summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-08-07 14:34:05 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-08 23:25:28 +0200
commitaf2d474ff9a91645043c1d4292891c313cceef5e (patch)
tree1650bcce0e4f0907f099181929b0d9a315234a7c
parent40b4567be2ea4aca90677167e0251cfd05385055 (diff)
sw: convert SwCaptionOptPage to OUString
Change-Id: Ibd54c1472a3f86a0799386e4cf5e929d73ac104d
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx72
-rw-r--r--sw/source/ui/inc/optload.hxx32
3 files changed, 51 insertions, 55 deletions
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index beb916efbc8a..2c08cca925da 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -161,7 +161,7 @@ sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet)
SwCondCollItem aCondItem;
for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
{
- String sEntry = aTbLinks.GetEntryText(i, 1);
+ OUString sEntry = aTbLinks.GetEntryText(i, 1);
aCondItem.SetStyle( &sEntry, i);
}
rSet.Put(aCondItem);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 312e56f924c1..2b19c92ec50a 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -398,16 +398,16 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
aCharStyleLB (this, SW_RES(LB_CHARSTYLE )),
aApplyBorderCB (this, SW_RES(CB_APPLYBORDER)),
- sSWTable (SW_RES(STR_TABLE )),
- sSWFrame (SW_RES(STR_FRAME )),
- sSWGraphic (SW_RES(STR_GRAPHIC )),
- sOLE (SW_RES(STR_OLE )),
+ m_sSWTable (SW_RES(STR_TABLE )),
+ m_sSWFrame (SW_RES(STR_FRAME )),
+ m_sSWGraphic (SW_RES(STR_GRAPHIC )),
+ m_sOLE (SW_RES(STR_OLE )),
- sBegin (SW_RESSTR(STR_BEGINNING )),
- sEnd (SW_RESSTR(STR_END )),
- sAbove (SW_RESSTR(STR_ABOVE )),
- sBelow (SW_RESSTR(STR_CP_BELOW )),
- sNone (SW_RESSTR( STR_CATEGORY_NONE )),
+ m_sBegin (SW_RESSTR(STR_BEGINNING )),
+ m_sEnd (SW_RESSTR(STR_END )),
+ m_sAbove (SW_RESSTR(STR_ABOVE )),
+ m_sBelow (SW_RESSTR(STR_CP_BELOW )),
+ m_sNone (SW_RESSTR( STR_CATEGORY_NONE )),
pMgr (new SwFldMgr()),
bHTMLMode(sal_False)
@@ -415,15 +415,10 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
Wallpaper aBack( GetSettings().GetStyleSettings().GetWindowColor() );
aPreview.SetBackground( aBack );
- OUString tmp1, tmp2, tmp3, tmp4; //FIXME
- SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, tmp1);
- SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, tmp2);
- SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, tmp3);
- SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, tmp4);
- sIllustration = tmp1;
- sTable = tmp2;
- sText = tmp3;
- sDrawing = tmp4;
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_ABB, m_sIllustration);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_TABLE, m_sTable);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_FRAME, m_sText);
+ SwStyleNameMapper::FillUIName(RES_POOLCOLL_LABEL_DRAWING, m_sDrawing);
sal_uInt16 i, nCount;
SwWrtShell *pSh = ::GetActiveWrtShell();
@@ -548,11 +543,11 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
// Writer objects
sal_uInt16 nPos = 0;
- aCheckLB.InsertEntry(sSWTable);
+ aCheckLB.InsertEntry(m_sSWTable);
SetOptions(nPos++, TABLE_CAP);
- aCheckLB.InsertEntry(sSWFrame);
+ aCheckLB.InsertEntry(m_sSWFrame);
SetOptions(nPos++, FRAME_CAP);
- aCheckLB.InsertEntry(sSWGraphic);
+ aCheckLB.InsertEntry(m_sSWGraphic);
SetOptions(nPos++, GRAPHIC_CAP);
// get Productname and -version
@@ -568,10 +563,11 @@ void SwCaptionOptPage::Reset( const SfxItemSet& rSet)
for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
{
const SvGlobalName &rOleId = aObjS[i].GetClassName();
- const String* pClassName = &aObjS[i].GetHumanName();
- if ( rOleId == SvGlobalName( SO3_OUT_CLASSID ) )
- pClassName = &sOLE;
- String sClass( *pClassName );
+ String sClass;
+ if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
+ sClass = aObjS[i].GetHumanName();
+ else
+ sClass = m_sOLE;
// don't show product version
sClass.SearchAndReplace( sComplete, sWithoutVersion );
aCheckLB.InsertEntry( sClass );
@@ -645,7 +641,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
InsCaptionOpt* pOpt = (InsCaptionOpt*)pSelEntry->GetUserData();
aCategoryBox.Clear();
- aCategoryBox.InsertEntry( sNone );
+ aCategoryBox.InsertEntry(String(m_sNone)); //FIXME
if (pSh)
{
sal_uInt16 nCount = pMgr->GetFldTypeCount();
@@ -660,16 +656,16 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
}
else
{
- aCategoryBox.InsertEntry(SwBoxEntry(sIllustration));
- aCategoryBox.InsertEntry(SwBoxEntry(sTable));
- aCategoryBox.InsertEntry(SwBoxEntry(sText));
- aCategoryBox.InsertEntry(SwBoxEntry(sDrawing));
+ aCategoryBox.InsertEntry(SwBoxEntry(m_sIllustration));
+ aCategoryBox.InsertEntry(SwBoxEntry(m_sTable));
+ aCategoryBox.InsertEntry(SwBoxEntry(m_sText));
+ aCategoryBox.InsertEntry(SwBoxEntry(m_sDrawing));
}
if(pOpt->GetCategory().Len())
aCategoryBox.SetText(pOpt->GetCategory());
else
- aCategoryBox.SetText( sNone );
+ aCategoryBox.SetText(m_sNone);
if (pOpt->GetCategory().Len() &&
aCategoryBox.GetEntryPos(OUString(pOpt->GetCategory())) == COMBOBOX_ENTRY_NOTFOUND)
aCategoryBox.InsertEntry(pOpt->GetCategory());
@@ -702,12 +698,12 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
case GRAPHIC_CAP:
case TABLE_CAP:
case OLE_CAP:
- aPosBox.InsertEntry(sAbove);
- aPosBox.InsertEntry(sBelow);
+ aPosBox.InsertEntry(m_sAbove);
+ aPosBox.InsertEntry(m_sBelow);
break;
case FRAME_CAP:
- aPosBox.InsertEntry(sBegin);
- aPosBox.InsertEntry(sEnd);
+ aPosBox.InsertEntry(m_sBegin);
+ aPosBox.InsertEntry(m_sEnd);
break;
}
aPosBox.SelectEntryPos(pOpt->GetPos());
@@ -752,7 +748,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
pOpt->UseCaption() = aCheckLB.IsChecked((sal_uInt16)aCheckLB.GetModel()->GetAbsPos(pEntry));
String aName( aCategoryBox.GetText() );
- if(aName == sNone)
+ if (aName == m_sNone)
pOpt->SetCategory(aEmptyStr);
else
pOpt->SetCategory(comphelper::string::strip(aName, ' '));
@@ -780,7 +776,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
PushButton *pBtn = pDlg ? pDlg->GetOKButton() : NULL;
if (pBtn)
pBtn->Enable(sFldTypeName.Len() != 0);
- sal_Bool bEnable = aCategoryBox.IsEnabled() && sFldTypeName != sNone;
+ sal_Bool bEnable = aCategoryBox.IsEnabled() && sFldTypeName != m_sNone;
aFormatText.Enable(bEnable);
aFormatBox.Enable(bEnable);
@@ -819,7 +815,7 @@ void SwCaptionOptPage::DrawSample()
{
String aStr;
- if( aCategoryBox.GetText() != OUString(sNone))
+ if( aCategoryBox.GetText() != m_sNone)
{
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
diff --git a/sw/source/ui/inc/optload.hxx b/sw/source/ui/inc/optload.hxx
index 293f3571a94b..a69dee861fcb 100644
--- a/sw/source/ui/inc/optload.hxx
+++ b/sw/source/ui/inc/optload.hxx
@@ -134,22 +134,22 @@ private:
ListBox aCharStyleLB;
CheckBox aApplyBorderCB;
- String sSWTable;
- String sSWFrame;
- String sSWGraphic;
- String sOLE;
-
- String sIllustration;
- String sTable;
- String sText;
- String sDrawing;
-
- String sBegin;
- String sEnd;
- String sAbove;
- String sBelow;
-
- String sNone;
+ OUString m_sSWTable;
+ OUString m_sSWFrame;
+ OUString m_sSWGraphic;
+ OUString m_sOLE;
+
+ OUString m_sIllustration;
+ OUString m_sTable;
+ OUString m_sText;
+ OUString m_sDrawing;
+
+ OUString m_sBegin;
+ OUString m_sEnd;
+ OUString m_sAbove;
+ OUString m_sBelow;
+
+ OUString m_sNone;
SwFldMgr *pMgr;
bool bHTMLMode;