summaryrefslogtreecommitdiff
path: root/include/vcl/mapmod.hxx
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-04-27 02:03:35 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-05-04 12:21:44 +0000
commit23dfb9e14571d96f9bd23d178f397ee35c36f686 (patch)
treedd107cb81b1644511adb4017eebe8856fc2119f0 /include/vcl/mapmod.hxx
parent2cf939b2da466b33189de153a1bbbb5c40485cee (diff)
tdf#62525 vcl: use cow_wrapper for mapmod
Change-Id: I25ddaeb051f171388bb490a23bf03dbaf0add281 Reviewed-on: https://gerrit.libreoffice.org/24438 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include/vcl/mapmod.hxx')
-rw-r--r--include/vcl/mapmod.hxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx
index 77aa83d53b65..9c7676dd790a 100644
--- a/include/vcl/mapmod.hxx
+++ b/include/vcl/mapmod.hxx
@@ -22,6 +22,7 @@
#include <vcl/dllapi.h>
#include <tools/mapunit.hxx>
+#include <o3tl/cow_wrapper.hxx>
class Point;
class Fraction;
@@ -36,19 +37,12 @@ class VCL_DLLPUBLIC MapMode
public:
struct ImplMapMode;
-private:
- ImplMapMode* mpImplMapMode;
-
- SAL_DLLPRIVATE void ImplMakeUnique();
- SAL_DLLPRIVATE bool IsSimple() const;
-
-public:
- MapMode();
- MapMode( const MapMode& rMapMode );
- MapMode( MapUnit eUnit );
- MapMode( MapUnit eUnit, const Point& rLogicOrg,
- const Fraction& rScaleX, const Fraction& rScaleY );
- ~MapMode();
+ MapMode();
+ MapMode( const MapMode& rMapMode );
+ MapMode( MapUnit eUnit );
+ MapMode( MapUnit eUnit, const Point& rLogicOrg,
+ const Fraction& rScaleX, const Fraction& rScaleY );
+ ~MapMode();
void SetMapUnit( MapUnit eUnit );
MapUnit GetMapUnit() const;
@@ -72,6 +66,13 @@ public:
friend VCL_DLLPUBLIC SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode );
friend VCL_DLLPUBLIC SvStream& WriteMapMode( SvStream& rOStm, const MapMode& rMapMode );
+
+ typedef o3tl::cow_wrapper< ImplMapMode > ImplType;
+
+private:
+ ImplType mpImplMapMode;
+
+ SAL_DLLPRIVATE bool IsSimple() const;
};
#endif // INCLUDED_VCL_MAPMOD_HXX