diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-11-13 21:47:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-11-14 01:08:47 +0100 |
commit | e8159871046448df4fba45d03e4b0efddf50859e (patch) | |
tree | e83b322128e567a236ce5c232f5bc5d9eae6a81c /include | |
parent | a2bba429fa4328d17818cbafe5229655b11e5c33 (diff) |
vcl: move the Impl class of MapMode ...uhm... out of the public header?
And remove the tools/fract.hxx include.
grep -l -r fract.hxx workdir/Dep/*Object* |wc -l
before: 4569
after: 1851
Shrinks some libraries, example from --enable-dbgutil Fedora gcc 4.8.3:
libvcllo.so by 473k (0.35%)
libswlo.so by ~1Mb (sadly that is just 0.2%)
Change-Id: I09bd025d551a5d2c5528b938a68c6aa5f8f114a0
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/export/shapes.hxx | 1 | ||||
-rw-r--r-- | include/svtools/ruler.hxx | 1 | ||||
-rw-r--r-- | include/svx/svdetc.hxx | 1 | ||||
-rw-r--r-- | include/svx/svdmodel.hxx | 1 | ||||
-rw-r--r-- | include/vcl/mapmod.hxx | 50 |
5 files changed, 15 insertions, 39 deletions
diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx index 995ef356bae7..f0dcdcc237de 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -25,6 +25,7 @@ #include <oox/export/drawingml.hxx> #include <sax/fshelper.hxx> #include <vcl/mapmod.hxx> +#include <tools/fract.hxx> #include <boost/unordered_map.hpp> namespace com { namespace sun { namespace star { diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 49d4e424da4b..10a2bd097fe5 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -22,6 +22,7 @@ #include <svtools/svtdllapi.h> #include <tools/link.hxx> +#include <tools/fract.hxx> #include <vcl/window.hxx> #include <vcl/virdev.hxx> #include <vcl/field.hxx> diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx index c3e451070316..df6778f5b002 100644 --- a/include/svx/svdetc.hxx +++ b/include/svx/svdetc.hxx @@ -24,6 +24,7 @@ #include <editeng/outliner.hxx> #include <svx/svxdllapi.h> #include <tools/shl.hxx> +#include <tools/fract.hxx> #include <vcl/outdev.hxx> diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index f51b6b5c8547..3e4b31e54e1b 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -30,6 +30,7 @@ #include <vcl/mapmod.hxx> #include <svl/SfxBroadcaster.hxx> #include <tools/datetime.hxx> +#include <tools/fract.hxx> #include <svl/hint.hxx> #include <svl/style.hxx> diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx index 10e06d2e9ca3..7ec4ca50239b 100644 --- a/include/vcl/mapmod.hxx +++ b/include/vcl/mapmod.hxx @@ -21,41 +21,14 @@ #define INCLUDED_VCL_MAPMOD_HXX #include <tools/gen.hxx> -#include <tools/fract.hxx> #include <tools/solar.h> #include <vcl/dllapi.h> #include <tools/resid.hxx> #include <tools/mapunit.hxx> +class Fraction; class SvStream; - - -// - ImplMapMode - - - -class OutputDevice; - -class ImplMapMode -{ - friend class MapMode; - friend class OutputDevice; - -private: - sal_uLong mnRefCount; - MapUnit meUnit; - Point maOrigin; - Fraction maScaleX; - Fraction maScaleY; - bool mbSimple; - - friend SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rMapMode ); - friend SvStream& WriteImplMapMode( SvStream& rOStm, const ImplMapMode& rMapMode ); - - static ImplMapMode* ImplGetStaticMapMode( MapUnit eUnit ); -public: - ImplMapMode(); - ImplMapMode( const ImplMapMode& rImpMapMode ); -}; +class OutputDevice; // - MapMode - @@ -65,10 +38,14 @@ class VCL_DLLPUBLIC MapMode { friend class OutputDevice; +public: + struct ImplMapMode; + private: ImplMapMode* mpImplMapMode; SAL_DLLPRIVATE void ImplMakeUnique(); + SAL_DLLPRIVATE bool IsSimple() const; public: MapMode(); @@ -79,27 +56,22 @@ public: ~MapMode(); void SetMapUnit( MapUnit eUnit ); - MapUnit GetMapUnit() const - { return mpImplMapMode->meUnit; } + MapUnit GetMapUnit() const; void SetOrigin( const Point& rOrigin ); - const Point& GetOrigin() const - { return mpImplMapMode->maOrigin; } + const Point& GetOrigin() const; void SetScaleX( const Fraction& rScaleX ); - const Fraction& GetScaleX() const - { return mpImplMapMode->maScaleX; } + const Fraction& GetScaleX() const; void SetScaleY( const Fraction& rScaleY ); - const Fraction& GetScaleY() const - { return mpImplMapMode->maScaleY; } + const Fraction& GetScaleY() const; MapMode& operator=( const MapMode& rMapMode ); bool operator==( const MapMode& rMapMode ) const; bool operator!=( const MapMode& rMapMode ) const { return !(MapMode::operator==( rMapMode )); } bool IsDefault() const; - bool IsSameInstance( const MapMode& rMapMode ) const - { return (mpImplMapMode == rMapMode.mpImplMapMode); } + bool IsSameInstance( const MapMode& rMapMode ) const; friend VCL_DLLPUBLIC SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ); friend VCL_DLLPUBLIC SvStream& WriteMapMode( SvStream& rOStm, const MapMode& rMapMode ); |