diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/viewsh.hxx | 5 | ||||
-rw-r--r-- | sw/source/core/view/vprint.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index afe420ac43be..1996cce7f40e 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -162,7 +162,7 @@ class SW_DLLPUBLIC SwViewShell : public sw::Ring<SwViewShell> SAL_DLLPRIVATE bool CheckInvalidForPaint( const SwRect & ); // Direct Paint or rather // trigger an action. - SAL_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions ); + SAL_DLLPRIVATE void PrepareForPrint( const SwPrintData &rOptions, bool bIsPDFExport = false ); SAL_DLLPRIVATE void ImplApplyViewOptions( const SwViewOption &rOpt ); @@ -346,7 +346,8 @@ public: // bIsPDFExport == true is: do PDF Export (no printing!) bool PrintOrPDFExport( OutputDevice *pOutDev, SwPrintData const& rPrintData, - sal_Int32 nRenderer /* offset in vector of pages to print */ ); + sal_Int32 nRenderer, /* offset in vector of pages to print */ + bool bIsPDFExport ); // Printing of one brochure page. void PrintProspect( OutputDevice *pOutDev, const SwPrintData &rPrintData, diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 42afa4f016b8..96f94a03a4a8 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -445,7 +445,8 @@ sw_getPage(SwRootFrame const& rLayout, sal_Int32 const nPage) bool SwViewShell::PrintOrPDFExport( OutputDevice *pOutDev, SwPrintData const& rPrintData, - sal_Int32 nRenderer /* the index in the vector of pages to be printed */ ) + sal_Int32 nRenderer, /* the index in the vector of pages to be printed */ + bool bIsPDFExport ) { // CAUTION: Do also always update the printing routines in viewpg.cxx (PrintProspect)! @@ -510,8 +511,7 @@ bool SwViewShell::PrintOrPDFExport( // save options at draw view: SwDrawViewSave aDrawViewSave( pShell->GetDrawView() ); - - pShell->PrepareForPrint( rPrintData ); + pShell->PrepareForPrint( rPrintData, bIsPDFExport ); const sal_Int32 nPage = rPrintData.GetRenderData().GetPagesToPrint()[ nRenderer ]; OSL_ENSURE( nPage < 0 || @@ -683,14 +683,15 @@ SwDrawViewSave::~SwDrawViewSave() } // OD 09.01.2003 #i6467# - method also called for page preview -void SwViewShell::PrepareForPrint( const SwPrintData &rOptions ) +void SwViewShell::PrepareForPrint( const SwPrintData &rOptions, bool bIsPDFExport ) { mpOpt->SetGraphic ( rOptions.m_bPrintGraphic ); mpOpt->SetTable ( rOptions.m_bPrintTable ); - mpOpt->SetDraw ( rOptions.m_bPrintDraw ); + mpOpt->SetDraw ( rOptions.m_bPrintDraw ); mpOpt->SetControl ( rOptions.m_bPrintControl ); mpOpt->SetPageBack ( rOptions.m_bPrintPageBackground ); - mpOpt->SetBlackFont( rOptions.m_bPrintBlackFont ); + // Font should not be balck if it's a PDF Export + mpOpt->SetBlackFont( rOptions.m_bPrintBlackFont && !bIsPDFExport ); if ( HasDrawView() ) { diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index ee6165166310..0a22921c96e6 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3058,7 +3058,7 @@ void SAL_CALL SwXTextDocument::render( if (bPrintProspect) pVwSh->PrintProspect( pOut, rSwPrtOptions, nRenderer ); else // normal printing and PDF export - pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer ); + pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer, bIsPDFExport ); // #i35176# |