Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4227

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/27/4227/1

Sidebar conversion to .ui for CellAppearancePropertyPanel

Change-Id: I90df6ebe428ec201aa204f26447c1728b2120c69
---
M sc/AllLangResTarget_sc.mk
M sc/UIConfig_scalc.mk
M sc/inc/sc.hrc
M sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
M sc/source/ui/sidebar/CellAppearancePropertyPanel.hrc
M sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
M sc/source/ui/sidebar/CellAppearancePropertyPanel.src
M sc/source/ui/src/scstring.src
A sc/uiconfig/scalc/ui/sidebarcellappearance.ui
9 files changed, 259 insertions(+), 307 deletions(-)



diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index b83e0f9..6c9cfde 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -86,7 +86,6 @@
     sc/source/ui/formdlg/formdlgs.src \
     sc/source/ui/formdlg/dwfunctr.src \
     sc/source/ui/sidebar/AlignmentPropertyPanel.src \
-    sc/source/ui/sidebar/CellAppearancePropertyPanel.src \
     sc/source/ui/sidebar/NumberFormatPropertyPanel.src \
     sc/source/core/src/compiler.src \
 ))
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 94a8aea..4abee5c 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -84,6 +84,7 @@
        sc/uiconfig/scalc/ui/printeroptions \
        sc/uiconfig/scalc/ui/protectsheetdlg \
        sc/uiconfig/scalc/ui/sheetprintpage \
+       sc/uiconfig/scalc/ui/sidebarcellappearance \
        sc/uiconfig/scalc/ui/rightfooterdialog \
        sc/uiconfig/scalc/ui/rightheaderdialog \
        sc/uiconfig/scalc/ui/selectrange \
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 6fbe3f0..5de0877 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -939,6 +939,9 @@
 
 #define SCSTR_FIELDSEP_TAB      (STR_START + 412)
 #define SCSTR_FIELDSEP_SPACE    (STR_START + 413)
+#define SCSTR_FILLCOLOR         (STR_START + 414)
+#define SCSTR_NOFILLCOLOR       (STR_START + 415)
+#define SCSTR_LINECOLOR         (STR_START + 416)
 
 #define STR_END                 (SCSTR_FIELDSEP_SPACE)
 
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 2ee40a9..c083906 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -45,6 +45,12 @@
 using namespace css;
 using namespace cssu;
 
+const char UNO_CELLBACKGROUND[]   = ".uno:CellBackground";
+const char UNO_BORDERTYPE[]       = ".uno:BorderType";
+const char UNO_BORDERLINESTYLE[]  = ".uno:BorderLineStyle";
+const char UNO_BORDERLINECOLOR[]  = ".uno:BorderLineColor";
+const char UNO_GRIDLINESVISIBLE[] = ".uno:GridLinesVisible";
+
 #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
 
 //////////////////////////////////////////////////////////////////////////////
@@ -67,13 +73,13 @@
 
 svx::sidebar::PopupControl* 
