diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx index 348f66772079..741bebc5e5e6 100644 --- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx +++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx @@ -40,7 +40,8 @@ namespace chart using namespace ::com::sun::star; NumberFormatDialog::NumberFormatDialog(Window* pParent, SfxItemSet& rSet) - : SfxSingleTabDialog(pParent, rSet) + : SfxSingleTabDialog(pParent, rSet, "FormatNumberDialog", + "cui/ui/formatnumberdialog.ui") { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ); diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 4bd60b4b38ab..bf0e76621277 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -21,6 +21,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/charnamepage \ cui/uiconfig/ui/colorpage \ cui/uiconfig/ui/comment \ + cui/uiconfig/ui/formatnumberdialog \ cui/uiconfig/ui/gradientpage \ cui/uiconfig/ui/colorconfigwin \ cui/uiconfig/ui/effectspage \ @@ -59,8 +60,8 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/optuserpage \ cui/uiconfig/ui/optviewpage \ cui/uiconfig/ui/pageformatpage \ - cui/uiconfig/ui/paragalignpage \ - cui/uiconfig/ui/paraindentspacing \ + cui/uiconfig/ui/paragalignpage \ + cui/uiconfig/ui/paraindentspacing \ cui/uiconfig/ui/pastespecial \ cui/uiconfig/ui/personalization_tab \ cui/uiconfig/ui/pickbulletpage \ diff --git a/cui/uiconfig/ui/formatnumberdialog.ui b/cui/uiconfig/ui/formatnumberdialog.ui new file mode 100644 index 000000000000..6671d4b2a521 --- /dev/null +++ b/cui/uiconfig/ui/formatnumberdialog.ui @@ -0,0 +1,81 @@ + + + + + False + 6 + Format Number + dialog + + + False + vertical + 2 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + + + + ok + cancel + help + + + diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index e29b8920c400..bdf86f647e0b 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2716,7 +2716,9 @@ namespace pcr aCoreSet.Put( aFormatter ); // a tab dialog with a single page - boost::scoped_ptr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog(impl_getDefaultDialogParent_nothrow(), aCoreSet)); + boost::scoped_ptr< SfxSingleTabDialog > xDialog(new SfxSingleTabDialog( + impl_getDefaultDialogParent_nothrow(), aCoreSet, + "FormatNumberDialog", "cui/ui/formatnumberdialog.ui")); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT( pFact, "CreateFactory fail!" ); ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ); diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 95278e89e605..609d639e9ed4 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -182,7 +182,8 @@ class SFX2_DLLPUBLIC SfxSingleTabDialogBase : public SfxModalDialog { public: //layout ctor - SfxSingleTabDialogBase(Window* pParent, const SfxItemSet& rOptionsSet); + SfxSingleTabDialogBase(Window *pParent, const SfxItemSet& rOptionsSet, + const OString& rID, const OUString& rUIXMLDescription); //non-layout ctors SfxSingleTabDialogBase( Window* pParent, const SfxItemSet& rOptionsSet, sal_uInt16 nUniqueId ); @@ -210,8 +211,10 @@ protected: class SFX2_DLLPUBLIC SfxSingleTabDialog : public SfxSingleTabDialogBase { public: - SfxSingleTabDialog(Window* pParent, const SfxItemSet& rOptionsSet) - : SfxSingleTabDialogBase(pParent, rOptionsSet) + SfxSingleTabDialog(Window *pParent, const SfxItemSet& rOptionsSet, + const OString& rID = OString("SingleTabDialog"), + const OUString& rUIXMLDescription = OUString("sfx/ui/singletabdialog.ui")) + : SfxSingleTabDialogBase(pParent, rOptionsSet, rID, rUIXMLDescription) { } void setTabPage(SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0, sal_uInt32 nSettingsId = 0); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 6b26bf3b0a8e..ff44f0159d94 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -749,8 +749,9 @@ SfxSingleTabDialogBase::SfxSingleTabDialogBase SetInputSet( pInSet ); } -SfxSingleTabDialogBase::SfxSingleTabDialogBase(Window *pParent, const SfxItemSet& rSet) - : SfxModalDialog(pParent, "SingleTabDialog", "sfx/ui/singletabdialog.ui") +SfxSingleTabDialogBase::SfxSingleTabDialogBase(Window *pParent, const SfxItemSet& rSet, + const OString& rID, const OUString& rUIXMLDescription) + : SfxModalDialog(pParent, rID, rUIXMLDescription) , pImpl(new SingleTabDlgImpl) { get(pOKBtn, "ok"); @@ -788,23 +789,27 @@ void SfxSingleTabDialog::setTabPage(SfxTabPage* pTabPage, { // First obtain the user data, only then Reset() SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( GetUniqId() ) ); - String sUserData; Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME ); - OUString aTemp; - if ( aUserItem >>= aTemp ) - sUserData = String( aTemp ); - pImpl->m_pSfxPage->SetUserData( sUserData ); + OUString sUserData; + aUserItem >>= sUserData; + pImpl->m_pSfxPage->SetUserData(sUserData); pImpl->m_pSfxPage->Reset( *GetInputItemSet() ); pImpl->m_pSfxPage->Show(); pHelpBtn->Show(Help::IsContextHelpEnabled()); - // Set TabPage text in the Dialog - SetText( pImpl->m_pSfxPage->GetText() ); + // Set TabPage text in the Dialog if there is any + OUString sTitle(pImpl->m_pSfxPage->GetText()); + if (!sTitle.isEmpty()) + SetText(sTitle); - // Dialog recieves the HelpId of TabPage - SetHelpId( pImpl->m_pSfxPage->GetHelpId() ); - SetUniqueId( pImpl->m_pSfxPage->GetUniqueId() ); + // Dialog recieves the HelpId of TabPage if there is any + OString sHelpId(pImpl->m_pSfxPage->GetHelpId()); + if (!sHelpId.isEmpty()) + SetHelpId(sHelpId); + OString sUniqueId(pImpl->m_pSfxPage->GetUniqueId()); + if (!sUniqueId.isEmpty()) + SetUniqueId(sUniqueId); } } diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx index 1552f606f06c..a77c08a13177 100644 --- a/sw/source/ui/chrdlg/tblnumfm.cxx +++ b/sw/source/ui/chrdlg/tblnumfm.cxx @@ -30,7 +30,8 @@ #include SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet) - : SfxSingleTabDialog(pParent, rSet) + : SfxSingleTabDialog(pParent, rSet, "FormatNumberDialog", + "cui/ui/formatnumberdialog.ui") { // Create TabPage SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();