Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : : #ifndef _SVX_CUIOPTGENRL_HXX
20 : : #define _SVX_CUIOPTGENRL_HXX
21 : :
22 : : #include <svx/optgenrl.hxx>
23 : : #include <sfx2/tabdlg.hxx>
24 : : #include <vcl/fixed.hxx>
25 : : #include <vcl/edit.hxx>
26 : : #include <vcl/group.hxx>
27 : :
28 : : // forward ---------------------------------------------------------------
29 : :
30 : : struct GeneralTabPage_Impl;
31 : :
32 : : #define SfxGeneralTabPage SvxGeneralTabPage
33 : : #define INDEX_NOTSET ((sal_Int16)-1)
34 : :
35 : : // class SvxUserEdit -----------------------------------------------------
36 : :
37 [ # # ]: 0 : class SvxUserEdit : public Edit
38 : : {
39 : : private:
40 : : sal_Int16 m_nIndex;
41 : : FixedText* m_pLabel;
42 : :
43 : : public:
44 : 0 : SvxUserEdit( Window* pParent, const ResId& rResId,
45 : : sal_Int16 nIndex = INDEX_NOTSET, FixedText* pLabel = NULL ) :
46 : 0 : Edit( pParent, rResId, true ), m_nIndex( nIndex ), m_pLabel( pLabel ) {}
47 : :
48 : 0 : inline void SetIndex( sal_Int16 nIndex ) { m_nIndex = nIndex; }
49 : 0 : inline sal_Int16 GetIndex() const { return m_nIndex; }
50 : 0 : inline void SetLabel( FixedText* pLabel ) { m_pLabel = pLabel; }
51 : 0 : inline FixedText* GetLabel() const { return m_pLabel; }
52 : : };
53 : :
54 : : // class SvxGeneralTabPage -----------------------------------------------
55 : :
56 : : class SvxGeneralTabPage : public SfxTabPage
57 : : {
58 : : using TabPage::DeactivatePage;
59 : : private:
60 : : FixedLine aAddrFrm;
61 : : FixedText aCompanyLbl;
62 : : SvxUserEdit aCompanyEdit;
63 : : FixedText aNameLbl;
64 : : FixedText aNameLblRuss;
65 : : FixedText aNameLblEastern;
66 : : SvxUserEdit aFirstName;
67 : : SvxUserEdit aFatherName;
68 : : SvxUserEdit aName;
69 : : SvxUserEdit aShortName;
70 : : FixedText aStreetLbl;
71 : : FixedText aStreetLblRuss;
72 : : SvxUserEdit aStreetEdit;
73 : : SvxUserEdit aApartmentNrEdit;
74 : : FixedText aCityLbl;
75 : : SvxUserEdit aPLZEdit;
76 : : SvxUserEdit aCityEdit;
77 : : SvxUserEdit aUsCityEdit;
78 : : SvxUserEdit aUsStateEdit;
79 : : SvxUserEdit aUsZipEdit;
80 : : FixedText aCountryLbl;
81 : : SvxUserEdit aCountryEdit;
82 : : FixedText aTitlePosLbl;
83 : : SvxUserEdit aTitleEdit;
84 : : SvxUserEdit aPositionEdit;
85 : : FixedText aPhoneLbl;
86 : : SvxUserEdit aTelPrivEdit;
87 : : SvxUserEdit aTelCompanyEdit;
88 : : FixedText aFaxMailLbl;
89 : : SvxUserEdit aFaxEdit;
90 : : SvxUserEdit aEmailEdit;
91 : : CheckBox aUseDataCB;
92 : :
93 : : GeneralTabPage_Impl* pImpl;
94 : :
95 : : #ifdef _SVX_OPTGENRL_CXX
96 : : DECL_LINK( ModifyHdl_Impl, Edit * );
97 : :
98 : : sal_Bool GetAddress_Impl();
99 : : void SetAddress_Impl();
100 : : #endif
101 : :
102 : : protected:
103 : : virtual int DeactivatePage( SfxItemSet* pSet );
104 : :
105 : : public:
106 : : SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
107 : : ~SvxGeneralTabPage();
108 : :
109 : : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
110 : :
111 : : virtual sal_Bool FillItemSet( SfxItemSet& rSet );
112 : : virtual void Reset( const SfxItemSet& rSet );
113 : : };
114 : :
115 : : #endif // #ifndef _SVX_CUIOPTGENRL_HXX
116 : :
117 : :
118 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|