summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-08-24 12:15:18 +0200
committerMichael Stahl <mstahl@redhat.com>2013-08-25 14:40:31 +0000
commit90f83bd75ffde23a42f1165b5c1e7272dca71164 (patch)
tree38372fabd7467f6471639b975ad700dcc105da76 /sw/source/ui
parent743c7c09b4deb7b62e49268f9867b96e6aab158c (diff)
String to OUString + missing SetText
SetText was addes as seen in other dialogs, for completeness, although all call places seem to pass the default null pointer. Change-Id: I1fe1792ad6f061fc762bae237f5cecfcbbd1ce06 Reviewed-on: https://gerrit.libreoffice.org/5616 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx8
-rw-r--r--sw/source/ui/chrdlg/pardlg.cxx8
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx6
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx6
-rw-r--r--sw/source/ui/envelp/envfmt.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx7
-rw-r--r--sw/source/ui/inc/chrdlg.hxx2
-rw-r--r--sw/source/ui/inc/frmdlg.hxx2
-rw-r--r--sw/source/ui/inc/swuipardlg.hxx2
9 files changed, 17 insertions, 28 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index db5ffc3f1b23..5fccdce8c52a 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno;
using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const String* pStr)
+ sal_uInt8 nDialogMode, const OUString* pStr)
: SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
"modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
, m_rView(rVw)
@@ -67,11 +67,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
{
if(pStr)
{
- String aTmp( GetText() );
- aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
- aTmp += *pStr;
- aTmp += ')';
- SetText(aTmp);
+ SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + OUString(')'));
}
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index 7686e40b77d7..31068946dc9d 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -48,7 +48,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw,
const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode,
- const String *pTitle,
+ const OUString *pTitle,
sal_Bool bDraw,
OString sDefPage)
: SfxTabDialog(pParent,
@@ -71,11 +71,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
if(pTitle)
{
// Update title
- String aTmp( GetText() );
- aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
- aTmp += *pTitle;
- aTmp += ')';
- SetText(aTmp);
+ SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pTitle + OUString(')'));
}
// tabs common to paragraph and draw paragraphs (paragraphs inside a text box)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index dfa187a70b2b..2f55dc6cc1a1 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -705,7 +705,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView&
// add for SwCharDlg
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw,
- const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const String* pFmtStr)
+ const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, const OUString* pFmtStr)
{
SfxTabDialog* pDlg = new SwCharDlg(pParent, pVw, rCoreSet, nDialogMode, pFmtStr);
@@ -794,7 +794,7 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet ,
sal_uInt8 nDialogMode,
- const String *pCollName,
+ const OUString *pCollName,
sal_Bool bDraw ,
OString sDefPage)
{
@@ -925,7 +925,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OSt
bool bNewFrm,
bool bFmt,
OString sDefPage,
- const String* pFmtStr ) //add for SwFrmDlg
+ const OUString* pFmtStr ) //add for SwFrmDlg
{
SfxTabDialog* pDlg = new SwFrmDlg(pFrame, pParent, rCoreSet, bNewFrm, rDialogType, bFmt, sDefPage, pFmtStr);
return new AbstractTabDialog_Impl(pDlg);
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 5a561aa6dc56..8076924cfb05 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -444,7 +444,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const String* pFmtStr = 0); // add for SwCharDlg
+ sal_uInt8 nDialogMode, const OUString* pFmtStr = 0); // add for SwCharDlg
virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
@@ -466,7 +466,7 @@ public:
SwView& rVw,
const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode,
- const String *pCollName = 0,
+ const OUString *pCollName = 0,
sal_Bool bDraw = sal_False,
OString sDefPage = OString() );
@@ -496,7 +496,7 @@ public:
bool bNewFrm = true,
bool bFmt = false,
OString sDefPage = OString(),
- const String* pFmtStr = 0); //add for SwFrmDlg
+ const OUString* pFmtStr = 0); //add for SwFrmDlg
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
Window* pParent,
SfxStyleSheetBase& rBase,
diff --git a/sw/source/ui/envelp/envfmt.cxx b/sw/source/ui/envelp/envfmt.cxx
index 25265be7e757..5cf9da61ab25 100644
--- a/sw/source/ui/envelp/envfmt.cxx
+++ b/sw/source/ui/envelp/envfmt.cxx
@@ -260,7 +260,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- const String sFmtStr = pColl->GetName();
+ const OUString sFmtStr = pColl->GetName();
SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFmtStr);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK)
@@ -299,7 +299,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// set BoxInfo
::PrepareBoxInfo( aTmpSet, *pSh );
- const String sFmtStr = pColl->GetName();
+ const OUString sFmtStr = pColl->GetName();
SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr);
if ( pDlg->Execute() == RET_OK )
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index a1d62202e729..428c9207d9b2 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -53,7 +53,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
OString sResType,
bool bFormat,
OString sDefPage,
- const String* pStr)
+ const OUString* pStr)
: SfxTabDialog(pViewFrame, pParent, sResType,
OUString("modules/swriter/ui/") +
@@ -82,10 +82,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
//
if(pStr)
{
- String aTmp( GetText() );
- aTmp += SW_RESSTR(STR_COLL_HEADER);
- aTmp += *pStr;
- aTmp += ')';
+ SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + OUString(')'));
}
m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
diff --git a/sw/source/ui/inc/chrdlg.hxx b/sw/source/ui/inc/chrdlg.hxx
index 596245270c09..21ddaec31684 100644
--- a/sw/source/ui/inc/chrdlg.hxx
+++ b/sw/source/ui/inc/chrdlg.hxx
@@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog
public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
- sal_uInt8 nDialogMode, const String* pFmtStr = 0);
+ sal_uInt8 nDialogMode, const OUString* pFmtStr = 0);
~SwCharDlg();
diff --git a/sw/source/ui/inc/frmdlg.hxx b/sw/source/ui/inc/frmdlg.hxx
index 4b19361ed120..a352e2227220 100644
--- a/sw/source/ui/inc/frmdlg.hxx
+++ b/sw/source/ui/inc/frmdlg.hxx
@@ -56,7 +56,7 @@ public:
OString sResType = OString("FrameDialog"),
bool bFmt = false,
OString sDefPage = OString(),
- const String* pFmtStr = 0);
+ const OUString* pFmtStr = 0);
~SwFrmDlg();
diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx
index e76c63117849..84347254a7f7 100644
--- a/sw/source/ui/inc/swuipardlg.hxx
+++ b/sw/source/ui/inc/swuipardlg.hxx
@@ -42,7 +42,7 @@ public:
SwView& rVw,
const SfxItemSet&,
sal_uInt8 nDialogMode,
- const String *pCollName = 0,
+ const OUString *pCollName = 0,
sal_Bool bDraw = sal_False,
OString sDefPage = OString());
~SwParaDlg();