drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx |    5 ++++-
 svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx       |   11 ++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 7eae02b9c37a6587463925da61535300211d7c56
Author:     Mohit Marathe <[email protected]>
AuthorDate: Tue Jan 20 20:12:49 2026 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Wed Jan 21 19:19:12 2026 +0100

    drawinglayer: suppress text if text in edited in other view in LOK case
    
    while decomposing SdrRectanglePrimitive2D, if SdrTextObject (model
    level) is in edit mode, wrap text as TextHierarchyEditPrimitive2D. And
    while decomposing it, suppress the text if LOK is active regardless if
    the text edit is active in that particular view.
    
    see 3a6bc34f076b27a366d7352e7e7b62730ff17b6f for more context
    
    Signed-off-by: Mohit Marathe <[email protected]>
    Change-Id: I50e42f5255c44ece5e7d35013aa971557cf7f686
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197711
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197724
    Tested-by: Michael Stahl <[email protected]>

diff --git a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx 
b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
index d0a69ad9a336..f99268bad576 100644
--- a/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texthierarchyprimitive2d.cxx
@@ -148,7 +148,10 @@ namespace drawinglayer::primitive2d
         {
             // check if TextEdit is active. If not, process. If yes, suppress 
the content
             // lok case: always decompose it when we're rendering a slide show
-            if (!rViewInformation.getTextEditActive() || 
comphelper::LibreOfficeKit::isSlideshowRendering())
+            bool bSuppress = rViewInformation.getTextEditActive() || 
comphelper::LibreOfficeKit::isActive();
+            if (comphelper::LibreOfficeKit::isSlideshowRendering())
+                bSuppress = false;
+            if (!bSuppress)
                 GroupPrimitive2D::get2DDecomposition(rVisitor, 
rViewInformation);
         }
 
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index d6eb5bb303ae..6a1427718c07 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -24,6 +24,7 @@
 #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>
@@ -135,7 +136,15 @@ namespace drawinglayer::primitive2d
                 }
                 else
                 {
-                    aRetval.append(std::move(aTempContentText));
+                    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));
                 }
             }
 

Reply via email to