[Libreoffice-commits] .: sw/source sw/uiconfig

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 26 11:54:50 PST 2012


 sw/source/ui/inc/instable.hxx         |    3 ++-
 sw/source/ui/table/instable.cxx       |   12 ++++++++++--
 sw/uiconfig/swriter/ui/inserttable.ui |    5 ++---
 3 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 95b4c0322d486d7899917ed22dd1f8193af77dcf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Nov 26 19:50:13 2012 +0000

    use secondary-group packing to left group help and adapt to OK->Insert change
    
    Change-Id: I0325f42e78efbf819c6883b69d5a8903e05ac36e

diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index 5e15ccd..40a5984 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -57,7 +57,7 @@ class SwInsTableDlg : public SfxModalDialog
     CheckBox*       m_pDontSplitCB;
     CheckBox*       m_pBorderCB;
 
-    OKButton*       m_pOkBtn;
+    PushButton*     m_pInsertBtn;
     PushButton*     m_pAutoFmtBtn;
 
     SwWrtShell*     pShell;
@@ -67,6 +67,7 @@ class SwInsTableDlg : public SfxModalDialog
     DECL_LINK( ModifyName, Edit * );
     DECL_LINK( ModifyRowCol, NumericField * );
     DECL_LINK( AutoFmtHdl, PushButton* );
+    DECL_LINK(OKHdl, void*);
     DECL_LINK(CheckBoxHdl, void * = 0);
     DECL_LINK( ReapeatHeaderCheckBoxHdl, void* p = 0 );
     DECL_LINK( ModifyRepeatHeaderNF_Hdl, void* p = 0 );
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index fbffb7e..f7f5d51 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -96,7 +96,7 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
     get(m_pDontSplitCB, "dontsplitcb");
     get(m_pBorderCB, "bordercb");
     get(m_pAutoFmtBtn, "autoformat");
-    get(m_pOkBtn, "ok");
+    get(m_pInsertBtn, "ok");
     get(m_pRepeatGroup, "repeatgroup");
     get(m_pRepeatHeaderNF, "repeatheaderspin");
 
@@ -109,6 +109,8 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
     m_pColNF->SetMax(ROW_COL_PROD/m_pRowNF->GetValue());
     m_pAutoFmtBtn->SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
 
+    m_pInsertBtn->SetClickHdl(LINK(this, SwInsTableDlg, OKHdl));
+
     sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
     const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
 
@@ -142,6 +144,12 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
     m_pRepeatHeaderNF->SetMax( nMax );
 }
 
+IMPL_LINK_NOARG(SwInsTableDlg, OKHdl)
+{
+    EndDialog(RET_OK);
+    return 0;
+}
+
 SwInsTableDlg::~SwInsTableDlg()
 {
     delete pTAutoFmt;
@@ -156,7 +164,7 @@ IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, pEdit )
         pEdit->SetText(sTblName);
     }
 
-    m_pOkBtn->Enable(pShell->GetTblStyle( sTblName ) == 0);
+    m_pInsertBtn->Enable(pShell->GetTblStyle( sTblName ) == 0);
     return 0;
 }
 IMPL_LINK_INLINE_END( SwInsTableDlg, ModifyName, Edit *, pEdit )
diff --git a/sw/uiconfig/swriter/ui/inserttable.ui b/sw/uiconfig/swriter/ui/inserttable.ui
index 90eebb1..56043c0 100644
--- a/sw/uiconfig/swriter/ui/inserttable.ui
+++ b/sw/uiconfig/swriter/ui/inserttable.ui
@@ -30,7 +30,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="halign">start</property>
                 <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
@@ -38,18 +37,18 @@
                 <property name="expand">True</property>
                 <property name="fill">True</property>
                 <property name="position">0</property>
+                <property name="secondary">True</property>
               </packing>
             </child>
             <child>
               <object class="GtkButton" id="ok">
-                <property name="label">gtk-add</property>
+                <property name="label">Insert</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">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>


More information about the Libreoffice-commits mailing list