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:
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
......
......@@ -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!");
......
......@@ -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();
......
......@@ -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);
......
......@@ -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,
......
......@@ -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 )
......
......@@ -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);
......
......@@ -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();
......
......@@ -56,7 +56,7 @@ public:
OString sResType = OString("FrameDialog"),
bool bFmt = false,
OString sDefPage = OString(),
const String* pFmtStr = 0);
const OUString* pFmtStr = 0);
~SwFrmDlg();
......
......@@ -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();
......
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