From afb511b940e009e00fbb0b8358f454a293c44915 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Mon, 1 Aug 2022 16:06:11 +0200 Subject: lok: Dont render active text edit on slide previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - extend ITiledRenderable interface to pass active text edit drawing state to the SdXImpressDocument - when painting tiles - allow text edit only for current part - pass new setting also to SdrPaintView where painting happens Change-Id: Ib4ff226961a76129f4f5ff11c90694cd46a83a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137676 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138648 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- desktop/source/lib/init.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'desktop/source') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d5403e2deb6b..2f378ada3a6a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3662,8 +3662,20 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis, } } + ITiledRenderable* pDoc = getTiledRenderable(pThis); + if (!pDoc) + { + SetLastExceptionMsg("Document doesn't support tiled rendering"); + return; + } + + bool bPaintTextEdit = nPart == nOrigPart; + pDoc->setPaintTextEdit( bPaintTextEdit ); + doc_paintTile(pThis, pBuffer, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); + pDoc->setPaintTextEdit( true ); + if (!isText && nPart != nOrigPart) { doc_setPartImpl(pThis, nOrigPart, false); -- cgit