update dev300-m58
[ooovba.git] / svx / source / cui / insrc.cxx
blobe0a7bdc5f07cb4781d597896819bc7430894810a
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: insrc.cxx,v $
10 * $Revision: 1.10 $
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"
33 #ifdef SVX_DLLIMPLEMENTATION
34 #undef SVX_DLLIMPLEMENTATION
35 #endif
37 #include <svx/dialmgr.hxx>
38 #include <svx/svxdlg.hxx>
39 #include <svx/dialogs.hrc>
40 #include "insrc.hxx"
41 #include "insrc.hrc"
43 bool SvxInsRowColDlg::isInsertBefore() const
45 return !aAfterBtn.IsChecked();
48 sal_uInt16 SvxInsRowColDlg::getInsertCount() const
50 return static_cast< sal_uInt16 >( aCountEdit.GetValue() );
53 SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, ULONG nHelpId )
54 : ModalDialog( pParent, SVX_RES(DLG_INS_ROW_COL) ),
55 aCount( this, SVX_RES( FT_COUNT ) ),
56 aCountEdit( this, SVX_RES( ED_COUNT ) ),
57 aInsFL( this, SVX_RES( FL_INS ) ),
58 aBeforeBtn( this, SVX_RES( CB_POS_BEFORE ) ),
59 aAfterBtn( this, SVX_RES( CB_POS_AFTER ) ),
60 aPosFL( this, SVX_RES( FL_POS ) ),
61 aRow(SVX_RES(STR_ROW)),
62 aCol(SVX_RES(STR_COL)),
63 aOKBtn( this, SVX_RES( BT_OK ) ),
64 aCancelBtn( this, SVX_RES( BT_CANCEL ) ),
65 aHelpBtn( this, SVX_RES( BT_HELP ) ),
66 bColumn( bCol )
68 FreeResource();
69 String aTmp( GetText() );
70 if( bColumn )
72 aTmp += aCol;
74 else
76 aTmp += aRow;
78 SetText( aTmp );
79 SetHelpId( nHelpId );
82 short SvxInsRowColDlg::Execute(void)
84 return ModalDialog::Execute();