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: adritem.hxx,v $
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_ADRITEM_HXX
31 #define _SVX_ADRITEM_HXX
33 // include ---------------------------------------------------------------
35 #ifndef _SFXSTRITEM_HXX //autogen
36 #include <bf_svtools/stritem.hxx>
40 // define ----------------------------------------------------------------
42 #define POS_COMPANY ((USHORT) 0)
43 #define POS_STREET ((USHORT) 1)
44 #define POS_COUNTRY ((USHORT) 2)
45 #define POS_PLZ ((USHORT) 3)
46 #define POS_CITY ((USHORT) 4)
47 #define POS_TITLE ((USHORT) 5)
48 #define POS_POSITION ((USHORT) 6)
49 #define POS_TEL_PRIVATE ((USHORT) 7)
50 #define POS_TEL_COMPANY ((USHORT) 8)
51 #define POS_FAX ((USHORT) 9)
52 #define POS_EMAIL ((USHORT)10)
53 #define POS_STATE ((USHORT)11)
54 #define POS_FATHERSNAME ((USHORT)12)
55 #define POS_APARTMENT ((USHORT)13)
56 #define POS_FIRSTNAME ((USHORT)14)
57 #define POS_LASTNAME ((USHORT)15)
58 #define POS_SHORTNAME ((USHORT)16)
60 #define SfxAddressItem SvxAddressItem
62 const char cAdrToken
= '#';
64 // forward ---------------------------------------------------------------
68 // class SvxAddressItem --------------------------------------------------
70 class SvxAddressItem
: public SfxStringItem
80 SvxAddressItem( USHORT nWhich
= 0 );
81 SvxAddressItem( const String
& rAddress
, const String
& rShortName
,
82 const String
& rFirstName
, const String
& rName
,
84 SvxAddressItem( SvStream
& rStrm
, USHORT nWhich
= 0 );
85 SvxAddressItem( const SvxAddressItem
& );
90 BOOL
SetToken( USHORT nPos
, const String
&rVal
);
91 String
GetToken( USHORT nPos
) const;
92 String
GetFirstName() const { return aFirstName
; }
93 String
GetName() const { return aName
; }
94 String
GetShortName() const { return aShortName
; }
95 String
GetEmail() const { return GetToken( POS_EMAIL
); }
97 sal_Bool
IsTokenReadonly( USHORT nToken
) const;
100 String
GetCompany() const { return GetToken( POS_COMPANY
); }
101 String
GetStreet() const { return GetToken( POS_STREET
); }
102 String
GetCountry() const { return GetToken( POS_COUNTRY
); }
103 String
GetPLZ() const { return GetToken( POS_PLZ
); }
104 String
GetCity() const { return GetToken( POS_CITY
); }
105 String
GetTitle() const { return GetToken( POS_TITLE
); }
106 String
GetPosition() const { return GetToken( POS_POSITION
); }
107 String
GetTelPriv() const { return GetToken( POS_TEL_PRIVATE
); }
108 String
GetTelCompany() const { return GetToken( POS_TEL_COMPANY
); }
109 String
GetFax() const { return GetToken( POS_FAX
); }
110 String
GetState() const { return GetToken( POS_STATE
); }
111 String
GetFatherName() const { return GetToken( POS_FATHERSNAME
); }
112 String
GetApartmentNr() const { return GetToken( POS_APARTMENT
); }
116 }//end of namespace binfilter
117 #endif // #ifndef _SVX_ADRITEM_HXX