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 
24 #ifndef _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
25 #define _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
26 
27 #include <sal/types.h>
28 #include <svx/xenum.hxx>
29 #include <editeng/outlobj.hxx>
30 #include <svx/sdtaitm.hxx>
31 
32 //////////////////////////////////////////////////////////////////////////////
33 // predefines
34 
35 class SdrText;
36 
37 namespace drawinglayer { namespace animation {
38 	class AnimationEntryList;
39 }}
40 
41 namespace drawinglayer { namespace attribute {
42 	class SdrFormTextAttribute;
43 }}
44 
45 namespace drawinglayer { namespace attribute {
46 	class ImpSdrTextAttribute;
47 }}
48 
49 //////////////////////////////////////////////////////////////////////////////
50 
51 namespace drawinglayer
52 {
53 	namespace attribute
54 	{
55 		class SdrTextAttribute
56 		{
57         private:
58             ImpSdrTextAttribute*		mpSdrTextAttribute;
59 
60 		public:
61             /// constructors/assignmentoperator/destructor
62 			SdrTextAttribute(
63 				const SdrText& rSdrText,
64                 const OutlinerParaObject& rOutlinerParaObject,
65 				XFormTextStyle eFormTextStyle,
66 				sal_Int32 aTextLeftDistance,
67 				sal_Int32 aTextUpperDistance,
68 				sal_Int32 aTextRightDistance,
69 				sal_Int32 aTextLowerDistance,
70                 SdrTextHorzAdjust aSdrTextHorzAdjust,
71                 SdrTextVertAdjust aSdrTextVertAdjust,
72 				bool bContour,
73                 bool bFitToSize,
74 				bool bHideContour,
75                 bool bBlink,
76 				bool bScroll,
77                 bool bInEditMode,
78                 bool bFixedCellHeight,
79 				bool bWrongSpell);
80 			SdrTextAttribute();
81 			SdrTextAttribute(const SdrTextAttribute& rCandidate);
82 			SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate);
83 			~SdrTextAttribute();
84 
85             // checks if the incarnation is default constructed
86             bool isDefault() const;
87 
88             // compare operator
89 			bool operator==(const SdrTextAttribute& rCandidate) const;
90 
91 			// data read access
92 			const SdrText& getSdrText() const;
93             const OutlinerParaObject& getOutlinerParaObject() const;
94 			bool isContour() const;
95 			bool isFitToSize() const;
96 			bool isHideContour() const;
97 			bool isBlink() const;
98 			bool isScroll() const;
99             bool isInEditMode() const;
100             bool isFixedCellHeight() const;
101 			bool isWrongSpell() const;
102             const SdrFormTextAttribute& getSdrFormTextAttribute() const;
103 			sal_Int32 getTextLeftDistance() const;
104 			sal_Int32 getTextUpperDistance() const;
105 			sal_Int32 getTextRightDistance() const;
106 			sal_Int32 getTextLowerDistance() const;
107             sal_uInt32 getPropertiesVersion() const;
108             SdrTextHorzAdjust getSdrTextHorzAdjust() const;
109             SdrTextVertAdjust getSdrTextVertAdjust() const;
110 
111 			// helpers: animation timing generators
112 			void getBlinkTextTiming(
113 				drawinglayer::animation::AnimationEntryList& rAnimList) const;
114 			void getScrollTextTiming(
115 				drawinglayer::animation::AnimationEntryList& rAnimList,
116 				double fFrameLength,
117 				double fTextLength) const;
118 		};
119 	} // end of namespace attribute
120 } // end of namespace drawinglayer
121 
122 //////////////////////////////////////////////////////////////////////////////
123 
124 #endif // _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
125 
126 // eof
127