CellAppearancePropertyPanel::CreateFillColorPopupControl(svx::sidebar::PopupContainer* pParent)
 {
-    const ScResId aResId(VS_NOFILLCOLOR);
+    const ScResId aResId(SCSTR_NOFILLCOLOR);
 
     return new svx::sidebar::ColorControl(
         pParent,
         mpBindings,
         ScResId(RID_POPUPPANEL_CELLAPPEARANCE_FILLCOLOR),
-        ScResId(VS_FILLCOLOR),
+        ScResId(SCSTR_FILLCOLOR),
         ::boost::bind(GetTransparentColor),
         ::boost::bind(&CellAppearancePropertyPanel::SetFillColor, this, _1, _2),
         pParent,
@@ -97,7 +103,7 @@
         pParent,
         mpBindings,
         ScResId(RID_POPUPPANEL_CELLAPPEARANCE_LINECOLOR),
-        ScResId(VS_LINECOLOR),
+        ScResId(SCSTR_LINECOLOR),
         ::boost::bind(GetTransparentColor),
         ::boost::bind(&CellAppearancePropertyPanel::SetLineColor, this, _1, _2),
         pParent,
@@ -122,7 +128,7 @@
 
 void CellAppearancePropertyPanel::EndCellLineStylePopupMode(void)
 {
-    if(mpCellLineStylePopup.get())
+    if(mpCellLineStylePopup)
     {
         mpCellLineStylePopup->Hide();
     }
@@ -137,7 +143,7 @@
 
 void CellAppearancePropertyPanel::EndCellBorderStylePopupMode(void)
 {
-    if(mpCellBorderStylePopup.get())
+    if(mpCellBorderStylePopup)
     {
         mpCellBorderStylePopup->Hide();
     }
@@ -149,28 +155,7 @@
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
     SfxBindings* pBindings)
-:   Control(
-        pParent,
-        ScResId(RID_PROPERTYPANEL_SC_APPEAR)),
-
-    mpFTFillColor(new FixedText(this, ScResId(FT_BK_COLOR))),
-    mpTBFillColorBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
-    mpTBFillColor(sfx2::sidebar::ControlFactory::CreateToolBox(mpTBFillColorBackground.get(), 
ScResId(TB_BK_COLOR))),
-    mpFillColorUpdater(new ::svx::ToolboxButtonColorUpdater(SID_ATTR_BRUSH, TBI_BK_COLOR, 
mpTBFillColor.get(), TBX_UPDATER_MODE_CHAR_COLOR_NEW)),
-
-    mpFTCellBorder(new FixedText(this, ScResId(FT_BORDER))),
-    mpTBCellBorderBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
-    mpTBCellBorder(sfx2::sidebar::ControlFactory::CreateToolBox(mpTBCellBorderBackground.get(), 
ScResId(TB_APP_BORDER))),
-    mpCellBorderUpdater(new CellBorderUpdater(TBI_BORDER, *mpTBCellBorder)),
-
-    mpTBLineStyleBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
-    mpTBLineStyle(sfx2::sidebar::ControlFactory::CreateToolBox(mpTBLineStyleBackground.get(), 
ScResId(TB_BORDER_LINE_STYLE))),
-
-    mpTBLineColorBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
-    mpTBLineColor(sfx2::sidebar::ControlFactory::CreateToolBox(mpTBLineColorBackground.get(), 
ScResId(TB_BORDER_LINE_COLOR))),
-    mpLineColorUpdater(new ::svx::ToolboxButtonColorUpdater(SID_FRAME_LINECOLOR, TBI_LINE_COLOR, 
mpTBLineColor.get(), TBX_UPDATER_MODE_CHAR_COLOR_NEW)),
-
-    mpCBXShowGrid(new CheckBox(this, ScResId(CBX_SHOW_GRID))),
+:   PanelLayout(pParent, "CellAppearancePropertyPanel", 
"modules/scalc/ui/sidebarcellappearance.ui", rxFrame),
 
     maBackColorControl(SID_BACKGROUND_COLOR, *pBindings, *this),
     maLineColorControl(SID_FRAME_LINECOLOR, *pBindings, *this),
@@ -180,19 +165,6 @@
     maGridShowControl(SID_SCGRIDSHOW, *pBindings, *this),
     maBorderTLBRControl(SID_ATTR_BORDER_DIAG_TLBR, *pBindings, *this),
     maBorderBLTRControl(SID_ATTR_BORDER_DIAG_BLTR, *pBindings, *this),
-
-    maIMGBKColor(ScResId(IMG_BK_COLOR)),
-    maIMGCellBorder(ScResId(IMG_CELL_BORDER)),
-    maIMGLineColor(ScResId(IMG_LINE_COLOR)),
-    maIMGLineStyle1(ScResId(IMG_LINE_STYLE1)),
-    maIMGLineStyle2(ScResId(IMG_LINE_STYLE2)),
-    maIMGLineStyle3(ScResId(IMG_LINE_STYLE3)),
-    maIMGLineStyle4(ScResId(IMG_LINE_STYLE4)),
-    maIMGLineStyle5(ScResId(IMG_LINE_STYLE5)),
-    maIMGLineStyle6(ScResId(IMG_LINE_STYLE6)),
-    maIMGLineStyle7(ScResId(IMG_LINE_STYLE7)),
-    maIMGLineStyle8(ScResId(IMG_LINE_STYLE8)),
-    maIMGLineStyle9(ScResId(IMG_LINE_STYLE9)),
 
     maBackColor(COL_TRANSPARENT),
     maLineColor(COL_BLACK),
@@ -230,71 +202,55 @@
     maContext(),
     mpBindings(pBindings)
 {
+    get(mpTBFillColor,      "cellbackgroundcolor");
+    get(mpTBCellBorder,     "cellbordertype");
+    get(mpTBLineStyle,      "borderlinestyle");
+    get(mpTBLineColor,      "borderlinecolor");
+    get(mpCBXShowGrid,      "cellgridlines");
+
+    mpFillColorUpdater =  new ::svx::ToolboxButtonColorUpdater(SID_ATTR_BRUSH,
+                          mpTBFillColor->GetItemId( UNO_CELLBACKGROUND ),
+                          mpTBFillColor, TBX_UPDATER_MODE_CHAR_COLOR_NEW);
+    mpLineColorUpdater =  new ::svx::ToolboxButtonColorUpdater(SID_FRAME_LINECOLOR,
+                          mpTBLineColor->GetItemId( UNO_BORDERLINECOLOR ),
+                          mpTBLineColor, TBX_UPDATER_MODE_CHAR_COLOR_NEW);
+    mpCellBorderUpdater = new CellBorderUpdater(
+                          mpTBCellBorder->GetItemId( UNO_BORDERTYPE ), *mpTBCellBorder);
+
     Initialize();
-    FreeResource();
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
 CellAppearancePropertyPanel::~CellAppearancePropertyPanel()
 {
-    // Destroy the toolboxes, then their background windows.
-    mpTBFillColor.reset();
-    mpTBCellBorder.reset();
-    mpTBLineStyle.reset();
-    mpTBLineColor.reset();
-
-    mpTBFillColorBackground.reset();
-    mpTBCellBorderBackground.reset();
-    mpTBLineStyleBackground.reset();
-    mpTBLineColorBackground.reset();
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
 void CellAppearancePropertyPanel::Initialize()
 {
-    mpTBFillColor->SetItemImage(TBI_BK_COLOR, maIMGBKColor);
-    mpTBFillColor->SetItemBits( TBI_BK_COLOR, mpTBFillColor->GetItemBits( TBI_BK_COLOR ) | 
TIB_DROPDOWNONLY );
-    mpTBFillColor->SetQuickHelpText(TBI_BK_COLOR,String(ScResId(STR_QH_BK_COLOR))); //Add
-    Size aTbxSize1( mpTBFillColor->CalcWindowSizePixel() );
-    mpTBFillColor->SetOutputSizePixel( aTbxSize1 );
-    mpTBFillColor->SetBackground(Wallpaper());
-    mpTBFillColor->SetPaintTransparent(true);
+    const sal_uInt16 nIdBkColor = mpTBFillColor->GetItemId( UNO_CELLBACKGROUND );
+    mpTBFillColor->SetItemBits( nIdBkColor, mpTBFillColor->GetItemBits( nIdBkColor ) | 
TIB_DROPDOWNONLY );
     Link aLink = LINK(this, CellAppearancePropertyPanel, TbxBKColorSelectHdl);
     mpTBFillColor->SetDropdownClickHdl ( aLink );
     mpTBFillColor->SetSelectHdl ( aLink );
 
-    mpTBCellBorder->SetItemImage(TBI_BORDER, maIMGCellBorder);
-    mpTBCellBorder->SetItemBits( TBI_BORDER, mpTBCellBorder->GetItemBits( TBI_BORDER ) | 
TIB_DROPDOWNONLY );
-    mpTBCellBorder->SetQuickHelpText(TBI_BORDER,String(ScResId(STR_QH_BORDER)));    //Add
-    Size aTbxSize2( mpTBCellBorder->CalcWindowSizePixel() );
-    mpTBCellBorder->SetOutputSizePixel( aTbxSize2 );
-    mpTBCellBorder->SetBackground(Wallpaper());
-    mpTBCellBorder->SetPaintTransparent(true);
+    const sal_uInt16 nIdBorderType  = mpTBCellBorder->GetItemId( UNO_BORDERTYPE );
+    mpTBCellBorder->SetItemBits( nIdBorderType, mpTBCellBorder->GetItemBits( nIdBorderType ) | 
TIB_DROPDOWNONLY );
     aLink = LINK(this, CellAppearancePropertyPanel, TbxCellBorderSelectHdl);
     mpTBCellBorder->SetDropdownClickHdl ( aLink );
     mpTBCellBorder->SetSelectHdl ( aLink );
 
-    mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle1);
-    mpTBLineStyle->SetItemBits( TBI_LINE_STYLE, mpTBLineStyle->GetItemBits( TBI_LINE_STYLE ) | 
TIB_DROPDOWNONLY );
-    mpTBLineStyle->SetQuickHelpText(TBI_LINE_STYLE,String(ScResId(STR_QH_BORDER_LINE_STYLE)));  
//Add
-    Size aTbxSize3( mpTBLineStyle->CalcWindowSizePixel() );
-    mpTBLineStyle->SetOutputSizePixel( aTbxSize3 );
-    mpTBLineStyle->SetBackground(Wallpaper());
-    mpTBLineStyle->SetPaintTransparent(true);
+    const sal_uInt16 nIdBorderLineStyle = mpTBLineStyle->GetItemId( UNO_BORDERLINESTYLE );
+    mpTBLineStyle->SetItemBits( nIdBorderLineStyle, mpTBLineStyle->GetItemBits( nIdBorderLineStyle 
) | TIB_DROPDOWNONLY );
     aLink = LINK(this, CellAppearancePropertyPanel, TbxLineStyleSelectHdl);
     mpTBLineStyle->SetDropdownClickHdl ( aLink );
     mpTBLineStyle->SetSelectHdl ( aLink );
     mpTBLineStyle->Disable();
 
-    mpTBLineColor->SetItemImage(TBI_LINE_COLOR, maIMGLineColor);
-    mpTBLineColor->SetItemBits( TBI_LINE_COLOR, mpTBLineColor->GetItemBits( TBI_LINE_COLOR ) | 
TIB_DROPDOWNONLY );
-    mpTBLineColor->SetQuickHelpText(TBI_LINE_COLOR,String(ScResId(STR_QH_BORDER_LINE_COLOR)));  
//Add
-    Size aTbxSize4( mpTBLineColor->CalcWindowSizePixel() );
-    mpTBLineColor->SetOutputSizePixel( aTbxSize4 );
-    mpTBLineColor->SetBackground(Wallpaper());
-    mpTBLineColor->SetPaintTransparent(true);
+    const sal_uInt16 nIdBorderLinecolor = mpTBLineColor->GetItemId( UNO_BORDERLINECOLOR );
+    mpTBLineColor->SetItemBits( nIdBorderLinecolor, mpTBLineColor->GetItemBits( nIdBorderLinecolor 
) | TIB_DROPDOWNONLY );
     aLink = LINK(this, CellAppearancePropertyPanel, TbxLineColorSelectHdl);
     mpTBLineColor->SetDropdownClickHdl ( aLink );
     mpTBLineColor->SetSelectHdl ( aLink );
@@ -303,18 +259,16 @@
     aLink = LINK(this, CellAppearancePropertyPanel, CBOXGridShowClkHdl);
     mpCBXShowGrid->SetClickHdl ( aLink );
 
-    mpTBFillColor->SetAccessibleRelationLabeledBy(mpFTFillColor.get());
-    mpTBLineColor->SetAccessibleRelationLabeledBy(mpTBLineColor.get());
-    mpTBCellBorder->SetAccessibleRelationLabeledBy(mpFTCellBorder.get());
-    mpTBLineStyle->SetAccessibleRelationLabeledBy(mpTBLineStyle.get());
+    mpTBLineColor->SetAccessibleRelationLabeledBy(mpTBLineColor);
+    mpTBLineStyle->SetAccessibleRelationLabeledBy(mpTBLineStyle);
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
 IMPL_LINK(CellAppearancePropertyPanel, TbxBKColorSelectHdl, ToolBox*, pToolBox)
 {
-    sal_uInt16 nId = pToolBox->GetCurItemId();
-    if(nId == TBI_BK_COLOR)
+    const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId()));
+    if(aCommand == UNO_CELLBACKGROUND)
     {
         maFillColorPopup.Show(*pToolBox);
         maFillColorPopup.SetCurrentColor(maBackColor, mbBackColorAvailable);
@@ -326,8 +280,8 @@
 
 IMPL_LINK(CellAppearancePropertyPanel, TbxLineColorSelectHdl, ToolBox*, pToolBox)
 {
-    sal_uInt16 nId = pToolBox->GetCurItemId();
-    if(nId == TBI_LINE_COLOR)
+    const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId()));
+    if(aCommand == UNO_BORDERLINECOLOR)
     {
         maLineColorPopup.Show(*pToolBox);
         maLineColorPopup.SetCurrentColor(maLineColor, mbLineColorAvailable);
@@ -339,20 +293,11 @@
 
 IMPL_LINK(CellAppearancePropertyPanel, TbxCellBorderSelectHdl, ToolBox*, pToolBox)
 {
-    sal_uInt16 nId = pToolBox->GetCurItemId();
-
-    if(nId == TBI_BORDER)
+    const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId()));
+    if(aCommand == UNO_BORDERTYPE)
     {
         // create popup on demand
-        if(!mpCellBorderStylePopup.get())
-        {
-            mpCellBorderStylePopup.reset(
-                new CellBorderStylePopup(
-                    this,
-                    ::boost::bind(&CellAppearancePropertyPanel::CreateCellBorderStylePopupControl, 
this, _1)));
-        }
-
-        if(mpCellBorderStylePopup.get())
+        if(mpCellBorderStylePopup)
         {
             mpCellBorderStylePopup->Show(*pToolBox);
         }
@@ -364,19 +309,11 @@
 
 IMPL_LINK(CellAppearancePropertyPanel, TbxLineStyleSelectHdl, ToolBox*, pToolBox)
 {
-    sal_uInt16 nId = pToolBox->GetCurItemId();
-    if(nId == TBI_LINE_STYLE)
+    const OUString aCommand(pToolBox->GetItemCommand(pToolBox->GetCurItemId()));
+    if(aCommand == UNO_BORDERLINESTYLE)
     {
         // create popup on demand
-        if(!mpCellLineStylePopup.get())
-        {
-            mpCellLineStylePopup.reset(
-                new CellLineStylePopup(
-                    this,
-                    ::boost::bind(&CellAppearancePropertyPanel::CreateCellLineStylePopupControl, 
this, _1)));
-        }
-
-        if(mpCellLineStylePopup.get())
+        if(mpCellLineStylePopup)
         {
             mpCellLineStylePopup->SetLineStyleSelect(mnOut, mnIn, mnDis);
             mpCellLineStylePopup->Show(*pToolBox);
@@ -512,7 +449,6 @@
             mnIn = 0;
             mnOut = 0;
             mnDis = 0;
-            SetStyleIcon();
             break;
         }
 
@@ -532,13 +468,11 @@
                 else
                     mbBorderStyleAvailable = true;
 
-                SetStyleIcon();
                 break;
             }
         }
 
         mbBorderStyleAvailable = false;
-        SetStyleIcon();
         break;
     case SID_ATTR_BORDER_OUTER:
         if(eState >= SFX_ITEM_DEFAULT)
@@ -560,11 +494,6 @@
 
                 if(pBoxItem->GetBottom())
                     mbBottom = true;
-
-                if(!Application::GetSettings().GetLayoutRTL())
-                    mpCellBorderUpdater->UpdateCellBorder(mbTop, mbBottom, mbLeft, mbRight, 
maIMGCellBorder, mbVer, mbHor);
-                else
-                    mpCellBorderUpdater->UpdateCellBorder(mbTop, mbBottom, mbRight, mbLeft, 
maIMGCellBorder, mbVer, mbHor);
 
                 if(mbLeft || mbRight || mbTop || mbBottom)
                     mbOuterBorder = true;
@@ -603,11 +532,6 @@
 
                 if(!pBoxInfoItem->IsValid( VALID_BOTTOM ) || mbBottom)
                     bBottom = true;
-
-                if(!Application::GetSettings().GetLayoutRTL())
-                    mpCellBorderUpdater->UpdateCellBorder(bTop, bBottom, bLeft, bRight, 
maIMGCellBorder, mbVer, mbHor);
-                else
-                    mpCellBorderUpdater->UpdateCellBorder(bTop, bBottom, bRight, bLeft, 
maIMGCellBorder, mbVer, mbHor);
 
                 if(mbVer || mbHor || bLeft || bRight || bTop || bBottom)
                     mbInnerBorder = true;
@@ -730,33 +654,6 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-void CellAppearancePropertyPanel::SetStyleIcon()
-{
-    //FIXME: update for new line border possibilities
-    if(mnOut == DEF_LINE_WIDTH_0 && mnIn == 0 && mnDis == 0)    //1
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle1);
-    else if(mnOut == DEF_LINE_WIDTH_2 && mnIn == 0 && mnDis == 0) //2
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle2);
-    else if(mnOut == DEF_LINE_WIDTH_3 && mnIn == 0 && mnDis == 0) //3
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle3);
-    else if(mnOut == DEF_LINE_WIDTH_4 && mnIn == 0 && mnDis == 0) //4
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle4);
-    else if(mnOut == DEF_LINE_WIDTH_0 && mnIn == DEF_LINE_WIDTH_0 && mnDis == DEF_LINE_WIDTH_1) //5
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle5);
-    else if(mnOut == DEF_LINE_WIDTH_0 && mnIn == DEF_LINE_WIDTH_0 && mnDis == DEF_LINE_WIDTH_2) //6
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle6);
-    else if(mnOut == DEF_LINE_WIDTH_1 && mnIn == DEF_LINE_WIDTH_2 && mnDis == DEF_LINE_WIDTH_1) //7
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle7);
-    else if(mnOut == DEF_LINE_WIDTH_2 && mnIn == DEF_LINE_WIDTH_0 && mnDis == DEF_LINE_WIDTH_2) //8
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle8);
-    else if(mnOut == DEF_LINE_WIDTH_2 && mnIn == DEF_LINE_WIDTH_2 && mnDis == DEF_LINE_WIDTH_2) //9
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle9);
-    else
-        mpTBLineStyle->SetItemImage(TBI_LINE_STYLE, maIMGLineStyle1);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
 void CellAppearancePropertyPanel::UpdateControlState()
 {
     if(mbOuterBorder || mbInnerBorder || mbTLBR || mbBLTR)
@@ -850,7 +747,6 @@
             mnOut = 0;
             mnDis = 0;
         }
-        SetStyleIcon();
     }
     else
     {
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hrc 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hrc
index a0a3b9e..1b93648 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hrc
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hrc
@@ -15,22 +15,6 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#define FT_BK_COLOR     1
-#define TB_BK_COLOR     2
-#define TBI_BK_COLOR    3
-#define FT_BORDER       4
-#define TB_APP_BORDER       5
-#define TBI_BORDER      6
-#define TB_BORDER_LINE_STYLE    7
-#define TBI_LINE_STYLE          8
-#define TB_BORDER_LINE_COLOR    9
-#define TBI_LINE_COLOR          10
-#define CBX_SHOW_GRID           11
-
-#define STR_QH_BK_COLOR         12
-#define STR_QH_BORDER           13
-#define STR_QH_BORDER_LINE_STYLE        14
-#define STR_QH_BORDER_LINE_COLOR        15
 
 #define IMG_BK_COLOR    21
 #define IMG_CELL_BORDER 22
@@ -108,7 +92,6 @@
 #define STR_BORDER_8            48
 
 #define VS_FILLCOLOR            1
-#define VS_NOFILLCOLOR          2
 #define VS_LINECOLOR            1
 
 // eof
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
index 30efdca..65416f1 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx
@@ -20,6 +20,7 @@
 
 #include <sfx2/sidebar/ControllerItem.hxx>
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
 #include <boost/scoped_ptr.hpp>
 #include <svx/sidebar/ColorPopup.hxx>
 
@@ -37,7 +38,7 @@
 namespace sc { namespace sidebar {
 
 class CellAppearancePropertyPanel
-:   public Control,
+:   public PanelLayout,
     public ::sfx2::sidebar::IContextChangeReceiver,
     public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
 {
@@ -67,24 +68,15 @@
 
 private:
     //ui controls
-    ::boost::scoped_ptr< FixedText >        mpFTFillColor;
-    ::boost::scoped_ptr< Window >           mpTBFillColorBackground;
-    ::boost::scoped_ptr< ToolBox >          mpTBFillColor;
-    ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpFillColorUpdater;
 
-    ::boost::scoped_ptr< FixedText >        mpFTCellBorder;
-    ::boost::scoped_ptr< Window >           mpTBCellBorderBackground;
-    ::boost::scoped_ptr< ToolBox >          mpTBCellBorder;
-    ::boost::scoped_ptr< CellBorderUpdater > mpCellBorderUpdater;
-
-    ::boost::scoped_ptr< Window >           mpTBLineStyleBackground;
-    ::boost::scoped_ptr< ToolBox >          mpTBLineStyle;
-
-    ::boost::scoped_ptr< Window >           mpTBLineColorBackground;
-    ::boost::scoped_ptr< ToolBox >          mpTBLineColor;
-    ::boost::scoped_ptr< ::svx::ToolboxButtonColorUpdater > mpLineColorUpdater;
-
-    ::boost::scoped_ptr< CheckBox >         mpCBXShowGrid;
+    ToolBox*                                mpTBFillColor;
+    ToolBox*                                mpTBCellBorder;
+    ToolBox*                                mpTBLineStyle;
+    ToolBox*                                mpTBLineColor;
+    ::svx::ToolboxButtonColorUpdater*       mpFillColorUpdater;
+    ::svx::ToolboxButtonColorUpdater*       mpLineColorUpdater;
+    CellBorderUpdater*                      mpCellBorderUpdater;
+    CheckBox*                               mpCBXShowGrid;
 
     ::sfx2::sidebar::ControllerItem         maBackColorControl;
     ::sfx2::sidebar::ControllerItem         maLineColorControl;
@@ -94,20 +86,6 @@
     ::sfx2::sidebar::ControllerItem         maGridShowControl;
     ::sfx2::sidebar::ControllerItem         maBorderTLBRControl;
     ::sfx2::sidebar::ControllerItem         maBorderBLTRControl;
-
-    // images
-    Image                                   maIMGBKColor;
-    Image                                   maIMGCellBorder;
-    Image                                   maIMGLineColor;
-    Image                                   maIMGLineStyle1;
-    Image                                   maIMGLineStyle2;
-    Image                                   maIMGLineStyle3;
-    Image                                   maIMGLineStyle4;
-    Image                                   maIMGLineStyle5;
-    Image                                   maIMGLineStyle6;
-    Image                                   maIMGLineStyle7;
-    Image                                   maIMGLineStyle8;
-    Image                                   maIMGLineStyle9;
 
     // cell background color
     Color                                   maBackColor;
@@ -150,8 +128,8 @@
     // popups
     svx::sidebar::ColorPopup                maFillColorPopup;
     svx::sidebar::ColorPopup                maLineColorPopup;
-    ::boost::scoped_ptr< CellLineStylePopup > mpCellLineStylePopup;
-    ::boost::scoped_ptr< CellBorderStylePopup > mpCellBorderStylePopup;
+    CellLineStylePopup*                     mpCellLineStylePopup;
+    CellBorderStylePopup*                   mpCellBorderStylePopup;
 
     cssu::Reference<css::frame::XFrame>     mxFrame;
     ::sfx2::sidebar::EnumContext            maContext;
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src 
b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
index cb87081..f25251d 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.src
@@ -43,106 +43,6 @@
     HelpID = HID_PROPERTYPANEL_SC_CELL_SECTION ;
     Text [ en-US ] = "Cell Appearance";
 
-    FixedText FT_BK_COLOR
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP );
-        Size = MAP_APPFONT ( PROPERTYPAGE_WIDTH - SECTIONPAGE_MARGIN_HORIZONTAL * 2 , TEXT_HEIGHT) 
;
-        Text [ en-US ] = "~Cell background:";
-    };
-    ToolBox TB_BK_COLOR
-    {
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT (SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP + 
TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL) ;
-        Size = MAP_APPFONT (TOOLBOX_WIDTH ,TOOLBOX_HEIGHT ) ;
-        TabStop = TRUE ;
-        HelpID = HID_PROPERTYPANEL_SC_TBX_BKCOLOR ;
-        Text [ en-US ] = "Cell Background";
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = TBI_BK_COLOR ;
-                DropDown = TRUE ;
-                Text [ en-US ] = "Cell background" ;
-                HelpID = HID_PROPERTYPANEL_SC_TBI_BKCOLOR;
-            };
-        };
-    };
-    String STR_QH_BK_COLOR
-    {
-        Text [ en-US ] = "Select the background color of the selected cells." ;
-    };
-    FixedText FT_BORDER
-    {
-        Pos = MAP_APPFONT ( SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP + 
TEXT_HEIGHT +  TEXT_CONTROL_SPACING_VERTICAL + TOOLBOX_HEIGHT  + CONTROL_SPACING_VERTICAL);
-        Size = MAP_APPFONT (  PROPERTYPAGE_WIDTH - SECTIONPAGE_MARGIN_HORIZONTAL * 2 , 
TEXT_HEIGHT) ;
-        Text [ en-US ] = "Cell ~border:";
-    };
-    ToolBox TB_APP_BORDER
-    {
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT (SECTIONPAGE_MARGIN_HORIZONTAL, SECTIONPAGE_MARGIN_VERTICAL_TOP + 
TEXT_HEIGHT * 2 +  TEXT_CONTROL_SPACING_VERTICAL * 2 + TOOLBOX_HEIGHT  + CONTROL_SPACING_VERTICAL) ;
-        Size = MAP_APPFONT (TOOLBOX_WIDTH_2 ,TOOLBOX_HEIGHT_2 ) ;
-        TabStop = TRUE ;
-        HelpID = HID_PROPERTYPANEL_SC_TBX_BORDER ;
-        Text [ en-US ] = "Cell Border";
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = TBI_BORDER ;
-                DropDown = TRUE ;
-                Text [ en-US ] = "Cell border" ;
-                HelpID = HID_PROPERTYPANEL_SC_TBI_BORDER;
-            };
-        };
-    };
-    String STR_QH_BORDER
-    {
-        Text [ en-US ] = "Specify the borders of the selected cells." ;
-    };
-    ToolBox TB_BORDER_LINE_STYLE
-    {
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT (SECTIONPAGE_MARGIN_HORIZONTAL + TOOLBOX_WIDTH_2 + 3, 
SECTIONPAGE_MARGIN_VERTICAL_TOP + TEXT_HEIGHT * 2 +  TEXT_CONTROL_SPACING_VERTICAL * 2 + 
TOOLBOX_HEIGHT  + CONTROL_SPACING_VERTICAL ) ;
-        Size = MAP_APPFONT (TOOLBOX_WIDTH ,TOOLBOX_HEIGHT) ;
-        TabStop = TRUE ;
-        HelpID = HID_PROPERTYPANEL_SC_TBX_STYLE ;
-        Text [ en-US ] = "Line Style";
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = TBI_LINE_STYLE ;
-                DropDown = TRUE ;
-                Text [ en-US ] = "Line style" ;
-                HelpID = HID_PROPERTYPANEL_SC_TBI_STYLE;
-            };
-        };
-    };
-    String STR_QH_BORDER_LINE_STYLE
-    {
-        Text [ en-US ] = "Select the line style of the borders." ;
-    };
-    ToolBox TB_BORDER_LINE_COLOR
-    {
-        SVLook = TRUE ;
-        Pos = MAP_APPFONT (SECTIONPAGE_MARGIN_HORIZONTAL + TOOLBOX_WIDTH_2 + 3, 
SECTIONPAGE_MARGIN_VERTICAL_TOP + TEXT_HEIGHT * 2 +  TEXT_CONTROL_SPACING_VERTICAL * 2 + 
TOOLBOX_HEIGHT * 2  + CONTROL_SPACING_VERTICAL + 3) ;
-        Size = MAP_APPFONT (TOOLBOX_WIDTH ,TOOLBOX_HEIGHT ) ;
-        TabStop = TRUE ;
-        HelpID = HID_PROPERTYPANEL_SC_TBX_LINECOLOR ;
-        Text [ en-US ] = "Line Color";
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = TBI_LINE_COLOR ;
-                DropDown = TRUE ;
-                Text [ en-US ] = "Line color" ;
-                HelpID = HID_PROPERTYPANEL_SC_TBI_LINECOLOR;
-            };
-        };
-    };
     String STR_QH_BORDER_LINE_COLOR
     {
         Text [ en-US ] = "Select the line color of the borders." ;
@@ -228,10 +128,6 @@
         Text [ en-US ] = "Color";
     };
 
