sw/AllLangResTarget_sw.mk | 1 sw/UI_swriter.mk | 1 sw/source/ui/inc/splittbl.hxx | 12 - sw/source/ui/inc/table.hrc | 2 sw/source/ui/table/splittbl.cxx | 32 +---- sw/source/ui/table/splittbl.hrc | 25 ---- sw/source/ui/table/splittbl.src | 86 ------------- sw/uiconfig/swriter/ui/linenumbering.ui | 1 sw/uiconfig/swriter/ui/splittable.ui | 197 ++++++++++++++++++++++++++++++++ sw/uiconfig/swriter/ui/titlepage.ui | 1 sw/uiconfig/swriter/ui/wordcount.ui | 1 11 files changed, 218 insertions(+), 141 deletions(-)
New commits: commit 6c0e0e54ec32aa48b875127ed6a0125cfe3f119c Author: Caolán McNamara <caol...@redhat.com> Date: Mon Sep 17 13:18:08 2012 +0100 convert code to use new split table dialog Change-Id: Id170da91f97d4a0648f0072fa0e02b7897ced13b diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index cef3c91..3a34a90 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -175,7 +175,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/table/convert.src \ sw/source/ui/table/mergetbl.src \ sw/source/ui/table/rowht.src \ - sw/source/ui/table/splittbl.src \ sw/source/ui/table/table.src \ sw/source/ui/table/tabledlg.src \ sw/source/ui/table/tautofmt.src \ diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk index fa2a727..70d7d90 100644 --- a/sw/UI_swriter.mk +++ b/sw/UI_swriter.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/inserttable \ sw/uiconfig/swriter/ui/linenumbering \ sw/uiconfig/swriter/ui/printeroptions \ + sw/uiconfig/swriter/ui/splittable \ sw/uiconfig/swriter/ui/titlepage \ sw/uiconfig/swriter/ui/wordcount \ )) diff --git a/sw/source/ui/inc/splittbl.hxx b/sw/source/ui/inc/splittbl.hxx index cb84876..58bfee5 100644 --- a/sw/source/ui/inc/splittbl.hxx +++ b/sw/source/ui/inc/splittbl.hxx @@ -27,14 +27,10 @@ class SwWrtShell; class SwSplitTblDlg : public SvxStandardDialog { - OKButton aOKPB; - CancelButton aCancelPB; - HelpButton aHelpPB; - FixedLine aSplitFL; - RadioButton aCntntCopyRB; - RadioButton aBoxAttrCopyWithParaRB ; - RadioButton aBoxAttrCopyNoParaRB ; - RadioButton aBorderCopyRB; + RadioButton* mpCntntCopyRB; + RadioButton* mpBoxAttrCopyWithParaRB ; + RadioButton* mpBoxAttrCopyNoParaRB ; + RadioButton* mpBorderCopyRB; SwWrtShell &rShell; sal_uInt16 m_nSplit; diff --git a/sw/source/ui/inc/table.hrc b/sw/source/ui/inc/table.hrc index 4be11b9..17372b7 100644 --- a/sw/source/ui/inc/table.hrc +++ b/sw/source/ui/inc/table.hrc @@ -30,7 +30,7 @@ #define TP_TABLE_COLUMN (RC_TABLE_BEGIN + 11) #define DLG_INSERT_CHART (RC_TABLE_BEGIN + 12) #define MSG_WRONG_TABLENAME (RC_TABLE_BEGIN + 13) -#define DLG_SPLIT_TABLE (RC_TABLE_BEGIN + 14) + #define DLG_MERGE_TABLE (RC_TABLE_BEGIN + 15) #define TABLE_ACT_END DLG_MERGE_TABLE diff --git a/sw/source/ui/table/splittbl.cxx b/sw/source/ui/table/splittbl.cxx index 81db2f6..30ff12d 100644 --- a/sw/source/ui/table/splittbl.cxx +++ b/sw/source/ui/table/splittbl.cxx @@ -25,39 +25,31 @@ #include <wrtsh.hxx> #include <splittbl.hxx> -#include <splittbl.hrc> #include <table.hrc> #include <tblenum.hxx> -SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) : - SvxStandardDialog(pParent, SW_RES(DLG_SPLIT_TABLE)), - aOKPB( this, SW_RES(PB_OK )), - aCancelPB( this, SW_RES(PB_CANCEL )), - aHelpPB( this, SW_RES(PB_HELP )), - aSplitFL( this, SW_RES(FL_SPLIT )), - aCntntCopyRB( this, SW_RES(RB_CNTNT )), - aBoxAttrCopyWithParaRB( this, SW_RES(RB_BOX_PARA )), - aBoxAttrCopyNoParaRB( this, SW_RES(RB_BOX_NOPARA)), - aBorderCopyRB( this, SW_RES(RB_BORDER )), - rShell(rSh), - m_nSplit( HEADLINE_CNTNTCOPY ) +SwSplitTblDlg::SwSplitTblDlg( Window *pParent, SwWrtShell &rSh ) + : SvxStandardDialog( pParent, "SplitTableDialog", "modules/swriter/ui/splittable.ui" ) + , rShell(rSh) + , m_nSplit(HEADLINE_CNTNTCOPY) { - FreeResource(); - aCntntCopyRB.Check(); + get(mpCntntCopyRB, "copyheading"); + get(mpBoxAttrCopyWithParaRB, "customheadingapplystyle"); + get(mpBoxAttrCopyNoParaRB, "customheading"); + get(mpBorderCopyRB, "customheading"); } void SwSplitTblDlg::Apply() { m_nSplit = HEADLINE_CNTNTCOPY; - if(aBoxAttrCopyWithParaRB.IsChecked()) + if(mpBoxAttrCopyWithParaRB->IsChecked()) m_nSplit = HEADLINE_BOXATRCOLLCOPY; - if(aBoxAttrCopyNoParaRB.IsChecked()) + if(mpBoxAttrCopyNoParaRB->IsChecked()) m_nSplit = HEADLINE_BOXATTRCOPY; - else if(aBorderCopyRB.IsChecked()) + else if(mpBorderCopyRB->IsChecked()) m_nSplit = HEADLINE_BORDERCOPY; - rShell.SplitTable( m_nSplit ); - + rShell.SplitTable(m_nSplit); } diff --git a/sw/source/ui/table/splittbl.hrc b/sw/source/ui/table/splittbl.hrc deleted file mode 100644 index d53721b..0000000 --- a/sw/source/ui/table/splittbl.hrc +++ /dev/null @@ -1,25 +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 PB_OK 1 -#define PB_CANCEL 2 -#define PB_HELP 3 -#define FL_SPLIT 4 -#define RB_CNTNT 5 -#define RB_BOX_NOPARA 6 -#define RB_BOX_PARA 7 -#define RB_BORDER 8 diff --git a/sw/source/ui/table/splittbl.src b/sw/source/ui/table/splittbl.src deleted file mode 100644 index 44eeeba..0000000 --- a/sw/source/ui/table/splittbl.src +++ /dev/null @@ -1,86 +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 "table.hrc" -#include "splittbl.hrc" -#include "cmdid.h" -#include "helpid.h" -ModalDialog DLG_SPLIT_TABLE -{ - HelpID = CMD_FN_TABLE_SPLIT_TABLE ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 207 , 76 ) ; - Moveable = TRUE ; - OKButton PB_OK - { - Pos = MAP_APPFONT ( 151 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton PB_CANCEL - { - Pos = MAP_APPFONT ( 151 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton PB_HELP - { - Pos = MAP_APPFONT ( 151 , 40 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine FL_SPLIT - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 139 , 8 ) ; - Text [ en-US ] = "Mode" ; - }; - RadioButton RB_CNTNT - { - HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_CNTNT"; - Pos = MAP_APPFONT ( 12 , 15 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - Check = TRUE ; - TabStop = TRUE ; - Text [ en-US ] = "~Copy heading" ; - }; - RadioButton RB_BOX_PARA - { - HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_PARA"; - Pos = MAP_APPFONT ( 12 , 30 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - Text [ en-US ] = "C~ustom heading (apply Style)" ; - }; - RadioButton RB_BOX_NOPARA - { - HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BOX_NOPARA"; - Pos = MAP_APPFONT ( 12 , 45 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - Text [ en-US ] = "Cu~stom heading" ; - }; - RadioButton RB_BORDER - { - HelpID = "sw:RadioButton:DLG_SPLIT_TABLE:RB_BORDER"; - Pos = MAP_APPFONT ( 12 , 60 ) ; - Size = MAP_APPFONT ( 130 , 10 ) ; - Text [ en-US ] = "~No heading" ; - }; - Text [ en-US ] = "Split Table" ; -}; diff --git a/sw/uiconfig/swriter/ui/splittable.ui b/sw/uiconfig/swriter/ui/splittable.ui index 183f17e..1df3714 100644 --- a/sw/uiconfig/swriter/ui/splittable.ui +++ b/sw/uiconfig/swriter/ui/splittable.ui @@ -119,7 +119,6 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="xalign">0</property> - <property name="active">True</property> <property name="draw_indicator">True</property> <property name="group">customheading</property> </object> @@ -139,7 +138,6 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="xalign">0</property> - <property name="active">True</property> <property name="draw_indicator">True</property> <property name="group">noheading</property> </object> @@ -159,7 +157,6 @@ <property name="receives_default">False</property> <property name="use_action_appearance">False</property> <property name="xalign">0</property> - <property name="active">True</property> <property name="draw_indicator">True</property> <property name="group">copyheading</property> </object> commit 9dd18cf82b2ddedcd5779a6989cdf2f493d257bf Author: Caolán McNamara <caol...@redhat.com> Date: Mon Sep 17 13:10:21 2012 +0100 add titles to these dialogs Change-Id: Ie8a99fbca7f71a2158534e14e7b87b4f503f1c6b diff --git a/sw/uiconfig/swriter/ui/linenumbering.ui b/sw/uiconfig/swriter/ui/linenumbering.ui index f664a6b..580a2f0 100644 --- a/sw/uiconfig/swriter/ui/linenumbering.ui +++ b/sw/uiconfig/swriter/ui/linenumbering.ui @@ -4,6 +4,7 @@ <object class="GtkDialog" id="LineNumberingDialog"> <property name="can_focus">False</property> <property name="border_width">5</property> + <property name="title" translatable="yes">Line Numbering</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> diff --git a/sw/uiconfig/swriter/ui/titlepage.ui b/sw/uiconfig/swriter/ui/titlepage.ui index 3f62f9c..b795a1f 100644 --- a/sw/uiconfig/swriter/ui/titlepage.ui +++ b/sw/uiconfig/swriter/ui/titlepage.ui @@ -4,6 +4,7 @@ <object class="GtkDialog" id="DLG_TITLEPAGE"> <property name="can_focus">False</property> <property name="border_width">5</property> + <property name="title" translatable="yes">Title Page</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> diff --git a/sw/uiconfig/swriter/ui/wordcount.ui b/sw/uiconfig/swriter/ui/wordcount.ui index 88fd52d..6b52247 100644 --- a/sw/uiconfig/swriter/ui/wordcount.ui +++ b/sw/uiconfig/swriter/ui/wordcount.ui @@ -4,6 +4,7 @@ <object class="GtkDialog" id="WordCountDialog"> <property name="can_focus">False</property> <property name="border_width">5</property> + <property name="title" translatable="yes">Word Count</property> <property name="type_hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> commit 31832166734c19a2a51c45da1889bc89b8c1c89d Author: Gokul <gokul.c...@gmail.com> Date: Mon Sep 17 13:09:53 2012 +0100 add a split table dialog Change-Id: Id2b1061271abe5605913227e841b2d969fc5acf2 diff --git a/sw/uiconfig/swriter/ui/splittable.ui b/sw/uiconfig/swriter/ui/splittable.ui new file mode 100644 index 0000000..183f17e --- /dev/null +++ b/sw/uiconfig/swriter/ui/splittable.ui @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="SplitTableDialog"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Split Table</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="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="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="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">5</property> + <property name="left_padding">12</property> + <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">5</property> + <child> + <object class="GtkRadioButton" id="copyheading"> + <property name="label" translatable="yes">Copy heading</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="relief">half</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">customheadingapplystyle</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> + <child> + <object class="GtkRadioButton" id="customheadingapplystyle"> + <property name="label" translatable="yes">Custom heading (apply Style)</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="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">customheading</property> + </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> + <child> + <object class="GtkRadioButton" id="customheading"> + <property name="label" translatable="yes">Custom heading</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="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">noheading</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkRadioButton" id="noheading"> + <property name="label" translatable="yes">No heading</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="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">copyheading</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</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">Mode</property> + <property name="use_markup">True</property> + </object> + </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>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits