xref: /aoo4110/main/svx/inc/svx/sdtaitm.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SDTAITM_HXX
24 #define _SDTAITM_HXX
25 
26 #include <svl/eitem.hxx>
27 #include <svx/svddef.hxx>
28 #include "svx/svxdllapi.h"
29 
30 //------------------------------
31 // class SdrTextVertAdjustItem
32 //------------------------------
33 
34 // Implementiert werden zunaechst nur TOP und CENTER, neustens auch BOTTOM
35 enum SdrTextVertAdjust {SDRTEXTVERTADJUST_TOP,      // Kopfbuendig (so wie man es normalerweise kennt)
36 						SDRTEXTVERTADJUST_CENTER,   // Zentriert (z.B. fuer die Titeltexte im Draw)
37 						SDRTEXTVERTADJUST_BOTTOM,   // Fussbuendig
38 						SDRTEXTVERTADJUST_BLOCK    // #103516# support vertical full with supported now
39 						/*,SDRTEXTVERTADJUST_STRETCH*/}; // Auch die Buchstaben in der Hoehe verzerren (ni)
40 
41 class SVX_DLLPUBLIC SdrTextVertAdjustItem: public SfxEnumItem {
42 public:
43 	TYPEINFO();
SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP)44 	SdrTextVertAdjustItem(SdrTextVertAdjust eAdj=SDRTEXTVERTADJUST_TOP): SfxEnumItem(SDRATTR_TEXT_VERTADJUST,(sal_uInt16)eAdj) {}
SdrTextVertAdjustItem(SvStream & rIn)45 	SdrTextVertAdjustItem(SvStream& rIn)                               : SfxEnumItem(SDRATTR_TEXT_VERTADJUST,rIn)  {}
46 	virtual SfxPoolItem*      Clone(SfxItemPool* pPool=NULL) const;
47 	virtual SfxPoolItem*      Create(SvStream& rIn, sal_uInt16 nVer) const;
48 	virtual sal_uInt16            GetValueCount() const; // { return 5; }
GetValue() const49 			SdrTextVertAdjust GetValue() const      { return (SdrTextVertAdjust)SfxEnumItem::GetValue(); }
50 
51 	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
52 	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
53 
54 	virtual String  GetValueTextByPos(sal_uInt16 nPos) const;
55     virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const;
56 };
57 
58 //------------------------------
59 // class SdrTextHorzAdjustItem
60 //------------------------------
61 
62 enum SdrTextHorzAdjust {SDRTEXTHORZADJUST_LEFT,     // Linksbuendig verankert
63 						SDRTEXTHORZADJUST_CENTER,   // Zentriert (z.B. fuer die Titeltexte im Draw)
64 						SDRTEXTHORZADJUST_RIGHT,    // Rechtsbuendig verankert
65 						SDRTEXTHORZADJUST_BLOCK    // So wie es frueher war: Gesamte Textrahmenbreite verwenden, Absatzformatierung macht wieder Sinn
66 						/*,SDRTEXTHORZADJUST_STRETCH*/}; // FitToSize in X-Richtung (ni).
67 
68 class SVX_DLLPUBLIC SdrTextHorzAdjustItem: public SfxEnumItem {
69 public:
70 	TYPEINFO();
SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK)71 	SdrTextHorzAdjustItem(SdrTextHorzAdjust eAdj=SDRTEXTHORZADJUST_BLOCK): SfxEnumItem(SDRATTR_TEXT_HORZADJUST,(sal_uInt16)eAdj) {}
SdrTextHorzAdjustItem(SvStream & rIn)72 	SdrTextHorzAdjustItem(SvStream& rIn)                                 : SfxEnumItem(SDRATTR_TEXT_HORZADJUST,rIn)  {}
73 	virtual SfxPoolItem*      Clone(SfxItemPool* pPool=NULL) const;
74 	virtual SfxPoolItem*      Create(SvStream& rIn, sal_uInt16 nVer) const;
75 	virtual sal_uInt16            GetValueCount() const; // { return 5; }
GetValue() const76 			SdrTextHorzAdjust GetValue() const      { return (SdrTextHorzAdjust)SfxEnumItem::GetValue(); }
77 
78 	virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
79 	virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
80 
81 	virtual String  GetValueTextByPos(sal_uInt16 nPos) const;
82     virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const;
83 };
84 
85 #endif
86