1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVX_SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
21 #define INCLUDED_SVX_SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
23 #include <sal/types.h>
24 #include <svx/xenum.hxx>
25 #include <editeng/outlobj.hxx>
26 #include <svx/sdtaitm.hxx>
27 #include <o3tl/cow_wrapper.hxx>
33 namespace drawinglayer
{ namespace animation
{
34 class AnimationEntryList
;
37 namespace drawinglayer
{ namespace attribute
{
38 class SdrFormTextAttribute
;
41 namespace drawinglayer
{ namespace attribute
{
42 class ImpSdrTextAttribute
;
46 namespace drawinglayer
50 class SdrTextAttribute
53 typedef o3tl::cow_wrapper
< ImpSdrTextAttribute
> ImplType
;
56 ImplType mpSdrTextAttribute
;
59 /// constructors/assignmentoperator/destructor
61 const SdrText
& rSdrText
,
62 const OutlinerParaObject
& rOutlinerParaObject
,
63 XFormTextStyle eFormTextStyle
,
64 sal_Int32 aTextLeftDistance
,
65 sal_Int32 aTextUpperDistance
,
66 sal_Int32 aTextRightDistance
,
67 sal_Int32 aTextLowerDistance
,
68 SdrTextHorzAdjust aSdrTextHorzAdjust
,
69 SdrTextVertAdjust aSdrTextVertAdjust
,
77 bool bFixedCellHeight
,
82 SdrTextAttribute(const SdrTextAttribute
& rCandidate
);
83 SdrTextAttribute(SdrTextAttribute
&& rCandidate
) noexcept
;
84 SdrTextAttribute
& operator=(const SdrTextAttribute
& rCandidate
);
85 SdrTextAttribute
& operator=(SdrTextAttribute
&& rCandidate
) noexcept
;
88 // checks if the incarnation is default constructed
89 bool isDefault() const;
92 bool operator==(const SdrTextAttribute
& rCandidate
) const;
95 const SdrText
& getSdrText() const;
96 const OutlinerParaObject
& getOutlinerParaObject() const;
97 bool isContour() const;
98 bool isFitToSize() const;
99 bool isAutoFit() const;
100 bool isHideContour() const;
101 bool isBlink() const;
102 bool isScroll() const;
103 bool isInEditMode() const;
104 bool isFixedCellHeight() const;
105 const SdrFormTextAttribute
& getSdrFormTextAttribute() const;
106 sal_Int32
getTextLeftDistance() const;
107 sal_Int32
getTextUpperDistance() const;
108 sal_Int32
getTextRightDistance() const;
109 sal_Int32
getTextLowerDistance() const;
110 SdrTextHorzAdjust
getSdrTextHorzAdjust() const;
111 SdrTextVertAdjust
getSdrTextVertAdjust() const;
113 bool isChainable() const;
116 // helpers: animation timing generators
117 void getBlinkTextTiming(
118 drawinglayer::animation::AnimationEntryList
& rAnimList
) const;
119 void getScrollTextTiming(
120 drawinglayer::animation::AnimationEntryList
& rAnimList
,
122 double fTextLength
) const;
124 } // end of namespace attribute
125 } // end of namespace drawinglayer
128 #endif // INCLUDED_SVX_SDR_ATTRIBUTE_SDRTEXTATTRIBUTE_HXX
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */