summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-03-17 12:21:34 +0100
committerJan Holesovsky <kendy@collabora.com>2017-03-17 12:27:07 +0100
commit9eb05864a2262e841aff2bbf7d0825c9b326efa5 (patch)
treeac82d8e92662e52285d060a97ec5b1a0c44a881a
parentafe8ca1ee3b5b291645c7845e844138652c53d6c (diff)
lok: It's not that important to skip some of the messages.
More important is always to perform the paint. Change-Id: I392dd6cea4a5f43a646fca04d284b365b5fb5b78
-rw-r--r--desktop/source/lib/init.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 936ca6b554a0..fde12fcdf63a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1824,17 +1824,16 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
// Disable callbacks while we are painting.
LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
- int nView = SfxLokHelper::getView();
- if (nView < 0)
- return;
+ const int nOrigViewId = doc_getView(pThis);
+
+ if (nOrigViewId >= 0)
+ pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(true);
- pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(true);
try
{
// Text documents have a single coordinate system; don't change part.
int nOrigPart = 0;
const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
- int nOrigViewId = doc_getView(pThis);
int nViewId = nOrigViewId;
if (!isText)
{
@@ -1878,7 +1877,8 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
// Nothing to do but restore the PartTilePainting flag.
}
- pDocument->mpCallbackFlushHandlers[nView]->setPartTilePainting(false);
+ if (nOrigViewId >= 0)
+ pDocument->mpCallbackFlushHandlers[nOrigViewId]->setPartTilePainting(false);
}
static int doc_getTileMode(LibreOfficeKitDocument* /*pThis*/)