shiva prasad wrote: > Hi, > Can any one explain the flow, when we click the print option > on openoffice.org "writer" till it prints on the printer, code level.
As you seem to ask for the code that actually prints something, I assume that "print option" shall mean that you want to see the code that is executed if the "print" button ic clicked, right? There's quite a lot of code involved. The print request first is handled in sfx2/source/view/viewprn.cxx as part of the Dispatch Framework. Here parameters and options are collected and then passed to the currently active view of the document by calling the virtual method SfxViewShell::DoPrint that itself sooner or later ends up in the also virtual method SfxViewShell::Print. These methods are overwritten in the particular application, in case of Writer its code in sw/source/ui/uiview. The application will send its output to an instance of the vcl class "Printer". In all cases I know, the code to handle that is in a core document class that will be called from the particular SfxViewShell instance of the application. At best you can follow the flow of operation in a debugger. In Writer you should compile the following code with debug information: sfx2/source/view sw/source/ui/uiview sw/source/ui/app sw/source/core/view sw/source/core/doc The code in vcl that sends the ooutput to the printer is not mentioned here, it's also platform dependent. IIRC having vcl/source/gdi and the "gdi" folder in the platform dependent part of VCL compiled with debug should be enough, but I'm not completely sure. You will not need all files in the mentioned folders to be compiled with debug for printing, but it's easier to prepare them all instead of finding out which one of them might not be needed. Regards, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "[email protected]". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
