summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-06-29 14:58:57 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2020-07-01 17:09:42 +0200
commit3bd01dc22c18acbca14b52bb982e7effd5a2b8a8 (patch)
treefa6ee493d604f6d557bf67d3e2730cfd74d9774d
parent884cf2aef3a46c269243d6dbe08356ad831e956d (diff)
tdf#130151 Fix toc pointing to wrong page
Change-Id: I26c1027722613f751bd39fde97f1e14d3238eefa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97413 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins (cherry picked from commit 63f3485b57904de4e77c04f5759e6563fcce6748) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97504 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 1fb4ce3713be..b65386a7c392 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2583,8 +2583,6 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
// 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;
@@ -2598,6 +2596,8 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
if( bStateChanged )
pRenderDocShell->EnableSetModified();
+ pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
+
pViewShell->SetPDFExportOption( false );
// enable view again