svgio/qa/cppunit/SvgImportTest.cxx            |    8 ++++++++
 svgio/qa/cppunit/data/fillContextStroke.svg   |    8 ++++++++
 svgio/source/svgreader/svgstyleattributes.cxx |   16 ++++++++++++++++
 vcl/source/window/dockwin.cxx                 |    2 ++
 4 files changed, 34 insertions(+)

New commits:
commit 8c5b0a2429c77eb601eb4d825527e1edbe1fed0d
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Jun 13 12:09:19 2024 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Thu Jun 27 16:43:05 2024 +0200

    tdf#161213: fill can use context-stroke and vice versa
    
    Change-Id: Id127bd4943ff1b67915d1de3ba4fcf93dab21423
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168774
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 1a7c927f6fb8fc4f6f2277a8442ce4b37f1ffccf)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168790
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/svgio/qa/cppunit/SvgImportTest.cxx 
b/svgio/qa/cppunit/SvgImportTest.cxx
index bc99c672b4b6..f3d8013bee9e 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -677,6 +677,14 @@ CPPUNIT_TEST_FIXTURE(Test, testContextFill)
     assertXPath(pDocument, 
"/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, 
"#ff0000");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testFillContextStroke)
+{
+    xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/fillContextStroke.svg");
+
+    assertXPath(pDocument, 
"/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, 
u"#ff0000"_ustr);
+    assertXPath(pDocument, 
"/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, 
u"#ff0000"_ustr);
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testContextStroke)
 {
     xmlDocUniquePtr pDocument = 
dumpAndParseSvg(u"/svgio/qa/cppunit/data/contextStroke.svg");
diff --git a/svgio/qa/cppunit/data/fillContextStroke.svg 
b/svgio/qa/cppunit/data/fillContextStroke.svg
new file mode 100644
index 000000000000..a5288889c63e
--- /dev/null
+++ b/svgio/qa/cppunit/data/fillContextStroke.svg
@@ -0,0 +1,8 @@
+<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg";>
+<defs>
+    <marker id="triangle" viewBox="0 0 10 10" refX="5" refY="5" 
markerWidth="6" markerHeight="6" orient="auto">
+       <path d="M 0 0 L 10 5 L 0 10 z" fill="context-stroke" />
+    </marker>
+</defs>
+<line x1="10" y1="10" x2="90" y2="90" fill="red" stroke="red" 
marker-end="url(#triangle)" />
+</svg>
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx 
b/svgio/source/svgreader/svgstyleattributes.cxx
index 42e19c51fcd5..bb15fbfdc0a3 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1326,6 +1326,10 @@ namespace svgio::svgreader
                     {
                         mbContextFill = true;
                     }
+                    else if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), 
u"context-stroke"))
+                    {
+                        mbContextStroke = true;
+                    }
                     else if(readSvgPaint(aContent, aSvgPaint, aURL, aOpacity))
                     {
                         setFill(aSvgPaint);
@@ -1375,6 +1379,10 @@ namespace svgio::svgreader
                     {
                         mbContextStroke = true;
                     }
+                    else if(o3tl::equalsIgnoreAsciiCase(o3tl::trim(aContent), 
u"context-fill"))
+                    {
+                        mbContextFill = true;
+                    }
                     else if(readSvgPaint(aContent, aSvgPaint, aURL, aOpacity))
                     {
                         maStroke = aSvgPaint;
@@ -2124,6 +2132,10 @@ namespace svgio::svgreader
             {
                 return getContextFill();
             }
+            else if (mbContextStroke)
+            {
+                return getContextStroke();
+            }
             else if (maNodeFillURL.isEmpty())
             {
                 const SvgStyleAttributes* pSvgStyleAttributes = 
getParentStyle();
@@ -2169,6 +2181,10 @@ namespace svgio::svgreader
                     return &maStroke.getBColor();
                 }
             }
+            else if (mbContextFill)
+            {
+                return getContextFill();
+            }
             else if (mbContextStroke)
             {
                 return getContextStroke();
commit 1c8baa677e5ede94a60de0d6d041e0599d7b5fc0
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jun 19 12:54:22 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jun 27 16:42:52 2024 +0200

    tdf#159835 vcl: Notify when floating window toggled
    
    Notify listeners using an `VclEventId::WindowToggleFloating`
    event when the floating mode was toggled in
    `DockingWindow::SetFloatingMode`.
    
    This will be used in upcoming commit
    
        Change-Id: I9a7e341e88d2de5f34e8f85ebada3ff2ebf6b47d
        Author: Michael Weghorn <m.wegh...@posteo.de>
        Date:   Tue Jun 18 13:41:03 2024 +0200
    
            tdf#159835 sfx2: Keep sidebar menu up to date
    
    to react to that toggling.
    
    Change-Id: I5286ab727c30d4dd4bbc3cf5d42f19ff649b39f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169195
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    (cherry picked from commit c2c6a5d32f8c536ab816630583f986860202c4a9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169249
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 8d12b6658b0e..9e2fa4df4f3d 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -789,6 +789,8 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
 
     if (bVisible)
         Show();
+
+    CallEventListeners(VclEventId::WindowToggleFloating);
 }
 
 void DockingWindow::SetFloatStyle( WinBits nStyle )

Reply via email to