1*1d2dbeb0SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1d2dbeb0SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1d2dbeb0SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1d2dbeb0SAndrew Rist * distributed with this work for additional information 6*1d2dbeb0SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1d2dbeb0SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1d2dbeb0SAndrew Rist * "License"); you may not use this file except in compliance 9*1d2dbeb0SAndrew Rist * with the License. You may obtain a copy of the License at 10*1d2dbeb0SAndrew Rist * 11*1d2dbeb0SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*1d2dbeb0SAndrew Rist * 13*1d2dbeb0SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1d2dbeb0SAndrew Rist * software distributed under the License is distributed on an 15*1d2dbeb0SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1d2dbeb0SAndrew Rist * KIND, either express or implied. See the License for the 17*1d2dbeb0SAndrew Rist * specific language governing permissions and limitations 18*1d2dbeb0SAndrew Rist * under the License. 19*1d2dbeb0SAndrew Rist * 20*1d2dbeb0SAndrew Rist *************************************************************/ 21*1d2dbeb0SAndrew Rist 22*1d2dbeb0SAndrew Rist 23cdf0e10cSrcweir #ifndef SW_PRINTDATA_HXX 24cdf0e10cSrcweir #define SW_PRINTDATA_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sal/types.h> 28cdf0e10cSrcweir #include <rtl/ustring.hxx> 29cdf0e10cSrcweir #include <vcl/print.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <set> 32cdf0e10cSrcweir #include <map> 33cdf0e10cSrcweir #include <vector> 34cdf0e10cSrcweir #include <utility> 35cdf0e10cSrcweir 36cdf0e10cSrcweir class SwPageFrm; 37cdf0e10cSrcweir class SwDoc; 38cdf0e10cSrcweir class SwDocShell; 39cdf0e10cSrcweir class ViewShell; 40cdf0e10cSrcweir class _SetGetExpFlds; 41cdf0e10cSrcweir class SwViewOption; 42cdf0e10cSrcweir class OutputDevice; 43cdf0e10cSrcweir class SwViewOptionAdjust_Impl; 44cdf0e10cSrcweir class SwPrtOptions; 45cdf0e10cSrcweir class ViewShell; 46cdf0e10cSrcweir class SfxViewShell; 47cdf0e10cSrcweir 48cdf0e10cSrcweir // forward declarations 49cdf0e10cSrcweir class SwPrintUIOptions; 50cdf0e10cSrcweir class SwRenderData; 51cdf0e10cSrcweir 52cdf0e10cSrcweir //////////////////////////////////////////////////////////// 53cdf0e10cSrcweir 54cdf0e10cSrcweir 55cdf0e10cSrcweir class SwPrintData 56cdf0e10cSrcweir { 57cdf0e10cSrcweir const SwPrintUIOptions * m_pPrintUIOptions; // not owner 58cdf0e10cSrcweir const SwRenderData * m_pRenderData; // not owner 59cdf0e10cSrcweir 60cdf0e10cSrcweir public: 61cdf0e10cSrcweir 62cdf0e10cSrcweir sal_Bool bPrintGraphic, bPrintTable, bPrintDraw, bPrintControl, bPrintPageBackground, 63cdf0e10cSrcweir bPrintBlackFont, 64cdf0e10cSrcweir //#i81434# - printing of hidden text 65cdf0e10cSrcweir bPrintHiddenText, bPrintTextPlaceholder, 66cdf0e10cSrcweir bPrintLeftPages, bPrintRightPages, bPrintReverse, bPrintProspect, 67cdf0e10cSrcweir bPrintProspectRTL, 68cdf0e10cSrcweir bPrintSingleJobs, bPaperFromSetup, 69cdf0e10cSrcweir // --> FME 2005-12-13 #b6354161# Print empty pages 70cdf0e10cSrcweir bPrintEmptyPages, 71cdf0e10cSrcweir // <-- 72cdf0e10cSrcweir // #i56195# no field update while printing mail merge documents 73cdf0e10cSrcweir bUpdateFieldsInPrinting, 74cdf0e10cSrcweir bModified; 75cdf0e10cSrcweir 76cdf0e10cSrcweir sal_Int16 nPrintPostIts; 77cdf0e10cSrcweir rtl::OUString sFaxName; 78cdf0e10cSrcweir SwPrintData()79cdf0e10cSrcweir SwPrintData() 80cdf0e10cSrcweir { 81cdf0e10cSrcweir m_pPrintUIOptions = NULL; 82cdf0e10cSrcweir m_pRenderData = NULL; 83cdf0e10cSrcweir 84cdf0e10cSrcweir bPrintGraphic = 85cdf0e10cSrcweir bPrintTable = 86cdf0e10cSrcweir bPrintDraw = 87cdf0e10cSrcweir bPrintControl = 88cdf0e10cSrcweir bPrintLeftPages = 89cdf0e10cSrcweir bPrintRightPages = 90cdf0e10cSrcweir bPrintPageBackground = 91cdf0e10cSrcweir bPrintEmptyPages = 92cdf0e10cSrcweir bUpdateFieldsInPrinting = sal_True; 93cdf0e10cSrcweir 94cdf0e10cSrcweir bPaperFromSetup = 95cdf0e10cSrcweir bPrintReverse = 96cdf0e10cSrcweir bPrintProspect = 97cdf0e10cSrcweir bPrintProspectRTL = 98cdf0e10cSrcweir bPrintSingleJobs = 99cdf0e10cSrcweir bModified = 100cdf0e10cSrcweir bPrintBlackFont = 101cdf0e10cSrcweir bPrintHiddenText = 102cdf0e10cSrcweir bPrintTextPlaceholder = sal_False; 103cdf0e10cSrcweir 104cdf0e10cSrcweir nPrintPostIts = 0; 105cdf0e10cSrcweir } 106cdf0e10cSrcweir ~SwPrintData()107cdf0e10cSrcweir virtual ~SwPrintData() {} 108cdf0e10cSrcweir operator ==(const SwPrintData & rData) const109cdf0e10cSrcweir sal_Bool operator==(const SwPrintData& rData)const 110cdf0e10cSrcweir { 111cdf0e10cSrcweir return 112cdf0e10cSrcweir bPrintGraphic == rData.bPrintGraphic && 113cdf0e10cSrcweir bPrintTable == rData.bPrintTable && 114cdf0e10cSrcweir bPrintDraw == rData.bPrintDraw && 115cdf0e10cSrcweir bPrintControl == rData.bPrintControl && 116cdf0e10cSrcweir bPrintPageBackground== rData.bPrintPageBackground && 117cdf0e10cSrcweir bPrintBlackFont == rData.bPrintBlackFont && 118cdf0e10cSrcweir bPrintLeftPages == rData.bPrintLeftPages && 119cdf0e10cSrcweir bPrintRightPages == rData.bPrintRightPages && 120cdf0e10cSrcweir bPrintReverse == rData.bPrintReverse && 121cdf0e10cSrcweir bPrintProspect == rData.bPrintProspect && 122cdf0e10cSrcweir bPrintProspectRTL == rData.bPrintProspectRTL && 123cdf0e10cSrcweir bPrintSingleJobs == rData.bPrintSingleJobs && 124cdf0e10cSrcweir bPaperFromSetup == rData.bPaperFromSetup && 125cdf0e10cSrcweir bPrintEmptyPages == rData.bPrintEmptyPages && 126cdf0e10cSrcweir bUpdateFieldsInPrinting == rData.bUpdateFieldsInPrinting && 127cdf0e10cSrcweir nPrintPostIts == rData.nPrintPostIts && 128cdf0e10cSrcweir sFaxName == rData.sFaxName && 129cdf0e10cSrcweir bPrintHiddenText == rData.bPrintHiddenText && 130cdf0e10cSrcweir bPrintTextPlaceholder == rData.bPrintTextPlaceholder; 131cdf0e10cSrcweir } 132cdf0e10cSrcweir 133cdf0e10cSrcweir // Note: in the context where this class ist used the pointers should always be valid 134cdf0e10cSrcweir // during the lifetime of this object GetPrintUIOptions() const135cdf0e10cSrcweir const SwPrintUIOptions & GetPrintUIOptions() const { return *m_pPrintUIOptions; } GetRenderData() const136cdf0e10cSrcweir const SwRenderData & GetRenderData() const { return *m_pRenderData; } SetPrintUIOptions(const SwPrintUIOptions * pOpt)137cdf0e10cSrcweir void SetPrintUIOptions( const SwPrintUIOptions *pOpt ) { m_pPrintUIOptions = pOpt; } SetRenderData(const SwRenderData * pData)138cdf0e10cSrcweir void SetRenderData( const SwRenderData *pData ) { m_pRenderData = pData; } 139cdf0e10cSrcweir IsPrintGraphic() const140cdf0e10cSrcweir sal_Bool IsPrintGraphic() const { return bPrintGraphic; } IsPrintTable() const141cdf0e10cSrcweir sal_Bool IsPrintTable() const { return bPrintTable; } IsPrintDraw() const142cdf0e10cSrcweir sal_Bool IsPrintDraw() const { return bPrintDraw; } IsPrintControl() const143cdf0e10cSrcweir sal_Bool IsPrintControl() const { return bPrintControl; } IsPrintLeftPage() const144cdf0e10cSrcweir sal_Bool IsPrintLeftPage() const { return bPrintLeftPages; } IsPrintRightPage() const145cdf0e10cSrcweir sal_Bool IsPrintRightPage() const { return bPrintRightPages; } IsPrintReverse() const146cdf0e10cSrcweir sal_Bool IsPrintReverse() const { return bPrintReverse; } IsPaperFromSetup() const147cdf0e10cSrcweir sal_Bool IsPaperFromSetup() const { return bPaperFromSetup; } IsPrintEmptyPages() const148cdf0e10cSrcweir sal_Bool IsPrintEmptyPages() const { return bPrintEmptyPages; } IsPrintProspect() const149cdf0e10cSrcweir sal_Bool IsPrintProspect() const { return bPrintProspect; } IsPrintProspectRTL() const150cdf0e10cSrcweir sal_Bool IsPrintProspectRTL() const { return bPrintProspectRTL; } IsPrintPageBackground() const151cdf0e10cSrcweir sal_Bool IsPrintPageBackground() const { return bPrintPageBackground; } IsPrintBlackFont() const152cdf0e10cSrcweir sal_Bool IsPrintBlackFont() const { return bPrintBlackFont; } IsPrintSingleJobs() const153cdf0e10cSrcweir sal_Bool IsPrintSingleJobs() const { return bPrintSingleJobs; } GetPrintPostIts() const154cdf0e10cSrcweir sal_Int16 GetPrintPostIts() const { return nPrintPostIts; } GetFaxName() const155cdf0e10cSrcweir const rtl::OUString GetFaxName() const { return sFaxName; } IsPrintHiddenText() const156cdf0e10cSrcweir sal_Bool IsPrintHiddenText() const { return bPrintHiddenText; } IsPrintTextPlaceholder() const157cdf0e10cSrcweir sal_Bool IsPrintTextPlaceholder() const { return bPrintTextPlaceholder; } 158cdf0e10cSrcweir SetPrintGraphic(sal_Bool b)159cdf0e10cSrcweir void SetPrintGraphic( sal_Bool b ) { doSetModified(); bPrintGraphic = b; } SetPrintTable(sal_Bool b)160cdf0e10cSrcweir void SetPrintTable( sal_Bool b ) { doSetModified(); bPrintTable = b; } SetPrintDraw(sal_Bool b)161cdf0e10cSrcweir void SetPrintDraw( sal_Bool b ) { doSetModified(); bPrintDraw = b; } SetPrintControl(sal_Bool b)162cdf0e10cSrcweir void SetPrintControl( sal_Bool b ) { doSetModified(); bPrintControl = b; } SetPrintLeftPage(sal_Bool b)163cdf0e10cSrcweir void SetPrintLeftPage( sal_Bool b ) { doSetModified(); bPrintLeftPages = b; } SetPrintRightPage(sal_Bool b)164cdf0e10cSrcweir void SetPrintRightPage( sal_Bool b ) { doSetModified(); bPrintRightPages = b; } SetPrintReverse(sal_Bool b)165cdf0e10cSrcweir void SetPrintReverse( sal_Bool b ) { doSetModified(); bPrintReverse = b; } SetPaperFromSetup(sal_Bool b)166cdf0e10cSrcweir void SetPaperFromSetup( sal_Bool b ) { doSetModified(); bPaperFromSetup = b; } SetPrintEmptyPages(sal_Bool b)167cdf0e10cSrcweir void SetPrintEmptyPages( sal_Bool b ) { doSetModified(); bPrintEmptyPages = b; } SetPrintPostIts(sal_Int16 n)168cdf0e10cSrcweir void SetPrintPostIts( sal_Int16 n ) { doSetModified(); nPrintPostIts = n; } SetPrintProspect(sal_Bool b)169cdf0e10cSrcweir void SetPrintProspect( sal_Bool b ) { doSetModified(); bPrintProspect = b; } SetPrintProspect_RTL(sal_Bool b)170cdf0e10cSrcweir void SetPrintProspect_RTL( sal_Bool b ) { doSetModified(); bPrintProspectRTL = b; } SetPrintPageBackground(sal_Bool b)171cdf0e10cSrcweir void SetPrintPageBackground( sal_Bool b ) { doSetModified(); bPrintPageBackground = b; } SetPrintBlackFont(sal_Bool b)172cdf0e10cSrcweir void SetPrintBlackFont( sal_Bool b ) { doSetModified(); bPrintBlackFont = b; } SetPrintSingleJobs(sal_Bool b)173cdf0e10cSrcweir void SetPrintSingleJobs( sal_Bool b ) { doSetModified(); bPrintSingleJobs = b; } SetFaxName(const rtl::OUString & rSet)174cdf0e10cSrcweir void SetFaxName( const rtl::OUString& rSet ) { sFaxName = rSet; } SetPrintHiddenText(sal_Bool b)175cdf0e10cSrcweir void SetPrintHiddenText( sal_Bool b ) { doSetModified(); bPrintHiddenText = b; } SetPrintTextPlaceholder(sal_Bool b)176cdf0e10cSrcweir void SetPrintTextPlaceholder( sal_Bool b ) { doSetModified(); bPrintTextPlaceholder = b; } 177cdf0e10cSrcweir doSetModified()178cdf0e10cSrcweir virtual void doSetModified () { bModified = sal_True;} 179cdf0e10cSrcweir }; 180cdf0e10cSrcweir 181cdf0e10cSrcweir 182cdf0e10cSrcweir //////////////////////////////////////////////////////////// 183cdf0e10cSrcweir 184cdf0e10cSrcweir 185cdf0e10cSrcweir class SwPrintUIOptions : public vcl::PrinterOptionsHelper 186cdf0e10cSrcweir { 187cdf0e10cSrcweir OutputDevice* m_pLast; 188cdf0e10cSrcweir const SwPrintData & m_rDefaultPrintData; 189cdf0e10cSrcweir 190cdf0e10cSrcweir public: 191cdf0e10cSrcweir SwPrintUIOptions( bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData ); 192cdf0e10cSrcweir virtual ~SwPrintUIOptions(); 193cdf0e10cSrcweir 194cdf0e10cSrcweir bool processPropertiesAndCheckFormat( const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& i_rNewProp ); 195cdf0e10cSrcweir IsPrintFormControls() const196cdf0e10cSrcweir bool IsPrintFormControls() const { return getBoolValue( "PrintControls", m_rDefaultPrintData.bPrintControl ); } IsPrintPageBackground() const197cdf0e10cSrcweir bool IsPrintPageBackground() const { return getBoolValue( "PrintPageBackground", m_rDefaultPrintData.bPrintPageBackground ); } IsPrintProspect() const198cdf0e10cSrcweir bool IsPrintProspect() const { return getBoolValue( "PrintProspect", m_rDefaultPrintData.bPrintProspect ); } IsPrintProspectRTL() const199cdf0e10cSrcweir bool IsPrintProspectRTL() const { return getIntValue( "PrintProspectRTL", m_rDefaultPrintData.bPrintProspectRTL ) ? true : false; } IsPrintTextPlaceholders() const200cdf0e10cSrcweir bool IsPrintTextPlaceholders() const { return getBoolValue( "PrintTextPlaceholder", m_rDefaultPrintData.bPrintTextPlaceholder ); } IsPrintHiddenText() const201cdf0e10cSrcweir bool IsPrintHiddenText() const { return getBoolValue( "PrintHiddenText", m_rDefaultPrintData.bPrintHiddenText ); } IsPrintWithBlackTextColor() const202cdf0e10cSrcweir bool IsPrintWithBlackTextColor() const { return getBoolValue( "PrintBlackFonts", m_rDefaultPrintData.bPrintBlackFont ); } GetPrintPostItsType() const203cdf0e10cSrcweir sal_Int16 GetPrintPostItsType() const { return static_cast< sal_Int16 >(getIntValue( "PrintAnnotationMode", m_rDefaultPrintData.nPrintPostIts )); } IsPaperFromSetup() const204cdf0e10cSrcweir bool IsPaperFromSetup() const { return getBoolValue( "PrintPaperFromSetup", m_rDefaultPrintData.bPaperFromSetup ); } IsPrintReverse() const205cdf0e10cSrcweir bool IsPrintReverse() const { return false; /*handled by print dialog now*/ /*getBoolValue( "PrintReversed", m_rDefaultPrintData.bPrintReverse );*/ } 206cdf0e10cSrcweir 207cdf0e10cSrcweir bool IsPrintLeftPages() const; 208cdf0e10cSrcweir bool IsPrintRightPages() const; 209cdf0e10cSrcweir bool IsPrintEmptyPages( bool bIsPDFExport ) const; 210cdf0e10cSrcweir bool IsPrintTables() const; 211cdf0e10cSrcweir bool IsPrintGraphics() const; 212cdf0e10cSrcweir bool IsPrintDrawings() const; 213cdf0e10cSrcweir }; 214cdf0e10cSrcweir 215cdf0e10cSrcweir 216cdf0e10cSrcweir //////////////////////////////////////////////////////////// 217cdf0e10cSrcweir 218cdf0e10cSrcweir // A class that stores temporary data that is needed for rendering the document. 219cdf0e10cSrcweir // Usually this data is created when 'getRendererCount' is called and 220cdf0e10cSrcweir // and it is used in the 'render' function of that same interface 221cdf0e10cSrcweir class SwRenderData 222cdf0e10cSrcweir { 223cdf0e10cSrcweir // pages valid for printing (according to the current settings) 224cdf0e10cSrcweir // and their respective start frames (see getRendererCount in unotxdoc.cxx) 225cdf0e10cSrcweir // This set of pages does NOT depend on the 'PageRange' that is used as a printing option! 226cdf0e10cSrcweir std::set< sal_Int32 > m_aValidPages; // the set of possible pages (see StringRangeEnumerator::getRangesFromString ) 227cdf0e10cSrcweir std::map< sal_Int32, const SwPageFrm * > m_aValidStartFrames; // the map of start frames for those pages 228cdf0e10cSrcweir 229cdf0e10cSrcweir // printer paper tray to use for each of the m_aValidPages above 230cdf0e10cSrcweir std::map< sal_Int32, sal_Int32 > m_aPrinterPaperTrays; 231cdf0e10cSrcweir 232cdf0e10cSrcweir // vector of pages and their order to be printed (duplicates and any order allowed!) 233cdf0e10cSrcweir // (see 'render' in unotxdoc.cxx) 234cdf0e10cSrcweir std::vector< sal_Int32 > m_aPagesToPrint; 235cdf0e10cSrcweir 236cdf0e10cSrcweir std::vector< const SwPageFrm * > m_aPostItStartFrames; 237cdf0e10cSrcweir 238cdf0e10cSrcweir // for prospect printing: the pairs of pages to be printed together on a single prospect page. 239cdf0e10cSrcweir // -1 indicates a half page to be left empty. 240cdf0e10cSrcweir std::vector< std::pair< sal_Int32, sal_Int32 > > m_aPagePairs; 241cdf0e10cSrcweir 242cdf0e10cSrcweir rtl::OUString m_aPageRange; 243cdf0e10cSrcweir 244cdf0e10cSrcweir // the view options to be applied for printing 245cdf0e10cSrcweir SwViewOptionAdjust_Impl * m_pViewOptionAdjust; 246cdf0e10cSrcweir 247cdf0e10cSrcweir SwPrintData * m_pPrtOptions; 248cdf0e10cSrcweir 249cdf0e10cSrcweir public: 250cdf0e10cSrcweir 251cdf0e10cSrcweir // PostIt relevant data 252cdf0e10cSrcweir _SetGetExpFlds * m_pPostItFields; // an array of "_SetGetExpFld *" sorted by page and line numbers 253cdf0e10cSrcweir SwDoc * m_pPostItDoc; 254cdf0e10cSrcweir ViewShell * m_pPostItShell; 255cdf0e10cSrcweir 256cdf0e10cSrcweir public: 257cdf0e10cSrcweir SwRenderData(); 258cdf0e10cSrcweir ~SwRenderData(); 259cdf0e10cSrcweir 260cdf0e10cSrcweir HasPostItData() const261cdf0e10cSrcweir bool HasPostItData() const { return m_pPostItShell != 0 && m_pPostItDoc != 0 && m_pPostItShell != 0; } 262cdf0e10cSrcweir void CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev ); 263cdf0e10cSrcweir void DeletePostItData(); 264cdf0e10cSrcweir IsViewOptionAdjust() const265cdf0e10cSrcweir bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; } 266cdf0e10cSrcweir bool NeedNewViewOptionAdjust( const ViewShell& ) const; 267cdf0e10cSrcweir void ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rViewOptions ); 268cdf0e10cSrcweir void ViewOptionAdjust( SwPrintData const* const pPrtOptions ); 269cdf0e10cSrcweir void ViewOptionAdjustStop(); 270cdf0e10cSrcweir HasSwPrtOptions() const271cdf0e10cSrcweir bool HasSwPrtOptions() const { return m_pPrtOptions != 0; } SetSwPrtOptions(SwPrintData * const pOpt)272cdf0e10cSrcweir void SetSwPrtOptions(SwPrintData *const pOpt) { m_pPrtOptions = pOpt; } GetSwPrtOptions() const273cdf0e10cSrcweir SwPrintData const* GetSwPrtOptions() const { return m_pPrtOptions; } GetSwPrtOptionsRef()274cdf0e10cSrcweir SwPrintData & GetSwPrtOptionsRef() { return *m_pPrtOptions; } 275cdf0e10cSrcweir void MakeSwPrtOptions( SwPrintData & rOptions, const SwDocShell *pDocShell, 276cdf0e10cSrcweir const SwPrintUIOptions *pOpt, const SwRenderData *pData, bool bIsPDFExport ); 277cdf0e10cSrcweir 278cdf0e10cSrcweir 279cdf0e10cSrcweir typedef std::map< sal_Int32, const SwPageFrm * > ValidStartFramesMap_t; 280cdf0e10cSrcweir typedef std::vector< std::pair< sal_Int32, sal_Int32 > > PagePairsVec_t; 281cdf0e10cSrcweir GetValidPagesSet()282cdf0e10cSrcweir std::set< sal_Int32 > & GetValidPagesSet() { return m_aValidPages; } GetValidPagesSet() const283cdf0e10cSrcweir const std::set< sal_Int32 > & GetValidPagesSet() const { return m_aValidPages; } GetValidStartFrames()284cdf0e10cSrcweir ValidStartFramesMap_t & GetValidStartFrames() { return m_aValidStartFrames; } GetValidStartFrames() const285cdf0e10cSrcweir const ValidStartFramesMap_t & GetValidStartFrames() const { return m_aValidStartFrames; } 286cdf0e10cSrcweir 287cdf0e10cSrcweir // a map for printer paper tray numbers to use for each document page 288cdf0e10cSrcweir // a value of -1 for the tray means that there is no specific tray defined GetPrinterPaperTrays()289cdf0e10cSrcweir std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() { return m_aPrinterPaperTrays; } GetPrinterPaperTrays() const290cdf0e10cSrcweir const std::map< sal_Int32, sal_Int32 >& GetPrinterPaperTrays() const { return m_aPrinterPaperTrays; } 291cdf0e10cSrcweir 292cdf0e10cSrcweir // used for 'normal' printing 293cdf0e10cSrcweir // A page value of 0 as entry indicates that this page is not from the document but 294cdf0e10cSrcweir // from the post-it document. (See also GetPostItStartFrame below) GetPagesToPrint()295cdf0e10cSrcweir std::vector< sal_Int32 > & GetPagesToPrint() { return m_aPagesToPrint; } GetPagesToPrint() const296cdf0e10cSrcweir const std::vector< sal_Int32 > & GetPagesToPrint() const { return m_aPagesToPrint; } 297cdf0e10cSrcweir 298cdf0e10cSrcweir // used for 'normal' printing with post-its 299cdf0e10cSrcweir // - if the map entry will be NULL then the respective page to be printed is from 300cdf0e10cSrcweir // the document. In that case use the value from GetPagesToPrint at the same index to 301cdf0e10cSrcweir // get the phys. page number to be printed, and then retrieve the start frame to use 302cdf0e10cSrcweir // from GetValidStartFrms. 303cdf0e10cSrcweir // - If the entry is not NULL it is the start frame of the page from the post-it document 304cdf0e10cSrcweir // that is to be printed GetPostItStartFrames()305cdf0e10cSrcweir std::vector< const SwPageFrm * > & GetPostItStartFrames() { return m_aPostItStartFrames; } GetPostItStartFrames() const306cdf0e10cSrcweir const std::vector< const SwPageFrm * > & GetPostItStartFrames() const { return m_aPostItStartFrames; } 307cdf0e10cSrcweir 308cdf0e10cSrcweir // used for prospect printing only GetPagePairsForProspectPrinting()309cdf0e10cSrcweir PagePairsVec_t & GetPagePairsForProspectPrinting() { return m_aPagePairs; } GetPagePairsForProspectPrinting() const310cdf0e10cSrcweir const PagePairsVec_t & GetPagePairsForProspectPrinting() const { return m_aPagePairs; } 311cdf0e10cSrcweir GetPageRange() const312cdf0e10cSrcweir rtl::OUString GetPageRange() const { return m_aPageRange; } SetPageRange(const rtl::OUString & rRange)313cdf0e10cSrcweir void SetPageRange( const rtl::OUString &rRange ) { m_aPageRange = rRange; } 314cdf0e10cSrcweir }; 315cdf0e10cSrcweir 316cdf0e10cSrcweir 317cdf0e10cSrcweir //////////////////////////////////////////////////////////// 318cdf0e10cSrcweir 319cdf0e10cSrcweir // last remnants of swprtopt.hxx: 320cdf0e10cSrcweir 321cdf0e10cSrcweir #define POSTITS_NONE 0 322cdf0e10cSrcweir #define POSTITS_ONLY 1 323cdf0e10cSrcweir #define POSTITS_ENDDOC 2 324cdf0e10cSrcweir #define POSTITS_ENDPAGE 3 325cdf0e10cSrcweir 326cdf0e10cSrcweir namespace sw { 327cdf0e10cSrcweir 328cdf0e10cSrcweir void InitPrintOptionsFromApplication(SwPrintData & o_rData, bool const bWeb); 329cdf0e10cSrcweir 330cdf0e10cSrcweir } // namespace sw 331cdf0e10cSrcweir 332cdf0e10cSrcweir #endif // SW_PRINTDATA_HXX 333