diff options
Diffstat (limited to 'drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx')
-rw-r--r-- | drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx index 5b38e57a2432..0a8213c9bcf2 100644 --- a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx @@ -28,13 +28,16 @@ #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX -#include <basegfx/polygon/b2dlinegeometry.hxx> -#include <basegfx/color/bcolor.hxx> +#include <sal/types.h> #include <vector> ////////////////////////////////////////////////////////////////////////////// // predefines +namespace drawinglayer { namespace attribute { + class ImpStrokeAttribute; +}} + ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -44,49 +47,26 @@ namespace drawinglayer class StrokeAttribute { private: - ::std::vector< double > maDotDashArray; // array of double which defines the dot-dash pattern - double mfFullDotDashLen; // sum of maDotDashArray (for convenience) + ImpStrokeAttribute* mpStrokeAttribute; public: + /// constructors/assignmentoperator/destructor StrokeAttribute( const ::std::vector< double >& rDotDashArray, - double fFullDotDashLen = 0.0) - : maDotDashArray(rDotDashArray), - mfFullDotDashLen(fFullDotDashLen) - { - } - - StrokeAttribute() - : maDotDashArray(), - mfFullDotDashLen(0.0) - { - } - - StrokeAttribute(const StrokeAttribute& rCandidate) - { - *this = rCandidate; - } - - StrokeAttribute& operator=(const StrokeAttribute& rCandidate) - { - maDotDashArray = rCandidate.maDotDashArray; - mfFullDotDashLen = rCandidate.mfFullDotDashLen; - return *this; - } + double fFullDotDashLen = 0.0); + StrokeAttribute(); + StrokeAttribute(const StrokeAttribute& rCandidate); + StrokeAttribute& operator=(const StrokeAttribute& rCandidate); + ~StrokeAttribute(); - ~StrokeAttribute() - { - } + // checks if the incarnation is default constructed + bool isDefault() const; // compare operator - bool operator==(const StrokeAttribute& rCandidate) const - { - return (mfFullDotDashLen == rCandidate.mfFullDotDashLen - && maDotDashArray == rCandidate.maDotDashArray); - } + bool operator==(const StrokeAttribute& rCandidate) const; - // data access - const ::std::vector< double >& getDotDashArray() const { return maDotDashArray; } + // data read access + const ::std::vector< double >& getDotDashArray() const; double getFullDotDashLen() const; }; } // end of namespace attribute |