Kaydet (Commit) c681b229 authored tarafından Caolán McNamara's avatar Caolán McNamara

split out table columns page and adapt code

Change-Id: I37fc7936357676dff135e85db17040324d2f3534
üst 90455e84
......@@ -41,6 +41,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/splittable \
sw/uiconfig/swriter/ui/statisticsinfopage \
sw/uiconfig/swriter/ui/stringinput \
sw/uiconfig/swriter/ui/tablecolumnpage \
sw/uiconfig/swriter/ui/tabletextflowpage \
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/wordcount \
......
......@@ -158,7 +158,6 @@
#define HID_GRF_EXT "SW_HID_GRF_EXT"
#define HID_FOOTNOTE_PAGE "SW_HID_FOOTNOTE_PAGE"
#define HID_FORMAT_TABLE "SW_HID_FORMAT_TABLE"
#define HID_TABLE_COLUMN "SW_HID_TABLE_COLUMN"
#define HID_LAB_LAB "SW_HID_LAB_LAB"
#define HID_LAB_PRT "SW_HID_LAB_PRT"
#define HID_ENV_PRT "SW_HID_ENV_PRT"
......
......@@ -47,6 +47,7 @@ public:
PercentFieldWrap();
void set(MetricField *pField);
const MetricField* get() const { return m_pField; }
MetricField* get() { return m_pField; }
void SetUpHdl(const Link& rLink) { m_pField->SetUpHdl(rLink); }
void SetDownHdl(const Link& rLink) { m_pField->SetDownHdl(rLink); }
void SetLoseFocusHdl(const Link& rLink) { m_pField->SetLoseFocusHdl(rLink); }
......@@ -56,6 +57,7 @@ public:
void SetAccessibleName(const OUString& rName) { m_pField->SetAccessibleName(rName); }
void SetText(const OUString& rStr) { m_pField->SetText(rStr); }
void SaveValue() { m_pField->SaveValue(); }
void ClearModifyFlag() { m_pField->ClearModifyFlag(); }
OUString GetSavedValue() const { return m_pField->GetSavedValue(); }
OUString GetText() const { return m_pField->GetText(); }
void SetMetricFieldMin(sal_Int64 nNewMin) { m_pField->SetMin(nNewMin); }
......
This diff is collapsed.
......@@ -37,7 +37,6 @@
#define FL_DIST 24
#define FT_WIDTH 25
#define FT_POS 32
#define CB_HEADLINE 40
#define FL_PROPERTIES 42
#define FT_TEXTORIENTATION 43
#define LB_TEXTORIENTATION 44
......@@ -49,25 +48,5 @@
#define FT_NAME 104
#define FL_OPTIONS 105
#define FL_NAME 106
#define COL_FT_1 107
#define COL_MF_1 108
#define COL_FT_2 109
#define COL_MF_2 110
#define COL_FT_3 111
#define COL_MF_3 112
#define COL_FT_4 113
#define COL_MF_4 114
#define COL_FT_5 115
#define COL_MF_5 116
#define COL_FT_6 117
#define COL_MF_6 118
#define COL_FL_LAYOUT 119
#define COL_BTN_UP 120
#define COL_BTN_DOWN 121
#define CB_MOD_TBL 122
#define CB_PROP 123
#define FT_SPACE 125
#define ED_SPACE 126
#define RB_FROM_LEFT 127
......@@ -313,245 +313,6 @@ TabPage TP_FORMAT_TABLE
};
};
TabPage TP_TABLE_COLUMN
{
HelpID = HID_TABLE_COLUMN ;
SVLook = TRUE ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
Hide = TRUE;
CheckBox CB_MOD_TBL
{
HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_MOD_TBL";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Adapt table ~width" ;
};
CheckBox CB_PROP
{
HelpID = "sw:CheckBox:TP_TABLE_COLUMN:CB_PROP";
Pos = MAP_APPFONT ( 6 , 20 ) ;
Size = MAP_APPFONT ( 180 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Ad~just columns proportionally" ;
};
FixedText FT_SPACE
{
Pos = MAP_APPFONT ( 6 , 36 ) ;
Size = MAP_APPFONT ( 85 , 8 ) ;
Text [ en-US ] = "Remaining space" ;
};
MetricField ED_SPACE
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:ED_SPACE";
ReadOnly = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 95 , 34 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
ImageButton COL_BTN_DOWN
{
HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_DOWN";
Disable = TRUE ;
Pos = MAP_APPFONT ( 12 , 65 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
TabStop = TRUE ;
SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
};
ImageButton COL_BTN_UP
{
HelpID = "sw:ImageButton:TP_TABLE_COLUMN:COL_BTN_UP";
Disable = TRUE ;
Pos = MAP_APPFONT ( 234 , 65 ) ;
Size = MAP_APPFONT ( 10 , 10 ) ;
TabStop = TRUE ;
SYMBOL = IMAGEBUTTON_ARROW_RIGHT ;
};
FixedText COL_FT_1
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 30 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~1" ;
Left = TRUE ;
Center = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_1
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_1";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 13 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedText COL_FT_2
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 68 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~2" ;
Left = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_2
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_2";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 52 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedText COL_FT_3
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 107 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~3" ;
Left = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_3
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_3";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 91 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedText COL_FT_4
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 146 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~4" ;
Left = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_4
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_4";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 130 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedText COL_FT_5
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 185 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~5" ;
Left = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_5
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_5";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 169 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedText COL_FT_6
{
Disable = TRUE ;
Pos = MAP_APPFONT ( 204 , 65 ) ;
Size = MAP_APPFONT ( 9 , 8 ) ;
Text = "~6" ;
Left = TRUE ;
Right = TRUE ;
};
MetricField COL_MF_6
{
HelpID = "sw:MetricField:TP_TABLE_COLUMN:COL_MF_6";
Disable = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 208 , 81 ) ;
Size = MAP_APPFONT ( 36 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 0 ;
Maximum = 5600 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 10 ;
Last = 5600 ;
SpinSize = 10 ;
};
FixedLine COL_FL_LAYOUT
{
Pos = MAP_APPFONT ( 6 , 50 ) ;
Size = MAP_APPFONT ( 240 , 8 ) ;
Text [ en-US ] = "Column width" ;
};
};
InfoBox MSG_WRONG_TABLENAME
{
Message [ en-US ] = "The name of the table must not contain spaces." ;
......
......@@ -97,29 +97,16 @@ public:
class SwTableColumnPage : public SfxTabPage
{
CheckBox aModifyTableCB;
CheckBox aProportionalCB;
FixedText aSpaceFT;
MetricField aSpaceED;
FixedLine aColFL;
ImageButton aUpBtn;
FixedText aFT1;
PercentField aMF1;
FixedText aFT2;
PercentField aMF2;
FixedText aFT3;
PercentField aMF3;
FixedText aFT4;
PercentField aMF4;
FixedText aFT5;
PercentField aMF5;
FixedText aFT6;
PercentField aMF6;
ImageButton aDownBtn;
CheckBox* m_pModifyTableCB;
CheckBox* m_pProportionalCB;
FixedText* m_pSpaceFT;
MetricField* m_pSpaceED;
PushButton* m_pUpBtn;
PushButton* m_pDownBtn;
SwTableRep* pTblData;
PercentField* pFieldArr[MET_FIELDS];
FixedText* pTextArr[MET_FIELDS];
PercentFieldWrap m_aFieldArr[MET_FIELDS];
FixedText* m_pTextArr[MET_FIELDS];
SwTwips nTableWidth;
SwTwips nMinWidth;
sal_uInt16 nNoOfCols;
......@@ -132,10 +119,10 @@ class SwTableColumnPage : public SfxTabPage
void Init(sal_Bool bWeb);
DECL_LINK( AutoClickHdl, CheckBox * );
void ModifyHdl( PercentField* pEdit );
DECL_LINK( UpHdl, PercentField * );
DECL_LINK( DownHdl, PercentField * );
DECL_LINK( LoseFocusHdl, PercentField * );
void ModifyHdl( MetricField* pEdit );
DECL_LINK( UpHdl, MetricField * );
DECL_LINK( DownHdl, MetricField * );
DECL_LINK( LoseFocusHdl, MetricField * );
DECL_LINK( ModeHdl, CheckBox * );
void UpdateCols( sal_uInt16 nAktPos );
SwTwips GetVisibleWidth(sal_uInt16 nPos);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment