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