summaryrefslogtreecommitdiff
path: root/sc/source/ui/sidebar
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-04-26 07:37:47 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:23 +0100
commit28ca23af2b67f260faf2b6e797d829b21ccd287a (patch)
treeced192b4e7470b07d888a57377007185ac8f712c /sc/source/ui/sidebar
parentaf4b1dbc934feeaf32eaebfaf331f4264b05e4ee (diff)
Related: #i122144# Use standard icons for sidebar number formats
(cherry picked from commit 7a309ee2def4ece46f78371ee18e94fae9fc3c05) Conflicts: icon-themes/galaxy/sc/res/sidebar/123.png icon-themes/galaxy/sc/res/sidebar/ABC.png icon-themes/galaxy/sc/res/sidebar/canlendar.png icon-themes/galaxy/sc/res/sidebar/money.png icon-themes/galaxy/sc/res/sidebar/percent.png Change-Id: I69c6c9b6f6cf887332186b68ca4b9e8775575855
Diffstat (limited to 'sc/source/ui/sidebar')
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx30
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc5
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx7
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.src20
4 files changed, 20 insertions, 42 deletions
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 9a7e2cbd3a50..10a12f73c1c0 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -25,6 +25,7 @@
#include "scresid.hxx"
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/imagemgr.hxx>
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/field.hxx>
@@ -34,6 +35,7 @@
using namespace css;
using namespace cssu;
+using ::sfx2::sidebar::Theme;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
@@ -67,11 +69,6 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
// yes, grep for it in SC and symphony (!)
maFormatControl(SID_NUMBER_FORMAT, *pBindings, *this),
- maImgNumber(ScResId(IMG_NUMBER)),
- maImgPercent(ScResId(IMG_PERCENT)),
- maImgCurrency(ScResId(IMG_CURRENCY)),
- maImgDate(ScResId(IMG_DATE)),
- maImgText(ScResId(IMG_TEXT)),
mnCategorySelected(0),
mxFrame(rxFrame),
maContext(),
@@ -100,11 +97,24 @@ void NumberFormatPropertyPanel::Initialize()
mpLbCategory->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Category"))); //wj acc
mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount());
- mpTBCategory->SetItemImage(ID_NUMBER, maImgNumber);
- mpTBCategory->SetItemImage(ID_PERCENT, maImgPercent);
- mpTBCategory->SetItemImage(ID_CURRENCY, maImgCurrency);
- mpTBCategory->SetItemImage(ID_DATE, maImgDate);
- mpTBCategory->SetItemImage(ID_TEXT, maImgText);
+ // 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());
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
index 13b17c32ef71..08e66bc29432 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
@@ -29,11 +29,6 @@
#define ID_CURRENCY 12
#define ID_DATE 13
#define ID_TEXT 14
-#define IMG_NUMBER 15
-#define IMG_PERCENT 16
-#define IMG_CURRENCY 17
-#define IMG_DATE 18
-#define IMG_TEXT 19
//===============================================================position=============================================
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index cf7087cb3ad9..8fc3f023e600 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
@@ -71,13 +71,6 @@ private:
::sfx2::sidebar::ControllerItem maNumFormatControl;
::sfx2::sidebar::ControllerItem maFormatControl;
- // images
- Image maImgNumber;
- Image maImgPercent;
- Image maImgCurrency;
- Image maImgDate;
- Image maImgText;
-
sal_uInt16 mnCategorySelected;
cssu::Reference<css::frame::XFrame> mxFrame;
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
index 2111a5ca233f..67b28434a375 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
@@ -158,26 +158,6 @@ Control RID_PROPERTYPANEL_SC_NUMBERFORMAT
QuickHelpText [ en-US ] = "Inserts a separator between thousands.";
Text [ en-US ] = "~Thousands separator" ;
};
- Image IMG_NUMBER
- {
- ImageBitmap = Bitmap{File = "sidebar/123.png";};
- };
- Image IMG_PERCENT
- {
- ImageBitmap = Bitmap{File = "sidebar/percent.png";};
- };
- Image IMG_CURRENCY
- {
- ImageBitmap = Bitmap{File = "sidebar/money.png";};
- };
- Image IMG_DATE
- {
- ImageBitmap = Bitmap{File = "sidebar/canlendar.png";};
- };
- Image IMG_TEXT
- {
- ImageBitmap = Bitmap{File = "sidebar/ABC.png";};
- };
};
// eof