summaryrefslogtreecommitdiff
path: root/svx/source/sidebar
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-27 17:01:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-28 16:45:48 +0100
commit5efc15f0006866ac4c422c1b2bde173ded47893f (patch)
tree119b46339aae67b9a5b1a76ea2a955a548e5016e /svx/source/sidebar
parente39a959429234aef5348a8b5800b27c29de02a6f (diff)
reduce use of UniString from ResID ctor
Change-Id: I8d7619e7807ff2d400ec5c7fd181375130245728
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r--svx/source/sidebar/area/AreaTransparencyGradientControl.cxx4
-rw-r--r--svx/source/sidebar/graphic/GraphicPropertyPanel.cxx8
-rw-r--r--svx/source/sidebar/line/LinePropertyPanel.cxx10
-rw-r--r--svx/source/sidebar/line/LineWidthControl.cxx20
-rw-r--r--svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx22
-rw-r--r--svx/source/sidebar/text/TextCharacterSpacingControl.cxx30
-rw-r--r--svx/source/sidebar/text/TextUnderlineControl.cxx22
-rw-r--r--svx/source/sidebar/tools/ColorControl.cxx4
8 files changed, 59 insertions, 61 deletions
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
index 8f1dd828056c..d0f8bd8f1414 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientControl.cxx
@@ -88,12 +88,12 @@ AreaTransparencyGradientControl::AreaTransparencyGradientControl (
maBtnLeft45.SetItemImage(1,maRotLeft);
Size aTbxSize = maBtnLeft45.CalcWindowSizePixel();
maBtnLeft45.SetOutputSizePixel( aTbxSize );
- maBtnLeft45.SetQuickHelpText(1, String(SVX_RES(STR_HELP_LEFT))); //acc wj
+ maBtnLeft45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_LEFT)); //acc wj
maBtnRight45.SetItemImage(1,maRotRight);
aTbxSize = maBtnRight45.CalcWindowSizePixel();
maBtnRight45.SetOutputSizePixel( aTbxSize );
- maBtnRight45.SetQuickHelpText(1, String(SVX_RES(STR_HELP_RIGHT))); //acc wj
+ maBtnRight45.SetQuickHelpText(1, SVX_RESSTR(STR_HELP_RIGHT)); //acc wj
maBtnLeft45.SetBackground(Wallpaper());
maBtnLeft45.SetPaintTransparent(true);
diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
index 663fa30c1140..b3b725dcbc4f 100644
--- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
+++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx
@@ -85,10 +85,10 @@ void GraphicPropertyPanel::Initialize()
mpMtrTrans->SetModifyHdl( LINK( this, GraphicPropertyPanel, ModifyTransHdl ) );
mpMtrTrans->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Transparency")));
- mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_STANDARD)));
- mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_GREYS)));
- mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_MONO)));
- mpLBColorMode->InsertEntry(String(SVX_RES(RID_SVXSTR_GRAFMODE_WATERMARK)));
+ mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_STANDARD));
+ mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_GREYS));
+ mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_MONO));
+ mpLBColorMode->InsertEntry(SVX_RESSTR(RID_SVXSTR_GRAFMODE_WATERMARK));
mpLBColorMode->SetSelectHdl( LINK( this, GraphicPropertyPanel, ClickColorModeHdl ));
mpLBColorMode->SetAccessibleName(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Color mode")));
diff --git a/svx/source/sidebar/line/LinePropertyPanel.cxx b/svx/source/sidebar/line/LinePropertyPanel.cxx
index dbacf2520fad..1d149bf516ed 100644
--- a/svx/source/sidebar/line/LinePropertyPanel.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanel.cxx
@@ -60,13 +60,11 @@ using ::sfx2::sidebar::Theme;
const char UNO_SELECTWIDTH[] = ".uno:SelectWidth";
const char UNO_SELECTCOLOR[] = ".uno:SelectColor";
-#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString)))
-
namespace {
void FillLineEndListBox(ListBox& rListBoxStart, ListBox& rListBoxEnd, const XLineEndList& rList)
{
const sal_uInt32 nCount(rList.Count());
- const String sNone(SVX_RES(RID_SVXSTR_NONE));
+ const OUString sNone(SVX_RESSTR(RID_SVXSTR_NONE));
rListBoxStart.SetUpdateMode(false);
rListBoxEnd.SetUpdateMode(false);
@@ -304,11 +302,11 @@ LinePropertyPanel* LinePropertyPanel::Create (
SfxBindings* pBindings)
{
if (pParent == NULL)
- throw lang::IllegalArgumentException(A2S("no parent Window given to LinePropertyPanel::Create"), NULL, 0);
+ throw lang::IllegalArgumentException(OUString("no parent Window given to LinePropertyPanel::Create"), NULL, 0);
if ( ! rxFrame.is())
- throw lang::IllegalArgumentException(A2S("no XFrame given to LinePropertyPanel::Create"), NULL, 1);
+ throw lang::IllegalArgumentException(OUString("no XFrame given to LinePropertyPanel::Create"), NULL, 1);
if (pBindings == NULL)
- throw lang::IllegalArgumentException(A2S("no SfxBindings given to LinePropertyPanel::Create"), NULL, 2);
+ throw lang::IllegalArgumentException(OUString("no SfxBindings given to LinePropertyPanel::Create"), NULL, 2);
return new LinePropertyPanel(
pParent,
diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx
index bd804eeee787..3e8cc4a12cc3 100644
--- a/svx/source/sidebar/line/LineWidthControl.cxx
+++ b/svx/source/sidebar/line/LineWidthControl.cxx
@@ -45,7 +45,7 @@ LineWidthControl::LineWidthControl (
maMFWidth( this, SVX_RES(MF_WIDTH)),
meMapUnit(SFX_MAPUNIT_TWIP),
rStr(NULL),
- mstrPT(SVX_RES(STR_PT)),
+ mstrPT(SVX_RESSTR(STR_PT)),
mnCustomWidth(0),
mbCustom(false),
mbColseByEdit(false),
@@ -132,15 +132,15 @@ void LineWidthControl::Initialize()
rStr = new XubString[9];
//modify,
- rStr[0] = String("05", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[1] = String("08", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[2] = String("10", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[3] = String("15", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[4] = String("23", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[5] = String("30", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[6] = String("45", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[7] = String("60", 2, RTL_TEXTENCODING_ASCII_US);
- rStr[8] = String( SVX_RES(STR_WIDTH_LAST_CUSTOM) );
+ rStr[0] = OUString("05");
+ rStr[1] = OUString("08");
+ rStr[2] = OUString("10");
+ rStr[3] = OUString("15");
+ rStr[4] = OUString("23");
+ rStr[5] = OUString("30");
+ rStr[6] = OUString("45");
+ rStr[7] = OUString("60");
+ rStr[8] = SVX_RESSTR(STR_WIDTH_LAST_CUSTOM);
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 4e429213fa3b..fabb2086ea27 100644
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -73,13 +73,13 @@ ParaLineSpacingControl::ParaLineSpacingControl(Window* pParent, svx::sidebar::Pa
, maSelSpacing2 (SVX_RES(IMG_SEL_SPACING2))
, maImgCus (SVX_RES(IMG_CUSTOM))
, maImgCusGrey (SVX_RES(IMG_CUSTOM_GRAY))
- , maStrCus (SVX_RES(STR_LCVALUE))
+ , maStrCus (SVX_RESSTR(STR_LCVALUE))
, mpImg(NULL)
, mpImgSel(NULL)
, mpStr(NULL)
, mpStrTip(NULL)
- , maLine(SVX_RES(STR_LSPACING))
- , maOf(SVX_RES(STR_LS_OF))
+ , maLine(SVX_RESSTR(STR_LSPACING))
+ , maOf(SVX_RESSTR(STR_LS_OF))
, maValue( 0 )
, maPos( 0 )
{
@@ -127,16 +127,16 @@ void ParaLineSpacingControl::initial()
mpImgSel[3] = maSelSpacing2;
mpStr = new XubString[4];
- mpStr[0] = XubString(SVX_RES(STR_SPACING1));
- mpStr[1] = XubString(SVX_RES(STR_SPACING115));
- mpStr[2] = XubString(SVX_RES(STR_SPACING15));
- mpStr[3] = XubString(SVX_RES(STR_SPACING2));
+ mpStr[0] = SVX_RESSTR(STR_SPACING1);
+ mpStr[1] = SVX_RESSTR(STR_SPACING115);
+ mpStr[2] = SVX_RESSTR(STR_SPACING15);
+ mpStr[3] = SVX_RESSTR(STR_SPACING2);
mpStrTip = new XubString[4];
- mpStrTip[0] = XubString(SVX_RES(STR_LS_SINGLE));
- mpStrTip[1] = XubString(SVX_RES(STR_LS_115));
- mpStrTip[2] = XubString(SVX_RES(STR_LS_15));
- mpStrTip[3] = XubString(SVX_RES(STR_LS_DOUBLE));
+ mpStrTip[0] = SVX_RESSTR(STR_LS_SINGLE);
+ mpStrTip[1] = SVX_RESSTR(STR_LS_115);
+ mpStrTip[2] = SVX_RESSTR(STR_LS_15);
+ mpStrTip[3] = SVX_RESSTR(STR_LS_DOUBLE);
for (int i=0;i<4;i++)
maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
index c7b3e224e10f..1f8b7222371f 100644
--- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
+++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx
@@ -50,11 +50,11 @@ TextCharacterSpacingControl::TextCharacterSpacingControl (
, maImgCus (SVX_RES(IMG_CUSTOM))
, maImgCusGrey (SVX_RES(IMG_CUSTOM_GRAY))
-, maStrCus (SVX_RES(STR_CUSTOM))
-, maStrCusE (SVX_RES(STR_CUSTOM_E_TIP)) //add
-, maStrCusC (SVX_RES(STR_CUSTOM_C_TIP)) //add
-, maStrCusN (SVX_RES(STR_NORMAL_TIP)) //add
-, maStrUnit (SVX_RES(STR_PT)) //add
+, maStrCus (SVX_RESSTR(STR_CUSTOM))
+, maStrCusE (SVX_RESSTR(STR_CUSTOM_E_TIP)) //add
+, maStrCusC (SVX_RESSTR(STR_CUSTOM_C_TIP)) //add
+, maStrCusN (SVX_RESSTR(STR_NORMAL_TIP)) //add
+, maStrUnit (SVX_RESSTR(STR_PT)) //add
, mnCustomKern(0)
, mnLastCus ( SPACING_NOCUSTOM )
@@ -112,19 +112,19 @@ void TextCharacterSpacingControl::initial()
mpImgSel[4] = Image(SVX_RES(IMG_VERY_LOOSE_S));
mpStr = new XubString[5];
- mpStr[0] = XubString(SVX_RES(STR_VERY_TIGHT));
- mpStr[1] = XubString(SVX_RES(STR_TIGHT));
- mpStr[2] = XubString(SVX_RES(STR_NORMAL));
- mpStr[3] = XubString(SVX_RES(STR_LOOSE));
- mpStr[4] = XubString(SVX_RES(STR_VERY_LOOSE));
+ mpStr[0] = SVX_RESSTR(STR_VERY_TIGHT);
+ mpStr[1] = SVX_RESSTR(STR_TIGHT);
+ mpStr[2] = SVX_RESSTR(STR_NORMAL);
+ mpStr[3] = SVX_RESSTR(STR_LOOSE);
+ mpStr[4] = SVX_RESSTR(STR_VERY_LOOSE);
mpStrTip = new XubString[5];
- mpStrTip[0] = XubString(SVX_RES(STR_VERY_TIGHT_TIP));
- mpStrTip[1] = XubString(SVX_RES(STR_TIGHT_TIP));
- mpStrTip[2] = XubString(SVX_RES(STR_NORMAL_TIP));
- mpStrTip[3] = XubString(SVX_RES(STR_LOOSE_TIP));
- mpStrTip[4] = XubString(SVX_RES(STR_VERY_LOOSE_TIP));
+ mpStrTip[0] = SVX_RESSTR(STR_VERY_TIGHT_TIP);
+ mpStrTip[1] = SVX_RESSTR(STR_TIGHT_TIP);
+ mpStrTip[2] = SVX_RESSTR(STR_NORMAL_TIP);
+ mpStrTip[3] = SVX_RESSTR(STR_LOOSE_TIP);
+ mpStrTip[4] = SVX_RESSTR(STR_VERY_LOOSE_TIP);
for (int i=0;i<5;i++)
maVSSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]);
diff --git a/svx/source/sidebar/text/TextUnderlineControl.cxx b/svx/source/sidebar/text/TextUnderlineControl.cxx
index 8c2227bf7e42..975cc1324175 100644
--- a/svx/source/sidebar/text/TextUnderlineControl.cxx
+++ b/svx/source/sidebar/text/TextUnderlineControl.cxx
@@ -82,36 +82,36 @@ void TextUnderlineControl::initial()
// 'none' item
maVSUnderline.SetStyle( maVSUnderline.GetStyle()| WB_NONEFIELD | WB_MENUSTYLEVALUESET );
- maVSUnderline.SetText( String(SVX_RES(STR_WITHOUT) ) );
+ maVSUnderline.SetText( SVX_RESSTR(STR_WITHOUT) );
- maVSUnderline.InsertItem(1, maIMGSingle ,String(SVX_RES(STR_SINGLE)));
+ maVSUnderline.InsertItem(1, maIMGSingle, SVX_RESSTR(STR_SINGLE));
maVSUnderline.SetItemData(1, (void*)(sal_uInt64)UNDERLINE_SINGLE);
- maVSUnderline.InsertItem(2, maIMGDouble ,String(SVX_RES(STR_DOUBLE)));
+ maVSUnderline.InsertItem(2, maIMGDouble, SVX_RESSTR(STR_DOUBLE));
maVSUnderline.SetItemData(2, (void*)(sal_uInt64)UNDERLINE_DOUBLE);
- maVSUnderline.InsertItem(3, maIMGBold, String(SVX_RES(STR_BOLD)));
+ maVSUnderline.InsertItem(3, maIMGBold, SVX_RESSTR(STR_BOLD));
maVSUnderline.SetItemData(3,(void*)(sal_uInt64)UNDERLINE_BOLD);
- maVSUnderline.InsertItem(4, maIMGDot, String(SVX_RES(STR_DOT)));
+ maVSUnderline.InsertItem(4, maIMGDot, SVX_RESSTR(STR_DOT));
maVSUnderline.SetItemData(4,(void*)(sal_uInt64)UNDERLINE_DOTTED);
- maVSUnderline.InsertItem(5, maIMGDotBold, String(SVX_RES(STR_DOT_BOLD)));
+ maVSUnderline.InsertItem(5, maIMGDotBold, SVX_RESSTR(STR_DOT_BOLD));
maVSUnderline.SetItemData(5,(void*)(sal_uInt64)UNDERLINE_BOLDDOTTED);
- maVSUnderline.InsertItem(6, maIMGDash, String(SVX_RES(STR_DASH)));
+ maVSUnderline.InsertItem(6, maIMGDash, SVX_RESSTR(STR_DASH));
maVSUnderline.SetItemData(6,(void*)(sal_uInt64)UNDERLINE_DASH);
- maVSUnderline.InsertItem(7, maIMGDashLong,String(SVX_RES(STR_DASH_LONG)));
+ maVSUnderline.InsertItem(7, maIMGDashLong, SVX_RESSTR(STR_DASH_LONG));
maVSUnderline.SetItemData(7,(void*)(sal_uInt64)UNDERLINE_LONGDASH);
- maVSUnderline.InsertItem(8, maIMGDashDot, String(SVX_RES(STR_DASH_DOT)));
+ maVSUnderline.InsertItem(8, maIMGDashDot, SVX_RESSTR(STR_DASH_DOT));
maVSUnderline.SetItemData(8,(void*)(sal_uInt64)UNDERLINE_DASHDOT);
- maVSUnderline.InsertItem(9, maIMGDashDotDot, String(SVX_RES(STR_DASH_DOT_DOT)));
+ maVSUnderline.InsertItem(9, maIMGDashDotDot, SVX_RESSTR(STR_DASH_DOT_DOT));
maVSUnderline.SetItemData(9,(void*)(sal_uInt64)UNDERLINE_DASHDOTDOT);
- maVSUnderline.InsertItem(10, maIMGWave, String(SVX_RES(STR_WAVE)));
+ maVSUnderline.InsertItem(10, maIMGWave, SVX_RESSTR(STR_WAVE));
maVSUnderline.SetItemData(10,(void*)(sal_uInt64)UNDERLINE_WAVE);
maVSUnderline.SetColCount( 1 );
diff --git a/svx/source/sidebar/tools/ColorControl.cxx b/svx/source/sidebar/tools/ColorControl.cxx
index ba43c0fc367d..48bc023b3f6e 100644
--- a/svx/source/sidebar/tools/ColorControl.cxx
+++ b/svx/source/sidebar/tools/ColorControl.cxx
@@ -97,8 +97,8 @@ ColorControl::ColorControl (
mpFloatingWindow(pFloatingWindow),
msNoColorString(
pNoColorStringResId
- ? String(*pNoColorStringResId)
- : String()),
+ ? pNoColorStringResId->toString()
+ : OUString()),
maNoColorGetter(rNoColorGetter),
maColorSetter(rColorSetter)
{