sw a11y: clang-format SidebarWinAccessible code
[LibreOffice.git] / svx / inc / sdr / attribute / sdrtextattribute.hxx
blob19b52d61126ed30c6e365692e6e47c18940e0f22
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <sal/types.h>
23 #include <svx/xenum.hxx>
24 #include <editeng/outlobj.hxx>
25 #include <svx/sdtaitm.hxx>
26 #include <o3tl/cow_wrapper.hxx>
28 // predefines
30 class SdrText;
31 namespace drawinglayer::animation { class AnimationEntryList; }
32 namespace drawinglayer::attribute { class SdrFormTextAttribute; }
33 namespace drawinglayer::attribute { class ImpSdrTextAttribute; }
36 namespace drawinglayer::attribute
38 class SdrTextAttribute
40 public:
41 typedef o3tl::cow_wrapper< ImpSdrTextAttribute > ImplType;
43 private:
44 ImplType mpSdrTextAttribute;
46 public:
47 /// constructors/assignmentoperator/destructor
48 SdrTextAttribute(
49 const SdrText& rSdrText,
50 const OutlinerParaObject& rOutlinerParaObject,
51 XFormTextStyle eFormTextStyle,
52 sal_Int32 aTextLeftDistance,
53 sal_Int32 aTextUpperDistance,
54 sal_Int32 aTextRightDistance,
55 sal_Int32 aTextLowerDistance,
56 SdrTextHorzAdjust aSdrTextHorzAdjust,
57 SdrTextVertAdjust aSdrTextVertAdjust,
58 bool bContour,
59 bool bFitToSize,
60 bool bAutoFit,
61 bool bHideContour,
62 bool bBlink,
63 bool bScroll,
64 bool bInEditMode,
65 bool bFixedCellHeight,
66 bool bWrongSpell,
67 bool bChainable);
69 SdrTextAttribute();
70 SdrTextAttribute(const SdrTextAttribute& rCandidate);
71 SdrTextAttribute(SdrTextAttribute&& rCandidate) noexcept;
72 SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate);
73 SdrTextAttribute& operator=(SdrTextAttribute&& rCandidate) noexcept;
74 ~SdrTextAttribute();
76 // checks if the incarnation is default constructed
77 bool isDefault() const;
79 // compare operator
80 bool operator==(const SdrTextAttribute& rCandidate) const;
82 // data read access
83 const SdrText& getSdrText() const;
84 const OutlinerParaObject& getOutlinerParaObject() const;
85 bool isContour() const;
86 bool isFitToSize() const;
87 bool isAutoFit() const;
88 bool isHideContour() const;
89 bool isBlink() const;
90 bool isScroll() const;
91 bool isInEditMode() const;
92 bool isFixedCellHeight() const;
93 const SdrFormTextAttribute& getSdrFormTextAttribute() const;
94 sal_Int32 getTextLeftDistance() const;
95 sal_Int32 getTextUpperDistance() const;
96 sal_Int32 getTextRightDistance() const;
97 sal_Int32 getTextLowerDistance() const;
98 SdrTextHorzAdjust getSdrTextHorzAdjust() const;
99 SdrTextVertAdjust getSdrTextVertAdjust() const;
101 bool isChainable() const;
104 // helpers: animation timing generators
105 void getBlinkTextTiming(
106 drawinglayer::animation::AnimationEntryList& rAnimList) const;
107 void getScrollTextTiming(
108 drawinglayer::animation::AnimationEntryList& rAnimList,
109 double fFrameLength,
110 double fTextLength) const;
113 } // end of namespace drawinglayer::attribute
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */