[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 8 12:23:42 UTC 2019


 sd/source/ui/view/drviews2.cxx |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

New commits:
commit 4bc42437cabf22a1351f485578e43f8fc0d21de3
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Nov 8 11:49:55 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 8 13:22:52 2019 +0100

    jsdialog: apply .uno:XLineColor in Impress
    
    Change-Id: I02bd0ce5d3b71e6acf28f56aead41abc76b42465
    Reviewed-on: https://gerrit.libreoffice.org/82280
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 24f41a3e81fa..77f63e1894b5 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -90,6 +90,7 @@
 #include <svx/xlnstwit.hxx>
 #include <svx/xlnwtit.hxx>
 #include <svx/chrtitem.hxx>
+#include <svx/xlnclit.hxx>
 
 #include <tools/diagnose_ex.h>
 
@@ -548,6 +549,8 @@ namespace
 {
     void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
     {
+        Color aColor;
+        OUString sColor;
         const SfxPoolItem* pItem = nullptr;
 
         if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
@@ -560,6 +563,18 @@ namespace
             XLineWidthItem aItem(nValue);
             pArgs->Put(aItem);
         }
+        else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
+        {
+            sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
+
+            if (sColor == "transparent")
+                aColor = COL_TRANSPARENT;
+            else
+                aColor = Color(sColor.toInt32(16));
+
+            XLineColorItem aLineColorItem(OUString(), aColor);
+            pArgs->Put(aLineColorItem);
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list