-    String VS_NOFILLCOLOR
-    {
-        Text [ en-US ] = "No Color" ;
-    };
 };
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src
index c15288d..7e04333 100644
--- a/sc/source/ui/src/scstring.src
+++ b/sc/source/ui/src/scstring.src
@@ -849,4 +849,21 @@
     Text [ en-US ] = "Range contains ~row labels" ;
 };
 
+String SCSTR_NOFILLCOLOR
+{
+    Text [ en-US ] = "No Color" ;
+};
+
+String SCSTR_FILLCOLOR
+{
+    Text [ en-US ] = "Fill Color" ;
+};
+
+String SCSTR_LINECOLOR
+{
+    Text [ en-US ] = "Line Color" ;
+};
+
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/uiconfig/scalc/ui/sidebarcellappearance.ui 
b/sc/uiconfig/scalc/ui/sidebarcellappearance.ui
new file mode 100644
index 0000000..a133e6b
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/sidebarcellappearance.ui
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkGrid" id="SidebarTextPanel">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="row_homogeneous">True</property>
+    <property name="column_homogeneous">True</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">6</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child>
+          <object class="GtkBox" id="box2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <child>
+              <object class="GtkLabel" id="cellbackgroundlabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_right">119</property>
+                <property name="label" translatable="yes">_Cell background:</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolbar" id="cellbackgroundcolor">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes">Select the background color of 
the selected cells.</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="cellborderlabel">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="margin_right">153</property>
+            <property name="label" translatable="yes">Cell _border</property>
+            <property name="use_underline">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkGrid" id="grid2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkToolbar" id="cellbordertype">
+                <property name="width_request">80</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <object class="GtkMenuToolButton" id="bordertype">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="tooltip_text" translatable="yes">Specify the borders of the 
selected cells.</property>
+                    <property name="margin_right">49</property>
+                    <property name="action_name">.uno:BorderType</property>
+                    <property name="label" translatable="yes">toolbutton1</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolbar" id="borderlinestyle">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <child>
+                  <object class="GtkMenuToolButton" id="linestyle">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="tooltip_text" translatable="yes">Select the line style of the 
borders.</property>
+                    <property name="action_name">.uno:BorderLineStyle</property>
+                    <property name="label" translatable="yes">toolbutton2</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolbar" id="borderlinecolor">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes">Select the line color of the 
borders.</property>
+                <property name="margin_right">34</property>
+                <property name="hexpand">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkCheckButton" id="cellgridlines">
+            <property name="label" translatable="yes">Show cell _grid lines</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">False</property>
+            <property name="action_name">.uno:GridLinesVisible</property>
+            <property name="use_underline">True</property>
+            <property name="xalign">0</property>
+            <property name="draw_indicator">True</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="left_attach">0</property>
+        <property name="top_attach">0</property>
+        <property name="width">1</property>
+        <property name="height">1</property>
+      </packing>
+    </child>
+  </object>
+</interface>

-- 
To view, visit https://gerrit.libreoffice.org/4227
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90df6ebe428ec201aa204f26447c1728b2120c69
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Prashant Pandey <prashant3.yishu@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.