1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _SVX_CUIOPTGENRL_HXX 28 #define _SVX_CUIOPTGENRL_HXX 29 30 // include --------------------------------------------------------------- 31 32 #include <svx/optgenrl.hxx> 33 #include <sfx2/tabdlg.hxx> 34 #include <vcl/fixed.hxx> 35 #include <vcl/edit.hxx> 36 #include <vcl/group.hxx> 37 38 // forward --------------------------------------------------------------- 39 40 struct GeneralTabPage_Impl; 41 42 #define SfxGeneralTabPage SvxGeneralTabPage 43 #define INDEX_NOTSET ((sal_Int16)-1) 44 45 // class SvxUserEdit ----------------------------------------------------- 46 47 class SvxUserEdit : public Edit 48 { 49 private: 50 sal_Int16 m_nIndex; 51 FixedText* m_pLabel; 52 53 public: 54 SvxUserEdit( Window* pParent, const ResId& rResId, 55 sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) : 56 Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {} 57 58 inline void SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; } 59 inline sal_Int16 GetIndex() const { return m_nIndex; } 60 inline void SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; } 61 inline FixedText* GetLabel() const { return m_pLabel; } 62 }; 63 64 // class SvxGeneralTabPage ----------------------------------------------- 65 66 class SvxGeneralTabPage : public SfxTabPage 67 { 68 using TabPage::DeactivatePage; 69 private: 70 FixedLine aAddrFrm; 71 FixedText aCompanyLbl; 72 SvxUserEdit aCompanyEdit; 73 FixedText aNameLbl; 74 FixedText aNameLblRuss; 75 FixedText aNameLblEastern; 76 SvxUserEdit aFirstName; 77 SvxUserEdit aFatherName; 78 SvxUserEdit aName; 79 SvxUserEdit aShortName; 80 FixedText aStreetLbl; 81 FixedText aStreetLblRuss; 82 SvxUserEdit aStreetEdit; 83 SvxUserEdit aApartmentNrEdit; 84 FixedText aCityLbl; 85 SvxUserEdit aPLZEdit; 86 SvxUserEdit aCityEdit; 87 SvxUserEdit aUsCityEdit; 88 SvxUserEdit aUsStateEdit; 89 SvxUserEdit aUsZipEdit; 90 FixedText aCountryLbl; 91 SvxUserEdit aCountryEdit; 92 FixedText aTitlePosLbl; 93 SvxUserEdit aTitleEdit; 94 SvxUserEdit aPositionEdit; 95 FixedText aPhoneLbl; 96 SvxUserEdit aTelPrivEdit; 97 SvxUserEdit aTelCompanyEdit; 98 FixedText aFaxMailLbl; 99 SvxUserEdit aFaxEdit; 100 SvxUserEdit aEmailEdit; 101 CheckBox aUseDataCB; 102 103 GeneralTabPage_Impl* pImpl; 104 105 #ifdef _SVX_OPTGENRL_CXX 106 DECL_LINK( ModifyHdl_Impl, Edit * ); 107 108 sal_Bool GetAddress_Impl(); 109 void SetAddress_Impl(); 110 #endif 111 112 protected: 113 virtual int DeactivatePage( SfxItemSet* pSet ); 114 115 public: 116 SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet ); 117 ~SvxGeneralTabPage(); 118 119 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet ); 120 121 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 122 virtual void Reset( const SfxItemSet& rSet ); 123 }; 124 125 #endif // #ifndef _SVX_CUIOPTGENRL_HXX 126 127 128