drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit c405ffbf57dc956b8f387c42f0f89a8c1b1596ab Author: Mohit Marathe <[email protected]> AuthorDate: Fri Jan 23 11:13:25 2026 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Fri Jan 23 15:02:00 2026 +0100 drawinglayer: suppress text for all views if text edit is active in any view This fixes the duplicated text issue for a user who sees text from both drawinglayer and EditEngine overlay. Using `isTiledPainting()` in place of `isActive()` does not interfere with SVG export of text (and bullet) content so the Cypress test passes. See 316c33628e67b41c69796c1af69b21f8d6c205c4 which mentions the failed cypress test in online.git Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I73ae74795b34729d570ad7a7be830085787ca5c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197909 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx index d0a69ad9a336..f8f9051cc279 100644 --- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx @@ -147,8 +147,15 @@ namespace drawinglayer::primitive2d const geometry::ViewInformation2D& rViewInformation) const { // check if TextEdit is active. If not, process. If yes, suppress the content + // lok case: if TextEdit is active in view, suppress text in all views. + // use `isTiledPainting()` instead of a more generic `isActive()` so that it + // does not suppress text for SVG exports + bool bSuppress = rViewInformation.getTextEditActive() + || (comphelper::LibreOfficeKit::isTiledPainting()); // lok case: always decompose it when we're rendering a slide show - if (!rViewInformation.getTextEditActive() || comphelper::LibreOfficeKit::isSlideshowRendering()) + if (comphelper::LibreOfficeKit::isSlideshowRendering()) + bSuppress = false; + if (!bSuppress) GroupPrimitive2D::get2DDecomposition(rVisitor, rViewInformation); }
