drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx | 6 +++++- svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx | 11 +---------- 2 files changed, 6 insertions(+), 11 deletions(-)
New commits: commit ab8d96e6ad10879bca2156b370c35191d86f3aee Author: Mohit Marathe <[email protected]> AuthorDate: Fri Jan 23 11:13:25 2026 +0530 Commit: Michael Stahl <[email protected]> CommitDate: Fri Jan 23 18:21:41 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]> (cherry picked from commit c405ffbf57dc956b8f387c42f0f89a8c1b1596ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197955 Tested-by: Michael Stahl <[email protected]> diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx index f99268bad576..f8f9051cc279 100644 --- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx @@ -147,8 +147,12 @@ 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 - bool bSuppress = rViewInformation.getTextEditActive() || comphelper::LibreOfficeKit::isActive(); if (comphelper::LibreOfficeKit::isSlideshowRendering()) bSuppress = false; if (!bSuppress) diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 6a1427718c07..d6eb5bb303ae 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -24,7 +24,6 @@ #include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> #include <drawinglayer/primitive2d/exclusiveeditviewprimitive2d.hxx> -#include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <utility> @@ -136,15 +135,7 @@ namespace drawinglayer::primitive2d } else { - if (getSdrLFSTAttribute().getText().isInEditMode()) - { - drawinglayer::primitive2d::Primitive2DReference aWrapped( - new drawinglayer::primitive2d::TextHierarchyEditPrimitive2D( - std::move(aTempContentText))); - aRetval.append(std::move(aWrapped)); - } - else - aRetval.append(std::move(aTempContentText)); + aRetval.append(std::move(aTempContentText)); } }
