Kaydet (Commit) 90f83bd7 authored tarafından Matteo Casalin's avatar Matteo Casalin Kaydeden (comit) Michael Stahl

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/5616Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 743c7c09
...@@ -340,7 +340,7 @@ public: ...@@ -340,7 +340,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh) = 0; // add for SwBreakDlg virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh) = 0; // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0; //add for SwChangeDBDlg virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0; //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, 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 AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0; //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId) = 0; //add for SwCaptionDialog
...@@ -365,7 +365,7 @@ public: ...@@ -365,7 +365,7 @@ public:
SwView& rVw, SwView& rVw,
const SfxItemSet& rCoreSet, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, sal_uInt8 nDialogMode,
const String *pCollName = 0, const OUString *pCollName = 0,
sal_Bool bDraw = sal_False, sal_Bool bDraw = sal_False,
OString sDefPage = OString() ) = 0; OString sDefPage = OString() ) = 0;
...@@ -397,7 +397,7 @@ public: ...@@ -397,7 +397,7 @@ public:
bool bNewFrm = true, bool bNewFrm = true,
bool bFmt = false, bool bFmt = false,
OString sDefPage = OString(), OString sDefPage = OString(),
const String* pFmtStr = 0) = 0; //add for SwFrmDlg const OUString* pFmtStr = 0) = 0; //add for SwFrmDlg
// @param nSlot // @param nSlot
// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered. // 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 // Currently used, if nRegion == SFX_STYLE_FAMILY_PAGE in order to activate certain dialog pane
......
...@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno; ...@@ -59,7 +59,7 @@ using namespace ::com::sun::star::uno;
using namespace ::sfx2; using namespace ::sfx2;
SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet, 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", : SfxTabDialog(0, pParent, "CharacterPropertiesDialog",
"modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0) "modules/swriter/ui/characterproperties.ui", &rCoreSet, pStr != 0)
, m_rView(rVw) , m_rView(rVw)
...@@ -67,11 +67,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet, ...@@ -67,11 +67,7 @@ SwCharDlg::SwCharDlg(Window* pParent, SwView& rVw, const SfxItemSet& rCoreSet,
{ {
if(pStr) if(pStr)
{ {
String aTmp( GetText() ); SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pStr + OUString(')'));
aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
aTmp += *pStr;
aTmp += ')';
SetText(aTmp);
} }
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!"); OSL_ENSURE(pFact, "Dialogdiet fail!");
......
...@@ -48,7 +48,7 @@ SwParaDlg::SwParaDlg(Window *pParent, ...@@ -48,7 +48,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
SwView& rVw, SwView& rVw,
const SfxItemSet& rCoreSet, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, sal_uInt8 nDialogMode,
const String *pTitle, const OUString *pTitle,
sal_Bool bDraw, sal_Bool bDraw,
OString sDefPage) OString sDefPage)
: SfxTabDialog(pParent, : SfxTabDialog(pParent,
...@@ -71,11 +71,7 @@ SwParaDlg::SwParaDlg(Window *pParent, ...@@ -71,11 +71,7 @@ SwParaDlg::SwParaDlg(Window *pParent,
if(pTitle) if(pTitle)
{ {
// Update title // Update title
String aTmp( GetText() ); SetText(GetText() + SW_RESSTR(STR_TEXTCOLL_HEADER) + *pTitle + OUString(')'));
aTmp += SW_RESSTR(STR_TEXTCOLL_HEADER);
aTmp += *pTitle;
aTmp += ')';
SetText(aTmp);
} }
// tabs common to paragraph and draw paragraphs (paragraphs inside a text box) // tabs common to paragraph and draw paragraphs (paragraphs inside a text box)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
......
...@@ -705,7 +705,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& ...@@ -705,7 +705,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView&
// add for SwCharDlg // add for SwCharDlg
SfxAbstractTabDialog * SwAbstractDialogFactory_Impl::CreateSwCharDlg(Window* pParent, SwView& pVw, 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); SfxTabDialog* pDlg = new SwCharDlg(pParent, pVw, rCoreSet, nDialogMode, pFmtStr);
...@@ -794,7 +794,7 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod () ...@@ -794,7 +794,7 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw, SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw,
const SfxItemSet& rCoreSet , const SfxItemSet& rCoreSet ,
sal_uInt8 nDialogMode, sal_uInt8 nDialogMode,
const String *pCollName, const OUString *pCollName,
sal_Bool bDraw , sal_Bool bDraw ,
OString sDefPage) OString sDefPage)
{ {
...@@ -925,7 +925,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OSt ...@@ -925,7 +925,7 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OSt
bool bNewFrm, bool bNewFrm,
bool bFmt, bool bFmt,
OString sDefPage, 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); SfxTabDialog* pDlg = new SwFrmDlg(pFrame, pParent, rCoreSet, bNewFrm, rDialogType, bFmt, sDefPage, pFmtStr);
return new AbstractTabDialog_Impl(pDlg); return new AbstractTabDialog_Impl(pDlg);
......
...@@ -444,7 +444,7 @@ public: ...@@ -444,7 +444,7 @@ public:
virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh); // add for SwBreakDlg virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell &rSh); // add for SwBreakDlg
virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw); //add for SwChangeDBDlg virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw); //add for SwChangeDBDlg
virtual SfxAbstractTabDialog * CreateSwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, 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 AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable); //add for SwConvertTableDlg
virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, SwView &rV,int nResId); //add for SwCaptionDialog
...@@ -466,7 +466,7 @@ public: ...@@ -466,7 +466,7 @@ public:
SwView& rVw, SwView& rVw,
const SfxItemSet& rCoreSet, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, sal_uInt8 nDialogMode,
const String *pCollName = 0, const OUString *pCollName = 0,
sal_Bool bDraw = sal_False, sal_Bool bDraw = sal_False,
OString sDefPage = OString() ); OString sDefPage = OString() );
...@@ -496,7 +496,7 @@ public: ...@@ -496,7 +496,7 @@ public:
bool bNewFrm = true, bool bNewFrm = true,
bool bFmt = false, bool bFmt = false,
OString sDefPage = OString(), OString sDefPage = OString(),
const String* pFmtStr = 0); //add for SwFrmDlg const OUString* pFmtStr = 0); //add for SwFrmDlg
virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( virtual SfxAbstractApplyTabDialog* CreateTemplateDialog(
Window* pParent, Window* pParent,
SfxStyleSheetBase& rBase, SfxStyleSheetBase& rBase,
......
...@@ -260,7 +260,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) ...@@ -260,7 +260,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
SwAbstractDialogFactory* pFact = swui::GetFactory(); SwAbstractDialogFactory* pFact = swui::GetFactory();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); 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); SfxAbstractTabDialog* pDlg = pFact->CreateSwCharDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_CHAR_ENV, &sFmtStr);
OSL_ENSURE(pDlg, "Dialogdiet fail!"); OSL_ENSURE(pDlg, "Dialogdiet fail!");
if (pDlg->Execute() == RET_OK) if (pDlg->Execute() == RET_OK)
...@@ -299,7 +299,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton ) ...@@ -299,7 +299,7 @@ IMPL_LINK( SwEnvFmtPage, EditHdl, MenuButton *, pButton )
// set BoxInfo // set BoxInfo
::PrepareBoxInfo( aTmpSet, *pSh ); ::PrepareBoxInfo( aTmpSet, *pSh );
const String sFmtStr = pColl->GetName(); const OUString sFmtStr = pColl->GetName();
SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr); SwParaDlg *pDlg = new SwParaDlg(GetParentSwEnvDlg(), pSh->GetView(), aTmpSet, DLG_ENVELOP, &sFmtStr);
if ( pDlg->Execute() == RET_OK ) if ( pDlg->Execute() == RET_OK )
......
...@@ -53,7 +53,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, ...@@ -53,7 +53,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
OString sResType, OString sResType,
bool bFormat, bool bFormat,
OString sDefPage, OString sDefPage,
const String* pStr) const OUString* pStr)
: SfxTabDialog(pViewFrame, pParent, sResType, : SfxTabDialog(pViewFrame, pParent, sResType,
OUString("modules/swriter/ui/") + OUString("modules/swriter/ui/") +
...@@ -82,10 +82,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, ...@@ -82,10 +82,7 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame,
// //
if(pStr) if(pStr)
{ {
String aTmp( GetText() ); SetText(GetText() + SW_RESSTR(STR_COLL_HEADER) + *pStr + OUString(')'));
aTmp += SW_RESSTR(STR_COLL_HEADER);
aTmp += *pStr;
aTmp += ')';
} }
m_nStdId = AddTabPage("type", SwFrmPage::Create, 0); m_nStdId = AddTabPage("type", SwFrmPage::Create, 0);
......
...@@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog ...@@ -50,7 +50,7 @@ class SwCharDlg: public SfxTabDialog
public: public:
SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, SwCharDlg(Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
sal_uInt8 nDialogMode, const String* pFmtStr = 0); sal_uInt8 nDialogMode, const OUString* pFmtStr = 0);
~SwCharDlg(); ~SwCharDlg();
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
OString sResType = OString("FrameDialog"), OString sResType = OString("FrameDialog"),
bool bFmt = false, bool bFmt = false,
OString sDefPage = OString(), OString sDefPage = OString(),
const String* pFmtStr = 0); const OUString* pFmtStr = 0);
~SwFrmDlg(); ~SwFrmDlg();
......
...@@ -42,7 +42,7 @@ public: ...@@ -42,7 +42,7 @@ public:
SwView& rVw, SwView& rVw,
const SfxItemSet&, const SfxItemSet&,
sal_uInt8 nDialogMode, sal_uInt8 nDialogMode,
const String *pCollName = 0, const OUString *pCollName = 0,
sal_Bool bDraw = sal_False, sal_Bool bDraw = sal_False,
OString sDefPage = OString()); OString sDefPage = OString());
~SwParaDlg(); ~SwParaDlg();
......
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