[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - desktop/source
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri May 6 15:03:02 UTC 2016
desktop/source/lib/init.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit aadab5f4a72e38ccc8bbe9b7811d2cdcaa00124c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri May 6 11:01:42 2016 -0400
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 at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d043a2f..8742c49 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);
}
More information about the Libreoffice-commits
mailing list