officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |    6 +++-
 sd/qa/unit/data/odg/softedges.odg                            |binary
 sd/qa/unit/data/pptx/shape-soft-edges.pptx                   |binary
 sd/qa/unit/export-tests-ooxml4.cxx                           |    4 +++
 sd/qa/unit/export-tests.cxx                                  |   14 +++++++++++
 svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx       |   14 +++++++++++
 svx/source/sdr/properties/textproperties.cxx                 |    2 -
 7 files changed, 37 insertions(+), 3 deletions(-)

New commits:
commit 8b7900dc3dfc6e3284442dc106799c44dc8961de
Author:     Balazs Varga <balazs.varga.ext...@allotropia.de>
AuthorDate: Mon Dec 16 13:35:38 2024 +0100
Commit:     Balazs Varga <balazs.varga.ext...@allotropia.de>
CommitDate: Wed Dec 18 16:27:40 2024 +0100

    tdf#135320 sd fix soft edges are not shown on text frames
    
    Allow soft edge and glow effect on text frames objects.
    
    Change-Id: If08da1cfeae515aa50ded5689b7fe3a963a98cd9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178656
    Tested-by: Jenkins
    Tested-by: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 48bf19ab3923..f9a0e6ad7ffe 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -807,10 +807,12 @@
             Calc,           Draw,       hidden  ;
             DrawImpress,    Draw,       hidden  ;
             DrawImpress,    Graphic,    hidden  ;
+            DrawImpress,    TextObject, hidden  ;
             WriterVariants, Draw,       hidden  ;
-            Calc,    DrawFontwork, visible ;
+            Calc,           TextObject, hidden  ;
+            Calc,           DrawFontwork, visible ;
             DrawImpress,    DrawFontwork, visible ;
-            WriterVariants,    DrawFontwork, visible ;
+            WriterVariants, DrawFontwork, visible ;
           </value>
         </prop>
         <prop oor:name="ImplementationURL" oor:type="xs:string">
diff --git a/sd/qa/unit/data/odg/softedges.odg 
b/sd/qa/unit/data/odg/softedges.odg
index a1fcab90e9ad..f1604b5d851e 100644
Binary files a/sd/qa/unit/data/odg/softedges.odg and 
b/sd/qa/unit/data/odg/softedges.odg differ
diff --git a/sd/qa/unit/data/pptx/shape-soft-edges.pptx 
b/sd/qa/unit/data/pptx/shape-soft-edges.pptx
index cafb8cf4ca59..e735070f0364 100644
Binary files a/sd/qa/unit/data/pptx/shape-soft-edges.pptx and 
b/sd/qa/unit/data/pptx/shape-soft-edges.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx 
b/sd/qa/unit/export-tests-ooxml4.cxx
index 55f1b5d5de2d..5c8085911303 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -579,6 +579,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, 
testShapeSoftEdgeEffect)
     sal_Int32 nRadius = -1;
     xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRadius;
     CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nRadius); // 18 pt
+
+    xShapeProps.set(getShapeFromPage(1, 0));
+    xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= nRadius;
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(353), nRadius); // 10 pt
 }
 
 CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testShapeShadowBlurEffect)
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index b20064eb1006..a57dc111b0d2 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1581,6 +1581,20 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testSoftEdges)
         pXmlDoc,
         
"/office:document-content/office:automatic-styles/style:style[2]/style:graphic-properties",
         "softedge-radius", u"0.635cm");
+
+    // Text frame object
+    xShapeProps.set(getShapeFromPage(1, 0));
+    CPPUNIT_ASSERT(xShapeProps->getPropertyValue(u"SoftEdgeRadius"_ustr) >>= 
nRad);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(353), nRad); // 10 pt
+
+    // Test ODF element
+    pXmlDoc = parseExport(u"content.xml"_ustr);
+    assertXPath(pXmlDoc, 
"/office:document-content/office:automatic-styles/style:style[3]",
+                "family", u"graphic");
+    assertXPath(
+        pXmlDoc,
+        
"/office:document-content/office:automatic-styles/style:style[3]/style:graphic-properties",
+        "softedge-radius", u"0.353cm");
 }
 
 CPPUNIT_TEST_FIXTURE(SdExportTest, testShadowBlur)
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx 
b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index e66285e6bb6e..60cfa24bd8db 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -89,6 +89,20 @@ namespace drawinglayer::primitive2d
                         getTransform()));
             }
 
+            // Soft edges should be before text, since text is not affected by 
soft edges
+            if (!aRetval.empty() && getSdrLFSTAttribute().getSoftEdgeRadius())
+            {
+                aRetval = createEmbeddedSoftEdgePrimitive(std::move(aRetval),
+                    getSdrLFSTAttribute().getSoftEdgeRadius());
+            }
+
+            // tdf#132199: put glow before shadow, to have shadow of the glow, 
not the opposite
+            if (!aRetval.empty() && 
!getSdrLFSTAttribute().getGlow().isDefault())
+            {
+                // glow
+                aRetval = createEmbeddedGlowPrimitive(std::move(aRetval), 
getSdrLFSTAttribute().getGlow());
+            }
+
             // add text
             if(!getSdrLFSTAttribute().getText().isDefault())
             {
diff --git a/svx/source/sdr/properties/textproperties.cxx 
b/svx/source/sdr/properties/textproperties.cxx
index cabe52ab68b7..3a2990846621 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -54,7 +54,7 @@ namespace sdr::properties
                 svl::Items<SDRATTR_START, SDRATTR_SHADOW_LAST,
                 SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST,
                 SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION,
-                SDRATTR_GLOW_TEXT_FIRST, SDRATTR_GLOW_TEXT_LAST,
+                SDRATTR_GLOW_FIRST, SDRATTR_GLOW_TEXT_LAST,
                 SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST,
 
                 // range from SdrTextObj

Reply via email to