xref: /AOO41X/main/svx/inc/svx/sdr/attribute/sdrtextattribute.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
29 #define _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
30 
31 #include <sal/types.h>
32 #include <svx/xenum.hxx>
33 #include <editeng/outlobj.hxx>
34 #include <svx/sdtaitm.hxx>
35 
36 //////////////////////////////////////////////////////////////////////////////
37 // predefines
38 
39 class SdrText;
40 
41 namespace drawinglayer { namespace animation {
42 	class AnimationEntryList;
43 }}
44 
45 namespace drawinglayer { namespace attribute {
46 	class SdrFormTextAttribute;
47 }}
48 
49 namespace drawinglayer { namespace attribute {
50 	class ImpSdrTextAttribute;
51 }}
52 
53 //////////////////////////////////////////////////////////////////////////////
54 
55 namespace drawinglayer
56 {
57 	namespace attribute
58 	{
59 		class SdrTextAttribute
60 		{
61         private:
62             ImpSdrTextAttribute*		mpSdrTextAttribute;
63 
64 		public:
65             /// constructors/assignmentoperator/destructor
66 			SdrTextAttribute(
67 				const SdrText& rSdrText,
68                 const OutlinerParaObject& rOutlinerParaObject,
69 				XFormTextStyle eFormTextStyle,
70 				sal_Int32 aTextLeftDistance,
71 				sal_Int32 aTextUpperDistance,
72 				sal_Int32 aTextRightDistance,
73 				sal_Int32 aTextLowerDistance,
74                 SdrTextHorzAdjust aSdrTextHorzAdjust,
75                 SdrTextVertAdjust aSdrTextVertAdjust,
76 				bool bContour,
77                 bool bFitToSize,
78 				bool bHideContour,
79                 bool bBlink,
80 				bool bScroll,
81                 bool bInEditMode,
82                 bool bFixedCellHeight,
83 				bool bWrongSpell);
84 			SdrTextAttribute();
85 			SdrTextAttribute(const SdrTextAttribute& rCandidate);
86 			SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate);
87 			~SdrTextAttribute();
88 
89             // checks if the incarnation is default constructed
90             bool isDefault() const;
91 
92             // compare operator
93 			bool operator==(const SdrTextAttribute& rCandidate) const;
94 
95 			// data read access
96 			const SdrText& getSdrText() const;
97             const OutlinerParaObject& getOutlinerParaObject() const;
98 			bool isContour() const;
99 			bool isFitToSize() const;
100 			bool isHideContour() const;
101 			bool isBlink() const;
102 			bool isScroll() const;
103             bool isInEditMode() const;
104             bool isFixedCellHeight() const;
105 			bool isWrongSpell() const;
106             const SdrFormTextAttribute& getSdrFormTextAttribute() const;
107 			sal_Int32 getTextLeftDistance() const;
108 			sal_Int32 getTextUpperDistance() const;
109 			sal_Int32 getTextRightDistance() const;
110 			sal_Int32 getTextLowerDistance() const;
111             sal_uInt32 getPropertiesVersion() const;
112             SdrTextHorzAdjust getSdrTextHorzAdjust() const;
113             SdrTextVertAdjust getSdrTextVertAdjust() const;
114 
115 			// helpers: animation timing generators
116 			void getBlinkTextTiming(
117 				drawinglayer::animation::AnimationEntryList& rAnimList) const;
118 			void getScrollTextTiming(
119 				drawinglayer::animation::AnimationEntryList& rAnimList,
120 				double fFrameLength,
121 				double fTextLength) const;
122 		};
123 	} // end of namespace attribute
124 } // end of namespace drawinglayer
125 
126 //////////////////////////////////////////////////////////////////////////////
127 
128 #endif // _SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
129 
130 // eof
131