diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-17 13:18:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:47 +0100 |
commit | e69c736c2769719027c3d26c3a8fd04be3d06b5d (patch) | |
tree | 6fd4590ff74f4da59312a7b958a8dbccb2c97a9b | |
parent | 11c10d89fbe7b133d66152272aac2e4edf973c6b (diff) |
convert code to use new split table dialog
Change-Id: Id170da91f97d4a0648f0072fa0e02b7897ced13b
-rw-r--r-- | sw/AllLangResTarget_sw.mk | 1 | ||||
-rw-r--r-- | sw/UI_swriter.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/splittbl.hxx | 12 | ||||
-rw-r--r-- | sw/source/ui/inc/table.hrc | 2 | ||||
-rw-r--r-- | sw/source/ui/table/splittbl.cxx | 32 | ||||
-rw-r--r-- | sw/source/ui/table/splittbl.hrc | 25 | ||||
-rw-r--r-- | sw/source/ui/table/splittbl.src | 86 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/splittable.ui | 3 |
8 files changed, 18 insertions, 144 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index cef3c91be03c..3a34a909106a 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 fa2a7279c863..70d7d90e11a4 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 cb8487697f4b..58bfee5ff28b 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 dfdf13fccb9a..cf131be9b667 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 371000818515..f82d642a8100 100644 --- a/sw/source/ui/table/splittbl.cxx +++ b/sw/source/ui/table/splittbl.cxx @@ -19,39 +19,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 d53721b33b37..000000000000 --- 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 44eeeba59c07..000000000000 --- 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 183f17e03ed9..1df37148bfc5 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> |