diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-10-14 14:43:27 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-10-14 14:43:27 +0200 |
commit | f330de104e33e41150d46578e786d522aa1d3822 (patch) | |
tree | c0ff841eb8965f08f7e4c1395c98d3cadca0f23d /vcl/inc | |
parent | 230ae5e24da02822247a301d0582d0aaa722bf34 (diff) | |
parent | 039c16253801f3d2e3d446765863f406d633a6c9 (diff) |
CWS-TOOLING: integrate CWS pdfprint
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/cupsmgr.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/vcl/jobdata.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/vcl/pdfwriter.hxx | 27 | ||||
-rw-r--r-- | vcl/inc/vcl/print.hxx | 15 | ||||
-rw-r--r-- | vcl/inc/vcl/printerinfomanager.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/vcl/prntypes.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/vcl/svdata.hxx | 1 |
7 files changed, 45 insertions, 11 deletions
diff --git a/vcl/inc/cupsmgr.hxx b/vcl/inc/cupsmgr.hxx index b413184f477f..0250cece817e 100644 --- a/vcl/inc/cupsmgr.hxx +++ b/vcl/inc/cupsmgr.hxx @@ -70,7 +70,7 @@ class CUPSManager : public PrinterInfoManager virtual void initialize(); - void getOptionsFromDocumentSetup( const JobData& rJob, int& rNumOptions, void** rOptions ) const; + void getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner, int& rNumOptions, void** rOptions ) const; void runDests(); public: // public for stub @@ -84,7 +84,7 @@ public: const char* authenticateUser( const char* ); virtual FILE* startSpool( const rtl::OUString& rPrinterName, bool bQuickCommand ); - virtual int endSpool( const rtl::OUString& rPrinterName, const rtl::OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData ); + virtual int endSpool( const rtl::OUString& rPrinterName, const rtl::OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner ); virtual void setupJobContextData( JobData& rData ); // changes the info about a named printer diff --git a/vcl/inc/vcl/jobdata.hxx b/vcl/inc/vcl/jobdata.hxx index f576b816dab0..18330ae3508d 100644 --- a/vcl/inc/vcl/jobdata.hxx +++ b/vcl/inc/vcl/jobdata.hxx @@ -50,6 +50,7 @@ struct JobData int m_nColorDepth; int m_nPSLevel; // 0: no override, else languaglevel to use int m_nColorDevice; // 0: no override, -1 grey scale, +1 color + int m_nPDFDevice; // 0: PostScript, 1: PDF orientation::type m_eOrientation; ::rtl::OUString m_aPrinterName; const PPDParser* m_pParser; @@ -64,6 +65,7 @@ struct JobData m_nColorDepth( 24 ), m_nPSLevel( 0 ), m_nColorDevice( 0 ), + m_nPDFDevice( 0 ), m_eOrientation( orientation::Portrait ), m_pParser( NULL ) {} @@ -72,6 +74,8 @@ struct JobData JobData( const JobData& rData ) { *this = rData; } void setCollate( bool bCollate ); + bool setPaper( int nWidth, int nHeight ); // dimensions in pt + bool setPaperBin( int nPaperBin ); // dimensions in pt // creates a new buffer using new // it is up to the user to delete it again diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx index 419814e5ce97..27dbbfc80c72 100644 --- a/vcl/inc/vcl/pdfwriter.hxx +++ b/vcl/inc/vcl/pdfwriter.hxx @@ -47,6 +47,7 @@ class Font; class Point; class OutputDevice; +class GDIMetaFile; class MapMode; class Polygon; class LineInfo; @@ -61,6 +62,8 @@ class Wallpaper; namespace vcl { +class PDFExtOutDevData; + struct PDFDocInfo { String Title; // document title @@ -578,6 +581,8 @@ The following structure describes the permissions used in PDF security rtl::OUString UserPassword; // user password for PDF, in clear text com::sun::star::lang::Locale DocumentLocale; // defines the document default language + sal_uInt32 DPIx, DPIy; // how to handle MapMode( MAP_PIXEL ) + // 0 here specifies a default handling PDFWriterContext() : RelFsys( false ), //i56629, i49415?, i64585? @@ -606,7 +611,9 @@ The following structure describes the permissions used in PDF security OpenBookmarkLevels( -1 ), AccessPermissions( ), Encrypt( false ), - Security128bit( true ) + Security128bit( true ), + DPIx( 0 ), + DPIy( 0 ) {} }; @@ -635,6 +642,24 @@ The following structure describes the permissions used in PDF security returns the page id of the new page */ sal_Int32 NewPage( sal_Int32 nPageWidth = 0, sal_Int32 nPageHeight = 0, Orientation eOrientation = Inherit ); + /** Play a metafile like an outputdevice would do + */ + struct PlayMetafileContext + { + int m_nMaxImageResolution; + bool m_bOnlyLosslessCompression; + int m_nJPEGQuality; + bool m_bTransparenciesWereRemoved; + + PlayMetafileContext() + : m_nMaxImageResolution( 0 ) + , m_bOnlyLosslessCompression( false ) + , m_nJPEGQuality( 90 ) + , m_bTransparenciesWereRemoved( false ) + {} + + }; + void PlayMetafile( const GDIMetaFile&, const PlayMetafileContext&, vcl::PDFExtOutDevData* pDevDat = NULL ); /* * set document info; due to the use of document information in building the PDF document ID, must be called before diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index be7633f13d53..c389034d918f 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -514,21 +514,24 @@ public: bool isDirectPrint() const; // implementation details, not usable outside vcl - SAL_DLLPRIVATE int getFilteredPageCount(); + // don't use outside vcl. Some of these ar exported for + // the benefit of vcl's plugins. + // Still: DO NOT USE OUTSIDE VCL + int getFilteredPageCount(); SAL_DLLPRIVATE PageSize getPageFile( int i_inUnfilteredPage, GDIMetaFile& rMtf, bool i_bMayUseCache = false ); - SAL_DLLPRIVATE PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false ); + PageSize getFilteredPageFile( int i_nFilteredPage, GDIMetaFile& o_rMtf, bool i_bMayUseCache = false ); SAL_DLLPRIVATE void printFilteredPage( int i_nPage ); SAL_DLLPRIVATE void setPrinter( const boost::shared_ptr<Printer>& ); SAL_DLLPRIVATE void setOptionChangeHdl( const Link& ); - SAL_DLLPRIVATE void createProgressDialog(); - SAL_DLLPRIVATE bool isProgressCanceled() const; + void createProgressDialog(); + bool isProgressCanceled() const; SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& ); SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const; - SAL_DLLPRIVATE void setLastPage( sal_Bool i_bLastPage ); + void setLastPage( sal_Bool i_bLastPage ); SAL_DLLPRIVATE void setReversePrint( sal_Bool i_bReverse ); SAL_DLLPRIVATE bool getReversePrint() const; SAL_DLLPRIVATE void pushPropertiesToPrinter(); - SAL_DLLPRIVATE void setJobState( com::sun::star::view::PrintableState ); + void setJobState( com::sun::star::view::PrintableState ); SAL_DLLPRIVATE bool setupPrinter( Window* i_pDlgParent ); SAL_DLLPRIVATE int getPageCountProtected() const; diff --git a/vcl/inc/vcl/printerinfomanager.hxx b/vcl/inc/vcl/printerinfomanager.hxx index f03234db3268..5e94ed919a4e 100644 --- a/vcl/inc/vcl/printerinfomanager.hxx +++ b/vcl/inc/vcl/printerinfomanager.hxx @@ -219,8 +219,10 @@ public: // this may either be a regular file or the result of popen() virtual FILE* startSpool( const rtl::OUString& rPrinterName, bool bQuickCommand ); // close the FILE* returned by startSpool and does the actual spooling + // set bBanner to "false" will attempt to suppress banner printing + // set bBanner to "true" will rely on the system default // returns a numerical job id - virtual int endSpool( const rtl::OUString& rPrinterName, const rtl::OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData ); + virtual int endSpool( const rtl::OUString& rPrinterName, const rtl::OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner ); // for spadmin: whether adding or removing a printer is possible virtual bool addOrRemovePossible() const; diff --git a/vcl/inc/vcl/prntypes.hxx b/vcl/inc/vcl/prntypes.hxx index 6b2af991f2dd..244154360f3b 100644 --- a/vcl/inc/vcl/prntypes.hxx +++ b/vcl/inc/vcl/prntypes.hxx @@ -91,5 +91,6 @@ enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE }; #define PRINTER_CAPABILITIES_PDF ((USHORT)9) #define PRINTER_CAPABILITIES_EXTERNALDIALOG ((USHORT)10) #define PRINTER_CAPABILITIES_SETDUPLEX ((USHORT)11) +#define PRINTER_CAPABILITIES_USEPULLMODEL ((USHORT)12) #endif // _SV_PRNTYPES_HXX diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx index fe69b0c0b4d4..0d54a82a1937 100644 --- a/vcl/inc/vcl/svdata.hxx +++ b/vcl/inc/vcl/svdata.hxx @@ -208,7 +208,6 @@ struct ImplSVGDIData BOOL mbFontSubChanged; // TRUE: FontSubstitution wurde zwischen Begin/End geaendert utl::DefaultFontConfiguration* mpDefaultFontConfiguration; utl::FontSubstConfiguration* mpFontSubstConfiguration; - bool mbPrinterPullModel; // true: use pull model instead of normal push model when printing bool mbNativeFontConfig; // true: do not override UI font bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects }; |