summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-14 12:28:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-15 09:46:23 +0000
commite34263af775118ccea4b69a641e618dbe13df15b (patch)
tree67b4cff678fc6d90f7a62bc26294b460a6eb18fc /sd
parentRemove unused parts of TkResMgr (diff)
downloadcore-e34263af775118ccea4b69a641e618dbe13df15b.tar.gz
core-e34263af775118ccea4b69a641e618dbe13df15b.zip
convert draw table design dialog to .ui
Change-Id: Ieb9e7f9d2b8ff89aa83e44f4f1d3f634adf71b25
Diffstat (limited to 'sd')
-rw-r--r--sd/UIConfig_sdraw.mk1
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx23
-rw-r--r--sd/source/ui/table/TableDesignPane.hrc6
-rw-r--r--sd/source/ui/table/TableDesignPane.hxx8
-rw-r--r--sd/source/ui/table/TableDesignPane.src44
-rw-r--r--sd/uiconfig/sdraw/ui/tabledesigndialog.ui82
6 files changed, 93 insertions, 71 deletions
diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk
index 1f924e810adf..90c2448cf949 100644
--- a/sd/UIConfig_sdraw.mk
+++ b/sd/UIConfig_sdraw.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\
sd/uiconfig/sdraw/ui/namedesign \
sd/uiconfig/sdraw/ui/paranumberingtab \
sd/uiconfig/sdraw/ui/printeroptions \
+ sd/uiconfig/sdraw/ui/tabledesigndialog \
))
# vim: set noet sw=4 ts=4:
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index adeecf635619..5247d6e9efc8 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -29,6 +29,7 @@
#include <comphelper/processfactory.hxx>
#include <sfx2/viewfrm.hxx>
#include <vcl/bmpacc.hxx>
+#include <vcl/layout.hxx>
#include <svl/style.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/app.hxx>
@@ -952,17 +953,11 @@ void TableDesignPane::FillDesignPreviewControl()
// ====================================================================
TableDesignDialog::TableDesignDialog(::Window* pParent, ViewShellBase& rBase )
-: ModalDialog( pParent, SdResId( DLG_TABLEDESIGNPANE ))
+ : ModalDialog(pParent, "TableDesignDialog",
+ "modules/sdraw/ui/tabledesigndialog.ui")
{
- mxFlSep1.reset( new FixedLine( this, SdResId( FL_SEP1 ) ) );
- mxFlSep2.reset( new FixedLine( this, SdResId( FL_SEP2 ) ) );
- mxHelpButton.reset( new HelpButton( this, SdResId( BTN_HELP ) ) );
- mxOkButton.reset( new OKButton( this, SdResId( BTN_OK ) ) );
- mxCancelButton.reset( new CancelButton( this, SdResId( BTN_CANCEL ) ) );
- FreeResource();
-
- mpDesignPane.reset( new TableDesignPane( this, rBase, true ) );
- mpDesignPane->Hide();
+ mxDesignPane.reset( new TableDesignPane( get_content_area(), rBase, true ) );
+ mxDesignPane->Hide();
}
// --------------------------------------------------------------------
@@ -971,11 +966,11 @@ short TableDesignDialog::Execute()
{
if( ModalDialog::Execute() )
{
- if( mpDesignPane->isStyleChanged() )
- mpDesignPane->ApplyStyle();
+ if( mxDesignPane->isStyleChanged() )
+ mxDesignPane->ApplyStyle();
- if( mpDesignPane->isOptionsChanged() )
- mpDesignPane->ApplyOptions();
+ if( mxDesignPane->isOptionsChanged() )
+ mxDesignPane->ApplyOptions();
return sal_True;
}
return sal_False;
diff --git a/sd/source/ui/table/TableDesignPane.hrc b/sd/source/ui/table/TableDesignPane.hrc
index 10c087f9e4f7..914b3e93376b 100644
--- a/sd/source/ui/table/TableDesignPane.hrc
+++ b/sd/source/ui/table/TableDesignPane.hrc
@@ -33,12 +33,6 @@
#define DESIGNPANE_CONTROL_COUNT 9
-#define FL_SEP1 10
-#define FL_SEP2 11
-#define BTN_HELP 12
-#define BTN_OK 13
-#define BTN_CANCEL 14
-
#endif // _SD_TABLEDESIGNPANE_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/table/TableDesignPane.hxx
index 34e6c3e72da6..50831e966339 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/table/TableDesignPane.hxx
@@ -107,13 +107,7 @@ public:
virtual short Execute();
private:
- boost::scoped_ptr< TableDesignPane > mpDesignPane;
-
- boost::scoped_ptr< FixedLine > mxFlSep1;
- boost::scoped_ptr< FixedLine > mxFlSep2;
- boost::scoped_ptr< HelpButton > mxHelpButton;
- boost::scoped_ptr< OKButton > mxOkButton;
- boost::scoped_ptr< CancelButton > mxCancelButton;
+ boost::scoped_ptr< TableDesignPane > mxDesignPane;
};
}
diff --git a/sd/source/ui/table/TableDesignPane.src b/sd/source/ui/table/TableDesignPane.src
index c058d6370d0e..0be0bca69d53 100644
--- a/sd/source/ui/table/TableDesignPane.src
+++ b/sd/source/ui/table/TableDesignPane.src
@@ -102,48 +102,4 @@ Control DLG_TABLEDESIGNPANE
};
};
-ModalDialog DLG_TABLEDESIGNPANE
-{
- HelpID = "sd:ModalDialog:DLG_TABLEDESIGNPANE";
- OutputSize = TRUE;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Size = MAP_APPFONT( 272, 198 );
-
- Text [ en-US ] = "Table Design";
-
- FixedLine FL_SEP1
- {
- Pos = MAP_APPFONT( 135, 14 );
- Size = MAP_APPFONT( 8, 143 );
- Vert = TRUE ;
- };
- FixedLine FL_SEP2
- {
- Pos = MAP_APPFONT ( 0 , 160 ) ;
- Size = MAP_APPFONT ( 272 , 12 ) ;
- };
-
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 6 , 176 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 158 , 176 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 211 , 176 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/uiconfig/sdraw/ui/tabledesigndialog.ui b/sd/uiconfig/sdraw/ui/tabledesigndialog.ui
new file mode 100644
index 000000000000..95427a6434ff
--- /dev/null
+++ b/sd/uiconfig/sdraw/ui/tabledesigndialog.ui
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="TableDesignDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Table 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="margin_top">5</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>