summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-04 10:56:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-04 14:34:57 +0200
commit59e38e946f19ab59370f8e52370b7a7b861cc558 (patch)
tree6f8dc52f6951996fa25a5f229f8b65f7b5fcc916 /sw/source
parentac9373e65ed7908a19edc6f5c758af9b8232820b (diff)
comphelper: move setTiledPainting() from SfxViewShell
And make it a static one. The primary point of that member function is to prevent invalidations during paint, and since multiple views are allowed, it wasn't extended to filter out invalidations from all views, not just from the current one. (Same goes for other callback types.) Change-Id: I23e6b2c2ff94227f2b72c481148b2d8279ae2905
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx6
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx6
3 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 64b6f7b6b979..3f62822018b0 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1842,7 +1842,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// TODO clean up SwViewShell's approach to output devices (the many of
// them - mpBufferedOut, mpOut, mpWin, ...)
OutputDevice *pSaveOut = mpOut;
- GetSfxViewShell()->setTiledPainting(true);
+ comphelper::LibreOfficeKit::setTiledPainting(true);
mpOut = &rDevice;
// resizes the virtual device so to contain the entries context
@@ -1895,7 +1895,7 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// SwViewShell's output device tear down
mpOut = pSaveOut;
- GetSfxViewShell()->setTiledPainting(false);
+ comphelper::LibreOfficeKit::setTiledPainting(false);
}
void SwViewShell::SetBrowseBorder( const Size& rNew )
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 2b8f5eeae3b7..962755d3ea51 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -735,13 +735,13 @@ void SwPostItMgr::LayoutPostIts()
// view that has the comment focus emits callbacks,
// so the editing view jumps to the comment, but
// not the others.
- bool bTiledPainting = mpView->getTiledPainting();
+ bool bTiledPainting = comphelper::LibreOfficeKit::isTiledPainting();
if (!bTiledPainting)
// No focus -> disable callbacks.
- mpView->setTiledPainting(!(*i)->HasChildPathFocus());
+ comphelper::LibreOfficeKit::setTiledPainting(!(*i)->HasChildPathFocus());
(*i)->ShowNote();
if (!bTiledPainting)
- mpView->setTiledPainting(bTiledPainting);
+ comphelper::LibreOfficeKit::setTiledPainting(bTiledPainting);
}
else
{
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 0b144e9e1ab8..c1560832a43d 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -1263,11 +1263,11 @@ void SwSidebarWin::DeactivatePostIt()
// Make sure this view doesn't emit LOK callbacks during the update, as the
// sidebar window's SidebarTextControl doesn't have a valid twip offset
// (map mode origin) during that operation.
- bool bTiledPainting = mrView.getTiledPainting();
- mrView.setTiledPainting(true);
+ bool bTiledPainting = comphelper::LibreOfficeKit::isTiledPainting();
+ comphelper::LibreOfficeKit::setTiledPainting(true);
// write the visible text back into the SwField
UpdateData();
- mrView.setTiledPainting(bTiledPainting);
+ comphelper::LibreOfficeKit::setTiledPainting(bTiledPainting);
if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
GetOutlinerView()->SetBackgroundColor(COL_TRANSPARENT);