Update ooo320-m1
[ooovba.git] / svx / source / cui / cuioptgenrl.hxx
blob818c23478dde9ae7c08b37ab9a6c5a89989a6eaa
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cuioptgenrl.hxx,v $
10 * $Revision: 1.6 $
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 ************************************************************************/
30 #ifndef _SVX_CUIOPTGENRL_HXX
31 #define _SVX_CUIOPTGENRL_HXX
33 // include ---------------------------------------------------------------
35 #include <optgenrl.hxx>
36 #include <sfx2/tabdlg.hxx>
37 #ifndef _FIXED_HXX //autogen
38 #include <vcl/fixed.hxx>
39 #endif
40 #ifndef _EDIT_HXX //autogen
41 #include <vcl/edit.hxx>
42 #endif
43 #ifndef _GROUP_HXX //autogen
44 #include <vcl/group.hxx>
45 #endif
47 // forward ---------------------------------------------------------------
49 struct GeneralTabPage_Impl;
51 #define SfxGeneralTabPage SvxGeneralTabPage
52 #define INDEX_NOTSET ((sal_Int16)-1)
54 // class SvxUserEdit -----------------------------------------------------
56 class SvxUserEdit : public Edit
58 private:
59 sal_Int16 m_nIndex;
60 FixedText* m_pLabel;
62 public:
63 SvxUserEdit( Window* pParent, const ResId& rResId,
64 sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) :
65 Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {}
67 inline void SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; }
68 inline sal_Int16 GetIndex() const { return m_nIndex; }
69 inline void SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; }
70 inline FixedText* GetLabel() const { return m_pLabel; }
73 // class SvxGeneralTabPage -----------------------------------------------
75 class SvxGeneralTabPage : public SfxTabPage
77 using TabPage::DeactivatePage;
78 private:
79 FixedText aCompanyLbl;
80 SvxUserEdit aCompanyEdit;
81 FixedText aNameLbl;
82 FixedText aNameLblRuss;
83 FixedText aNameLblEastern;
84 SvxUserEdit aFirstName;
85 SvxUserEdit aFatherName;
86 SvxUserEdit aName;
87 SvxUserEdit aShortName;
88 FixedText aStreetLbl;
89 FixedText aStreetLblRuss;
90 SvxUserEdit aStreetEdit;
91 SvxUserEdit aApartmentNrEdit;
92 FixedText aCityLbl;
93 SvxUserEdit aPLZEdit;
94 SvxUserEdit aCityEdit;
95 SvxUserEdit aUsCityEdit;
96 SvxUserEdit aUsStateEdit;
97 SvxUserEdit aUsZipEdit;
98 FixedText aCountryLbl;
99 SvxUserEdit aCountryEdit;
100 FixedText aTitlePosLbl;
101 SvxUserEdit aTitleEdit;
102 SvxUserEdit aPositionEdit;
103 FixedText aPhoneLbl;
104 SvxUserEdit aTelPrivEdit;
105 SvxUserEdit aTelCompanyEdit;
106 FixedText aFaxMailLbl;
107 SvxUserEdit aFaxEdit;
108 SvxUserEdit aEmailEdit;
109 FixedLine aAddrFrm;
110 CheckBox aUseDataCB;
112 GeneralTabPage_Impl* pImpl;
115 #ifdef _SVX_OPTGENRL_CXX
116 DECL_LINK( ModifyHdl_Impl, Edit * );
118 sal_Bool GetAddress_Impl();
119 void SetAddress_Impl();
120 #endif
122 protected:
123 virtual int DeactivatePage( SfxItemSet* pSet );
125 public:
126 SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
127 ~SvxGeneralTabPage();
129 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
131 virtual BOOL FillItemSet( SfxItemSet& rSet );
132 virtual void Reset( const SfxItemSet& rSet );
135 #endif // #ifndef _SVX_CUIOPTGENRL_HXX