summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-05-06 11:01:42 -0400
committerJan Holesovsky <kendy@collabora.com>2016-05-09 13:58:29 +0200
commit755827016d0fffaffd155806c378b5d972ac9016 (patch)
tree97d9d4e32ff5ac41b328675b5ab4457d3977f6b5 /desktop
parent70e8e788beb122b5779693ecece8f65e27192256 (diff)
Don't change part on text documents to paint tiles
Change-Id: Icb5fb46cbc9d2f72c814cf9f1f166382493d403f Reviewed-on: https://gerrit.libreoffice.org/24702 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit aadab5f4a72e38ccc8bbe9b7811d2cdcaa00124c)
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ed48935a7b19..460157b8881f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1052,15 +1052,21 @@ void doc_paintPartTile(LibreOfficeKitDocument* pThis,
pDocument->mpCallbackFlushHandler->setPartTilePainting(true);
try
{
- const int nOrigPart = doc_getPart(pThis);
- if (nPart != nOrigPart)
+ // Text documents have a single coordinate system; don't change part.
+ int nOrigPart = 0;
+ const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
+ if (!isText)
{
- doc_setPart(pThis, nPart);
+ nOrigPart = doc_getPart(pThis);
+ if (nPart != nOrigPart)
+ {
+ doc_setPart(pThis, nPart);
+ }
}
doc_paintTile(pThis, pBuffer, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
- if (nPart != nOrigPart)
+ if (!isText && nPart != nOrigPart)
{
doc_setPart(pThis, nOrigPart);
}