merge the formfield patch from ooo-build
[ooovba.git] / svx / source / cui / newtabledlg.cxx
blob6e8b7a59f7ad7ac7571653c59a4a0f91a9be024a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: newtabledlg.cxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
34 #ifdef SVX_DLLIMPLEMENTATION
35 #undef SVX_DLLIMPLEMENTATION
36 #endif
38 // include ---------------------------------------------------------------
40 #include "svx/dialogs.hrc"
41 #include "svx/dialmgr.hxx"
42 #include "newtabledlg.hxx"
43 #include "newtabledlg.hrc"
45 SvxNewTableDialog::SvxNewTableDialog( Window* pParent )
46 : ModalDialog( pParent, SVX_RES( RID_SVX_NEWTABLE_DLG ) )
47 , maFtColumns( this, SVX_RES( FT_COLUMNS ) )
48 , maNumColumns( this, SVX_RES( NF_COLUMNS ) )
49 , maFtRows( this, SVX_RES( FT_ROWS ) )
50 , maNumRows( this, SVX_RES( NF_ROWS ) )
51 , maFlSep( this, SVX_RES( FL_SEP ) )
52 , maHelpButton( this, SVX_RES( BTN_HELP ) )
53 , maOkButton( this, SVX_RES( BTN_OK ) )
54 , maCancelButton( this, SVX_RES( BTN_CANCEL ) )
56 maNumRows.SetValue(2);
57 maNumColumns.SetValue(5);
58 FreeResource();
61 short SvxNewTableDialog::Execute(void)
63 return ModalDialog::Execute();
66 void SvxNewTableDialog::Apply(void)
70 sal_Int32 SvxNewTableDialog::getRows() const
72 return sal::static_int_cast< sal_Int32 >( maNumRows.GetValue() );
75 sal_Int32 SvxNewTableDialog::getColumns() const
77 return sal::static_int_cast< sal_Int32 >( maNumColumns.GetValue() );