Talk:Mac OS X Porting - Native Printing
From Apache OpenOffice Wiki
Contents
- 1 Notes on Printing pages
- 1.1 Star Writer printing related files and class
- 1.1.1 SwDocShell class - docsh.hxx, docsh.cxx, docsh2.cxx
- 1.1.2 SwDoc class - doc.hxx
- 1.1.3 SwPrtOptions class - prtopt.hxx
- 1.1.4 ViewShell class - viewsh.hxx, vprint.cxx
- 1.1.5 SwViewImp class - viewimp.hxx
- 1.1.6 SwPagePreview - pview.hxx
- 1.1.7 SwView ---> SfxViewShell - view.hxx
- 1.1.8 May be useful
- 1.1 Star Writer printing related files and class
Notes on Printing pages
These items might be useful but might not. I add them here just for further reference.
SwDocShell class - docsh.hxx, docsh.cxx, docsh2.cxx
The UI-related class SwDocShell contains :
- Printer *SwDocShell::GetDocumentPrinter() which returns an instance of printer associated to the SwDocShell instance.
- void SwDocShell::OnDocumentPrinterChanged( Printer * pNewPrinter ) which sets the JobSetup or the Printer of the Document associated with the shell using GetDoc()
SwDoc class - doc.hxx
- This class contains a SfxPrinter instance.
- void PrtDataChanged(); (used to update the class when modifying the print setup)
- /** IDocumentDeviceAccess */
virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const; virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ); virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const; virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ); virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const; virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewHiRes ); virtual const JobSetup* getJobsetup() const; virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ); virtual SwPrintData* getPrintData() const; virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData);
SwPrtOptions class - prtopt.hxx
Herits of SwPrintData, utl::ConfigItem Options set for OOo to know what to print.
ViewShell class - viewsh.hxx, vprint.cxx
// 1. GetRefDev: Either the printer or the virtual device from the doc // 2. GetWin: Available if we not printing // 3. GetOut: Printer, Window or Virtual device OutputDevice& GetRefDev() const; inline Window* GetWin() const { return pWin; } inline OutputDevice* GetOut() const { return pOut; }
- void InitPrt( SfxPrinter * , OutputDevice *pPDFOut = NULL );
- sal_Bool Prt( SwPrtOptions& rOptions, SfxProgress* pProgress, OutputDevice* pPDFOut = NULL );
- SwDoc * CreatePrtDoc( SfxPrinter* pPrt, SfxObjectShellRef& );
- SwDoc * FillPrtDoc( SwDoc* pPrtDoc, const SfxPrinter* pPrt );
- void PrintPreViewPage( SwPrtOptions& rOptions, sal_uInt16 nRowCol, SfxProgress& rProgress, const SwPagePreViewPrtData* = 0 ); NOT only for preview !!!
- void PrepareForPrint( const SwPrtOptions &rOptions );
SwViewImp class - viewimp.hxx
Only for print preview.
SwPagePreview - pview.hxx
Only for print preview.
SwView ---> SfxViewShell - view.hxx
- SfxPrinter* GetPrinter( BOOL bCreate = FALSE );
- PrintDialog* CreatePrintDialog( Window* pParent );
- SfxTabPage* CreatePrintOptionsPage( Window* pParent, const SfxItemSet& rSet);
- USHORT SetPrinter( SfxPrinter* pNew, USHORT nDiff = SFX_PRINTER_ALL);
- ErrCode DoPrint( SfxPrinter *pPrinter, PrintDialog *pPrintDialog, BOOL bSilent );
- ExecutePrint(SfxRequest&);
- static void MakeOptions( PrintDialog* pDlg, SwPrtOptions& rOpts, BOOL* pPrtProspect, BOOL bWeb, SfxPrinter* pPrt, SwPrintData* pData );
May be useful
- SwBaseShell - basesh.hxx
- SwDrawShell -> SwDrawBaseShell - drawsh.hxx
- SwDrawBaseShell - drwbassh.hxx
TODO : See where the graphic context is used...