sw/source/uibase/shells/textsh1.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit e70ccc06094bec12d1947328b98ea040b46d08fc
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Oct 28 13:38:15 2019 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Oct 28 14:32:35 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.k...@collabora.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 173805a5ae85..7ff0435665d3 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1216,15 +1216,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)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to