diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-01-23 21:53:49 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-17 16:48:39 +0100 |
commit | 574dd40ae6ef9aff39b363c1969f37ba23768478 (patch) | |
tree | 85dcd132966d7c8efe6b57788a65a1a7ef28e2ac /sw | |
parent | d9c5659d9bcc9fca7eb5f090c314bf106c672a96 (diff) |
lok: New feature flag to turn off tiled annotations
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0
Reviewed-on: https://gerrit.libreoffice.org/33472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 75d8b305bbc1c2377f23361ecd64816a350baa4c)
Diffstat (limited to 'sw')
-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 9d94244d7729..8e05c85e7653 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1890,7 +1890,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 a65616a54d87..3cfaa2a497a7 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> @@ -3292,8 +3293,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(); |