dev/null |binary sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 30 ++++++++++++++------- sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc | 5 --- sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 7 ---- sc/source/ui/sidebar/NumberFormatPropertyPanel.src | 20 -------------- 5 files changed, 20 insertions(+), 42 deletions(-)
New commits: commit 3f306a9036ccf50d1f05d5897645db08bbcacb27 Author: Andre Fischer <a...@apache.org> Date: Fri Apr 26 07:37:47 2013 +0000 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 diff --git a/icon-themes/galaxy/sc/res/sidebar/123.png b/icon-themes/galaxy/sc/res/sidebar/123.png deleted file mode 100755 index 0d0a6ef..0000000 Binary files a/icon-themes/galaxy/sc/res/sidebar/123.png and /dev/null differ diff --git a/icon-themes/galaxy/sc/res/sidebar/ABC.png b/icon-themes/galaxy/sc/res/sidebar/ABC.png deleted file mode 100755 index fb7e5c8..0000000 Binary files a/icon-themes/galaxy/sc/res/sidebar/ABC.png and /dev/null differ diff --git a/icon-themes/galaxy/sc/res/sidebar/canlendar.png b/icon-themes/galaxy/sc/res/sidebar/canlendar.png deleted file mode 100755 index b40421e..0000000 Binary files a/icon-themes/galaxy/sc/res/sidebar/canlendar.png and /dev/null differ diff --git a/icon-themes/galaxy/sc/res/sidebar/money.png b/icon-themes/galaxy/sc/res/sidebar/money.png deleted file mode 100755 index 15b6ff2..0000000 Binary files a/icon-themes/galaxy/sc/res/sidebar/money.png and /dev/null differ diff --git a/icon-themes/galaxy/sc/res/sidebar/percent.png b/icon-themes/galaxy/sc/res/sidebar/percent.png deleted file mode 100755 index 83f3751..0000000 Binary files a/icon-themes/galaxy/sc/res/sidebar/percent.png and /dev/null differ diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 9a7e2cb..10a12f7 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 13b17c3..08e66bc 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 cf7087c..8fc3f02 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 2111a5c..67b2843 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits