diff options
author | Daniel <danielfaleirosilva@gmail.com> | 2018-05-01 16:22:33 -0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-05-07 01:11:11 +0200 |
commit | 08441d466dd70c203a519a133aaf1a5997adbbd3 (patch) | |
tree | 660684776a5bf6361fb26e28bdd2043962d66277 /sw/source | |
parent | 6a8ae73b4c23ec80f97bcafd8b9a5e8f14b2abc7 (diff) |
tdf#113866 print text in black print option doest not affect PDF export
Change-Id: Ie328e3a8246e1c2c818af1b9cc4d59e2e711a041
Reviewed-on: https://gerrit.libreoffice.org/53716
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/view/vprint.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 2 |
2 files changed, 8 insertions, 7 deletions
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# |