Kaydet (Commit) 28ca23af authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Michael Meeks

Related: #i122144# Use standard icons for sidebar number formats

(cherry picked from commit 7a309ee2)

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
üst af4b1dbc
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "scresid.hxx" #include "scresid.hxx"
#include <sfx2/bindings.hxx> #include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx> #include <sfx2/dispatch.hxx>
#include <sfx2/imagemgr.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx> #include <vcl/lstbox.hxx>
#include <vcl/field.hxx> #include <vcl/field.hxx>
...@@ -34,6 +35,7 @@ ...@@ -34,6 +35,7 @@
using namespace css; using namespace css;
using namespace cssu; using namespace cssu;
using ::sfx2::sidebar::Theme;
#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) #define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
...@@ -67,11 +69,6 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel( ...@@ -67,11 +69,6 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
// yes, grep for it in SC and symphony (!) // yes, grep for it in SC and symphony (!)
maFormatControl(SID_NUMBER_FORMAT, *pBindings, *this), 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), mnCategorySelected(0),
mxFrame(rxFrame), mxFrame(rxFrame),
maContext(), maContext(),
...@@ -100,11 +97,24 @@ void NumberFormatPropertyPanel::Initialize() ...@@ -100,11 +97,24 @@ void NumberFormatPropertyPanel::Initialize()
mpLbCategory->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Category"))); //wj acc mpLbCategory->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Category"))); //wj acc
mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount());
mpTBCategory->SetItemImage(ID_NUMBER, maImgNumber); // Note that we use icons from UNO commands that are not in every case the commands
mpTBCategory->SetItemImage(ID_PERCENT, maImgPercent); // that are really dispatched. They just look right.
mpTBCategory->SetItemImage(ID_CURRENCY, maImgCurrency); mpTBCategory->SetItemImage(
mpTBCategory->SetItemImage(ID_DATE, maImgDate); ID_NUMBER,
mpTBCategory->SetItemImage(ID_TEXT, maImgText); 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() ); Size aTbxSize( mpTBCategory->CalcWindowSizePixel() );
mpTBCategory->SetOutputSizePixel( aTbxSize ); mpTBCategory->SetOutputSizePixel( aTbxSize );
mpTBCategory->SetBackground(Wallpaper()); mpTBCategory->SetBackground(Wallpaper());
......
...@@ -29,11 +29,6 @@ ...@@ -29,11 +29,6 @@
#define ID_CURRENCY 12 #define ID_CURRENCY 12
#define ID_DATE 13 #define ID_DATE 13
#define ID_TEXT 14 #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============================================= //===============================================================position=============================================
......
...@@ -71,13 +71,6 @@ private: ...@@ -71,13 +71,6 @@ private:
::sfx2::sidebar::ControllerItem maNumFormatControl; ::sfx2::sidebar::ControllerItem maNumFormatControl;
::sfx2::sidebar::ControllerItem maFormatControl; ::sfx2::sidebar::ControllerItem maFormatControl;
// images
Image maImgNumber;
Image maImgPercent;
Image maImgCurrency;
Image maImgDate;
Image maImgText;
sal_uInt16 mnCategorySelected; sal_uInt16 mnCategorySelected;
cssu::Reference<css::frame::XFrame> mxFrame; cssu::Reference<css::frame::XFrame> mxFrame;
......
...@@ -158,26 +158,6 @@ Control RID_PROPERTYPANEL_SC_NUMBERFORMAT ...@@ -158,26 +158,6 @@ Control RID_PROPERTYPANEL_SC_NUMBERFORMAT
QuickHelpText [ en-US ] = "Inserts a separator between thousands."; QuickHelpText [ en-US ] = "Inserts a separator between thousands.";
Text [ en-US ] = "~Thousands separator" ; 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 // eof
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment