diff options
-rw-r--r-- | chart2/source/controller/dialogs/dlg_NumberFormat.cxx | 3 | ||||
-rw-r--r-- | cui/UIConfig_cui.mk | 5 | ||||
-rw-r--r-- | cui/uiconfig/ui/formatnumberdialog.ui | 81 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 4 | ||||
-rw-r--r-- | include/sfx2/basedlgs.hxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 31 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/tblnumfm.cxx | 3 |
7 files changed, 115 insertions, 21 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="FormatNumberDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Format Number</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> 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() ); - - // Dialog recieves the HelpId of TabPage - SetHelpId( pImpl->m_pSfxPage->GetHelpId() ); - SetUniqueId( pImpl->m_pSfxPage->GetUniqueId() ); + // 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 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 <sfx2/tabdlg.hxx> SwNumFmtDlg::SwNumFmtDlg(Window* pParent, const SfxItemSet& rSet) - : SfxSingleTabDialog(pParent, rSet) + : SfxSingleTabDialog(pParent, rSet, "FormatNumberDialog", + "cui/ui/formatnumberdialog.ui") { // Create TabPage SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); |