diff options
Diffstat (limited to 'svx/inc/sdr/attribute')
-rw-r--r-- | svx/inc/sdr/attribute/sdreffectstextattribute.hxx | 67 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrfilltextattribute.hxx | 60 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrformtextattribute.hxx | 81 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx | 74 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx | 62 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx | 63 | ||||
-rw-r--r-- | svx/inc/sdr/attribute/sdrtextattribute.hxx | 116 |
7 files changed, 523 insertions, 0 deletions
diff --git a/svx/inc/sdr/attribute/sdreffectstextattribute.hxx b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx new file mode 100644 index 000000000..e1826552d --- /dev/null +++ b/svx/inc/sdr/attribute/sdreffectstextattribute.hxx @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <drawinglayer/attribute/sdrshadowattribute.hxx> +#include <sdr/attribute/sdrtextattribute.hxx> +#include <drawinglayer/attribute/sdrglowattribute.hxx> + + +namespace drawinglayer::attribute + { + class SdrEffectsTextAttribute + { + // shadow and text attributes + SdrShadowAttribute maShadow; // shadow attributes (if used) + SdrTextAttribute maTextAttribute; // text and text attributes (if used) + + // glow effect + SdrGlowAttribute maGlow; + + // soft edge + sal_Int32 mnSoftEdgeRadius = 0; + + public: + SdrEffectsTextAttribute( + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrEffectsTextAttribute(); + SdrEffectsTextAttribute(const SdrEffectsTextAttribute& rCandidate); + SdrEffectsTextAttribute& operator=(const SdrEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrEffectsTextAttribute& rCandidate) const; + + // data access + const SdrShadowAttribute& getShadow() const { return maShadow; } + const SdrTextAttribute& getText() const { return maTextAttribute; } + const SdrGlowAttribute& getGlow() const { return maGlow; } + sal_Int32 getSoftEdgeRadius() const { return mnSoftEdgeRadius; } + }; + +} // end of namespace drawinglayer::attribute + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrfilltextattribute.hxx b/svx/inc/sdr/attribute/sdrfilltextattribute.hxx new file mode 100644 index 000000000..3bb66c809 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrfilltextattribute.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX +#define INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX + +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/fillgradientattribute.hxx> +#include <sdr/attribute/sdrtextattribute.hxx> + + +namespace drawinglayer::attribute + { + class SdrFillTextAttribute + { + // shadow and text attributes + SdrFillAttribute maFill; // fill attributes (if used) + FillGradientAttribute maFillFloatTransGradient; // fill float transparence gradient (if used) + SdrTextAttribute maTextAttribute; // text and text attributes (if used) + + public: + SdrFillTextAttribute( + const SdrFillAttribute& rFill, + const FillGradientAttribute& rFillFloatTransGradient, + const SdrTextAttribute& rTextAttribute); + SdrFillTextAttribute(); + SdrFillTextAttribute(const SdrFillTextAttribute& rCandidate); + SdrFillTextAttribute& operator=(const SdrFillTextAttribute& rCandidate); + + // compare operator + bool operator==(const SdrFillTextAttribute& rCandidate) const; + + // data access + const SdrFillAttribute& getFill() const { return maFill; } + const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; } + const SdrTextAttribute& getText() const { return maTextAttribute; } + }; + +} // end of namespace drawinglayer::attribute + + +#endif // INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFILLTEXTATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrformtextattribute.hxx b/svx/inc/sdr/attribute/sdrformtextattribute.hxx new file mode 100644 index 000000000..7167bf615 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrformtextattribute.hxx @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <tools/color.hxx> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +class SfxItemSet; + +namespace drawinglayer::attribute { + class ImpSdrFormTextAttribute; + class SdrFormTextOutlineAttribute; +} + + +namespace drawinglayer::attribute + { + class SdrFormTextAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFormTextAttribute > ImplType; + + private: + ImplType mpSdrFormTextAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFormTextAttribute(const SfxItemSet& rSet); + SdrFormTextAttribute(); + SdrFormTextAttribute(const SdrFormTextAttribute& rCandidate); + SdrFormTextAttribute(SdrFormTextAttribute&& rCandidate) noexcept; + SdrFormTextAttribute& operator=(const SdrFormTextAttribute& rCandidate); + SdrFormTextAttribute& operator=(SdrFormTextAttribute&& rCandidate) noexcept; + ~SdrFormTextAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrFormTextAttribute& rCandidate) const; + + // data read access + sal_Int32 getFormTextDistance() const; + sal_Int32 getFormTextStart() const; + sal_Int32 getFormTextShdwXVal() const; + sal_Int32 getFormTextShdwYVal() const; + XFormTextStyle getFormTextStyle() const; + XFormTextAdjust getFormTextAdjust() const; + XFormTextShadow getFormTextShadow() const; + Color const & getFormTextShdwColor() const; + const SdrFormTextOutlineAttribute& getOutline() const; + const SdrFormTextOutlineAttribute& getShadowOutline() const; + bool getFormTextMirror() const; + bool getFormTextOutline() const; + }; + +} // end of namespace drawinglayer::attribute + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx new file mode 100644 index 000000000..34086c2c8 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrformtextoutlineattribute.hxx @@ -0,0 +1,74 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX +#define INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +#include <sal/types.h> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +namespace drawinglayer::attribute { + class ImpSdrFormTextOutlineAttribute; + class LineAttribute; + class StrokeAttribute; +} + + +namespace drawinglayer::attribute + { + class SdrFormTextOutlineAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFormTextOutlineAttribute > ImplType; + + private: + ImplType mpSdrFormTextOutlineAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFormTextOutlineAttribute( + const LineAttribute& rLineAttribute, + const StrokeAttribute& rStrokeAttribute, + sal_uInt8 nTransparence); + SdrFormTextOutlineAttribute(); + SdrFormTextOutlineAttribute(const SdrFormTextOutlineAttribute& rCandidate); + SdrFormTextOutlineAttribute& operator=(const SdrFormTextOutlineAttribute& rCandidate); + SdrFormTextOutlineAttribute& operator=(SdrFormTextOutlineAttribute&& rCandidate) noexcept; + ~SdrFormTextOutlineAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrFormTextOutlineAttribute& rCandidate) const; + + // data read access + const LineAttribute& getLineAttribute() const; + const StrokeAttribute& getStrokeAttribute() const; + sal_uInt8 getTransparence() const; + }; + +} // end of namespace drawinglayer::attribute + + +#endif // INCLUDED_SVX_INC_SDR_ATTRIBUTE_SDRFORMTEXTOUTLINEATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx new file mode 100644 index 000000000..1e7f694c7 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrlineeffectstextattribute.hxx @@ -0,0 +1,62 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sdr/attribute/sdreffectstextattribute.hxx> +#include <drawinglayer/attribute/sdrglowattribute.hxx> +#include <drawinglayer/attribute/sdrlineattribute.hxx> +#include <drawinglayer/attribute/sdrlinestartendattribute.hxx> + + +namespace drawinglayer::attribute + { + class SdrLineEffectsTextAttribute : public SdrEffectsTextAttribute + { + // line, shadow, lineStartEnd and text attributes + SdrLineAttribute maLine; // line attributes (if used) + SdrLineStartEndAttribute maLineStartEnd; // line start end (if used) + + public: + SdrLineEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrLineEffectsTextAttribute(); + SdrLineEffectsTextAttribute(const SdrLineEffectsTextAttribute& rCandidate); + SdrLineEffectsTextAttribute& operator=(const SdrLineEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrLineEffectsTextAttribute& rCandidate) const; + + // data access + const SdrLineAttribute& getLine() const { return maLine; } + const SdrLineStartEndAttribute& getLineStartEnd() const { return maLineStartEnd; } + }; + +} // end of namespace drawinglayer::attribute + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx new file mode 100644 index 000000000..7bb85e897 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrlinefilleffectstextattribute.hxx @@ -0,0 +1,63 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sdr/attribute/sdrlineeffectstextattribute.hxx> +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/fillgradientattribute.hxx> + + +namespace drawinglayer::attribute + { + class SdrLineFillEffectsTextAttribute : public SdrLineEffectsTextAttribute + { + // add fill and transGradient attributes + SdrFillAttribute maFill; // fill attributes (if used) + FillGradientAttribute maFillFloatTransGradient; // fill float transparence gradient (if used) + + public: + SdrLineFillEffectsTextAttribute( + const SdrLineAttribute& rLine, + const SdrFillAttribute& rFill, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const FillGradientAttribute& rFillFloatTransGradient, + const SdrTextAttribute& rTextAttribute, + const SdrGlowAttribute& rGlow, + sal_Int32 nSoftEdgeRadius); + SdrLineFillEffectsTextAttribute(); + SdrLineFillEffectsTextAttribute(const SdrLineFillEffectsTextAttribute& rCandidate); + SdrLineFillEffectsTextAttribute& operator=(const SdrLineFillEffectsTextAttribute& rCandidate); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrLineFillEffectsTextAttribute& rCandidate) const; + + // data access + const SdrFillAttribute& getFill() const { return maFill; } + const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; } + }; + +} // end of namespace drawinglayer::attribute + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/attribute/sdrtextattribute.hxx b/svx/inc/sdr/attribute/sdrtextattribute.hxx new file mode 100644 index 000000000..19b52d611 --- /dev/null +++ b/svx/inc/sdr/attribute/sdrtextattribute.hxx @@ -0,0 +1,116 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <sal/types.h> +#include <svx/xenum.hxx> +#include <editeng/outlobj.hxx> +#include <svx/sdtaitm.hxx> +#include <o3tl/cow_wrapper.hxx> + +// predefines + +class SdrText; +namespace drawinglayer::animation { class AnimationEntryList; } +namespace drawinglayer::attribute { class SdrFormTextAttribute; } +namespace drawinglayer::attribute { class ImpSdrTextAttribute; } + + +namespace drawinglayer::attribute + { + class SdrTextAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrTextAttribute > ImplType; + + private: + ImplType mpSdrTextAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrTextAttribute( + const SdrText& rSdrText, + const OutlinerParaObject& rOutlinerParaObject, + XFormTextStyle eFormTextStyle, + sal_Int32 aTextLeftDistance, + sal_Int32 aTextUpperDistance, + sal_Int32 aTextRightDistance, + sal_Int32 aTextLowerDistance, + SdrTextHorzAdjust aSdrTextHorzAdjust, + SdrTextVertAdjust aSdrTextVertAdjust, + bool bContour, + bool bFitToSize, + bool bAutoFit, + bool bHideContour, + bool bBlink, + bool bScroll, + bool bInEditMode, + bool bFixedCellHeight, + bool bWrongSpell, + bool bChainable); + + SdrTextAttribute(); + SdrTextAttribute(const SdrTextAttribute& rCandidate); + SdrTextAttribute(SdrTextAttribute&& rCandidate) noexcept; + SdrTextAttribute& operator=(const SdrTextAttribute& rCandidate); + SdrTextAttribute& operator=(SdrTextAttribute&& rCandidate) noexcept; + ~SdrTextAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrTextAttribute& rCandidate) const; + + // data read access + const SdrText& getSdrText() const; + const OutlinerParaObject& getOutlinerParaObject() const; + bool isContour() const; + bool isFitToSize() const; + bool isAutoFit() const; + bool isHideContour() const; + bool isBlink() const; + bool isScroll() const; + bool isInEditMode() const; + bool isFixedCellHeight() const; + const SdrFormTextAttribute& getSdrFormTextAttribute() const; + sal_Int32 getTextLeftDistance() const; + sal_Int32 getTextUpperDistance() const; + sal_Int32 getTextRightDistance() const; + sal_Int32 getTextLowerDistance() const; + SdrTextHorzAdjust getSdrTextHorzAdjust() const; + SdrTextVertAdjust getSdrTextVertAdjust() const; + + bool isChainable() const; + + + // helpers: animation timing generators + void getBlinkTextTiming( + drawinglayer::animation::AnimationEntryList& rAnimList) const; + void getScrollTextTiming( + drawinglayer::animation::AnimationEntryList& rAnimList, + double fFrameLength, + double fTextLength) const; + }; + +} // end of namespace drawinglayer::attribute + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |