svx/source/sidebar/line/LinePropertyPanel.cxx |    5 ++++-
 svx/source/tbxctrls/tbxcolorupdate.cxx        |    6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 9379a922c07df3cdb7d567cc88dfaaa39ead3681
Author: Prashant Pandey <prashant3.yi...@gmail.com>
Date:   Fri Sep 13 01:27:39 2013 +0530

    Sidebar: Show default line-color in 'Draw'
    
    Currently, the default color shown in Sidebar>Line>Color
    is yellow and is not updated until and unless one hovers a
    mouse on top of it. This is wrong and the default color of
    the line-color should be updated and shown by default.
    
    Change-Id: I213cba84a0fc726220acfe547955a96d6bb4446b
    Reviewed-on: https://gerrit.libreoffice.org/5932
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx 
b/svx/source/sidebar/line/LinePropertyPanel.cxx
index 45c64d6..d4e632e 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -337,6 +337,9 @@ void LinePropertyPanel::NotifyItemUpdate(
     (void)bIsEnabled;
     const bool bDisabled(SFX_ITEM_DISABLED == eState);
 
+    // By default, fill and show the color of existing line-color
+    mpColorUpdater->Update( maColor );
+
     switch(nSID)
     {
         case SID_ATTR_LINE_COLOR:
@@ -359,7 +362,7 @@ void LinePropertyPanel::NotifyItemUpdate(
                 {
                     maColor = pItem->GetColorValue();
                     mbColorAvailable = true;
-                    mpColorUpdater->Update(maColor);
+                    mpColorUpdater->Update( maColor );
                     break;
                 }
             }
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx 
b/svx/source/tbxctrls/tbxcolorupdate.cxx
index b3e4fc7..53376bf 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -92,7 +92,11 @@ namespace svx
         if( aColor.GetColor() == COL_AUTO )
             aColor = Color( COL_TRANSPARENT );
 
-        if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged )
+        // For a shape selected in 'Draw', when color selected in Sidebar > 
Line > Color
+        // is COL_BLACK, then (maCurColor != aColor) becomes 'false', 
therefore we take
+        // explicit care of COL_BLACK from the last argument in the condition 
so that the
+        // Update() does its routine job appropriately !
+        if( ( maCurColor != aColor ) || bSizeChanged || bDisplayModeChanged || 
( aColor == COL_BLACK ) )
         {
             // create an empty bitmap, and copy the original bitmap inside
             // (so that it grows in case the original bitmap was smaller)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to