xref: /aoo42x/main/cui/source/dialogs/insrc.cxx (revision 108891ce)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_cui.hxx"
24 
25 #include <dialmgr.hxx>
26 #include <svx/svxdlg.hxx>
27 #include <cuires.hrc>
28 #include "insrc.hxx"
29 #include "insrc.hrc"
30 
isInsertBefore() const31 bool SvxInsRowColDlg::isInsertBefore() const
32 {
33 	return !aAfterBtn.IsChecked();
34 }
35 
getInsertCount() const36 sal_uInt16 SvxInsRowColDlg::getInsertCount() const
37 {
38 	return static_cast< sal_uInt16 >( aCountEdit.GetValue() );
39 }
40 
SvxInsRowColDlg(Window * pParent,bool bCol,const rtl::OString & sHelpId)41 SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, const rtl::OString& sHelpId )
42 	: ModalDialog( pParent, CUI_RES(DLG_INS_ROW_COL) ),
43 	aCount( this, CUI_RES( FT_COUNT ) ),
44 	aCountEdit( this, CUI_RES( ED_COUNT ) ),
45 	aInsFL( this, CUI_RES( FL_INS ) ),
46 	aBeforeBtn( this, CUI_RES( CB_POS_BEFORE ) ),
47 	aAfterBtn( this, CUI_RES( CB_POS_AFTER ) ),
48 	aPosFL( this, CUI_RES( FL_POS ) ),
49 	aRow(CUI_RES(STR_ROW)),
50 	aCol(CUI_RES(STR_COL)),
51 	aOKBtn( this, CUI_RES( BT_OK ) ),
52 	aCancelBtn( this, CUI_RES( BT_CANCEL ) ),
53 	aHelpBtn( this, CUI_RES( BT_HELP ) ),
54 	bColumn( bCol )
55 {
56 	FreeResource();
57 	String aTmp;
58 	if( bColumn )
59 	{
60 		aTmp = aCol;
61 	}
62 	else
63 	{
64 		aTmp = aRow;
65 	}
66 	SetText( aTmp );
67 	SetHelpId( sHelpId );
68 }
69 
Execute(void)70 short SvxInsRowColDlg::Execute(void)
71 {
72 	return ModalDialog::Execute();
73 }
74 
75 /* vim: set noet sw=4 ts=4: */
76