summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-03-25 16:35:40 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-05-13 19:51:04 +0200
commitd5f31e430b0d7970df997beedb1938e3a85a2560 (patch)
tree7302ad7d9a64fdd48c8391b020583bb1fa8bf992
parent7d88468f3a877315fcaae85dc716e5207d62ff99 (diff)
tdf#124025 Update formula before printing
Reintroduce the UpdateFields call, but guard it so that it does not modify the doc (as it was before) Change-Id: I23e814f0b5d900d145dc82272034f03e66c079ed Reviewed-on: https://gerrit.libreoffice.org/69696 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 055480aac88e4688619e9a7815e0a8b0ab97a5a1)
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index b5d224209275..d2d512fd8c6f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2621,23 +2621,25 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
// since printing now also use the API for PDF export this option
// should be set for printing as well ...
pViewShell->SetPDFExportOption( true );
- bool bOrigStatus = pRenderDocShell->IsEnableSetModified();
- // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+
+ // tdf#122607 Re-layout the doc. Calling CalcLayout here is not enough, as it depends
+ // on the currently visible area which is 0 when doing headless conversion.
+ pViewShell->Reformat();
+ pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
+
+
+ // #122919# Force field update before PDF export, but after layout init (tdf#121962)
bool bStateChanged = false;
- if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
+ // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+ if ( pRenderDocShell->IsEnableSetModified() && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
{
pRenderDocShell->EnableSetModified( false );
bStateChanged = true;
}
-
+ pViewShell->SwViewShell::UpdateFields(true);
if( bStateChanged )
pRenderDocShell->EnableSetModified();
- // tdf#122607 Re-layout the doc. Calling CalcLayout here is not enough, as it depends
- // on the currently visible area which is 0 when doing headless conversion.
- pViewShell->Reformat();
- pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
-
pViewShell->SetPDFExportOption( false );
// enable view again