[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 3 commits - desktop/source svx/sdi sw/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 1 08:10:39 UTC 2019


 desktop/source/lib/init.cxx         |    4 ++--
 svx/sdi/svx.sdi                     |    2 +-
 sw/source/uibase/shells/drawdlg.cxx |   31 ++++++++++++++++++++++++++++++-
 sw/source/uibase/shells/textsh1.cxx |   10 +++++-----
 4 files changed, 38 insertions(+), 9 deletions(-)

New commits:
commit e92a9ea35f1b04d2d6e5b3714e531b052a7a7868
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Oct 31 15:36:28 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 1 09:10:06 2019 +0100

    jsdialogs: refresh SidebarDockingWindow after event
    
    Before we had JSON genertion in Deck now it was moved
    to the parent.
    
    Change-Id: I0fc11ec716542fd3aa6862292ae94985ee3d20d4
    Reviewed-on: https://gerrit.libreoffice.org/81854
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 415c87e617ae9bd1dc89a80023bce8746be69af9)
    Reviewed-on: https://gerrit.libreoffice.org/81861
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3124e999fe56..36d6015db423 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3349,8 +3349,8 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
         } catch(...) {}
 
         // force resend
-        pWindow->Hide();
-        pWindow->Show();
+        pWindow->GetParent()->Hide();
+        pWindow->GetParent()->Show();
     }
 }
 
commit ce3c1615ffc29ae4c0ebf8b05e198070460fae0a
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 28 13:38:15 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 1 09:10:01 2019 +0100

    jsdialogs: fix .uno:BackColor command
    
    Change-Id: I628067afa4c3a8d28c5c3635c4e5e46f9febdf94
    Reviewed-on: https://gerrit.libreoffice.org/81602
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/81607
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 46868deff1be..525b808fb2d0 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1205,15 +1205,15 @@ void SwTextShell::Execute(SfxRequest &rReq)
             OUString sColor;
             const SfxPoolItem* pColorStringItem = nullptr;
 
-            if (pItem)
-            {
-                aSet = pItem ? static_cast<const SvxColorItem*>(pItem)->GetValue() : COL_TRANSPARENT;
-            }
-            else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+            if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
             {
                 sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
                 aSet = Color(sColor.toInt32(16));
             }
+            else if (pItem)
+                aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
+            else
+                aSet = COL_TRANSPARENT;
 
             SwEditWin& rEdtWin = GetView().GetEditWin();
             if (nSlot != SID_ATTR_CHAR_COLOR_EXT)
commit e5a9832fc0f437ed48bafb9e897fd88820211ff7
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Oct 31 07:45:40 2019 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Nov 1 09:09:56 2019 +0100

    jsdialogs: .uno:XLineColor with string argument
    
    Change-Id: Ic06aaef076d101d90bf76461e2b3a97580ad311f
    Reviewed-on: https://gerrit.libreoffice.org/81821
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 51f6b20a0c8c3b2830547e4400cf4c513e9d9c00)
    Reviewed-on: https://gerrit.libreoffice.org/81828
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 489ae6af30e9..09c127c2340f 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8828,7 +8828,7 @@ SvxWordLineModeItem WordMode SID_ATTR_CHAR_WORDLINEMODE
 
 
 XLineColorItem XLineColor SID_ATTR_LINE_COLOR
-
+(SfxStringItem Color SID_ATTR_COLOR_STR, XLineColorItem XLineColor SID_ATTR_LINE_COLOR)
 [
     AutoUpdate = TRUE,
     FastCall = FALSE,
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 7cc72c5e4ae9..5a9bebc85659 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -33,6 +33,8 @@
 #include <svx/svxdlg.hxx>
 #include <svx/dialogs.hrc>
 #include <memory>
+#include <svl/stritem.hxx>
+#include <svx/xlnclit.hxx>
 
 void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 {
@@ -197,6 +199,29 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
             pDoc->SetChanged();
 }
 
+namespace
+{
+    void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+    {
+        Color aColor;
+        OUString sColor;
+        const SfxPoolItem* pColorStringItem = nullptr;
+
+        if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
+        {
+            sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
+
+            if (sColor == "transparent")
+                aColor = COL_TRANSPARENT;
+            else
+                aColor = Color(sColor.toInt32(16));
+
+            XLineColorItem aLineColorItem(OUString(), aColor);
+            pArgs->Put(aLineColorItem);
+        }
+    }
+}
+
 void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
 {
     SwWrtShell* pSh   = &GetShell();
@@ -210,7 +235,11 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
     if (pArgs)
     {
         if(pView->AreObjectsMarked())
-            pView->SetAttrToMarked(*rReq.GetArgs(), false);
+        {
+            std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone();
+            lcl_convertStringArguments(pNewArgs);
+            pView->SetAttrToMarked(*pNewArgs, false);
+        }
         else
             pView->SetDefaultAttr(*rReq.GetArgs(), false);
     }


More information about the Libreoffice-commits mailing list