Author: af
Date: Fri Apr 26 08:37:47 2013
New Revision: 1476103
URL: http://svn.apache.org/r1476103
Log:
122144: Use AOO icons for sidebar number formats.
Removed:
openoffice/trunk/main/default_images/sc/res/sidebar/123.png
openoffice/trunk/main/default_images/sc/res/sidebar/ABC.png
openoffice/trunk/main/default_images/sc/res/sidebar/canlendar.png
openoffice/trunk/main/default_images/sc/res/sidebar/money.png
openoffice/trunk/main/default_images/sc/res/sidebar/percent.png
Modified:
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
Modified:
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx?rev=1476103&r1=1476102&r2=1476103&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
(original)
+++ openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
Fri Apr 26 08:37:47 2013
@@ -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::NumberFormatP
// 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::Initiali
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());
Modified:
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc?rev=1476103&r1=1476102&r2=1476103&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
(original)
+++ openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hrc
Fri Apr 26 08:37:47 2013
@@ -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=============================================
Modified:
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx?rev=1476103&r1=1476102&r2=1476103&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
(original)
+++ openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
Fri Apr 26 08:37:47 2013
@@ -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;
Modified:
openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src?rev=1476103&r1=1476102&r2=1476103&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
(original)
+++ openoffice/trunk/main/sc/source/ui/sidebar/NumberFormatPropertyPanel.src
Fri Apr 26 08:37:47 2013
@@ -162,26 +162,6 @@ Control RID_PROPERTYPANEL_SC_NUMBERFORMA
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