sw/inc/swabstdlg.hxx | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 2 +- sw/source/ui/dialog/swdlgfact.hxx | 2 +- sw/source/ui/frmdlg/frmdlg.cxx | 10 +++++----- sw/source/uibase/inc/frmdlg.hxx | 4 ++-- sw/source/uibase/shells/frmsh.cxx | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-)
New commits: commit 3b79694781e825a215842e57287e6054db591c57 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Nov 6 13:43:54 2014 +0100 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 diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index f554275..c94ca6f 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -389,7 +389,7 @@ public: virtual AbstractSwModalRedlineAcceptDlg * CreateSwModalRedlineAcceptDlg(vcl::Window *pParent) = 0; virtual VclAbstractDialog* CreateTblMergeDialog( vcl::Window* pParent, bool& rWithPrev ) = 0; - 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/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 3b79a38..8bc1190 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 0a402199..9e6ff47 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 2213373d..da504e1 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); } diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx index 3e0f2b9..1e5a0c4 100644 --- a/sw/source/uibase/inc/frmdlg.hxx +++ b/sw/source/uibase/inc/frmdlg.hxx @@ -31,7 +31,7 @@ class SwFrmDlg : public SfxTabDialog bool m_bNew; bool m_bHTMLMode; const SfxItemSet& m_rSet; - OString m_sDlgType; + OUString m_sDlgType; SwWrtShell* m_pWrtShell; sal_uInt16 m_nStdId; @@ -53,7 +53,7 @@ public: SwFrmDlg( SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrm = false, - const OString& sResType = OString("FrameDialog"), + const OUString& sResType = OUString("FrameDialog"), bool bFmt = false, const OString& sDefPage = OString(), const OUString* pFmtStr = 0); diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 46ec8f3..6ef7dfb 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -501,9 +501,9 @@ void SwFrameShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialog creation failed!"); boost::scoped_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateFrmTabDialog( - nSel & nsSelectionType::SEL_GRF ? "PictureDialog" : - nSel & nsSelectionType::SEL_OLE ? "ObjectDialog": - "FrameDialog", + nSel & nsSelectionType::SEL_GRF ? OUString("PictureDialog") : + nSel & nsSelectionType::SEL_OLE ? OUString("ObjectDialog"): + OUString("FrameDialog"), GetView().GetViewFrame(), GetView().GetWindow(), aSet, false, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits