update dev300-m58
[ooovba.git] / svx / source / cui / cuioptgenrl.hxx
blobbed2f3829655bb0af73f1896c15a118f405143ba
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 SvxUserEdit aFirstName;
84 SvxUserEdit aFatherName;
85 SvxUserEdit aName;
86 SvxUserEdit aShortName;
87 FixedText aStreetLbl;
88 FixedText aStreetLblRuss;
89 SvxUserEdit aStreetEdit;
90 SvxUserEdit aApartmentNrEdit;
91 FixedText aCityLbl;
92 SvxUserEdit aPLZEdit;
93 SvxUserEdit aCityEdit;
94 SvxUserEdit aUsCityEdit;
95 SvxUserEdit aUsStateEdit;
96 SvxUserEdit aUsZipEdit;
97 FixedText aCountryLbl;
98 SvxUserEdit aCountryEdit;
99 FixedText aTitlePosLbl;
100 SvxUserEdit aTitleEdit;
101 SvxUserEdit aPositionEdit;
102 FixedText aPhoneLbl;
103 SvxUserEdit aTelPrivEdit;
104 SvxUserEdit aTelCompanyEdit;
105 FixedText aFaxMailLbl;
106 SvxUserEdit aFaxEdit;
107 SvxUserEdit aEmailEdit;
108 FixedLine aAddrFrm;
109 CheckBox aUseDataCB;
111 GeneralTabPage_Impl* pImpl;
114 #ifdef _SVX_OPTGENRL_CXX
115 DECL_LINK( ModifyHdl_Impl, Edit * );
117 sal_Bool GetAddress_Impl();
118 void SetAddress_Impl();
119 #endif
121 protected:
122 virtual int DeactivatePage( SfxItemSet* pSet );
124 public:
125 SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
126 ~SvxGeneralTabPage();
128 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
130 virtual BOOL FillItemSet( SfxItemSet& rSet );
131 virtual void Reset( const SfxItemSet& rSet );
134 #endif // #ifndef _SVX_CUIOPTGENRL_HXX