- if ( !m_macPageSetupInfo )
- {
- m_macPageSetupInfo = (THPrint) NewHandleClear( sizeof( TPrint ) ) ;
- if ( m_macPageSetupInfo )
- {
- ::PrintDefault( m_macPageSetupInfo ) ;
- }
- }
- if ( m_macPageSetupInfo )
- {
- // on mac the paper rect has a negative top left corner, because the page rect (printable area) is at 0,0
- (**m_macPageSetupInfo).rPaper.left = int( ((double) m_minMarginTopLeft.x)*mm2pt ) ;
- (**m_macPageSetupInfo).rPaper.top = int( ((double) m_minMarginTopLeft.y)*mm2pt ) ;
-
- (**m_macPageSetupInfo).rPaper.right = int( ((double) m_paperSize.x - m_minMarginTopLeft.x)*mm2pt ) ;
- (**m_macPageSetupInfo).rPaper.bottom = int( ((double) m_paperSize.y - m_minMarginTopLeft.y)*mm2pt ) ;
-
- (**m_macPageSetupInfo).prInfo.rPage.left = 0 ;
- (**m_macPageSetupInfo).prInfo.rPage.top = 0 ;
- (**m_macPageSetupInfo).prInfo.rPage.right = int( ((double) m_paperSize.x - m_minMarginTopLeft.x - m_minMarginBottomRight.x)*mm2pt ) ;
- (**m_macPageSetupInfo).prInfo.rPage.bottom = int( ((double) m_paperSize.y - m_minMarginTopLeft.y - m_minMarginBottomRight.y)*mm2pt ) ;
-
- //TODO add custom fields in dialog for margins
-
- }
+ m_printData.ConvertToNative() ;
+ // on mac the paper rect has a negative top left corner, because the page rect (printable area) is at 0,0
+ (**m_printData.m_macPrintInfo).rPaper.left = int( ((double) m_minMarginTopLeft.x)*mm2pt ) ;
+ (**m_printData.m_macPrintInfo).rPaper.top = int( ((double) m_minMarginTopLeft.y)*mm2pt ) ;
+
+ (**m_printData.m_macPrintInfo).rPaper.right = int( ((double) m_paperSize.x - m_minMarginTopLeft.x)*mm2pt ) ;
+ (**m_printData.m_macPrintInfo).rPaper.bottom = int( ((double) m_paperSize.y - m_minMarginTopLeft.y)*mm2pt ) ;
+
+ (**m_printData.m_macPrintInfo).prInfo.rPage.left = 0 ;
+ (**m_printData.m_macPrintInfo).prInfo.rPage.top = 0 ;
+ (**m_printData.m_macPrintInfo).prInfo.rPage.right = int( ((double) m_paperSize.x - m_minMarginTopLeft.x - m_minMarginBottomRight.x)*mm2pt ) ;
+ (**m_printData.m_macPrintInfo).prInfo.rPage.bottom = int( ((double) m_paperSize.y - m_minMarginTopLeft.y - m_minMarginBottomRight.y)*mm2pt ) ;