diff options
author | Andre Fischer <af@apache.org> | 2013-04-26 07:37:47 +0000 |
---|---|---|
committer | Andre Fischer <af@apache.org> | 2013-04-26 07:37:47 +0000 |
commit | 7a309ee2def4ece46f78371ee18e94fae9fc3c05 (patch) | |
tree | e794aa9243f0acbfde428e46e1e556845f72026d /sc | |
parent | ae86d3036171e63bfe193e678c9c05a1ec1a12bb (diff) |
122144: Use AOO icons for sidebar number formats.
Notes
Notes:
merged as: 3f306a9036ccf50d1f05d5897645db08bbcacb27
Diffstat (limited to 'sc')
4 files changed, 20 insertions, 42 deletions
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index d91655d6316c..80fac5fb0dd6 100755 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -30,6 +30,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> @@ -39,6 +40,7 @@ using namespace css; using namespace cssu; +using ::sfx2::sidebar::Theme; #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) @@ -72,11 +74,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(), @@ -105,11 +102,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, Theme::IsHighContrastMode())); + mpTBCategory->SetItemImage( + ID_PERCENT, + GetImage(mxFrame, A2S(".uno:NumberFormatPercent"), sal_False, Theme::IsHighContrastMode())); + mpTBCategory->SetItemImage( + ID_CURRENCY, + GetImage(mxFrame, A2S(".uno:NumberFormatCurrency"), sal_False, Theme::IsHighContrastMode())); + mpTBCategory->SetItemImage( + ID_DATE, + GetImage(mxFrame, A2S(".uno:NumberFormatDate"), sal_False, Theme::IsHighContrastMode())); + mpTBCategory->SetItemImage( + ID_TEXT, + GetImage(mxFrame, A2S(".uno:InsertFixedText"), sal_False, Theme::IsHighContrastMode())); + 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 9fb5cef06f53..9c4777a50389 100755 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc @@ -33,11 +33,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 ab385870c95f..762f6a15998a 100755 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -75,13 +75,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 5da3953149ea..c0bae5130ba5 100755 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.src +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.src @@ -162,26 +162,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 |