diff options
author | Daniel Robertson <danlrobertson89@gmail.com> | 2015-08-28 22:53:28 -0400 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2015-08-30 12:58:46 +0000 |
commit | 49cb81b411e1c68cada5d3f4375de713118fce64 (patch) | |
tree | 185acdb82d57ccbee19694f21983fa66e76c36b0 /include | |
parent | c1a9d0139112d7489ca6dd29b18f9418c6da3085 (diff) |
tdf#62525 vcl: use cow_wrapper for Gradient
Convert the pimpled copy-on-write Gradient class from vcl to use
::o3tl::cow_wrapper using the default reference counting policy.
Change-Id: Iadf4d2288669e58a4d5b41f436978c3ab34216f3
Reviewed-on: https://gerrit.libreoffice.org/18124
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/gradient.hxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx index 10b16e43c380..3f2404b5ba0a 100644 --- a/include/vcl/gradient.hxx +++ b/include/vcl/gradient.hxx @@ -25,6 +25,7 @@ #include <tools/color.hxx> #include <vcl/vclenum.hxx> +#include <o3tl/cow_wrapper.hxx> // - Impl_Gradient - @@ -52,8 +53,10 @@ public: friend SvStream& ReadImpl_Gradient( SvStream& rIStm, Impl_Gradient& rImplGradient ); friend SvStream& WriteImpl_Gradient( SvStream& rOStm, const Impl_Gradient& rImplGradient ); - Impl_Gradient(); - Impl_Gradient( const Impl_Gradient& rImplGradient ); + Impl_Gradient(); + Impl_Gradient( const Impl_Gradient& rImplGradient ); + + bool operator==( const Impl_Gradient& rImpl_Gradient ) const; }; @@ -63,8 +66,7 @@ public: class VCL_DLLPUBLIC Gradient { private: - Impl_Gradient* mpImplGradient; - void MakeUnique(); + ::o3tl::cow_wrapper< Impl_Gradient > mpImplGradient; public: Gradient(); |