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 <dialmgr.hxx> 28 #include <svx/svxdlg.hxx> 29 #include <cuires.hrc> 30 #include "insrc.hxx" 31 #include "insrc.hrc" 32 33 bool SvxInsRowColDlg::isInsertBefore() const 34 { 35 return !aAfterBtn.IsChecked(); 36 } 37 38 sal_uInt16 SvxInsRowColDlg::getInsertCount() const 39 { 40 return static_cast< sal_uInt16 >( aCountEdit.GetValue() ); 41 } 42 43 SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId ) 44 : ModalDialog( pParent, CUI_RES(DLG_INS_ROW_COL) ), 45 aCount( this, CUI_RES( FT_COUNT ) ), 46 aCountEdit( this, CUI_RES( ED_COUNT ) ), 47 aInsFL( this, CUI_RES( FL_INS ) ), 48 aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ), 49 aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ), 50 aPosFL( this, CUI_RES( FL_POS ) ), 51 aRow(CUI_RES(STR_ROW)), 52 aCol(CUI_RES(STR_COL)), 53 aOKBtn( this, CUI_RES( BT_OK ) ), 54 aCancelBtn( this, CUI_RES( BT_CANCEL ) ), 55 aHelpBtn( this, CUI_RES( BT_HELP ) ), 56 bColumn( bCol ) 57 { 58 FreeResource(); 59 String aTmp; 60 if( bColumn ) 61 { 62 aTmp = aCol; 63 } 64 else 65 { 66 aTmp = aRow; 67 } 68 SetText( aTmp ); 69 SetHelpId( sHelpId ); 70 } 71 72 short SvxInsRowColDlg::Execute(void) 73 { 74 return ModalDialog::Execute(); 75 } 76 77 78 79