diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-06 13:43:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-06 13:48:55 +0100 |
commit | 3b79694781e825a215842e57287e6054db591c57 (patch) | |
tree | 34743556cae6f741bc568d35bfc0ebf0a4f82d76 /sw/source/ui | |
parent | 03977c451acd3aadf2509397dc8224bd80ce419b (diff) |
SwFrmDlg ctor: turn sRestype into an OUString
In practice, currently possible values are ASCII, but then this string
becomes part of URLs, which are in general no longer ASCII, and are
OUStrings. Instead of trying to guess the encoding of the string we get,
require callers to create an OUString right away.
A follow-up commit could adapt SfxTabDialog ctor,
SwFrmPage::SetFrmType() and SwFrmAddPage::SetFrmType() accordingly to
avoid the new introduced OUStringToOString() calls.
Change-Id: I087ed2bb341f5aca59e15e2ef4102556ca803363
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmdlg.cxx | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 3b79a38c69dd..8bc1190a50a6 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -938,7 +938,7 @@ VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTblMergeDialog(vcl::Wind return new VclAbstractDialog_Impl( pDlg ); } -SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OString &rDialogType, +SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrmTabDialog(const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrm, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 0a4021993f71..9e6ff470c404 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -435,7 +435,7 @@ public: virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) SAL_OVERRIDE; virtual VclAbstractDialog* CreateTblMergeDialog(vcl::Window* pParent, bool& rWithPrev) SAL_OVERRIDE; - virtual SfxAbstractTabDialog* CreateFrmTabDialog( const OString &rDialogType, + virtual SfxAbstractTabDialog* CreateFrmTabDialog( const OUString &rDialogType, SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrm = true, diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx index 2213373dc58b..da504e1daaf4 100644 --- a/sw/source/ui/frmdlg/frmdlg.cxx +++ b/sw/source/ui/frmdlg/frmdlg.cxx @@ -48,14 +48,14 @@ SwFrmDlg::SwFrmDlg( SfxViewFrame* pViewFrame, vcl::Window* pParent, const SfxItemSet& rCoreSet, bool bNewFrm, - const OString& sResType, + const OUString& sResType, bool bFormat, const OString& sDefPage, const OUString* pStr) - : SfxTabDialog(pViewFrame, pParent, sResType, + : SfxTabDialog(pViewFrame, pParent, OUStringToOString(sResType, RTL_TEXTENCODING_UTF8), OUString("modules/swriter/ui/") + - OUString::fromUtf8(sResType.toAsciiLowerCase()) + + sResType.toAsciiLowerCase() + (".ui"), &rCoreSet, pStr != 0) , m_bFormat(bFormat) , m_bNew(bNewFrm) @@ -148,12 +148,12 @@ void SwFrmDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { ((SwFrmPage&)rPage).SetNewFrame(m_bNew); ((SwFrmPage&)rPage).SetFormatUsed(m_bFormat); - ((SwFrmPage&)rPage).SetFrmType(m_sDlgType); + ((SwFrmPage&)rPage).SetFrmType(OUStringToOString(m_sDlgType, RTL_TEXTENCODING_UTF8)); } else if (nId == m_nAddId) { ((SwFrmAddPage&)rPage).SetFormatUsed(m_bFormat); - ((SwFrmAddPage&)rPage).SetFrmType(m_sDlgType); + ((SwFrmAddPage&)rPage).SetFrmType(OUStringToOString(m_sDlgType, RTL_TEXTENCODING_UTF8)); ((SwFrmAddPage&)rPage).SetNewFrame(m_bNew); ((SwFrmAddPage&)rPage).SetShell(m_pWrtShell); } |