diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-05-06 11:01:42 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2016-05-06 15:02:37 +0000 |
commit | aadab5f4a72e38ccc8bbe9b7811d2cdcaa00124c (patch) | |
tree | adbc5f4a3049a4efd96dd0ff9f497a26f87bd7f1 /desktop | |
parent | 7f6a0f656ddb2312c3d78091fce663a36ef6e1db (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>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d043a2f32f2c..8742c4996747 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1101,15 +1101,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); } |