[Libreoffice-commits] .: 2 commits - cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 2 08:47:13 PDT 2012


 cui/AllLangResTarget_cui.mk        |    1 
 cui/UI_cui.mk                      |    1 
 cui/source/dialogs/cuires.src      |   14 +-
 cui/source/dialogs/insrc.cxx       |   26 +--
 cui/source/dialogs/insrc.hrc       |   31 ----
 cui/source/dialogs/insrc.src       |  109 ----------------
 cui/source/inc/cuires.hrc          |    7 -
 cui/source/inc/insrc.hxx           |   13 -
 cui/uiconfig/ui/insertrowcolumn.ui |  252 +++++++++++++++++++++++++++++++++++++
 9 files changed, 280 insertions(+), 174 deletions(-)

New commits:
commit 0633cd04b8739436fe1a10a67a4804ecdb724198
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 2 15:23:16 2012 +0000

    tidy dialog a bit
    
    Change-Id: I301e24aeb3f8b49dbf9902b7fb00c2992ece5e42

diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk
index 4128699..9ec65f9 100644
--- a/cui/AllLangResTarget_cui.mk
+++ b/cui/AllLangResTarget_cui.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
     cui/source/dialogs/hlmarkwn.src \
     cui/source/dialogs/hyperdlg.src \
     cui/source/dialogs/iconcdlg.src \
-    cui/source/dialogs/insrc.src \
     cui/source/dialogs/multipat.src \
     cui/source/dialogs/newtabledlg.src \
     cui/source/dialogs/passwdomdlg.src \
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 9e4f844..a4df7be 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
 	cui/uiconfig/ui/insertfloatingframe \
 	cui/uiconfig/ui/insertoleobject \
 	cui/uiconfig/ui/insertplugin \
-	cui/uiconfig/ui/insrc \
+	cui/uiconfig/ui/insertrowcolumn \
 	cui/uiconfig/ui/macroselectordialog \
 	cui/uiconfig/ui/positionpage \
 	cui/uiconfig/ui/specialcharacters \
diff --git a/cui/source/dialogs/cuires.src b/cui/source/dialogs/cuires.src
index 2e6e6ed..8fa9695 100644
--- a/cui/source/dialogs/cuires.src
+++ b/cui/source/dialogs/cuires.src
@@ -31,12 +31,22 @@ String RID_SVXSTR_PRODMACROS
 
 String RID_SVXSTR_SELECTOR_ADD_COMMANDS
 {
-  TEXT [ en-US ] = "Add Commands" ;
+    TEXT [ en-US ] = "Add Commands" ;
 };
 
 String RID_SVXSTR_SELECTOR_RUN
 {
-  TEXT [ en-US ] = "Run" ;
+    TEXT [ en-US ] = "Run" ;
+};
+
+String RID_SVXSTR_ROW
+{
+    Text [ en-US ] = "Insert Rows" ;
+};
+
+String RID_SVXSTR_COL
+{
+    Text [ en-US ] = "Insert Columns" ;
 };
 
 #define MASKCOLOR  MaskColor = \
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index e48a8eb..7efbc48 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -21,7 +21,6 @@
 #include <svx/svxdlg.hxx>
 #include <cuires.hrc>
 #include "insrc.hxx"
-#include "insrc.hrc"
 
 bool SvxInsRowColDlg::isInsertBefore() const
 {
@@ -34,10 +33,10 @@ sal_uInt16 SvxInsRowColDlg::getInsertCount() const
 }
 
 SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId )
-    : ModalDialog( pParent, "insert_row_dialog", "cui/ui/insrc.ui" ),
-    aRow(CUI_RESSTR(STR_ROW)),
-    aCol(CUI_RESSTR(STR_COL)),
-    bColumn( bCol )
+    : ModalDialog(pParent, "InsertRowColumnDialog", "cui/ui/insertrowcolumn.ui")
+    , aRow(CUI_RESSTR(RID_SVXSTR_ROW))
+    , aCol(CUI_RESSTR(RID_SVXSTR_COL))
+    , bColumn(bCol)
 {
     get(m_pCountEdit, "insert_number");
     get(m_pBeforeBtn, "insert_before");
diff --git a/cui/source/dialogs/insrc.hrc b/cui/source/dialogs/insrc.hrc
deleted file mode 100644
index d024cfe..0000000
--- a/cui/source/dialogs/insrc.hrc
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#define FT_COUNT    1
-#define ED_COUNT    2
-#define FL_INS          3
-
-#define CB_POS_BEFORE   10
-#define CB_POS_AFTER    11
-#define FL_POS                  12
-
-#define STR_ROW         20
-#define STR_COL         21
-
-#define BT_OK       100
-#define BT_CANCEL   101
-#define BT_HELP     102
diff --git a/cui/source/dialogs/insrc.src b/cui/source/dialogs/insrc.src
deleted file mode 100644
index 101dca6..0000000
--- a/cui/source/dialogs/insrc.src
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-
-#include <cuires.hrc>
-#include "insrc.hrc"
-
-ModalDialog DLG_INS_ROW_COL
-{
-    HelpID = "cui:ModalDialog:DLG_INS_ROW_COL";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 136 , 84 ) ;
-    Moveable = TRUE ;
-    OKButton BT_OK
-    {
-        Pos = MAP_APPFONT ( 80 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton BT_CANCEL
-    {
-        Pos = MAP_APPFONT ( 80 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    HelpButton BT_HELP
-    {
-        Pos = MAP_APPFONT ( 80 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        TabStop = TRUE ;
-    };
-    RadioButton CB_POS_BEFORE
-    {
-        HelpID = "cui:RadioButton:DLG_INS_ROW_COL:CB_POS_BEFORE";
-        Pos = MAP_APPFONT ( 12 , 49 ) ;
-        Size = MAP_APPFONT ( 56 , 10 ) ;
-        Text [ en-US ] = "~Before" ;
-        TabStop = TRUE ;
-    };
-    RadioButton CB_POS_AFTER
-    {
-        HelpID = "cui:RadioButton:DLG_INS_ROW_COL:CB_POS_AFTER";
-        Pos = MAP_APPFONT ( 12 , 62 ) ;
-        Size = MAP_APPFONT ( 56 , 10 ) ;
-        Text [ en-US ] = "A~fter" ;
-        TabStop = TRUE ;
-        Check = TRUE ;
-    };
-    NumericField ED_COUNT
-    {
-        HelpID = "cui:NumericField:DLG_INS_ROW_COL:ED_COUNT";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 44 , 14 ) ;
-        Size = MAP_APPFONT ( 24 , 12 ) ;
-        TabStop = TRUE ;
-        Left = TRUE ;
-        Repeat = TRUE ;
-        Spin = TRUE ;
-        Minimum = 1 ;
-        Maximum = 99 ;
-        Value = 1 ;
-        First = 1 ;
-        Last = 5 ;
-    };
-    FixedLine FL_INS
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 68 , 8 ) ;
-        Text [ en-US ] = "Insert" ;
-    };
-    FixedLine FL_POS
-    {
-        Pos = MAP_APPFONT ( 6 , 38 ) ;
-        Size = MAP_APPFONT ( 68 , 8 ) ;
-        Text [ en-US ] = "Position";
-    };
-    FixedText FT_COUNT
-    {
-        Pos = MAP_APPFONT ( 12 , 16 ) ;
-        Size = MAP_APPFONT ( 30 , 8 ) ;
-        Text [ en-US ] = "~Number" ;
-        Left = TRUE ;
-    };
-    String STR_ROW
-    {
-        Text [ en-US ] = "Insert Rows" ;
-    };
-    String STR_COL
-    {
-        Text [ en-US ] = "Insert Columns" ;
-    };
-};
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 710f6cf..c497fda 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -259,9 +259,6 @@
 // icon choice
 #define RID_SVXSTR_ICONCHOICEDLG_RESETBUT   (RID_SVX_START + 580)
 
-// insert rows&cols
-#define DLG_INS_ROW_COL                     (RID_SVX_START + 156)
-
 // SvxMultiFileDialog
 #define RID_SVXSTR_FILE_TITLE               (RID_SVX_START + 482)
 #define RID_SVXSTR_FILE_HEADLINE            (RID_SVX_START + 483)
@@ -429,7 +426,9 @@
 #define RID_SVXSTR_PRODMACROS                               (RID_SVX_START + 1198)
 #define RID_SVXSTR_SELECTOR_ADD_COMMANDS                    (RID_SVX_START + 1199)
 #define RID_SVXSTR_SELECTOR_RUN                             (RID_SVX_START + 1200)
+#define RID_SVXSTR_ROW                                      (RID_SVX_START + 1201)
+#define RID_SVXSTR_COL                                      (RID_SVX_START + 1202)
 
-#define RID_SVXDLG_CERTPATH                                 (RID_SVX_START + 1201)
+#define RID_SVXDLG_CERTPATH                                 (RID_SVX_START + 1203)
 
 #endif
diff --git a/cui/uiconfig/ui/insertrowcolumn.ui b/cui/uiconfig/ui/insertrowcolumn.ui
new file mode 100644
index 0000000..c3b4d6f
--- /dev/null
+++ b/cui/uiconfig/ui/insertrowcolumn.ui
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="lower">1</property>
+    <property name="upper">99</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
+  <object class="GtkDialog" id="InsertRowColumnDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Insert Row</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="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</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_action_appearance">False</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="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">12</property>
+            <child>
+              <object class="GtkFrame" id="frame1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">16</property>
+                    <child>
+                      <object class="GtkGrid" id="grid2">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="column_spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label3">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">_Number</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">insert_number</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">2</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="insert_number">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="invisible_char">●</property>
+                            <property name="activates_default">True</property>
+                            <property name="invisible_char_set">True</property>
+                            <property name="adjustment">adjustment1</property>
+                            <property name="numeric">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Insert</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </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>
+            <child>
+              <object class="GtkFrame" id="frame2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label_xalign">0</property>
+                <property name="shadow_type">none</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="top_padding">6</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkGrid" id="grid3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkRadioButton" id="insert_before">
+                            <property name="label" translatable="yes">_Before</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">2</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkRadioButton" id="insert_after">
+                            <property name="label" translatable="yes">A_fter</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="use_action_appearance">False</property>
+                            <property name="use_underline">True</property>
+                            <property name="xalign">0</property>
+                            <property name="draw_indicator">True</property>
+                            <property name="group">insert_before</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">1</property>
+                            <property name="width">2</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes">Position</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</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-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/cui/uiconfig/ui/insrc.ui b/cui/uiconfig/ui/insrc.ui
deleted file mode 100644
index 102d12e..0000000
--- a/cui/uiconfig/ui/insrc.ui
+++ /dev/null
@@ -1,242 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkDialog" id="insert_row_dialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Insert Row</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="spacing">2</property>
-        <child internal-child="action_area">
-          <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="orientation">vertical</property>
-            <property name="layout_style">start</property>
-            <child>
-              <object class="GtkButton" id="ok">
-                <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</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="button2">
-                <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</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="button1">
-                <property name="label">gtk-help</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="margin_top">6</property>
-                <property name="use_action_appearance">False</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>
-          <object class="GtkGrid" id="grid1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="row_spacing">6</property>
-            <property name="column_spacing">6</property>
-            <child>
-              <object class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Insert</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSeparator" id="separator1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">0</property>
-                <property name="width">3</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Number</property>
-                <property name="use_underline">True</property>
-                <property name="mnemonic_widget">insert_number</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">1</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSpinButton" id="insert_number">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <property name="is_focus">True</property>
-                <property name="invisible_char">●</property>
-                <property name="activates_default">True</property>
-                <property name="numeric">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">3</property>
-                <property name="top_attach">1</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">Position</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">2</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkSeparator" id="separator2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-              </object>
-              <packing>
-                <property name="left_attach">2</property>
-                <property name="top_attach">2</property>
-                <property name="width">3</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="insert_before">
-                <property name="label" translatable="yes">_Before</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="draw_indicator">True</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">3</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkRadioButton" id="insert_after">
-                <property name="label" translatable="yes">A_fter</property>
-                <property name="use_action_appearance">False</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_action_appearance">False</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0</property>
-                <property name="active">True</property>
-                <property name="draw_indicator">True</property>
-                <property name="group">insert_before</property>
-              </object>
-              <packing>
-                <property name="left_attach">1</property>
-                <property name="top_attach">4</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </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">button2</action-widget>
-      <action-widget response="0">button1</action-widget>
-    </action-widgets>
-  </object>
-</interface>
commit fb3a7529bc77211d795936a960211f147f658d8f
Author: Philipp Kaluza <floss at ghostroute.eu>
Date:   Sun Oct 21 00:05:02 2012 +0000

    WIP: first stab at converting the insert-row dialog
    
    to UI format
    
    Conflicts:
    	cui/UI_cui.mk
    
    Change-Id: I1b1888f667b31b6ca22d1eca57aeb9da7ce45b71

diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 6f316fa..9e4f844 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
 	cui/uiconfig/ui/insertfloatingframe \
 	cui/uiconfig/ui/insertoleobject \
 	cui/uiconfig/ui/insertplugin \
+	cui/uiconfig/ui/insrc \
 	cui/uiconfig/ui/macroselectordialog \
 	cui/uiconfig/ui/positionpage \
 	cui/uiconfig/ui/specialcharacters \
diff --git a/cui/source/dialogs/insrc.cxx b/cui/source/dialogs/insrc.cxx
index 81b8c0c..e48a8eb 100644
--- a/cui/source/dialogs/insrc.cxx
+++ b/cui/source/dialogs/insrc.cxx
@@ -25,30 +25,23 @@
 
 bool SvxInsRowColDlg::isInsertBefore() const
 {
-    return !aAfterBtn.IsChecked();
+    return !m_pAfterBtn->IsChecked();
 }
 
 sal_uInt16 SvxInsRowColDlg::getInsertCount() const
 {
-    return static_cast< sal_uInt16 >( aCountEdit.GetValue() );
+    return static_cast< sal_uInt16 >( m_pCountEdit->GetValue() );
 }
 
 SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId )
-    : ModalDialog( pParent, CUI_RES(DLG_INS_ROW_COL) ),
-    aCount( this, CUI_RES( FT_COUNT ) ),
-    aCountEdit( this, CUI_RES( ED_COUNT ) ),
-    aInsFL( this, CUI_RES( FL_INS ) ),
-    aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ),
-    aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ),
-    aPosFL( this, CUI_RES( FL_POS ) ),
+    : ModalDialog( pParent, "insert_row_dialog", "cui/ui/insrc.ui" ),
     aRow(CUI_RESSTR(STR_ROW)),
     aCol(CUI_RESSTR(STR_COL)),
