summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-13 10:14:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-13 13:50:36 +0000
commitc1fd218e903d5b7b9f705b379d86f0d237705785 (patch)
treee85b460fa226b6cd69be7a921c87e885723749ec /sd
parentff5448b6c7be7a4ea60787aa1e64362d7f8f8077 (diff)
convert name html design to .ui
Change-Id: If384ab765e09a6600d3e9cb559ed58dccb6b18c1
Diffstat (limited to 'sd')
-rw-r--r--sd/UIConfig_sdraw.mk1
-rw-r--r--sd/inc/helpids.h2
-rw-r--r--sd/source/filter/html/pubdlg.cxx25
-rw-r--r--sd/source/filter/html/pubdlg.src38
-rw-r--r--sd/source/ui/inc/pubdlg.hrc7
-rw-r--r--sd/uiconfig/sdraw/ui/namedesign.ui89
6 files changed, 101 insertions, 61 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="NameDesignDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Name HTML Design</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">12</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="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>
+ </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>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">12</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkEntry" id="entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>