[Libreoffice-commits] core.git: 2 commits - sc/AllLangResTarget_sc.mk sc/source sc/uiconfig sc/UIConfig_scalc.mk sfx2/source

Prashant Pandey prashant3.yishu at gmail.com
Wed Jun 12 06:06:19 PDT 2013


 sc/AllLangResTarget_sc.mk                          |    1 
 sc/UIConfig_scalc.mk                               |    1 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |   83 +-----
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc |   65 -----
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx |   19 -
 sc/source/ui/sidebar/NumberFormatPropertyPanel.src |  163 ------------
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui        |  272 +++++++++++++++++++++
 sfx2/source/control/templatecontaineritem.cxx      |   12 
 sfx2/source/control/templateviewitem.cxx           |    6 
 sfx2/source/control/thumbnailviewitem.cxx          |   12 
 10 files changed, 319 insertions(+), 315 deletions(-)

New commits:
commit 782adaed6342ceb798c52cff9c47a6dd8c1c2d72
Author: Prashant Pandey <prashant3.yishu at gmail.com>
Date:   Thu Jun 6 19:54:59 2013 +0530

    sidebar: Conversion to .ui for NumberFormatPropertyPanel
    
    Change-Id: I25891c0acda620621f0af868914cbc58776d0f53

diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk
index acf0911..9f98d4c 100644
--- a/sc/AllLangResTarget_sc.mk
+++ b/sc/AllLangResTarget_sc.mk
@@ -85,7 +85,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\
     sc/source/ui/formdlg/formdlgs.src \
     sc/source/ui/formdlg/dwfunctr.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 5b937a1..fc82180 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
 	sc/uiconfig/scalc/ui/sharedfooterdialog \
 	sc/uiconfig/scalc/ui/sharedheaderdialog \
 	sc/uiconfig/scalc/ui/sidebaralignment \
+	sc/uiconfig/scalc/ui/sidebarnumberformat \
 	sc/uiconfig/scalc/ui/solverdlg \
 	sc/uiconfig/scalc/ui/sortcriteriapage \
 	sc/uiconfig/scalc/ui/sortkey \
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 10a12f7..7e9983a 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -20,7 +20,6 @@
 #include <sfx2/sidebar/Theme.hxx>
 #include <sfx2/sidebar/ControlFactory.hxx>
 #include <NumberFormatPropertyPanel.hxx>
-#include <NumberFormatPropertyPanel.hrc>
 #include "sc.hrc"
 #include "scresid.hxx"
 #include <sfx2/bindings.hxx>
@@ -37,6 +36,12 @@ using namespace css;
 using namespace cssu;
 using ::sfx2::sidebar::Theme;
 
+const char UNO_NUMERICFIELD[]         = ".uno:NumericField";
+const char UNO_NUMBERFORMATPERCENT[]  = ".uno:NumberFormatPercent";
+const char UNO_NUMBERFORMATCURRENCY[] = ".uno:NumberFormatCurrency";
+const char UNO_NUMBERFORMATDATE[]     = ".uno:NumberFormatDate";
+const char UNO_INSERTFIXEDTEXT[]      = ".uno:InsertFixedText";
+
 #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
 
 //////////////////////////////////////////////////////////////////////////////
@@ -50,19 +55,7 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
     Window* pParent,
     const cssu::Reference<css::frame::XFrame>& rxFrame,
     SfxBindings* pBindings)
