diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index e0ef02b2c4b6..1762c097201f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1908,7 +1908,8 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex // draw - works in logic coordinates Paint(rDevice, aOutRect); - if (SwPostItMgr* pPostItMgr = GetPostItMgr()) + SwPostItMgr* pPostItMgr = GetPostItMgr(); + if (GetViewOptions()->IsPostIts() && pPostItMgr) pPostItMgr->PaintTile(rDevice, aOutRect); // SwViewShell's output device tear down 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(); |