summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-02-07 11:17:21 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-02-12 09:13:58 +0100
commite41b09d0126ecb28cff277c9b4b40eae7cc7c3f4 (patch)
treef1664189feae1930cd817d1ad9e539e52ab8d4dc /sw/source/uibase/uno
parentfe2e315e21ccc53c2b15e1b2648001b638e13d58 (diff)
tdf#122607 Fix layout invalidation in headless mode
Layout was not invalidated correctly since the visible area is 0 in headless mode. So just reformat the whole doc when doing the pdf conversion headless. An attempt to fix this was already made with commit 1ecca673b40fedc53db125e332b087d1c120a254 but that didn't cover all cases. Change-Id: I3f620b2f2db2c4a6e5bf279b33e5c93697e4e2d4 Reviewed-on: https://gerrit.libreoffice.org/67417 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 70c4647fd3ab..934072fd0cf9 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -2640,6 +2640,9 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
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() );
// #122919# Force field update before PDF export, but after layout init (tdf#121962)