-    aOKBtn( this, CUI_RES( BT_OK ) ),
-    aCancelBtn( this, CUI_RES( BT_CANCEL ) ),
-    aHelpBtn( this, CUI_RES( BT_HELP ) ),
     bColumn( bCol )
 {
-    FreeResource();
+    get(m_pCountEdit, "insert_number");
+    get(m_pBeforeBtn, "insert_before");
+    get(m_pAfterBtn,  "insert_after");
     SetText( bColumn ? aCol : aRow );
     SetHelpId( sHelpId );
 }
diff --git a/cui/source/inc/insrc.hxx b/cui/source/inc/insrc.hxx
index 4e472d4..98f393f 100644
--- a/cui/source/inc/insrc.hxx
+++ b/cui/source/inc/insrc.hxx
@@ -31,21 +31,14 @@
 
 class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog
 {
-    FixedText       aCount;
-    NumericField    aCountEdit;
-    FixedLine        aInsFL;
+    NumericField*   m_pCountEdit;
 
-    RadioButton     aBeforeBtn;
-    RadioButton     aAfterBtn;
-    FixedLine        aPosFL;
+    RadioButton*    m_pBeforeBtn;
+    RadioButton*    m_pAfterBtn;
 
     rtl::OUString   aRow;
     rtl::OUString   aCol;
 
-    OKButton        aOKBtn;
-    CancelButton    aCancelBtn;
-    HelpButton      aHelpBtn;
-
     bool            bColumn;
 
 public:
diff --git a/cui/uiconfig/ui/insrc.ui b/cui/uiconfig/ui/insrc.ui
new file mode 100644
index 0000000..102d12e
--- /dev/null
+++ b/cui/uiconfig/ui/insrc.ui
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="insert_row_dialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Insert Row</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="spacing">2</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="orientation">vertical</property>
+            <property name="layout_style">start</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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="button2">
+                <property name="label">gtk-cancel</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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="button1">
+                <property name="label">gtk-help</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="margin_top">6</property>
+                <property name="use_action_appearance">False</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>
+          <object class="GtkGrid" id="grid1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="row_spacing">6</property>
+            <property name="column_spacing">6</property>
+            <child>
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Insert</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator" id="separator1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">0</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">_Number</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">insert_number</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSpinButton" id="insert_number">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="is_focus">True</property>
+                <property name="invisible_char">●</property>
+                <property name="activates_default">True</property>
+                <property name="numeric">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">3</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkLabel" id="label3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Position</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">2</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkSeparator" id="separator2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+              </object>
+              <packing>
+                <property name="left_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="width">3</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="insert_before">
+                <property name="label" translatable="yes">_Before</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">3</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkRadioButton" id="insert_after">
+                <property name="label" translatable="yes">A_fter</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="active">True</property>
+                <property name="draw_indicator">True</property>
+                <property name="group">insert_before</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">4</property>
+                <property name="width">2</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </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">button2</action-widget>
+      <action-widget response="0">button1</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list