summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unotxdoc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index d880e4817506..2c81a20ce62f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -119,6 +119,7 @@
#include <drawdoc.hxx>
#include <SwStyleNameMapper.hxx>
#include <osl/file.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <unotools/saveopt.hxx>
@@ -3284,8 +3285,15 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
pDocShell->SetView(pView);
}
}
+
+ aViewOption.SetPostIts(comphelper::LibreOfficeKit::isTiledAnnotations());
pViewShell->ApplyViewOptions(aViewOption);
+ // position the pages again after setting view options. Eg: if postit
+ // rendering is false, then there would be no sidebar, so width of the
+ // document needs to be adjusted
+ pViewShell->GetLayout()->CheckViewLayout( pViewShell->GetViewOptions(), nullptr );
+
// Disable map mode, so that it's possible to send mouse event coordinates
// directly in twips.
SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();