summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-04 16:49:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:44 +0100
commitbc347f9f247e141b7377a531a966da076dcd2351 (patch)
tree9baaa81a80f74b31b445a447bbe4908d41e5632c /sw
parent0553a0b10267f824100fa5a9c2aa0d5749a46868 (diff)
Drop .src layout for inserttable and use Gokul's .ui
Change-Id: Ibc09a1d208720607944f24139eaf45e62699e69e
Diffstat (limited to 'sw')
-rw-r--r--sw/AllLangResTarget_sw.mk1
-rw-r--r--sw/UI_swriter.mk1
-rw-r--r--sw/inc/swabstdlg.hxx3
-rw-r--r--sw/inc/swcommands.h1
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx18
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx17
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx3
-rw-r--r--sw/source/ui/inc/actctrl.hxx14
-rw-r--r--sw/source/ui/inc/instable.hxx34
-rw-r--r--sw/source/ui/inc/table.hrc1
-rw-r--r--sw/source/ui/shells/basesh.cxx2
-rw-r--r--sw/source/ui/table/instable.cxx129
-rw-r--r--sw/source/ui/table/instable.hrc18
-rw-r--r--sw/source/ui/table/instable.src187
-rw-r--r--sw/uiconfig/swriter/ui/inserttable.ui60
15 files changed, 132 insertions, 357 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 5e6ae48aea31..48bec3c289aa 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -174,7 +174,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/table/chartins.src \
sw/source/ui/table/colwd.src \
sw/source/ui/table/convert.src \
- sw/source/ui/table/instable.src \
sw/source/ui/table/mergetbl.src \
sw/source/ui/table/rowht.src \
sw/source/ui/table/splittbl.src \
diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index c4a22f5acb00..e0f7edcb3373 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -10,6 +10,7 @@
$(eval $(call gb_UI_UI,modules/swriter))
$(eval $(call gb_UI_add_uifiles,modules/swriter,\
+ sw/uiconfig/swriter/ui/inserttable \
sw/uiconfig/swriter/ui/linenumbering \
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/wordcount \
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index e8b10df1c8b9..6a12c7c3fb79 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -447,8 +447,7 @@ public:
SwView& rView, sal_Bool bCol = sal_False ) = 0; //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ) = 0; //add for SwInsertGrfRulerDlg
- virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
- SwView& rView ) = 0; //add for SwInsTableDlg
+ virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView) = 0; //add for SwInsTableDlg
virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
Window* pParent, SwWrtShell* pWrtSh ) = 0; //add for SwJavaEditDialog
virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId,
diff --git a/sw/inc/swcommands.h b/sw/inc/swcommands.h
index 85a94eb87c49..74a93ad512ad 100644
--- a/sw/inc/swcommands.h
+++ b/sw/inc/swcommands.h
@@ -61,7 +61,6 @@
#define CMD_FN_INSERT_FLD_PGCOUNT ".uno:InsertPageCountField"
#define CMD_FN_INSERT_FLD_PGNUMBER ".uno:InsertPageNumberField"
#define CMD_FN_TABLE_INSERT_ROW_DLG ".uno:InsertRowDialog"
-#define CMD_FN_INSERT_TABLE ".uno:InsertTable"
#define CMD_FN_INSERT_FLD_TIME ".uno:InsertTimeField"
#define CMD_FN_INSERT_FLD_TITLE ".uno:InsertTitleField"
#define CMD_FN_INSERT_FLD_TOPIC ".uno:InsertTopicField"
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index 2910585b4df5..0f2d02afc61f 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -64,6 +64,12 @@ NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId)
{
}
+NoSpaceEdit::NoSpaceEdit(Window* pParent)
+ : Edit(pParent),
+ sForbiddenChars(String::CreateFromAscii(" "))
+{
+}
+
NoSpaceEdit::~NoSpaceEdit()
{
}
@@ -119,4 +125,16 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
Edit::KeyInput(rEvt);
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent)
+{
+ TableNameEdit* pTableNameEdit = new TableNameEdit(pParent);
+ pTableNameEdit->SetMaxWidthInChars(25);
+ return pTableNameEdit;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent)
+{
+ return new NoSpaceEdit(pParent);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index f684751a51df..a8618cc3b4bd 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1312,21 +1312,10 @@ AbstractInsertGrfRulerDlg * SwAbstractDialogFactory_Impl::CreateInsertGrfRulerDl
return 0;
}
-AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg( int nResId,
- SwView& rView ) //add for SwInsTableDlg
+AbstractInsTableDlg * SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView) //add for SwInsTableDlg
{
- SwInsTableDlg* pDlg=NULL;
- switch ( nResId )
- {
- case DLG_INSERT_TABLE :
- pDlg = new SwInsTableDlg( rView );
- break;
- default:
- break;
- }
- if ( pDlg )
- return new AbstractInsTableDlg_Impl( pDlg );
- return 0;
+ SwInsTableDlg* pDlg = new SwInsTableDlg(rView);
+ return new AbstractInsTableDlg_Impl( pDlg );
}
AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( int nResId,
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index c28fe03446dd..a005c59b1715 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -526,8 +526,7 @@ public:
SwView& rView, sal_Bool bCol = sal_False ); //add for SwInsRowColDlg, SwLineNumberingDlg
virtual AbstractInsertGrfRulerDlg* CreateInsertGrfRulerDlg( int nResId,
Window * pParent ); //add for SwInsertGrfRulerDlg
- virtual AbstractInsTableDlg* CreateInsTableDlg( int nResId,
- SwView& rView ); //add for SwInsTableDlg
+ virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView); //add for SwInsTableDlg
virtual AbstractJavaEditDialog* CreateJavaEditDialog( int nResId,
Window* pParent, SwWrtShell* pWrtSh ); //add for SwJavaEditDialog
virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId,
diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx
index 6e6330b52cbe..0b353eb6101e 100644
--- a/sw/source/ui/inc/actctrl.hxx
+++ b/sw/source/ui/inc/actctrl.hxx
@@ -62,6 +62,7 @@ protected:
public:
NoSpaceEdit( Window* pParent, const ResId& rResId);
+ NoSpaceEdit( Window* pParent );
virtual ~NoSpaceEdit();
void SetForbiddenChars(const String& rSet){sForbiddenChars = rSet;}
const String& GetForbiddenChars(){return sForbiddenChars;}
@@ -73,9 +74,16 @@ public:
class TableNameEdit : public NoSpaceEdit
{
public:
- TableNameEdit(Window* pWin, const ResId& rResId) :
- NoSpaceEdit(pWin, rResId)
- {SetForbiddenChars(rtl::OUString(" .<>"));}
+ TableNameEdit(Window* pWin, const ResId& rResId)
+ : NoSpaceEdit(pWin, rResId)
+ {
+ SetForbiddenChars(rtl::OUString(" .<>"));
+ }
+ TableNameEdit(Window* pWin)
+ : NoSpaceEdit(pWin)
+ {
+ SetForbiddenChars(rtl::OUString(" .<>"));
+ }
};
/* --------------------------------------------------
diff --git a/sw/source/ui/inc/instable.hxx b/sw/source/ui/inc/instable.hxx
index 90839bb481cd..5e15ccd77e0b 100644
--- a/sw/source/ui/inc/instable.hxx
+++ b/sw/source/ui/inc/instable.hxx
@@ -30,8 +30,8 @@
#include <vcl/button.hxx>
#include <vcl/field.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
+#include <vcl/layout.hxx>
#include <sfx2/basedlgs.hxx>
#include <actctrl.hxx>
#include <textcontrolcombo.hxx>
@@ -44,31 +44,21 @@ struct SwInsertTableOptions;
class SwInsTableDlg : public SfxModalDialog
{
- FixedText aNameFT;
- TableNameEdit aNameEdit;
+ TableNameEdit* m_pNameEdit;
- FixedLine aFL;
- FixedText aColLbl;
- NumericField aColEdit;
- FixedText aRowLbl;
- NumericField aRowEdit;
+ NumericField* m_pColNF;
+ NumericField* m_pRowNF;
- FixedLine aOptionsFL;
- CheckBox aHeaderCB;
- CheckBox aRepeatHeaderCB;
- FixedText aRepeatHeaderFT; // "dummy" to build before and after FT
- FixedText aRepeatHeaderBeforeFT;
- NumericField aRepeatHeaderNF;
- FixedText aRepeatHeaderAfterFT;
- TextControlCombo aRepeatHeaderCombo;
+ CheckBox* m_pHeaderCB;
+ CheckBox* m_pRepeatHeaderCB;
+ NumericField* m_pRepeatHeaderNF;
+ VclContainer* m_pRepeatGroup;
- CheckBox aDontSplitCB;
- CheckBox aBorderCB;
+ CheckBox* m_pDontSplitCB;
+ CheckBox* m_pBorderCB;
- OKButton aOkBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
- PushButton aAutoFmtBtn;
+ OKButton* m_pOkBtn;
+ PushButton* m_pAutoFmtBtn;
SwWrtShell* pShell;
SwTableAutoFmt* pTAutoFmt;
diff --git a/sw/source/ui/inc/table.hrc b/sw/source/ui/inc/table.hrc
index a7b517da6f79..a3d6d2485cd9 100644
--- a/sw/source/ui/inc/table.hrc
+++ b/sw/source/ui/inc/table.hrc
@@ -18,7 +18,6 @@
#include "rcid.hrc"
-#define DLG_INSERT_TABLE RC_TABLE_BEGIN
#define DLG_FORMAT_TABLE (RC_TABLE_BEGIN + 1)
#define DLG_CONV_TEXT_TABLE (RC_TABLE_BEGIN + 2)
#define DLG_ROW_HEIGHT (RC_TABLE_BEGIN + 4)
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index af0cc9751c11..f7e5f8e4e828 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -2619,7 +2619,7 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractInsTableDlg* pDlg = pFact->CreateInsTableDlg( DLG_INSERT_TABLE, rTempView );
+ AbstractInsTableDlg* pDlg = pFact->CreateInsTableDlg(rTempView);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if( RET_OK == pDlg->Execute() )
{
diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index d5fe12daf4e0..629a8cf6c1cd 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -56,19 +56,19 @@ void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol
SwTableAutoFmt *& prTAFmt )
{
sal_uInt16 nInsMode = 0;
- rName = aNameEdit.GetText();
- rRow = (sal_uInt16)aRowEdit.GetValue();
- rCol = (sal_uInt16)aColEdit.GetValue();
+ rName = m_pNameEdit->GetText();
+ rRow = (sal_uInt16)m_pRowNF->GetValue();
+ rCol = (sal_uInt16)m_pColNF->GetValue();
- if (aBorderCB.IsChecked())
+ if (m_pBorderCB->IsChecked())
nInsMode |= tabopts::DEFAULT_BORDER;
- if (aHeaderCB.IsChecked())
+ if (m_pHeaderCB->IsChecked())
nInsMode |= tabopts::HEADLINE;
- if (aRepeatHeaderCB.IsEnabled() && aRepeatHeaderCB.IsChecked())
- rInsTblOpts.mnRowsToRepeat = sal_uInt16( aRepeatHeaderNF.GetValue() );
+ if (m_pRepeatHeaderCB->IsEnabled() && m_pRepeatHeaderCB->IsChecked())
+ rInsTblOpts.mnRowsToRepeat = sal_uInt16( m_pRepeatHeaderNF->GetValue() );
else
rInsTblOpts.mnRowsToRepeat = 0;
- if (!aDontSplitCB.IsChecked())
+ if (!m_pDontSplitCB->IsChecked())
nInsMode |= tabopts::SPLIT_LAYOUT;
if( pTAutoFmt )
{
@@ -83,46 +83,31 @@ void SwInsTableDlg::GetValues( String& rName, sal_uInt16& rRow, sal_uInt16& rCol
SwInsTableDlg::SwInsTableDlg( SwView& rView )
- : SfxModalDialog( rView.GetWindow(), SW_RES(DLG_INSERT_TABLE) ),
- aNameFT (this, SW_RES(FT_NAME)),
- aNameEdit (this, SW_RES(ED_NAME)),
-
- aFL (this, SW_RES(FL_TABLE)),
- aColLbl (this, SW_RES(FT_COL)),
- aColEdit (this, SW_RES(ED_COL)),
- aRowLbl (this, SW_RES(FT_ROW)),
- aRowEdit (this, SW_RES(ED_ROW)),
-
- aOptionsFL (this, SW_RES(FL_OPTIONS)),
- aHeaderCB (this, SW_RES(CB_HEADER)),
- aRepeatHeaderCB (this, SW_RES(CB_REPEAT_HEADER)),
- aRepeatHeaderFT (this, SW_RES(FT_REPEAT_HEADER)),
- aRepeatHeaderBeforeFT (this),
- aRepeatHeaderNF (this, SW_RES(NF_REPEAT_HEADER)),
- aRepeatHeaderAfterFT (this),
- aRepeatHeaderCombo (this, SW_RES(WIN_REPEAT_HEADER), aRepeatHeaderNF, aRepeatHeaderBeforeFT, aRepeatHeaderAfterFT),
-
- aDontSplitCB (this, SW_RES(CB_DONT_SPLIT)),
- aBorderCB (this, SW_RES(CB_BORDER)),
-
- aOkBtn (this, SW_RES(BT_OK)),
- aCancelBtn (this, SW_RES(BT_CANCEL)),
- aHelpBtn (this, SW_RES(BT_HELP)),
- aAutoFmtBtn (this, SW_RES(BT_AUTOFORMAT)),
-
- pShell(&rView.GetWrtShell()),
- pTAutoFmt( 0 ),
- nEnteredValRepeatHeaderNF( -1 )
+ : SfxModalDialog(rView.GetWindow(), "InsertTableDialog", "modules/swriter/ui/inserttable.ui")
+ , pShell(&rView.GetWrtShell())
+ , pTAutoFmt(0)
+ , nEnteredValRepeatHeaderNF(-1)
{
- FreeResource();
- aNameEdit.SetText(pShell->GetUniqueTblName());
- aNameEdit.SetModifyHdl(LINK(this, SwInsTableDlg, ModifyName));
- aColEdit.SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol));
- aRowEdit.SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol));
-
- aRowEdit.SetMax(ROW_COL_PROD/aColEdit.GetValue());
- aColEdit.SetMax(ROW_COL_PROD/aRowEdit.GetValue());
- aAutoFmtBtn.SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
+ get(m_pNameEdit, "nameedit");
+ get(m_pColNF, "colspin");
+ get(m_pRowNF, "rowspin");
+ get(m_pHeaderCB, "headercb");
+ get(m_pRepeatHeaderCB, "repeatcb");
+ get(m_pDontSplitCB, "dontsplitcb");
+ get(m_pBorderCB, "bordercb");
+ get(m_pAutoFmtBtn, "autoformat");
+ get(m_pOkBtn, "ok");
+ get(m_pRepeatGroup, "repeatgroup");
+ get(m_pRepeatHeaderNF, "repeatheaderspin");
+
+ m_pNameEdit->SetText(pShell->GetUniqueTblName());
+ m_pNameEdit->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyName));
+ m_pColNF->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol));
+ m_pRowNF->SetModifyHdl(LINK(this, SwInsTableDlg, ModifyRowCol));
+
+ m_pRowNF->SetMax(ROW_COL_PROD/m_pColNF->GetValue());
+ m_pColNF->SetMax(ROW_COL_PROD/m_pRowNF->GetValue());
+ m_pAutoFmtBtn->SetClickHdl(LINK(this, SwInsTableDlg, AutoFmtHdl));
sal_Bool bHTMLMode = 0 != (::GetHtmlMode(rView.GetDocShell())&HTMLMODE_ON);
const SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
@@ -130,33 +115,31 @@ SwInsTableDlg::SwInsTableDlg( SwView& rView )
SwInsertTableOptions aInsOpts = pModOpt->GetInsTblFlags(bHTMLMode);
sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode;
- aHeaderCB.Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
- aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat > 0);
+ m_pHeaderCB->Check( 0 != (nInsTblFlags & tabopts::HEADLINE) );
+ m_pRepeatHeaderCB->Check(aInsOpts.mnRowsToRepeat > 0);
if(bHTMLMode)
{
- aDontSplitCB.Hide();
- aBorderCB.SetPosPixel(aDontSplitCB.GetPosPixel());
+ m_pDontSplitCB->Hide();
+ m_pBorderCB->SetPosPixel(m_pDontSplitCB->GetPosPixel());
}
else
{
- aDontSplitCB.Check( 0 == (nInsTblFlags & tabopts::SPLIT_LAYOUT) );
+ m_pDontSplitCB->Check( 0 == (nInsTblFlags & tabopts::SPLIT_LAYOUT) );
}
- aBorderCB.Check( 0 != (nInsTblFlags & tabopts::DEFAULT_BORDER) );
+ m_pBorderCB->Check( 0 != (nInsTblFlags & tabopts::DEFAULT_BORDER) );
- aRepeatHeaderNF.SetModifyHdl( LINK( this, SwInsTableDlg, ModifyRepeatHeaderNF_Hdl ) );
- aHeaderCB.SetClickHdl(LINK(this, SwInsTableDlg, CheckBoxHdl));
- aRepeatHeaderCB.SetClickHdl(LINK(this, SwInsTableDlg, ReapeatHeaderCheckBoxHdl));
+ m_pRepeatHeaderNF->SetModifyHdl( LINK( this, SwInsTableDlg, ModifyRepeatHeaderNF_Hdl ) );
+ m_pHeaderCB->SetClickHdl(LINK(this, SwInsTableDlg, CheckBoxHdl));
+ m_pRepeatHeaderCB->SetClickHdl(LINK(this, SwInsTableDlg, ReapeatHeaderCheckBoxHdl));
ReapeatHeaderCheckBoxHdl();
CheckBoxHdl();
- sal_Int64 nMax = aRowEdit.GetValue();
+ sal_Int64 nMax = m_pRowNF->GetValue();
if( nMax <= 1 )
nMax = 1;
else
--nMax;
- aRepeatHeaderNF.SetMax( nMax );
-
- aRepeatHeaderCombo.Arrange( aRepeatHeaderFT );
+ m_pRepeatHeaderNF->SetMax( nMax );
}
SwInsTableDlg::~SwInsTableDlg()
@@ -173,37 +156,37 @@ IMPL_LINK_INLINE_START( SwInsTableDlg, ModifyName, Edit *, pEdit )
pEdit->SetText(sTblName);
}
- aOkBtn.Enable(pShell->GetTblStyle( sTblName ) == 0);
+ m_pOkBtn->Enable(pShell->GetTblStyle( sTblName ) == 0);
return 0;
}
IMPL_LINK_INLINE_END( SwInsTableDlg, ModifyName, Edit *, pEdit )
IMPL_LINK( SwInsTableDlg, ModifyRowCol, NumericField *, pField )
{
- if(pField == &aColEdit)
+ if(pField == m_pColNF)
{
- sal_Int64 nCol = aColEdit.GetValue();
+ sal_Int64 nCol = m_pColNF->GetValue();
if(!nCol)
nCol = 1;
- aRowEdit.SetMax(ROW_COL_PROD/nCol);
+ m_pRowNF->SetMax(ROW_COL_PROD/nCol);
}
else
{
- sal_Int64 nRow = aRowEdit.GetValue();
+ sal_Int64 nRow = m_pRowNF->GetValue();
if(!nRow)
nRow = 1;
- aColEdit.SetMax(ROW_COL_PROD/nRow);
+ m_pColNF->SetMax(ROW_COL_PROD/nRow);
// adjust depending NF for repeated rows
sal_Int64 nMax = ( nRow == 1 )? 1 : nRow - 1 ;
- sal_Int64 nActVal = aRepeatHeaderNF.GetValue();
+ sal_Int64 nActVal = m_pRepeatHeaderNF->GetValue();
- aRepeatHeaderNF.SetMax( nMax );
+ m_pRepeatHeaderNF->SetMax( nMax );
if( nActVal > nMax )
- aRepeatHeaderNF.SetValue( nMax );
+ m_pRepeatHeaderNF->SetValue( nMax );
else if( nActVal < nEnteredValRepeatHeaderNF )
- aRepeatHeaderNF.SetValue( ( nEnteredValRepeatHeaderNF < nMax )? nEnteredValRepeatHeaderNF : nMax );
+ m_pRepeatHeaderNF->SetValue( ( nEnteredValRepeatHeaderNF < nMax )? nEnteredValRepeatHeaderNF : nMax );
}
return 0;
}
@@ -223,7 +206,7 @@ IMPL_LINK( SwInsTableDlg, AutoFmtHdl, PushButton*, pButton )
IMPL_LINK_NOARG(SwInsTableDlg, CheckBoxHdl)
{
- aRepeatHeaderCB.Enable(aHeaderCB.IsChecked());
+ m_pRepeatHeaderCB->Enable(m_pHeaderCB->IsChecked());
ReapeatHeaderCheckBoxHdl();
return 0;
@@ -231,14 +214,14 @@ IMPL_LINK_NOARG(SwInsTableDlg, CheckBoxHdl)
IMPL_LINK_NOARG(SwInsTableDlg, ReapeatHeaderCheckBoxHdl)
{
- aRepeatHeaderCombo.Enable(aHeaderCB.IsChecked() && aRepeatHeaderCB.IsChecked());
+ m_pRepeatGroup->Enable(m_pHeaderCB->IsChecked() && m_pRepeatHeaderCB->IsChecked());
return 0;
}
IMPL_LINK_NOARG(SwInsTableDlg, ModifyRepeatHeaderNF_Hdl)
{
- nEnteredValRepeatHeaderNF = aRepeatHeaderNF.GetValue();
+ nEnteredValRepeatHeaderNF = m_pRepeatHeaderNF->GetValue();
return 0;
}
diff --git a/sw/source/ui/table/instable.hrc b/sw/source/ui/table/instable.hrc
index 96305ca475f2..e0251b2de21f 100644
--- a/sw/source/ui/table/instable.hrc
+++ b/sw/source/ui/table/instable.hrc
@@ -16,25 +16,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#define FT_COL 1
-#define FT_ROW 2
-#define ED_COL 4
-#define ED_ROW 5
-#define FL_TABLE 10
-#define ED_NAME 11
-#define FT_NAME 12
-#define CB_HEADER 13
-#define CB_REPEAT_HEADER 14
-#define CB_DONT_SPLIT 15
-#define CB_BORDER 16
-#define FL_OPTIONS 17
#define FT_REPEAT_HEADER 18
#define NF_REPEAT_HEADER 19
-#define BT_OK 20
-#define BT_CANCEL 21
-#define BT_HELP 22
-#define BT_AUTOFORMAT 23
-
#define WIN_REPEAT_HEADER 25
-
diff --git a/sw/source/ui/table/instable.src b/sw/source/ui/table/instable.src
deleted file mode 100644
index 9531a7d55a74..000000000000
--- a/sw/source/ui/table/instable.src
+++ /dev/null
@@ -1,187 +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 "instable.hrc"
-#include "cmdid.h"
-#include "helpid.h"
-ModalDialog DLG_INSERT_TABLE
-{
- HelpID = CMD_FN_INSERT_TABLE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 280 , 166 ) ;
- Text [ en-US ] = "Insert Table" ;
- Moveable = TRUE ;
- Edit ED_NAME
- {
- HelpID = "sw:Edit:DLG_INSERT_TABLE:ED_NAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 53 , 6 ) ;
- Size = MAP_APPFONT ( 158, 12 ) ;
- TabStop = TRUE ;
- };
- FixedText FT_NAME
- {
- Pos = MAP_APPFONT ( 6 , 8 ) ;
- Size = MAP_APPFONT ( 45, 8 ) ;
- Text [ en-US ] = "Name";
- };
- FixedText FT_COL
- {
- Pos = MAP_APPFONT ( 12 , 34 ) ;
- Size = MAP_APPFONT ( 39 , 8 ) ;
- Text [ en-US ] = "~Columns" ;
- Left = TRUE ;
- };
- NumericField ED_COL
- {
- HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_COL";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 53 , 32 ) ;
- Size = MAP_APPFONT ( 28 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 99 ;
- Value = 2 ;
- First = 1 ;
- Last = 99 ;
- };
- FixedText FT_ROW
- {
- Pos = MAP_APPFONT ( 12 , 50 ) ;
- Size = MAP_APPFONT ( 39 , 8 ) ;
- Text [ en-US ] = "~Rows" ;
- Left = TRUE ;
- };
- NumericField ED_ROW
- {
- HelpID = "sw:NumericField:DLG_INSERT_TABLE:ED_ROW";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 53 , 48 ) ;
- Size = MAP_APPFONT ( 28 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 99 ;
- Value = 2 ;
- First = 1 ;
- Last = 99 ;
- };
- FixedLine FL_TABLE
- {
- Pos = MAP_APPFONT ( 6 , 21 ) ;
- Size = MAP_APPFONT ( 212 , 8 ) ;
- Text [ en-US ] = "Size";
- };
- CheckBox CB_HEADER
- {
- HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_HEADER";
- Pos = MAP_APPFONT ( 12 , 74 ) ;
- Size = MAP_APPFONT (113 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Heading";
- };
- CheckBox CB_REPEAT_HEADER
- {
- HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_REPEAT_HEADER";
- Pos = MAP_APPFONT ( 21 , 88 ) ;
- Size = MAP_APPFONT ( 104 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Repeat heading";
- };
- FixedText FT_REPEAT_HEADER
- {
- Pos = MAP_APPFONT ( 30 , 105 ) ;
- Size = MAP_APPFONT ( 95 , 10 ) ;
- Text [ en-US ] = "The first %POSITION_OF_CONTROL rows" ;
- };
- NumericField NF_REPEAT_HEADER
- {
- HelpID = "sw:NumericField:DLG_INSERT_TABLE:NF_REPEAT_HEADER";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 130 , 104 ) ;
- Size = MAP_APPFONT ( 28 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Repeat = TRUE ;
- Spin = TRUE ;
- Minimum = 1 ;
- Maximum = 1000 ;
- First = 1 ;
- };
- Window WIN_REPEAT_HEADER
- {
- Pos = MAP_APPFONT ( 30 , 102 ) ;
- Size = MAP_APPFONT ( 2 , 1 ) ;
- };
- CheckBox CB_DONT_SPLIT
- {
- HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_DONT_SPLIT";
- Pos = MAP_APPFONT ( 12 , 118 ) ;
- Size = MAP_APPFONT ( 113 , 10 ) ;
- Text [ en-US ] = "Don't split table";
- TabStop = TRUE ;
- };
- CheckBox CB_BORDER
- {
- HelpID = "sw:CheckBox:DLG_INSERT_TABLE:CB_BORDER";
- Pos = MAP_APPFONT ( 12 , 132 ) ;
- Size = MAP_APPFONT ( 113 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Border";
- };
- PushButton BT_AUTOFORMAT
- {
- HelpID = "sw:PushButton:DLG_INSERT_TABLE:BT_AUTOFORMAT";
- Pos = MAP_APPFONT ( 12 , 146 ) ;
- Size = MAP_APPFONT ( 86 , 14 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Auto~Format..." ;
- };
- FixedLine FL_OPTIONS
- {
- Pos = MAP_APPFONT ( 6 , 63 ) ;
- Size = MAP_APPFONT ( 212 , 8 ) ;
- Text [ en-US ] = "Options";
- };
- OKButton BT_OK
- {
- Pos = MAP_APPFONT ( 224 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL
- {
- Pos = MAP_APPFONT ( 224 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BT_HELP
- {
- Pos = MAP_APPFONT ( 224 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-};
diff --git a/sw/uiconfig/swriter/ui/inserttable.ui b/sw/uiconfig/swriter/ui/inserttable.ui
index dcbd6ceacf28..567b91b4dfb5 100644
--- a/sw/uiconfig/swriter/ui/inserttable.ui
+++ b/sw/uiconfig/swriter/ui/inserttable.ui
@@ -3,21 +3,15 @@
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
- <property name="upper">100</property>
+ <property name="upper">99</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkAdjustment" id="adjustment2">
- <property name="lower">1</property>
- <property name="upper">100</property>
- <property name="value">1</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkDialog" id="dialog1">
+ <object class="GtkDialog" id="InsertTableDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="title" translatable="yes">Insert Table</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -29,7 +23,7 @@
<property name="orientation">vertical</property>
<property name="layout_style">start</property>
<child>
- <object class="GtkButton" id="101">
+ <object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -45,7 +39,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="102">
+ <object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -61,7 +55,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="103">
+ <object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -97,11 +91,10 @@
<property name="row_spacing">4</property>
<property name="column_spacing">6</property>
<child>
- <object class="GtkEntry" id="10">
+ <object class="swlo:TableNameEdit" id="nameedit">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
- <property name="text" translatable="yes">Table 1</property>
<property name="shadow_type">out</property>
<property name="invisible_char_set">True</property>
</object>
@@ -118,7 +111,7 @@
<property name="can_focus">False</property>
<property name="left_padding">4</property>
<child>
- <object class="GtkLabel" id="2">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Name</property>
@@ -183,7 +176,7 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="10001">
+ <object class="GtkSpinButton" id="colspin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
@@ -191,6 +184,7 @@
<property name="invisible_char_set">True</property>
<property name="progress_pulse_step">1</property>
<property name="adjustment">adjustment1</property>
+ <property name="climb_rate">1</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -200,7 +194,7 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="10002">
+ <object class="GtkSpinButton" id="rowspin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
@@ -208,6 +202,7 @@
<property name="invisible_char_set">True</property>
<property name="progress_pulse_step">1</property>
<property name="adjustment">adjustment1</property>
+ <property name="climb_rate">1</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -221,7 +216,7 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="1">
+ <object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Size</property>
@@ -252,7 +247,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <object class="GtkCheckButton" id="1001">
+ <object class="GtkCheckButton" id="headercb">
<property name="label" translatable="yes">Heading</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -270,7 +265,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="1002">
+ <object class="GtkCheckButton" id="repeatcb">
<property name="label" translatable="yes">Repeat heading</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -291,7 +286,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="1004">
+ <object class="GtkCheckButton" id="bordercb">
<property name="label" translatable="yes">Border</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -310,7 +305,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="1003">
+ <object class="GtkCheckButton" id="dontsplitcb">
<property name="label" translatable="yes">Don't split table</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -328,12 +323,12 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid5">
+ <object class="GtkGrid" id="repeatgroup">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">46</property>
<child>
- <object class="GtkLabel" id="6">
+ <object class="GtkLabel" id="repeatheaderbefore">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">The first</property>
@@ -346,7 +341,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="7">
+ <object class="GtkLabel" id="repeatheaderafter">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">rows</property>
@@ -359,13 +354,14 @@
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="10003">
+ <object class="GtkSpinButton" id="repeatheaderspin">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="invisible_char_set">True</property>
<property name="progress_pulse_step">1</property>
- <property name="adjustment">adjustment2</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="climb_rate">1</property>
<property name="update_policy">if-valid</property>
</object>
<packing>
@@ -388,7 +384,7 @@
</object>
</child>
<child type="label">
- <object class="GtkLabel" id="5">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0.47999998927116394</property>
@@ -404,7 +400,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="104">
+ <object class="GtkButton" id="autoformat">
<property name="label" translatable="yes">AutoFormat...</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -429,9 +425,9 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">101</action-widget>
- <action-widget response="0">102</action-widget>
- <action-widget response="0">103</action-widget>
+ <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>