-:   Control(
-        pParent,
-        ScResId(RID_PROPERTYPANEL_SC_NUMBERFORMAT)),
-    mpFtCategory(new FixedText(this, ScResId(FT_CATEGORY))),
-    mpLbCategory(new ListBox(this, ScResId(LB_CATEGORY))),
-    mpTBCategoryBackground(sfx2::sidebar::ControlFactory::CreateToolBoxBackground(this)),
-    mpTBCategory(sfx2::sidebar::ControlFactory::CreateToolBox(mpTBCategoryBackground.get(), ScResId(TBX_CATEGORY))),
-    mpFtDecimals(new FixedText(this, ScResId(FT_DECIMALS))),
-    mpEdDecimals(new NumericField(this, ScResId(ED_DECIMALS))),
-    mpFtLeadZeroes(new FixedText(this, ScResId(FT_LEADZEROES))),
-    mpEdLeadZeroes(new NumericField(this, ScResId(ED_LEADZEROES))),
-    mpBtnNegRed(new CheckBox(this, ScResId(BTN_NEGRED))),
-    mpBtnThousand(new CheckBox(this, ScResId(BTN_THOUSAND))),
+  : PanelLayout(pParent,"NumberFormatPropertyPanel", "modules/scalc/ui/sidebarnumberformat.ui", rxFrame),
     maNumFormatControl(SID_NUMBER_TYPE_FORMAT, *pBindings, *this),
 
     // Caution! SID_NUMBER_FORMAT is reworked in symphony code, may be needed (!) If
@@ -74,17 +67,20 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
     maContext(),
     mpBindings(pBindings)
 {
+    get(mpLbCategory,   "category");
+    get(mpTBCategory,   "numberformat");
+    get(mpEdDecimals,   "decimalplaces");
+    get(mpEdLeadZeroes, "leadingzeroes");
+    get(mpBtnNegRed,    "negativenumbersred");
+    get(mpBtnThousand,  "thousandseperator");
+
     Initialize();
-    FreeResource();
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
 NumberFormatPropertyPanel::~NumberFormatPropertyPanel()
 {
-    // Destroy the toolboxes, then their background windows.
-    mpTBCategory.reset();
-    mpTBCategoryBackground.reset();
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -97,28 +93,6 @@ void NumberFormatPropertyPanel::Initialize()
     mpLbCategory->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Category")));     //wj acc
     mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount());
 
-    // Note that we use icons from UNO commands that are not in every case the commands
-    // that are really dispatched.  They just look right.
-    mpTBCategory->SetItemImage(
-        ID_NUMBER,
-        GetImage(mxFrame, A2S(".uno:NumericField"), sal_False));
-    mpTBCategory->SetItemImage(
-        ID_PERCENT,
-        GetImage(mxFrame, A2S(".uno:NumberFormatPercent"), sal_False));
-    mpTBCategory->SetItemImage(
-        ID_CURRENCY,
-        GetImage(mxFrame, A2S(".uno:NumberFormatCurrency"), sal_False));
-    mpTBCategory->SetItemImage(
-        ID_DATE,
-        GetImage(mxFrame, A2S(".uno:NumberFormatDate"), sal_False));
-    mpTBCategory->SetItemImage(
-        ID_TEXT,
-        GetImage(mxFrame, A2S(".uno:InsertFixedText"), sal_False));
-
-    Size aTbxSize( mpTBCategory->CalcWindowSizePixel() );
-    mpTBCategory->SetOutputSizePixel( aTbxSize );
-    mpTBCategory->SetBackground(Wallpaper());
-    mpTBCategory->SetPaintTransparent(true);
     aLink = LINK(this, NumberFormatPropertyPanel, NumFormatHdl);
     mpTBCategory->SetSelectHdl ( aLink );
 
@@ -131,38 +105,27 @@ void NumberFormatPropertyPanel::Initialize()
     mpBtnNegRed->SetClickHdl( aLink );
     mpBtnThousand->SetClickHdl( aLink );
 
-    mpLbCategory->SetAccessibleRelationLabeledBy(mpFtCategory.get());
-    mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory.get());
-    mpEdDecimals->SetAccessibleRelationLabeledBy(mpFtDecimals.get());
-    mpEdLeadZeroes->SetAccessibleRelationLabeledBy(mpFtLeadZeroes.get());
+    mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory);
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
 IMPL_LINK( NumberFormatPropertyPanel, NumFormatHdl, ToolBox*, pBox )
 {
-    sal_uInt16 nVal = pBox->GetCurItemId();
+    const OUString aCommand(pBox->GetItemCommand(pBox->GetCurItemId()));
     sal_uInt16 nId = 0;
-    switch(nVal)
-    {
-    case ID_NUMBER:
+
+    if(aCommand == UNO_NUMERICFIELD)
         nId = 1;
-        break;
-    case ID_PERCENT:
+    else if(aCommand == UNO_NUMBERFORMATPERCENT)
         nId = 2;
-        break;
-    case ID_CURRENCY:
+    else if(aCommand == UNO_NUMBERFORMATCURRENCY)
         nId = 3;
-        break;
-    case ID_DATE:
+    else if(aCommand == UNO_NUMBERFORMATDATE)
         nId = 4;
-        break;
-    case ID_TEXT:
+    else if(aCommand == UNO_INSERTFIXEDTEXT)
         nId = 9;
-        break;
-    default:
-        ;
-    }
+
     if( nId != mnCategorySelected )
     {
         SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT,  nId );
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
deleted file mode 100644
index 08e66bc..0000000
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   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_CATEGORY                 1
-#define LB_CATEGORY                 2
-#define FT_DECIMALS                 3
-#define ED_DECIMALS                 4
-#define FT_LEADZEROES               5
-#define ED_LEADZEROES               6
-#define BTN_NEGRED                  7
-#define BTN_THOUSAND                8
-#define TBX_CATEGORY                9
-#define ID_NUMBER                   10
-#define ID_PERCENT                  11
-#define ID_CURRENCY                 12
-#define ID_DATE                     13
-#define ID_TEXT                     14
-
-//===============================================================position=============================================
-
-#define MBOX_WIDTH                          28
-#define NF_TOOLBOX_ITEM_HEIGHT              12
-#define CHECKBOX_HEIGHT                     10
-
-#define FT_CATEGORY_X                       SECTIONPAGE_MARGIN_HORIZONTAL
-#define FT_CATEGORY_Y                       SECTIONPAGE_MARGIN_VERTICAL_TOP
-#define LB_CATEGORY_X                       FT_CATEGORY_X
-#define LB_CATEGORY_Y                       FT_CATEGORY_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-
-#define TBX_CATEGORY_X                      SECTIONPAGE_MARGIN_HORIZONTAL + 1
-#define TBX_CATEGORY_Y                      LB_CATEGORY_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-
-#define FT_DECIMALS_X                       SECTIONPAGE_MARGIN_HORIZONTAL
-#define FT_DECIMALS_Y                       TBX_CATEGORY_Y + NF_TOOLBOX_ITEM_HEIGHT + 4 + CONTROL_SPACING_VERTICAL
-#define LB_DECIMALS_X                       FT_CATEGORY_X
-#define LB_DECIMALS_Y                       FT_DECIMALS_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-
-#define FT_LEADZEROES_X                     SECTIONPAGE_MARGIN_HORIZONTAL + MBOX_WIDTH*2 + CONTROL_SPACING_HORIZONTAL
-#define FT_LEADZEROES_Y                     FT_DECIMALS_Y
-#define LB_LEADZEROES_X                     FT_LEADZEROES_X
-#define LB_LEADZEROES_Y                     FT_LEADZEROES_Y + TEXT_HEIGHT + TEXT_CONTROL_SPACING_VERTICAL
-
-#define BTN_NEGRED_X                        SECTIONPAGE_MARGIN_HORIZONTAL
-#define BTN_NEGRED_Y                        LB_LEADZEROES_Y + MBOX_HEIGHT + CONTROL_SPACING_VERTICAL
-
-#define BTN_THOUSAND_X                      SECTIONPAGE_MARGIN_HORIZONTAL
-#define BTN_THOUSAND_Y                      BTN_NEGRED_Y + CHECKBOX_HEIGHT + CONTROL_SPACING_VERTICAL - 3
-
-#define PROPERTYPAGE_HEIGHT                 BTN_THOUSAND_Y + CHECKBOX_HEIGHT + 2
-
-// eof
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index 0d1efe6..6bc898f 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.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>
 
 class FixedText;
@@ -29,7 +30,7 @@ class NumericField;
 namespace sc { namespace sidebar {
 
 class NumberFormatPropertyPanel
-:   public Control,
+:   public PanelLayout,
     public ::sfx2::sidebar::IContextChangeReceiver,
     public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
 {
@@ -56,16 +57,12 @@ public:
 
 private:
     //ui controls
-    ::boost::scoped_ptr< FixedText >        mpFtCategory;
-    ::boost::scoped_ptr< ListBox >          mpLbCategory;
-    ::boost::scoped_ptr< Window >           mpTBCategoryBackground;
-    ::boost::scoped_ptr< ToolBox >          mpTBCategory;
-    ::boost::scoped_ptr< FixedText >        mpFtDecimals;
-    ::boost::scoped_ptr< NumericField >     mpEdDecimals;
-    ::boost::scoped_ptr< FixedText >        mpFtLeadZeroes;
-    ::boost::scoped_ptr< NumericField >     mpEdLeadZeroes;
-    ::boost::scoped_ptr< CheckBox >         mpBtnNegRed;
-    ::boost::scoped_ptr< CheckBox >         mpBtnThousand;
+    ListBox*                                mpLbCategory;
+    ToolBox*                                mpTBCategory;
+    NumericField*                           mpEdDecimals;
+    NumericField*                           mpEdLeadZeroes;
+    CheckBox*                               mpBtnNegRed;
+    CheckBox*                               mpBtnThousand;
 
     ::sfx2::sidebar::ControllerItem         maNumFormatControl;
     ::sfx2::sidebar::ControllerItem         maFormatControl;
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
deleted file mode 100644
index 67b2843..0000000
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "NumberFormatPropertyPanel.hrc"
-#include <sfx2/sidebar/ResourceDefinitions.hrc>
-#include "sc.hrc"
-#include "helpids.h"
-
-Control RID_PROPERTYPANEL_SC_NUMBERFORMAT
-{
-    OutputSize = TRUE;
-    DialogControl = TRUE;
-    Border = FALSE;
-
-    Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, PROPERTYPAGE_HEIGHT );
-    HelpID = HID_PROPERTYPANEL_SC_NUM_SECTION ;
-    Text = "Number Format";
-
-    FixedText FT_CATEGORY
-    {
-        Pos = MAP_APPFONT ( FT_CATEGORY_X , FT_CATEGORY_Y ) ;
-        Size = MAP_APPFONT ( MBOX_WIDTH*4 , TEXT_HEIGHT ) ;
-        Text [ en-US ] = "~Category:" ;
-    };
-    ListBox LB_CATEGORY
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( LB_CATEGORY_X , LB_CATEGORY_Y ) ;
-        Size = MAP_APPFONT ( MBOX_WIDTH *2 , MBOX_HEIGHT ) ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_LB_CATEGORY;
-        QuickHelpText [ en-US ] = "Select a category of contents.";
-        TabStop = TRUE ;
-        DropDown = TRUE ;
-        StringList [ en-US ] =
-        {
-            < "General" ; Default ; > ;
-            < "Number" ;> ;
-            < "Percent" ;> ;
-            < "Currency" ;> ;
-            < "Date" ;> ;
-            < "Time" ;> ;
-            < "Scientific" ;> ;
-            < "Fraction" ;> ;
-            < "Boolean Value" ;> ;
-            < "Text" ;> ;
-        };
-    };
-    ToolBox TBX_CATEGORY
-    {
-        Pos = MAP_APPFONT ( TBX_CATEGORY_X , TBX_CATEGORY_Y );
-        SVLook = TRUE ;
-        Border = FALSE ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_TBX_CATEGORY;
-        Text = "Format";
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = ID_NUMBER ;
-                Text [ en-US ] = "Number" ;
-                HelpID = HID_PROPERTY_PANEL_NUMFMT_ID_NUMBER;
-            };
-            ToolBoxItem
-            {
-                Identifier = ID_PERCENT ;
-                Text [ en-US ] = "Percent" ;
-                HelpID = HID_PROPERTY_PANEL_NUMFMT_ID_PERCENT;
-            };
-            ToolBoxItem
-            {
-                Identifier = ID_CURRENCY ;
-                Text [ en-US ] = "Currency" ;
-                HelpID = HID_PROPERTY_PANEL_NUMFMT_ID_CURRENCY;
-            };
-            ToolBoxItem
-            {
-                Identifier = ID_DATE ;
-                Text [ en-US ] = "Date" ;
-                HelpID = HID_PROPERTY_PANEL_NUMFMT_ID_DATE;
-            };
-            ToolBoxItem
-            {
-                Identifier = ID_TEXT ;
-                Text [ en-US ] = "Text" ;
-                HelpID = HID_PROPERTY_PANEL_NUMFMT_ID_TEXT;
-            };
-        };
-    };
-    FixedText FT_DECIMALS
-    {
-        Pos = MAP_APPFONT ( FT_DECIMALS_X , FT_DECIMALS_Y ) ;
-        Size = MAP_APPFONT ( MBOX_WIDTH *2, TEXT_HEIGHT ) ;
-        Text [ en-US ] = "~Decimal places:" ;
-    };
-    NumericField ED_DECIMALS
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( LB_DECIMALS_X , LB_DECIMALS_Y ) ;
-        Size = MAP_APPFONT ( MBOX_WIDTH , MBOX_HEIGHT ) ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_ED_DECIMALS;
-        QuickHelpText [ en-US ] = "Enter the number of decimal places that you want to display.";
-        Spin = TRUE ;
-        Maximum = 20 ;
-        Last = 15 ;
-        First = 0 ;
-        StrictFormat = TRUE ;
-        SpinSize = 1 ;
-        Repeat = TRUE ;
-    };
-    FixedText FT_LEADZEROES
-    {
-        Pos = MAP_APPFONT ( FT_LEADZEROES_X , FT_LEADZEROES_Y ) ;
-        Size = MAP_APPFONT (PROPERTYPAGE_WIDTH -  MBOX_WIDTH *2 - SECTIONPAGE_MARGIN_HORIZONTAL * 2, TEXT_HEIGHT ) ; //
-        Text [ en-US ] = "Leading ~zeroes:" ;
-    };
-    NumericField ED_LEADZEROES
-    {
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( LB_LEADZEROES_X , LB_LEADZEROES_Y ) ;
-        Size = MAP_APPFONT ( MBOX_WIDTH , MBOX_HEIGHT ) ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_ED_LEADZEROES;
-        QuickHelpText [ en-US ] = "Enter the maximum number of zeroes to display before the decimal point.";
-        Spin = TRUE ;
-        Maximum = 20 ;
-        Last = 15 ;
-        First = 0 ;
-        StrictFormat = TRUE ;
-        SpinSize = 1 ;
-        Repeat = TRUE ;
-    };
-    CheckBox BTN_NEGRED
-    {
-        Pos = MAP_APPFONT ( BTN_NEGRED_X , BTN_NEGRED_Y ) ;
-        Size = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT ) ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_BTN_NEGRED;
-        QuickHelpText [ en-US ] = "Changes the font color of negative numbers to red.";
-        Text [ en-US ] = "~Negative numbers red" ;
-    };
-    CheckBox BTN_THOUSAND
-    {
-        Pos = MAP_APPFONT ( BTN_THOUSAND_X , BTN_THOUSAND_Y ) ;
-        Size = MAP_APPFONT ( 100 , CHECKBOX_HEIGHT ) ;
-        HelpID = HID_PROPERTY_PANEL_NUMFMT_BTN_THOUSAND;
-        QuickHelpText [ en-US ] = "Inserts a separator between thousands.";
-        Text [ en-US ] = "~Thousands separator" ;
-    };
-};
-
-// eof
diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
new file mode 100644
index 0000000..fc5137f
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
@@ -0,0 +1,272 @@
+<?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="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="categorylabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_right">122</property>
+                <property name="label" translatable="yes">_Category:</property>
+                <property name="use_underline">True</property>
+              </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="GtkComboBoxText" id="category">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes">Select a category of contents.</property>
+                <property name="entry_text_column">0</property>
+                <property name="id_column">1</property>
+                <items>
+                  <item translatable="yes">General</item>
+                  <item translatable="yes">Number</item>
+                  <item translatable="yes">Percent</item>
+                  <item translatable="yes">Currency</item>
+                  <item translatable="yes">Date </item>
+                  <item translatable="yes">Time</item>
+                  <item translatable="yes">Scientific</item>
+                  <item translatable="yes">Fraction</item>
+                  <item translatable="yes">Boolean Value</item>
+                  <item translatable="yes">Text</item>
+                </items>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkToolbar" id="numberformat">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkToolButton" id="numericfield">
+                <property name="width_request">30</property>
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:NumericField</property>
+                <property name="label" translatable="yes">toolbutton1</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="percent">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:NumberFormatPercent</property>
+                <property name="label" translatable="yes">toolbutton2</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="currency">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:NumberFormatCurrency</property>
+                <property name="label" translatable="yes">toolbutton3</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="date">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:NumberFormatDate</property>
+                <property name="label" translatable="yes">toolbutton4</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkToolButton" id="insertfixedtext">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="action_name">.uno:InsertFixedText</property>
+                <property name="label" translatable="yes">toolbutton5</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="homogeneous">True</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="GtkGrid" id="grid2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkLabel" id="decimalplaceslabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_right">2</property>
+                <property name="label" translatable="yes">_Decimal places:</property>
+                <property name="use_underline">True</property>
+              </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="GtkLabel" id="leadingzeroeslabel">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="margin_left">51</property>
+                <property name="label" translatable="yes">Leading _zeroes:</property>
+                <property name="use_underline">True</property>
+              </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="GtkSpinButton" id="decimalplaces">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip_text" translatable="yes">Enter the number of decimal places that you want to display.</property>
+                <property name="invisible_char">•</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="leadingzeroes">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="tooltip_text" translatable="yes">Enter the maximum number of zeroes to display before the decimal
+                 point.</property>
+                <property name="margin_left">50</property>
+                <property name="invisible_char">•</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>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <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="GtkCheckButton" id="negativenumbersred">
+                <property name="label" translatable="yes">_Negative numbers red</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Changes the font color of negative numbers to red.</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">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="thousandseperator">
+                <property name="label" translatable="yes">_Thousands seperator</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="tooltip_text" translatable="yes">Inserts a separator between thousands.</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">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</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>
commit 8055945bd433ff94b379d7bd38ab79614dd40f76
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Wed Jun 12 14:59:56 2013 +0200

    Primitive2DReference : ambiguous symbol
    
    Change-Id: I98876ab880e6a22693ffba9f50bf989b33ef7f1f

diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx
index c594bfd..5dc8c30 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -65,18 +65,18 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
         nSeqSize += 3;
 
     BColor aFillColor = pAttrs->aFillColor;
-    Primitive2DSequence aSeq(nSeqSize);
+    drawinglayer::primitive2d::Primitive2DSequence aSeq(nSeqSize);
 
     // Draw background
     if ( mbSelected || mbHover )
         aFillColor = pAttrs->aHighlightColor;
 
-    aSeq[nCount++] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
+    aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D(
                                                B2DPolyPolygon(Polygon(maDrawArea,5,5).getB2DPolygon()),
                                                aFillColor));
 
     // Create rounded rectangle border
-    aSeq[nCount++] = Primitive2DReference( new PolygonStrokePrimitive2D(
+    aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolygonStrokePrimitive2D(
                                               Polygon(maThumbnailArea,5,5).getB2DPolygon(),
                                               LineAttribute(BColor(0.8, 0.8, 0.8), 2.0)));
 
@@ -137,9 +137,9 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
             aBounds.append(B2DPoint(fPosX,fPosY+fHeight));
             aBounds.setClosed(true);
 
-            aSeq[nCount++] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
+            aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D(
                                                 B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
-            aSeq[nCount++] = Primitive2DReference( new FillGraphicPrimitive2D(
+            aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new FillGraphicPrimitive2D(
                                                 createScaleTranslateB2DHomMatrix(1.0,1.0,fPosX,fPosY),
                                                 FillGraphicAttribute(Graphic(*pImage),
                                                                     B2DRange(
@@ -149,7 +149,7 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
                                                 ));
 
             // draw thumbnail borders
-            aSeq[nCount++] = Primitive2DReference(createBorderLine(aBounds));
+            aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference(createBorderLine(aBounds));
         }
     }
 
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 7abafd0..f488f81 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -94,10 +94,10 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
     aBounds.append(B2DPoint(fPosX,fPosY+fHeight));
     aBounds.setClosed(true);
 
-    aSeq[1] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
+    aSeq[1] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D(
                                         B2DPolyPolygon(aBounds), Color(COL_WHITE).getBColor()));
 
-    aSeq[2] = Primitive2DReference( new FillGraphicPrimitive2D(
+    aSeq[2] = drawinglayer::primitive2d::Primitive2DReference( new FillGraphicPrimitive2D(
                                         createTranslateB2DHomMatrix(maPrev1Pos.X(),maPrev1Pos.Y()),
                                         FillGraphicAttribute(Graphic(maPreview1),
                                                             B2DRange(
@@ -107,7 +107,7 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
                                         ));
 
     // draw thumbnail borders
-    aSeq[3] = Primitive2DReference(createBorderLine(aBounds));
+    aSeq[3] = drawinglayer::primitive2d::Primitive2DReference(createBorderLine(aBounds));
 
     addTextPrimitives(maTitle, pAttrs, maTextPos, aSeq);
 
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 34981ec..b8b4bd3 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -244,14 +244,14 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
                                const ThumbnailItemAttributes *pAttrs)
 {
     BColor aFillColor = pAttrs->aFillColor;
-    Primitive2DSequence aSeq(4);
+    drawinglayer::primitive2d::Primitive2DSequence aSeq(4);
 
     // Draw background
     if ( mbSelected || mbHover )
         aFillColor = pAttrs->aHighlightColor;
 
     sal_uInt32 nPrimitive = 0;
-    aSeq[nPrimitive++] = Primitive2DReference( new PolyPolygonColorPrimitive2D(
+    aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonColorPrimitive2D(
                                                B2DPolyPolygon(Polygon(maDrawArea,5,5).getB2DPolygon()),
                                                aFillColor));
 
@@ -259,7 +259,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
     Point aPos = maPrev1Pos;
     Size aImageSize = maPreview1.GetSizePixel();
 
-    aSeq[nPrimitive++] = Primitive2DReference( new FillGraphicPrimitive2D(
+    aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( new FillGraphicPrimitive2D(
                                         createTranslateB2DHomMatrix(aPos.X(),aPos.Y()),
                                         FillGraphicAttribute(Graphic(maPreview1),
                                                             B2DRange(
@@ -281,7 +281,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
     aBounds.append(B2DPoint(fPosX,fPosY+fHeight));
     aBounds.setClosed(true);
 
-    aSeq[nPrimitive++] = Primitive2DReference(createBorderLine(aBounds));
+    aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference(createBorderLine(aBounds));
 
     // Draw text below thumbnail
     aPos = maTextPos;
@@ -290,7 +290,7 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
     pProcessor->process(aSeq);
 }
 
-void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, Primitive2DSequence& rSeq)
+void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DSequence& rSeq)
 {
     drawinglayer::primitive2d::TextLayouterDevice aTextDev;
 
@@ -335,7 +335,7 @@ void ThumbnailViewItem::addTextPrimitives (const OUString& rText, const Thumbnai
                     pAttrs->aFontSize.getX(), pAttrs->aFontSize.getY(),
                     nLineX, double( aPos.Y() ) ) );
 
-        rSeq[nPrimitives++] = Primitive2DReference(
+        rSeq[nPrimitives++] = drawinglayer::primitive2d::Primitive2DReference(
                     new TextSimplePortionPrimitive2D(aTextMatrix,
                                                      aText,nLineStart,nLineLength,
                                                      std::vector< double >( ),


More information about the Libreoffice-commits mailing list