From c1fd218e903d5b7b9f705b379d86f0d237705785 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 13 Nov 2013 10:14:57 +0000 Subject: convert name html design to .ui Change-Id: If384ab765e09a6600d3e9cb559ed58dccb6b18c1 --- sd/UIConfig_sdraw.mk | 1 + sd/inc/helpids.h | 2 - sd/source/filter/html/pubdlg.cxx | 25 +++++------ sd/source/filter/html/pubdlg.src | 38 ---------------- sd/source/ui/inc/pubdlg.hrc | 7 --- sd/uiconfig/sdraw/ui/namedesign.ui | 89 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 61 deletions(-) create mode 100644 sd/uiconfig/sdraw/ui/namedesign.ui diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index c6851e27b2f9..a578a2d3afc2 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/drawpagedialog \ sd/uiconfig/sdraw/ui/drawprtldialog \ sd/uiconfig/sdraw/ui/insertlayer \ + sd/uiconfig/sdraw/ui/namedesign \ sd/uiconfig/sdraw/ui/paranumberingtab \ sd/uiconfig/sdraw/ui/printeroptions \ )) diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h index a0cc01c9aca0..3d6aabf52e97 100644 --- a/sd/inc/helpids.h +++ b/sd/inc/helpids.h @@ -88,8 +88,6 @@ #define HID_SD_CHGFOIL_OBJECTS "SD_HID_SD_CHGFOIL_OBJECTS" #define HID_SD_CHGFOIL_NAME "SD_HID_SD_CHGFOIL_NAME" -#define HID_SD_HTMLEXPORT_DLG_DNAME "SD_HID_SD_HTMLEXPORT_DLG_DNAME" - #define HID_FM_CTL_SELECTION "SD_HID_FM_CTL_SELECTION" #define HID_SD_AUTOPILOT_REGION "SD_HID_SD_AUTOPILOT_REGION" diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index 26acda2af336..31076f6bda70 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -350,9 +350,8 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign) class SdDesignNameDlg : public ModalDialog { private: - Edit m_aEdit; - OKButton m_aBtnOK; - CancelButton m_aBtnCancel; + Edit* m_pEdit; + OKButton* m_pBtnOK; public: SdDesignNameDlg(Window* pWindow, const OUString& aName ); @@ -1581,26 +1580,24 @@ sal_Bool SdPublishingDlg::Save() } // SdDesignNameDlg Methods -SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const OUString& aName): - ModalDialog (pWindow, SdResId( DLG_DESIGNNAME )), - m_aEdit (this, SdResId(EDT_NAME)), - m_aBtnOK (this, SdResId(BTN_SAVE)), - m_aBtnCancel (this, SdResId(BTN_NOSAVE)) +SdDesignNameDlg::SdDesignNameDlg(Window* pWindow, const OUString& aName) + : ModalDialog(pWindow, "NameDesignDialog", "modules/sdraw/ui/namedesign.ui") { - FreeResource(); - m_aEdit.SetModifyHdl(LINK(this, SdDesignNameDlg, ModifyHdl )); - m_aEdit.SetText(aName); - m_aBtnOK.Enable(!aName.isEmpty()); + get(m_pEdit, "entry"); + get(m_pBtnOK, "ok"); + m_pEdit->SetModifyHdl(LINK(this, SdDesignNameDlg, ModifyHdl )); + m_pEdit->SetText(aName); + m_pBtnOK->Enable(!aName.isEmpty()); } OUString SdDesignNameDlg::GetDesignName() { - return m_aEdit.GetText(); + return m_pEdit->GetText(); } IMPL_LINK_NOARG(SdDesignNameDlg, ModifyHdl) { - m_aBtnOK.Enable(!m_aEdit.GetText().isEmpty()); + m_pBtnOK->Enable(!m_pEdit->GetText().isEmpty()); return 0; } diff --git a/sd/source/filter/html/pubdlg.src b/sd/source/filter/html/pubdlg.src index d13f62e82967..bf23d8503d50 100644 --- a/sd/source/filter/html/pubdlg.src +++ b/sd/source/filter/html/pubdlg.src @@ -693,42 +693,4 @@ ModalDialog DLG_PUBLISHING }; }; -ModalDialog DLG_DESIGNNAME -{ - HelpID = HID_SD_HTMLEXPORT_DLG_DNAME; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 160 , 40 ) ; - Moveable = TRUE ; - - Edit EDT_NAME - { - HelpID = "sd:Edit:DLG_DESIGNNAME:EDT_NAME"; - BORDER = TRUE ; - Pos = MAP_APPFONT ( 4, 4 ); - Size = MAP_APPFONT ( 152, 14 ); - LEFT = TRUE; - }; - - OKButton BTN_SAVE - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 25 , 22 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - TabStop = TRUE ; - Text [ en-US ] = "~Save"; - }; - - CancelButton BTN_NOSAVE - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 80 , 22 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Do Not Save"; - }; - Text [ en-US ] = "Name HTML Design"; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/pubdlg.hrc b/sd/source/ui/inc/pubdlg.hrc index d5612da51c23..77d84a892af8 100644 --- a/sd/source/ui/inc/pubdlg.hrc +++ b/sd/source/ui/inc/pubdlg.hrc @@ -123,11 +123,4 @@ #define DLG_PUBLISHING 739 -////////////////////////////// - -#define BTN_SAVE 1 -#define BTN_NOSAVE 2 -#define EDT_NAME 3 -#define DLG_DESIGNNAME 740 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/uiconfig/sdraw/ui/namedesign.ui b/sd/uiconfig/sdraw/ui/namedesign.ui new file mode 100644 index 000000000000..e568ad4f3ea1 --- /dev/null +++ b/sd/uiconfig/sdraw/ui/namedesign.ui @@ -0,0 +1,89 @@ + + + + + False + 6 + Name HTML Design + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + False + True + end + 0 + + + + + True + False + True + 12 + 12 + + + True + True + True + + + + 0 + 0 + 1 + 1 + + + + + False + True + 1 + + + + + + ok + cancel + + + -- cgit v1.2.3