xref: /aoo41x/main/editeng/inc/editeng/cmapitem.hxx (revision 4c5491ea)
1*4c5491eaSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*4c5491eaSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*4c5491eaSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*4c5491eaSAndrew Rist  * distributed with this work for additional information
6*4c5491eaSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*4c5491eaSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*4c5491eaSAndrew Rist  * "License"); you may not use this file except in compliance
9*4c5491eaSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*4c5491eaSAndrew Rist  *
11*4c5491eaSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*4c5491eaSAndrew Rist  *
13*4c5491eaSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*4c5491eaSAndrew Rist  * software distributed under the License is distributed on an
15*4c5491eaSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*4c5491eaSAndrew Rist  * KIND, either express or implied.  See the License for the
17*4c5491eaSAndrew Rist  * specific language governing permissions and limitations
18*4c5491eaSAndrew Rist  * under the License.
19*4c5491eaSAndrew Rist  *
20*4c5491eaSAndrew Rist  *************************************************************/
21*4c5491eaSAndrew Rist 
22*4c5491eaSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SVX_CMAPITEM_HXX
24cdf0e10cSrcweir #define _SVX_CMAPITEM_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir // include ---------------------------------------------------------------
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <svl/eitem.hxx>
29cdf0e10cSrcweir #include <editeng/svxenum.hxx>
30cdf0e10cSrcweir #include <editeng/editengdllapi.h>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir class SvXMLUnitConverter;
33cdf0e10cSrcweir namespace rtl
34cdf0e10cSrcweir {
35cdf0e10cSrcweir 	class OUString;
36cdf0e10cSrcweir }
37cdf0e10cSrcweir 
38cdf0e10cSrcweir // class SvxCaseMapItem --------------------------------------------------
39cdf0e10cSrcweir 
40cdf0e10cSrcweir /*	[Beschreibung]
41cdf0e10cSrcweir 
42cdf0e10cSrcweir 	Dieses Item beschreibt die Schrift-Ausrichtung (Versalien, Kapitaelchen,...).
43cdf0e10cSrcweir */
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class EDITENG_DLLPUBLIC SvxCaseMapItem : public SfxEnumItem
46cdf0e10cSrcweir {
47cdf0e10cSrcweir public:
48cdf0e10cSrcweir 	TYPEINFO();
49cdf0e10cSrcweir 
50cdf0e10cSrcweir     SvxCaseMapItem( const SvxCaseMap eMap /*= SVX_CASEMAP_NOT_MAPPED*/,
51cdf0e10cSrcweir                     const sal_uInt16 nId );
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 	// "pure virtual Methoden" vom SfxPoolItem + SfxEnumItem
54cdf0e10cSrcweir 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
55cdf0e10cSrcweir 									SfxMapUnit eCoreMetric,
56cdf0e10cSrcweir 									SfxMapUnit ePresMetric,
57cdf0e10cSrcweir                                     String &rText, const IntlWrapper * = 0 ) const;
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
60cdf0e10cSrcweir 	virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const;
61cdf0e10cSrcweir 	virtual SvStream&		Store(SvStream &, sal_uInt16 nItemVersion) const;
62cdf0e10cSrcweir 	virtual String			GetValueTextByPos( sal_uInt16 nPos ) const;
63cdf0e10cSrcweir 	virtual sal_uInt16          GetValueCount() const;
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	// MS VC4.0 kommt durcheinander
SetValue(sal_uInt16 nNewVal)66cdf0e10cSrcweir 	void			 		SetValue( sal_uInt16 nNewVal )
67cdf0e10cSrcweir 								{SfxEnumItem::SetValue(nNewVal); }
68cdf0e10cSrcweir 
operator =(const SvxCaseMapItem & rMap)69cdf0e10cSrcweir 	inline SvxCaseMapItem& operator=(const SvxCaseMapItem& rMap)
70cdf0e10cSrcweir 		{
71cdf0e10cSrcweir 			SetValue( rMap.GetValue() );
72cdf0e10cSrcweir 			return *this;
73cdf0e10cSrcweir 		}
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 	// enum cast
GetCaseMap() const76cdf0e10cSrcweir 	SvxCaseMap 				GetCaseMap() const
77cdf0e10cSrcweir 								{ return (SvxCaseMap)GetValue(); }
SetCaseMap(SvxCaseMap eNew)78cdf0e10cSrcweir 	void 					SetCaseMap( SvxCaseMap eNew )
79cdf0e10cSrcweir 								{ SetValue( (sal_uInt16)eNew ); }
80cdf0e10cSrcweir 	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
81cdf0e10cSrcweir 	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
82cdf0e10cSrcweir };
83cdf0e10cSrcweir 
84cdf0e10cSrcweir #endif
85cdf0e10cSrcweir 
86