sw/inc/swabstdlg.hxx | 6 +++--- sw/source/ui/chrdlg/chardlg.cxx | 8 ++------ sw/source/ui/chrdlg/pardlg.cxx | 8 ++------ sw/source/ui/dialog/swdlgfact.cxx | 6 +++--- sw/source/ui/dialog/swdlgfact.hxx | 6 +++--- sw/source/ui/envelp/envfmt.cxx | 4 ++-- sw/source/ui/frmdlg/frmdlg.cxx | 7 ++----- sw/source/ui/inc/chrdlg.hxx | 2 +- sw/source/ui/inc/frmdlg.hxx | 2 +- sw/source/ui/inc/swuipardlg.hxx | 2 +- 10 files changed, 20 insertions(+), 31 deletions(-)
New commits: commit 90f83bd75ffde23a42f1165b5c1e7272dca71164 Author: Matteo Casalin <matteo.casa...@yahoo.com> Date: Sat Aug 24 12:15:18 2013 +0200 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 <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 7a6402c..9d6f988 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -340,7 +340,7 @@ public: virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh) = 0; // add for SwBreakDlg virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0; //add for SwChangeDBDlg virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, - sal_uInt8 nDialogMode, const String* pFmtStr = 0) = 0; // add for SwCharDlg + sal_uInt8 nDialogMode, const OUString* pFmtStr = 0) = 0; // add for SwCharDlg virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0; //add for SwConvertTableDlg virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog @@ -365,7 +365,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() ) = 0; @@ -397,7 +397,7 @@ public: bool bNewFrm = true, bool bFmt = false, OString sDefPage = OString(), - const String* pFmtStr = 0) = 0; //add for SwFrmDlg + const OUString* pFmtStr = 0) = 0; //add for SwFrmDlg // @param nSlot // Identifies optional Slot by which the creation of the Template (Style) dialog is triggered. // Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to activate certain dialog pane diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx index db5ffc3..5fccdce 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 7686e40..3106894 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 dfa187a..2f55dc6 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 5a561aa..8076924 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 25265be..5cf9da6 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 a1d6220..428c920 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 5962452..21ddaec 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 4b19361..a352e22 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 e76c631..8434725 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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits