[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 26 13:12:47 UTC 2019


 sw/source/uibase/uno/unotxdoc.cxx |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

New commits:
commit 97ff2b5fb8d3f6812c7d2f0a59d1accbff03c468
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Mar 25 16:35:40 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Mar 26 14:12:23 2019 +0100

    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 at cib.de>
    (cherry picked from commit 055480aac88e4688619e9a7815e0a8b0ab97a5a1)
    Reviewed-on: https://gerrit.libreoffice.org/69727
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 8ee3a4aa689c..f8b476133672 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2621,24 +2621,26 @@ 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"?
+
+            // there is some redundancy between those two function calls, but right now
+            // there is no time to sort this out.
+            //TODO: check what exactly needs to be done and make just one function for that
+            pViewShell->CalcLayout();
+            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();
 
-            // there is some redundancy between those two function calls, but right now
-            // there is no time to sort this out.
-            //TODO: check what exactly needs to be done and make just one function for that
-            pViewShell->CalcLayout();
-            pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
-
             pViewShell->SetPDFExportOption( false );
 
             // enable view again


More information about the Libreoffice-commits mailing list