1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_cui.hxx" 26 27 // include --------------------------------------------------------------- 28 29 #include "cuires.hrc" 30 #include "dialmgr.hxx" 31 #include "newtabledlg.hxx" 32 #include "newtabledlg.hrc" 33 34 SvxNewTableDialog::SvxNewTableDialog( Window* pParent ) 35 : ModalDialog( pParent, CUI_RES( RID_SVX_NEWTABLE_DLG ) ) 36 , maFtColumns( this, CUI_RES( FT_COLUMNS ) ) 37 , maNumColumns( this, CUI_RES( NF_COLUMNS ) ) 38 , maFtRows( this, CUI_RES( FT_ROWS ) ) 39 , maNumRows( this, CUI_RES( NF_ROWS ) ) 40 , maFlSep( this, CUI_RES( FL_SEP ) ) 41 , maHelpButton( this, CUI_RES( BTN_HELP ) ) 42 , maOkButton( this, CUI_RES( BTN_OK ) ) 43 , maCancelButton( this, CUI_RES( BTN_CANCEL ) ) 44 { 45 maNumRows.SetValue(2); 46 maNumColumns.SetValue(5); 47 FreeResource(); 48 } 49 50 short SvxNewTableDialog::Execute(void) 51 { 52 return ModalDialog::Execute(); 53 } 54 55 void SvxNewTableDialog::Apply(void) 56 { 57 } 58 59 sal_Int32 SvxNewTableDialog::getRows() const 60 { 61 return sal::static_int_cast< sal_Int32 >( maNumRows.GetValue() ); 62 } 63 64 sal_Int32 SvxNewTableDialog::getColumns() const 65 { 66 return sal::static_int_cast< sal_Int32 >( maNumColumns.GetValue() ); 67 } 68