[Libreoffice-commits] core.git: sfx2/uiconfig sw/source sw/uiconfig sw/UIConfig_swriter.mk

Caolán McNamara caolanm at redhat.com
Fri Aug 9 01:24:47 PDT 2013


 sfx2/uiconfig/ui/singletabdialog.ui  |    2 
 sw/UIConfig_swriter.mk               |    1 
 sw/source/ui/frmdlg/frmui.src        |    4 -
 sw/source/ui/frmdlg/wrap.cxx         |   17 ++-----
 sw/source/ui/inc/frmui.hrc           |    1 
 sw/source/ui/inc/wrap.hxx            |    7 +--
 sw/uiconfig/swriter/ui/wrapdialog.ui |   81 +++++++++++++++++++++++++++++++++++
 7 files changed, 91 insertions(+), 22 deletions(-)

New commits:
commit 17664f377bf499cfa3438c95bbf5ac16ec7d8674
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 9 09:14:01 2013 +0100

    convert wrap dialog to .ui
    
    Change-Id: I453c7d50dad00f510770c425629594f1c197fdef

diff --git a/sfx2/uiconfig/ui/singletabdialog.ui b/sfx2/uiconfig/ui/singletabdialog.ui
index 8ad458f..647f946 100644
--- a/sfx2/uiconfig/ui/singletabdialog.ui
+++ b/sfx2/uiconfig/ui/singletabdialog.ui
@@ -8,7 +8,7 @@
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="can_focus">False</property>
-        <property name="spacing">2</property>
+        <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
             <property name="can_focus">False</property>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index cd38209..634ee53 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -148,6 +148,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
 	sw/uiconfig/swriter/ui/titlepage \
 	sw/uiconfig/swriter/ui/viewoptionspage \
 	sw/uiconfig/swriter/ui/wordcount \
+	sw/uiconfig/swriter/ui/wrapdialog \
 	sw/uiconfig/swriter/ui/wrappage \
 ))
 
diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src
index 679fc12..f771bb7 100644
--- a/sw/source/ui/frmdlg/frmui.src
+++ b/sw/source/ui/frmdlg/frmui.src
@@ -106,10 +106,6 @@ String STR_FRMUI_PATTERN
 {
     Text [ en-US ] = "Background" ;
 };
-String STR_FRMUI_WRAP
-{
-    Text [ en-US ] = "Wrap" ;
-};
 InfoBox MSG_COLUMN_ERR_BOUNDWIDTH
 {
     BUTTONS = WB_OK ;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 9194bb5..a487150 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -51,23 +51,16 @@ static sal_uInt16 aWrapPageRg[] = {
     0
 };
 
-SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
-    SfxNoLayoutSingleTabDialog(pParent, rSet, 0),
-    pWrtShell(pSh)
+SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode)
+    : SfxSingleTabDialog(pParent, rSet, "WrapDialog", "modules/swriter/ui/wrapdialog.ui")
+    , pWrtShell(pSh)
 
 {
     // create TabPage
-    SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet);
+    SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(get_content_area(), rSet);
     pNewPage->SetFormatUsed(sal_False, bDrawMode);
     pNewPage->SetShell(pWrtShell);
-    SetTabPage(pNewPage);
-
-    String sTitle(SW_RES(STR_FRMUI_WRAP));
-    SetText(sTitle);
-}
-
-SwWrapDlg::~SwWrapDlg()
-{
+    setTabPage(pNewPage);
 }
 
 SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet)
diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc
index cc03279..c893ac3 100644
--- a/sw/source/ui/inc/frmui.hrc
+++ b/sw/source/ui/inc/frmui.hrc
@@ -30,7 +30,6 @@
 
 #define STR_FRMUI_BORDER        (RC_FRMDLG_BEGIN + 16)
 #define STR_FRMUI_PATTERN       (RC_FRMDLG_BEGIN + 17)
-#define STR_FRMUI_WRAP          (RC_FRMDLG_BEGIN + 18)
 
 #define BMP_BEGIN               (RC_FRMDLG_BEGIN + 18)
 #define BMP_NOWRAP              (BMP_BEGIN+5)
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 7190ab9..96223fb 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -29,15 +29,14 @@ class Window;
 class SfxItemSet;
 class SwWrtShell;
 
-class SwWrapDlg : public SfxNoLayoutSingleTabDialog
+class SwWrapDlg : public SfxSingleTabDialog
 {
     SwWrtShell*         pWrtShell;
 
 public:
-     SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
-    ~SwWrapDlg();
+    SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
 
-    inline SwWrtShell*  GetWrtShell()   { return pWrtShell; }
+    SwWrtShell*  GetWrtShell()   { return pWrtShell; }
 };
 
 
diff --git a/sw/uiconfig/swriter/ui/wrapdialog.ui b/sw/uiconfig/swriter/ui/wrapdialog.ui
new file mode 100644
index 0000000..bff683a
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/wrapdialog.ui
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="WrapDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">Wrap</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="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>


More information about the Libreoffice-commits mailing list