12ee96f1cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 32ee96f1cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 42ee96f1cSAndrew Rist * or more contributor license agreements. See the NOTICE file 52ee96f1cSAndrew Rist * distributed with this work for additional information 62ee96f1cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 72ee96f1cSAndrew Rist * to you under the Apache License, Version 2.0 (the 82ee96f1cSAndrew Rist * "License"); you may not use this file except in compliance 92ee96f1cSAndrew Rist * with the License. You may obtain a copy of the License at 102ee96f1cSAndrew Rist * 112ee96f1cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 122ee96f1cSAndrew Rist * 132ee96f1cSAndrew Rist * Unless required by applicable law or agreed to in writing, 142ee96f1cSAndrew Rist * software distributed under the License is distributed on an 152ee96f1cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 162ee96f1cSAndrew Rist * KIND, either express or implied. See the License for the 172ee96f1cSAndrew Rist * specific language governing permissions and limitations 182ee96f1cSAndrew Rist * under the License. 192ee96f1cSAndrew Rist * 202ee96f1cSAndrew Rist *************************************************************/ 212ee96f1cSAndrew Rist 222ee96f1cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_cui.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <dialmgr.hxx> 28cdf0e10cSrcweir #include <svx/svxdlg.hxx> 29cdf0e10cSrcweir #include <cuires.hrc> 30cdf0e10cSrcweir #include "insrc.hxx" 31cdf0e10cSrcweir #include "insrc.hrc" 32cdf0e10cSrcweir 33cdf0e10cSrcweir bool SvxInsRowColDlg::isInsertBefore() const 34cdf0e10cSrcweir { 35cdf0e10cSrcweir return !aAfterBtn.IsChecked(); 36cdf0e10cSrcweir } 37cdf0e10cSrcweir 38cdf0e10cSrcweir sal_uInt16 SvxInsRowColDlg::getInsertCount() const 39cdf0e10cSrcweir { 40cdf0e10cSrcweir return static_cast< sal_uInt16 >( aCountEdit.GetValue() ); 41cdf0e10cSrcweir } 42cdf0e10cSrcweir 43cdf0e10cSrcweir SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId ) 44cdf0e10cSrcweir : ModalDialog( pParent, CUI_RES(DLG_INS_ROW_COL) ), 45cdf0e10cSrcweir aCount( this, CUI_RES( FT_COUNT ) ), 46cdf0e10cSrcweir aCountEdit( this, CUI_RES( ED_COUNT ) ), 47cdf0e10cSrcweir aInsFL( this, CUI_RES( FL_INS ) ), 48cdf0e10cSrcweir aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ), 49cdf0e10cSrcweir aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ), 50cdf0e10cSrcweir aPosFL( this, CUI_RES( FL_POS ) ), 51cdf0e10cSrcweir aRow(CUI_RES(STR_ROW)), 52cdf0e10cSrcweir aCol(CUI_RES(STR_COL)), 53cdf0e10cSrcweir aOKBtn( this, CUI_RES( BT_OK ) ), 54cdf0e10cSrcweir aCancelBtn( this, CUI_RES( BT_CANCEL ) ), 55cdf0e10cSrcweir aHelpBtn( this, CUI_RES( BT_HELP ) ), 56cdf0e10cSrcweir bColumn( bCol ) 57cdf0e10cSrcweir { 58cdf0e10cSrcweir FreeResource(); 59*6ebe9162Smseidel String aTmp; 60cdf0e10cSrcweir if( bColumn ) 61cdf0e10cSrcweir { 62*6ebe9162Smseidel aTmp = aCol; 63cdf0e10cSrcweir } 64cdf0e10cSrcweir else 65cdf0e10cSrcweir { 66*6ebe9162Smseidel aTmp = aRow; 67cdf0e10cSrcweir } 68cdf0e10cSrcweir SetText( aTmp ); 69cdf0e10cSrcweir SetHelpId( sHelpId ); 70cdf0e10cSrcweir } 71cdf0e10cSrcweir 72cdf0e10cSrcweir short SvxInsRowColDlg::Execute(void) 73cdf0e10cSrcweir { 74cdf0e10cSrcweir return ModalDialog::Execute(); 75cdf0e10cSrcweir } 76cdf0e10cSrcweir 77cdf0e10cSrcweir 78cdf0e10cSrcweir 79