diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-18 13:33:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-18 14:35:11 +0000 |
commit | a8eecb6df5f11cbfc8a57b737ad82eacad79ccb4 (patch) | |
tree | c0141248aa45bd10099c14f305ce050f4cd2d81c /sw/source/ui/table | |
parent | 4b529841d34ffdbcf6befe6f1eb70fe7ff8c159c (diff) |
convert table properties tabdialog to .ui
Change-Id: Ide72fb6bfc604f13e9d01250aac8e9b011bd034b
Diffstat (limited to 'sw/source/ui/table')
-rw-r--r-- | sw/source/ui/table/swtablerep.cxx | 1 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.cxx | 35 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.hrc | 52 | ||||
-rw-r--r-- | sw/source/ui/table/tabledlg.src | 295 |
4 files changed, 16 insertions, 367 deletions
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx index 4fddcae6b57c..b4d1197ed84f 100644 --- a/sw/source/ui/table/swtablerep.cxx +++ b/sw/source/ui/table/swtablerep.cxx @@ -50,7 +50,6 @@ #include <SwStyleNameMapper.hxx> #include <cmdid.h> -#include <tabledlg.hrc> #include <table.hrc> #include "swtablerep.hxx" diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 9dbfeeebc409..cb8f631c006d 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -53,7 +53,6 @@ #include <SwStyleNameMapper.hxx> #include <cmdid.h> -#include <tabledlg.hrc> #include <table.hrc> #include <svx/svxids.hrc> #include <svx/dialogs.hrc> @@ -1236,42 +1235,40 @@ void SwTableColumnPage::SetVisibleWidth(sal_uInt16 nPos, SwTwips nNewWidth) } - -SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool& , - const SfxItemSet* pItemSet, SwWrtShell* pSh ) : - SfxTabDialog(pParent, SW_RES(DLG_FORMAT_TABLE), pItemSet,0), - pShell(pSh), - nHtmlMode(::GetHtmlMode(pSh->GetView().GetDocShell())) +SwTableTabDlg::SwTableTabDlg(Window* pParent, SfxItemPool&, + const SfxItemSet* pItemSet, SwWrtShell* pSh) + : SfxTabDialog(0, pParent, "TablePropertiesDialog", + "modules/swriter/ui/tableproperties.ui", pItemSet, 0) + , pShell(pSh) + , m_nHtmlMode(::GetHtmlMode(pSh->GetView().GetDocShell())) { - FreeResource(); SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "Dialogdiet fail!"); - AddTabPage(TP_FORMAT_TABLE, &SwFormatTablePage::Create, 0 ); - AddTabPage(TP_TABLE_TEXTFLOW, &SwTextFlowPage::Create, 0 ); - AddTabPage(TP_TABLE_COLUMN, &SwTableColumnPage::Create, 0 ); - AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 ); - AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), 0 ); + AddTabPage("table", &SwFormatTablePage::Create, 0); + m_nTextFlowId = AddTabPage("textflow", &SwTextFlowPage::Create, 0); + AddTabPage("columns", &SwTableColumnPage::Create, 0); + m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BACKGROUND), 0); + m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_BORDER), 0); } - void SwTableTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - if( TP_BACKGROUND == nId ) + if (nId == m_nBackgroundId) { sal_Int32 nFlagType = SVX_SHOW_TBLCTL; - if(!( nHtmlMode & HTMLMODE_ON ) || - nHtmlMode & HTMLMODE_SOME_STYLES) + if(!( m_nHtmlMode & HTMLMODE_ON ) || + m_nHtmlMode & HTMLMODE_SOME_STYLES) nFlagType |= SVX_SHOW_SELECTOR; aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlagType)); rPage.PageCreated(aSet); } - else if(TP_BORDER == nId) + else if (nId == m_nBorderId) { aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_TABLE)); rPage.PageCreated(aSet); } - else if(TP_TABLE_TEXTFLOW == nId) + else if (nId == m_nTextFlowId) { ((SwTextFlowPage&)rPage).SetShell(pShell); const sal_uInt16 eType = pShell->GetFrmType(0,sal_True); diff --git a/sw/source/ui/table/tabledlg.hrc b/sw/source/ui/table/tabledlg.hrc deleted file mode 100644 index f801bba344e1..000000000000 --- a/sw/source/ui/table/tabledlg.hrc +++ /dev/null @@ -1,52 +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 "globals.hrc" - -#define ED_WIDTH 1 -#define FL_WIDTH 3 -#define CB_REL_WIDTH 4 -#define RB_LEFT 10 -#define RB_RIGHT 11 -#define RB_CENTER 12 -#define RB_FREE 13 -#define RB_FULL 14 -#define FL_POS 15 -#define ED_LEFT_DIST 51 -#define ED_RIGHT_DIST 52 -#define FT_RIGHT_DIST 53 -#define FT_LEFT_DIST 54 -#define FT_TOP_DIST 20 -#define ED_TOP_DIST 21 -#define FT_BOTTOM_DIST 22 -#define ED_BOTTOM_DIST 23 -#define FL_DIST 24 -#define FT_WIDTH 25 -#define FT_POS 32 -#define FL_PROPERTIES 42 -#define FT_TEXTORIENTATION 43 -#define LB_TEXTORIENTATION 44 - -#define BT_OK 100 -#define BT_CANCEL 101 -#define BT_MORE 102 -#define ED_NAME 103 -#define FT_NAME 104 -#define FL_OPTIONS 105 -#define FL_NAME 106 - -#define RB_FROM_LEFT 127 diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index 79140b6e42ad..89e2adb30649 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -17,301 +17,6 @@ */ #include "table.hrc" -#include "tabledlg.hrc" -#include "helpid.h" -#define TEXT_TEXTFLOW \ - Text [ en-US ] = "Text Flow" ; \ - -TabDialog DLG_FORMAT_TABLE -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Table Format" ; - Moveable = TRUE ; - TabControl 1 - { - SVLook = TRUE ; - PageList = - { - PageItem - { - Identifier = TP_FORMAT_TABLE ; - Text [ en-US ] = "Table" ; - PageResID = TP_FORMAT_TABLE ; - }; - PageItem - { - Identifier = TP_TABLE_TEXTFLOW ; - TEXT_TEXTFLOW - }; - PageItem - { - Identifier = TP_TABLE_COLUMN ; - Text [ en-US ] = "Columns" ; - PageResID = TP_TABLE_COLUMN ; - }; - PageItem - { - Identifier = TP_BORDER ; - Text [ en-US ] = "Borders" ; - PageResID = TP_BORDER ; - }; - PageItem - { - Identifier = TP_BACKGROUND ; - Text [ en-US ] = "Background" ; - PageResID = TP_BACKGROUND ; - }; - }; - }; -}; - -TabPage TP_FORMAT_TABLE -{ - HelpID = HID_FORMAT_TABLE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE; - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 12 , 16 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "~Name" ; - }; - Edit ED_NAME - { - HelpID = "sw:Edit:TP_FORMAT_TABLE:ED_NAME"; - Border = TRUE ; - Pos = MAP_APPFONT ( 75 , 14 ) ; - Size = MAP_APPFONT ( 112 , 12 ) ; - TabStop = TRUE ; - }; - FixedText FT_WIDTH - { - Pos = MAP_APPFONT ( 12 , 32 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "W~idth" ; - }; - MetricField ED_WIDTH - { - HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_WIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 75 , 30 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 9999 ; - DecimalDigits = 2 ; - Value = 0 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 9999 ; - SpinSize = 5 ; - }; - CheckBox CB_REL_WIDTH - { - HelpID = "sw:CheckBox:TP_FORMAT_TABLE:CB_REL_WIDTH"; - Pos = MAP_APPFONT ( 118 , 32 ) ; - Size = MAP_APPFONT ( 69 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Relati~ve" ; - }; - FixedLine FL_OPTIONS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 184 , 8 ) ; - Text [ en-US ] = "Properties" ; - }; - RadioButton RB_FULL - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FULL"; - Pos = MAP_APPFONT ( 202 , 14 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "A~utomatic" ; - }; - RadioButton RB_LEFT - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_LEFT"; - Pos = MAP_APPFONT ( 202 , 28 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "~Left" ; - TabStop = TRUE ; - }; - RadioButton RB_FROM_LEFT - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FROM_LEFT"; - Pos = MAP_APPFONT ( 202 , 42 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~From left"; - }; - RadioButton RB_RIGHT - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_RIGHT"; - Pos = MAP_APPFONT ( 202 , 56 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "R~ight" ; - TabStop = TRUE ; - }; - RadioButton RB_CENTER - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_CENTER"; - Pos = MAP_APPFONT ( 202 , 70 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "~Center" ; - TabStop = TRUE ; - }; - RadioButton RB_FREE - { - HelpID = "sw:RadioButton:TP_FORMAT_TABLE:RB_FREE"; - Pos = MAP_APPFONT ( 202 , 84 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Manual" ; - }; - FixedLine FL_POS - { - Pos = MAP_APPFONT ( 196 , 3 ) ; - Size = MAP_APPFONT ( 58 , 8 ) ; - Text [ en-US ] = "Alignment" ; - }; - FixedLine FL_DIST - { - Pos = MAP_APPFONT ( 6 , 48 ) ; - Size = MAP_APPFONT ( 184 , 8 ) ; - Text [ en-US ] = "Spacing" ; - }; - FixedText FT_LEFT_DIST - { - Pos = MAP_APPFONT ( 12 , 61 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Lef~t" ; - }; - MetricField ED_LEFT_DIST - { - HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_LEFT_DIST"; - Pos = MAP_APPFONT ( 147 , 59 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -9999 ; - Maximum = 9999 ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 9999 ; - SpinSize = 5 ; - }; - FixedText FT_RIGHT_DIST - { - Pos = MAP_APPFONT ( 12 , 77 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Ri~ght" ; - }; - - MetricField ED_RIGHT_DIST - { - HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_RIGHT_DIST"; - Pos = MAP_APPFONT ( 147 , 75 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = -9999 ; - Maximum = 9999 ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 9999 ; - SpinSize = 5 ; - }; - FixedText FT_TOP_DIST - { - Pos = MAP_APPFONT ( 12 , 93 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "~Above" ; - }; - MetricField ED_TOP_DIST - { - HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_TOP_DIST"; - Pos = MAP_APPFONT ( 147 , 91 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 9999 ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 9999 ; - SpinSize = 5 ; - }; - FixedText FT_BOTTOM_DIST - { - Pos = MAP_APPFONT ( 12 , 109 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "~Below" ; - }; - MetricField ED_BOTTOM_DIST - { - HelpID = "sw:MetricField:TP_FORMAT_TABLE:ED_BOTTOM_DIST"; - Border = TRUE ; - Pos = MAP_APPFONT ( 147 , 107 ) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 0 ; - Maximum = 1000 ; - DecimalDigits = 2 ; - Unit = FUNIT_CM ; - First = 0 ; - Last = 9999 ; - SpinSize = 5 ; - }; - FixedLine FL_PROPERTIES - { - Pos = MAP_APPFONT ( 6 , 125 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Hide = TRUE ; - Text [ en-US ] = "Properties"; - }; - FixedText FT_TEXTORIENTATION - { - Pos = MAP_APPFONT ( 12 , 138 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Hide = TRUE ; - Text [ en-US ] = "Text ~direction"; - }; - ListBox LB_TEXTORIENTATION - { - HelpID = "sw:ListBox:TP_FORMAT_TABLE:LB_TEXTORIENTATION"; - Border = TRUE ; - Pos = MAP_APPFONT ( 75 , 136 ) ; - Size = MAP_APPFONT ( 176 , 50 ) ; - DropDown = TRUE ; - Hide = TRUE ; - StringList [ en-US ] = - { - < "Left-to-right" ; 0; > ; - < "Right-to-left" ; 1; > ; - < "Use superordinate object settings" ; 4; > ; - }; - }; -}; InfoBox MSG_WRONG_TABLENAME { |