[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/attribute/linestartendattribute.hxx | 63 +++ solenv/clang-format/excludelist |1 2 files changed, 31 insertions(+), 33 deletions(-) New commits: commit 356006712320c524515a959a022a0f2b02fa63bb Author: Tomaž Vajngerl AuthorDate: Wed Oct 21 21:07:40 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Nov 24 06:44:56 2020 +0100 remove linestartendattribute.hxx from clang-format excludelist Change-Id: I2d6cef1d3dff33c6cb2695c645d4f30e899c4616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106390 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/attribute/linestartendattribute.hxx b/include/drawinglayer/attribute/linestartendattribute.hxx index ea2bf22235fd..f894a335da4c 100644 --- a/include/drawinglayer/attribute/linestartendattribute.hxx +++ b/include/drawinglayer/attribute/linestartendattribute.hxx @@ -22,48 +22,47 @@ #include #include -namespace basegfx { -class B2DPolyPolygon; +namespace basegfx +{ +class B2DPolyPolygon; } -namespace drawinglayer::attribute { -class ImpLineStartEndAttribute; +namespace drawinglayer::attribute +{ +class ImpLineStartEndAttribute; } - namespace drawinglayer::attribute -{ -class DRAWINGLAYER_DLLPUBLIC LineStartEndAttribute -{ -public: -typedef o3tl::cow_wrapper< ImpLineStartEndAttribute > ImplType; +{ +class DRAWINGLAYER_DLLPUBLIC LineStartEndAttribute +{ +public: +typedef o3tl::cow_wrapper ImplType; -private: -ImplType mpLineStartEndAttribute; +private: +ImplType mpLineStartEndAttribute; -public: -/// constructors/assignmentoperator/destructor -LineStartEndAttribute( -double fWidth, -const basegfx::B2DPolyPolygon& rPolyPolygon, -bool bCentered); -LineStartEndAttribute(); -LineStartEndAttribute(const LineStartEndAttribute&); -LineStartEndAttribute& operator=(const LineStartEndAttribute&); -~LineStartEndAttribute(); +public: +/// constructors/assignmentoperator/destructor +LineStartEndAttribute(double fWidth, const basegfx::B2DPolyPolygon& rPolyPolygon, + bool bCentered); +LineStartEndAttribute(); +LineStartEndAttribute(const LineStartEndAttribute&); +LineStartEndAttribute& operator=(const LineStartEndAttribute&); +~LineStartEndAttribute(); -// checks if the incarnation is default constructed -bool isDefault() const; +// checks if the incarnation is default constructed +bool isDefault() const; -// compare operator -bool operator==(const LineStartEndAttribute& rCandidate) const; +// compare operator +bool operator==(const LineStartEndAttribute& rCandidate) const; -// data read access -double getWidth() const; -const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const; -bool isCentered() const; -bool isActive() const; -}; +// data read access +double getWidth() const; +const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const; +bool isCentered() const; +bool isActive() const; +}; } // end of namespace drawinglayer::attribute diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index bcd9ff0ccb37..c7eee25f0f8c 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -5230,7 +5230,6 @@ include/dbaccess/genericcontroller.hxx include/desktop/crashreport.hxx include/drawinglayer/XShapeDumper.hxx include/drawinglayer/animation/animationtiming.hxx -include/drawinglayer/attribute/linestartendattribute.hxx include/drawinglayer/attribute/materialattribute3d.hxx include/drawinglayer/attribute/sdrallattribute3d.hxx include/drawinglayer/attribute/sdrfillattribute.hxx ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/attribute/fillgradientattribute.hxx | 116 ++--- include/drawinglayer/attribute/fillgraphicattribute.hxx | 79 - include/drawinglayer/attribute/fillhatchattribute.hxx| 128 +++ solenv/clang-format/excludelist |3 4 files changed, 149 insertions(+), 177 deletions(-) New commits: commit 99b4f42fca6a8a17d10cdb94243c7b602a234a79 Author: Tomaž Vajngerl AuthorDate: Wed Oct 21 20:55:54 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Nov 23 10:36:20 2020 +0100 remove fill*attribute.hxx from clang-format excludelist Change-Id: Idc70c350b1ed6015d56fd785acf5afbc394056fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106386 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/attribute/fillgradientattribute.hxx b/include/drawinglayer/attribute/fillgradientattribute.hxx index 7363eb4bad89..cc2fab0518dc 100644 --- a/include/drawinglayer/attribute/fillgradientattribute.hxx +++ b/include/drawinglayer/attribute/fillgradientattribute.hxx @@ -23,81 +23,71 @@ #include #include - -// predefines - -namespace basegfx { -class BColor; +namespace basegfx +{ +class BColor; } -namespace drawinglayer::attribute { -class ImpFillGradientAttribute; +namespace drawinglayer::attribute +{ +class ImpFillGradientAttribute; } - namespace drawinglayer::attribute -{ -enum class GradientStyle -{ -Linear, -Axial, -Radial, -Elliptical, -Square, -Rect -}; +{ +enum class GradientStyle +{ +Linear, +Axial, +Radial, +Elliptical, +Square, +Rect +}; } // end of namespace drawinglayer::attribute - namespace drawinglayer::attribute -{ -class DRAWINGLAYER_DLLPUBLIC FillGradientAttribute -{ -public: -typedef o3tl::cow_wrapper< ImpFillGradientAttribute > ImplType; - -private: -ImplType mpFillGradientAttribute; - -public: -/// constructors/assignmentoperator/destructor -FillGradientAttribute( -GradientStyle eStyle, -double fBorder, -double fOffsetX, -double fOffsetY, -double fAngle, -const basegfx::BColor& rStartColor, -const basegfx::BColor& rEndColor, -sal_uInt16 nSteps); -FillGradientAttribute(); -FillGradientAttribute(const FillGradientAttribute&); -FillGradientAttribute(FillGradientAttribute&&); -FillGradientAttribute& operator=(const FillGradientAttribute&); -FillGradientAttribute& operator=(FillGradientAttribute&&); -~FillGradientAttribute(); - -// checks if the incarnation is default constructed -bool isDefault() const; - -// compare operator -bool operator==(const FillGradientAttribute& rCandidate) const; - -// data read access -GradientStyle getStyle() const; -double getBorder() const; -double getOffsetX() const; -double getOffsetY() const; -double getAngle() const; -const basegfx::BColor& getStartColor() const; -const basegfx::BColor& getEndColor() const; -sal_uInt16 getSteps() const; -}; +{ +class DRAWINGLAYER_DLLPUBLIC FillGradientAttribute +{ +public: +typedef o3tl::cow_wrapper ImplType; + +private: +ImplType mpFillGradientAttribute; + +public: +/// constructors/assignmentoperator/destructor +FillGradientAttribute(GradientStyle eStyle, double fBorder, double fOffsetX, double fOffsetY, + double fAngle, const basegfx::BColor& rStartColor, + const basegfx::BColor& rEndColor, sal_uInt16 nSteps); +FillGradientAttribute(); +FillGradientAttribute(const FillGradientAttribute&); +FillGradientAttribute(FillGradientAttribute&&); +FillGradientAttribute& operator=(const FillGradientAttribute&); +FillGradientAttribute& operator=(FillGradientAttribute&&); +~FillGradientAttribute(); + +// checks if the incarnation is default constructed +bool isDefault() const; + +// compare operator +bool operator==(const FillGradientAttribute& rCandidate) const; + +// data read access +GradientStyle getStyle() const; +double getBorder() const; +double getOffsetX() const; +double getOffsetY() const; +double getAngle() const; +const basegfx::BColor& getStartColor() const; +const basegfx::BColor& getEndColor() const; +sal_uInt16 getSteps() const; +}; } // end of namespace drawinglayer::attribute - #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/fillgraphicattri
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/primitive2d/textprimitive2d.hxx | 275 +-- solenv/clang-format/blacklist|1 2 files changed, 137 insertions(+), 139 deletions(-) New commits: commit 47f4ec51665c7b5f7682dece127ae1888fe73e72 Author: Tomaž Vajngerl AuthorDate: Wed Jun 3 17:00:47 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Sun Jun 28 00:34:56 2020 +0200 drawinglayer: remove textprimitive2d.hxx from clang-format blacklist Change-Id: I6fa692bb3e4a16400ee2ae847a1f97201493f53a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97287 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx index 9aeaa96fc15e..6bbc14aa498a 100644 --- a/include/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx @@ -33,152 +33,151 @@ namespace drawinglayer::primitive2d { -/** TextSimplePortionPrimitive2D class +/** TextSimplePortionPrimitive2D class -This is the basic primitive for representing a text portion. It contains -all needed information. If it is not handled by a renderer, its decomposition -will provide the text tools::PolyPolygon outlines as filled polygons, correctly -transformed. +This is the basic primitive for representing a text portion. It contains +all needed information. If it is not handled by a renderer, its decomposition +will provide the text tools::PolyPolygon outlines as filled polygons, correctly +transformed. -To get better text quality, it is suggested to handle this primitive directly -in a renderer. In that case, e.g. hintings on the system can be supported. +To get better text quality, it is suggested to handle this primitive directly +in a renderer. In that case, e.g. hintings on the system can be supported. -@param maTextTransform -The text transformation contains the text start position (always baselined) -as translation, the FontSize as scale (where width relative to height defines -font scaling and width == height means no font scaling) and the font rotation -and shear. -When shear is used and a renderer does not support it, it may be better to use -the decomposition which will do everything correctly. Same is true for mirroring -which would be expressed as negative scalings. +@param maTextTransform +The text transformation contains the text start position (always baselined) +as translation, the FontSize as scale (where width relative to height defines +font scaling and width == height means no font scaling) and the font rotation +and shear. +When shear is used and a renderer does not support it, it may be better to use +the decomposition which will do everything correctly. Same is true for mirroring +which would be expressed as negative scalings. -@param rText -The text to be used. Only a part may be used, but a bigger part of the string -may be necessary for correct layouting (e.g. international) - -@param aTextPosition -The index to the first character to use from rText - -@param aTextLength -The number of characters to use from rText - -@param rDXArray -The distances between the characters. This parameter may be empty, in that case -the renderer is responsible to do something useful. If it is given, it has to be of -the size aTextLength. Its values are in logical coordinates and describe the -distance for each character to use. This is independent from the font width which -is given with maTextTransform. The first value is the offset to use from the start -point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start -point of the second character - -@param rFontAttribute -The font definition - -@param rLocale -The locale to use - -@param rFontColor -The font color to use - -@param bFilled - -@param nWidthToFill - -@param rTextFillColor -Text background color (has nothing to do with bFilled and nWidthToFill) - - */ -class DRAWINGLAYER_DLLPUBLIC TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D -{ -private: -/// text transformation (FontCoordinateSystem) -basegfx::B2DHomMatrix maTextTransform; - -/// The text, used from maTextPosition up to maTextPosition + maTextLength -OUStringmaText; - -/// The index from where on m
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/attribute/lineattribute.hxx | 67 ++--- include/drawinglayer/attribute/strokeattribute.hxx | 55 - solenv/clang-format/blacklist |2 3 files changed, 60 insertions(+), 64 deletions(-) New commits: commit 65f5484dd7ad8036f617685f2a76e5e2c24be298 Author: Tomaž Vajngerl AuthorDate: Sat Apr 11 12:12:19 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Sun Apr 12 11:33:44 2020 +0200 remove {line,stroke}attribute.hxx from clang-format blacklist Change-Id: I4826b94da3982be8807c4eba63971cb7d3df9d8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92070 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx index 90c50f904fe9..77828a15d21e 100644 --- a/include/drawinglayer/attribute/lineattribute.hxx +++ b/include/drawinglayer/attribute/lineattribute.hxx @@ -26,51 +26,50 @@ #include #include -namespace basegfx { -class BColor; +namespace basegfx +{ +class BColor; } -namespace drawinglayer::attribute { -class ImpLineAttribute; +namespace drawinglayer::attribute +{ +class ImpLineAttribute; } namespace drawinglayer::attribute { -class DRAWINGLAYER_DLLPUBLIC LineAttribute -{ -public: -typedef o3tl::cow_wrapper< ImpLineAttribute > ImplType; +class DRAWINGLAYER_DLLPUBLIC LineAttribute +{ +public: +typedef o3tl::cow_wrapper ImplType; -private: -ImplType mpLineAttribute; +private: +ImplType mpLineAttribute; -public: -/// constructors/assignmentoperator/destructor -explicit LineAttribute( -const basegfx::BColor& rColor, -double fWidth = 0.0, -basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round, -css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT, -double fMiterMinimumAngle = basegfx::deg2rad(15.0)); -LineAttribute(); -LineAttribute(const LineAttribute&); -LineAttribute& operator=(const LineAttribute&); -~LineAttribute(); +public: +/// constructors/assignmentoperator/destructor +explicit LineAttribute(const basegfx::BColor& rColor, double fWidth = 0.0, + basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round, + css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT, + double fMiterMinimumAngle = basegfx::deg2rad(15.0)); +LineAttribute(); +LineAttribute(const LineAttribute&); +LineAttribute& operator=(const LineAttribute&); +~LineAttribute(); -// checks if the incarnation is default constructed -bool isDefault() const; +// checks if the incarnation is default constructed +bool isDefault() const; -// compare operator -bool operator==(const LineAttribute& rCandidate) const; +// compare operator +bool operator==(const LineAttribute& rCandidate) const; -// data read access -const basegfx::BColor& getColor() const; -double getWidth() const; -basegfx::B2DLineJoin getLineJoin() const; -css::drawing::LineCap getLineCap() const; -double getMiterMinimumAngle() const; -}; +// data read access +const basegfx::BColor& getColor() const; +double getWidth() const; +basegfx::B2DLineJoin getLineJoin() const; +css::drawing::LineCap getLineCap() const; +double getMiterMinimumAngle() const; +}; } // end of namespace drawinglayer - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx index fd9409e9519d..d5d825c54710 100644 --- a/include/drawinglayer/attribute/strokeattribute.hxx +++ b/include/drawinglayer/attribute/strokeattribute.hxx @@ -23,43 +23,42 @@ #include #include -namespace drawinglayer::attribute { -class ImpStrokeAttribute; +namespace drawinglayer::attribute +{ +class ImpStrokeAttribute; } namespace drawinglayer::attribute { -class DRAWINGLAYER_DLLPUBLIC StrokeAttribute -{ -public: -typedef o3tl::cow_wrapper< ImpStrokeAttribute > ImplType; +class DRAWINGLAYER_DLLPUBLIC StrokeAttribute +{ +public: +typedef o3tl::cow_wrapper ImplType; -private: -ImplType mpStrokeAttribute; +private: +ImplType mpStrokeAttribute; -public: -/// constructors/assignmentoperator/destructor -explicit StrokeAttribute( -const ::std::vector< double >& rDotDashArray, -double fFullDotDashLen = 0.0); -StrokeAttribute(); -StrokeAttribute(const StrokeAttribute&); -StrokeAttribute(StrokeAttri
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/primitive2d/polygonprimitive2d.hxx | 353 solenv/clang-format/blacklist |1 2 files changed, 177 insertions(+), 177 deletions(-) New commits: commit 83859e149dea5ad481d020f6dc6e2090101ba170 Author: Tomaž Vajngerl AuthorDate: Mon Apr 6 23:03:29 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Tue Apr 7 01:47:14 2020 +0200 remove polygonprimitive2d.hxx from clang-format blacklist Change-Id: I3fa3f255b3f594c421f7fcaec6ca63b83cc085ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91787 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx index 4ccbcb2e7f7a..142e0d88eb8d 100644 --- a/include/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -29,10 +29,9 @@ #include #include - namespace drawinglayer::primitive2d { -/** PolygonHairlinePrimitive2D class +/** PolygonHairlinePrimitive2D class This primitive defines a Hairline. Since hairlines are view-dependent, this primitive is view-dependent, too. @@ -40,36 +39,35 @@ namespace drawinglayer::primitive2d This is one of the non-decomposable primitives, so a renderer should process it. */ -class DRAWINGLAYER_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D -{ -private: -/// the hairline geometry -basegfx::B2DPolygon maPolygon; +class DRAWINGLAYER_DLLPUBLIC PolygonHairlinePrimitive2D final : public BasePrimitive2D +{ +private: +/// the hairline geometry +basegfx::B2DPolygon maPolygon; -/// the hairline color -basegfx::BColor maBColor; +/// the hairline color +basegfx::BColor maBColor; -public: -/// constructor -PolygonHairlinePrimitive2D( -const basegfx::B2DPolygon& rPolygon, -const basegfx::BColor& rBColor); +public: +/// constructor +PolygonHairlinePrimitive2D(const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor); -/// data read access -const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; } -const basegfx::BColor& getBColor() const { return maBColor; } +/// data read access +const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; } +const basegfx::BColor& getBColor() const { return maBColor; } -/// compare operator -virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; +/// compare operator +virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; -/// get range -virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; +/// get range +virtual basegfx::B2DRange +getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; -/// provide unique ID -virtual sal_uInt32 getPrimitive2DID() const override; -}; +/// provide unique ID +virtual sal_uInt32 getPrimitive2DID() const override; +}; -/** PolygonMarkerPrimitive2D class +/** PolygonMarkerPrimitive2D class This primitive defines a two-colored marker hairline which is dashed with the given dash length. Since hairlines are view-dependent, @@ -78,192 +76,195 @@ namespace drawinglayer::primitive2d It will be decomposed to the needed PolygonHairlinePrimitive2D if not handled directly by a renderer. */ -class DRAWINGLAYER_DLLPUBLIC PolygonMarkerPrimitive2D final : public BufferedDecompositionPrimitive2D -{ -private: -/// the marker hairline geometry -basegfx::B2DPolygon maPolygon; +class DRAWINGLAYER_DLLPUBLIC PolygonMarkerPrimitive2D final +: public BufferedDecompositionPrimitive2D +{ +private: +/// the marker hairline geometry +basegfx::B2DPolygon maPolygon; -/// the two colors -basegfx::BColor maRGBColorA; -basegfx::BColor maRGBColorB; +/// the two colors +basegfx::BColor maRGBColorA; +basegfx::BColor maRGBColorB; -/// the dash distance in 'pixels' -double mfDiscreteDashLength; +/// the dash distance in 'pixels' +double mfDiscreteDashLength; -/// decomposition is view-dependent, remember last InverseObjectToViewTransformation -basegfx::B2DHomMatrix maLastInverseObjectToViewTransformation; +/// decomposition is view-dependent, remember last Invers
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/primitive2d/controlprimitive2d.hxx | 152 solenv/clang-format/blacklist |1 2 files changed, 82 insertions(+), 71 deletions(-) New commits: commit d487e1826bc177742aa8563f855c4b0bee49a705 Author: Tomaž Vajngerl AuthorDate: Mon Feb 3 19:39:33 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Tue Feb 4 08:38:09 2020 +0100 remove controlprimitive2d.hxx from clang-format blacklist Change-Id: I8918f8c9e4f27a287c98dadd51a11acf3338daa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87942 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/primitive2d/controlprimitive2d.hxx b/include/drawinglayer/primitive2d/controlprimitive2d.hxx index 29ac5a343f92..85686de5a453 100644 --- a/include/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -24,84 +24,96 @@ #include #include -namespace com::sun::star::awt { class XControl; } -namespace com::sun::star::awt { class XControlModel; } - +namespace com::sun::star::awt +{ +class XControl; +} +namespace com::sun::star::awt +{ +class XControlModel; +} namespace drawinglayer { -namespace primitive2d -{ -/** ControlPrimitive2D class - -Base class for ControlPrimitive handling. It decomposes to a -graphical representation (Bitmap data) of the control. This -representation is limited to a quadratic pixel maximum defined -in the application settings. - */ -class DRAWINGLAYER_DLLPUBLIC ControlPrimitive2D final : public BufferedDecompositionPrimitive2D -{ -private: -/// object's base data -basegfx::B2DHomMatrix maTransform; -css::uno::Reference< css::awt::XControlModel >mxControlModel; - -/// the created and cached awt::XControl -css::uno::Reference< css::awt::XControl > mxXControl; - -/// the last used scaling, used from getDecomposition for buffering -basegfx::B2DVector maLastViewScaling; - -/** used from getXControl() to create a local awt::XControl which is remembered in mxXControl -and from thereon always used and returned by getXControl() - */ -void createXControl(); +namespace primitive2d +{ +/** ControlPrimitive2D class -/// single local decompositions, used from create2DDecomposition() -Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const; -Primitive2DReference createPlaceholderDecomposition() const; +Base class for ControlPrimitive handling. It decomposes to a +graphical representation (Bitmap data) of the control. This +representation is limited to a quadratic pixel maximum defined +in the application settings. + */ +class DRAWINGLAYER_DLLPUBLIC ControlPrimitive2D final : public BufferedDecompositionPrimitive2D +{ +private: +/// object's base data +basegfx::B2DHomMatrix maTransform; +css::uno::Reference mxControlModel; -/// local decomposition -virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; +/// the created and cached awt::XControl +css::uno::Reference mxXControl; -public: -/// constructor -ControlPrimitive2D( -const basegfx::B2DHomMatrix& rTransform, -const css::uno::Reference< css::awt::XControlModel >& rxControlModel); +/// the last used scaling, used from getDecomposition for buffering +basegfx::B2DVector maLastViewScaling; -/** constructor with an additional XControl as parameter to allow to hand it over at incarnation time -if it exists. This will avoid to create a 2nd one on demand in createXControl() -and thus double the XControls. - */ -ControlPrimitive2D( -const basegfx::B2DHomMatrix& rTransform, -const css::uno::Reference< css::awt::XControlModel >& rxControlModel, -const css::uno::Reference< css::awt::XControl >& rxXControl); - -/// data read access -const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } -const css::uno::Reference< css::awt::XControlModel >& getControlModel() const { return mxControlModel; } - -/** mxControl access. This will on demand create the awt::XControl using createXControl() -if it does not exist. It may already have been created or even handed over at -incarnation +/** used from getXControl() to create a local awt::XControl which is remembered in mxXControl +and from there
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx | 103 +- solenv/clang-format/blacklist |1 2 files changed, 53 insertions(+), 51 deletions(-) New commits: commit f31b00b1a43f0d2fab2762ada230cd6dc267b6a4 Author: Tomaž Vajngerl AuthorDate: Mon Feb 3 18:00:29 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Tue Feb 4 08:35:42 2020 +0100 remove backgroundcolorprimitive2d.hxx from clang-format blacklist Change-Id: I8ad988dd0eb6a4bbbe9fc9bbc773c692cab4401f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87936 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index b88a43f4d26e..127353581212 100644 --- a/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -24,60 +24,63 @@ #include #include - // BackgroundColorPrimitive2D class namespace drawinglayer { -namespace primitive2d -{ -/** BackgroundColorPrimitive2D class - -This primitive is defined to fill the whole visible Viewport with -the given color (and thus decomposes to a filled polygon). This -makes it a view-dependent primitive by definition. It only has -a valid decomposition if a valid Viewport is given in the -ViewInformation2D at decomposition time. - -It will try to buffer its last decomposition using maLastViewport -to detect changes in the get2DDecomposition call. - */ -class DRAWINGLAYER_DLLPUBLIC BackgroundColorPrimitive2D final : public BufferedDecompositionPrimitive2D -{ -private: -/// the fill color to use -basegfx::BColor maBColor; -double mfTransparency; - -/// the last used viewInformation, used from getDecomposition for buffering -basegfx::B2DRange maLastViewport; - -/// create local decomposition -virtual void create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation) const override; - -public: -/// constructor -explicit BackgroundColorPrimitive2D( -const basegfx::BColor& rBColor, -double fTransparency = 0); - -/// data read access -const basegfx::BColor& getBColor() const { return maBColor; } -double getTransparency() const { return mfTransparency; } - -/// compare operator -virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; - -/// get B2Drange -virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; - -/// provide unique ID -virtual sal_uInt32 getPrimitive2DID() const override; - -/// Override standard getDecomposition call to be view-dependent here -virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; -}; -} // end of namespace primitive2d +namespace primitive2d +{ +/** BackgroundColorPrimitive2D class + +This primitive is defined to fill the whole visible Viewport with +the given color (and thus decomposes to a filled polygon). This +makes it a view-dependent primitive by definition. It only has +a valid decomposition if a valid Viewport is given in the +ViewInformation2D at decomposition time. + +It will try to buffer its last decomposition using maLastViewport +to detect changes in the get2DDecomposition call. + */ +class DRAWINGLAYER_DLLPUBLIC BackgroundColorPrimitive2D final +: public BufferedDecompositionPrimitive2D +{ +private: +/// the fill color to use +basegfx::BColor maBColor; +double mfTransparency; + +/// the last used viewInformation, used from getDecomposition for buffering +basegfx::B2DRange maLastViewport; + +/// create local decomposition +virtual void +create2DDecomposition(Primitive2DContainer& rContainer, + const geometry::ViewInformation2D& rViewInformation) const override; + +public: +/// constructor +explicit BackgroundColorPrimitive2D(const basegfx::BColor& rBColor, double fTransparency = 0); + +/// data read access +const basegfx::BColor& getBColor() const { return maBColor; } +double getTransparency() const { return mfTransparency; } + +/// compare operator +virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; + +/// get B2Drange +virtual basegfx::B2DRange +getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
[Libreoffice-commits] core.git: include/drawinglayer solenv/clang-format
include/drawinglayer/primitive2d/animatedprimitive2d.hxx | 259 +++ solenv/clang-format/blacklist|1 2 files changed, 132 insertions(+), 128 deletions(-) New commits: commit 233c8aec16faf9302acb3625adcd1df026d59412 Author: Tomaž Vajngerl AuthorDate: Mon Feb 3 17:53:19 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Tue Feb 4 08:34:26 2020 +0100 remove animatedprimitive2d.hxx from clang-format blacklist Change-Id: I6e4b2bc524a0880631735fb79b3545e88bf50f0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87933 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx index c03ac0f220dc..cfd64f5c90f0 100644 --- a/include/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -26,145 +26,150 @@ #include // predefines -namespace drawinglayer { namespace animation { -class AnimationEntry; -}} - -namespace basegfx { class B2DHomMatrix; } +namespace drawinglayer +{ +namespace animation +{ +class AnimationEntry; +} +} +namespace basegfx +{ +class B2DHomMatrix; +} namespace drawinglayer { -namespace primitive2d -{ -/** AnimatedSwitchPrimitive2D class - -This is the basic class for simple, animated primitives. The basic idea -is to have an animation definition (AnimationEntry) who's basic -functionality is to return a state value for any given animation time in -the range of [0.0 .. 1.0]. Depending on the state, the decomposition -calculates an index, which of the members of the child vector is to -be visualized. - -An example: For blinking, the Child vector should exist of two entries; -for values of [0.0 .. 0.5] the first, else the last entry will be used. -This mechanism is not limited to two entries, though. - */ -class DRAWINGLAYER_DLLPUBLIC AnimatedSwitchPrimitive2D : public GroupPrimitive2D -{ -private: -/** -The animation definition which allows translation of a point in time -to an animation state [0.0 .. 1.0]. This member contains a cloned -definition and is owned by this implementation. - */ -std::unique_ptr mpAnimationEntry; - -/** flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate -between both types if they are on/off - */ -boolmbIsTextAnimation : 1; - -protected: -/** write access right for classes deriving from this who want to do special -things (e.g. optimization, buffering). -Caution: This is an exception from the read-only, non-modifiable paradigm -for primitives, so special preparations may be needed. Usually should -only be used for initialization (e.g. in a derived constructor) -*/ -void setAnimationEntry(const animation::AnimationEntry& rNew); - -public: -/// constructor -AnimatedSwitchPrimitive2D( -const animation::AnimationEntry& rAnimationEntry, -const Primitive2DContainer& rChildren, -bool bIsTextAnimation); - -/// destructor - needed due to mpAnimationEntry -virtual ~AnimatedSwitchPrimitive2D() override; - -/// data read access -const animation::AnimationEntry& getAnimationEntry() const { return *mpAnimationEntry; } -bool isTextAnimation() const { return mbIsTextAnimation; } -bool isGraphicAnimation() const { return !isTextAnimation(); } - -/// compare operator -virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; - -/// provide unique ID -virtual sal_uInt32 getPrimitive2DID() const override; - -/** Override getDecomposition() here since the decompose -depends on the point in time, so the default implementation is -not useful here, it needs to be handled locally - */ -virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override; -}; -} // end of namespace primitive2d +namespace primitive2d +{ +/** AnimatedSwitchPrimitive2D class + +This is the basic class for simple, animated primitives. The basic idea +is to have an animation definition (AnimationEntry) who's basic +functionality is to return a state value for any given animation time in +the range of [0.0 .. 1.0]. Depending on the state, the decomposition +calculates