diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-04-26 20:07:56 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-04-27 21:33:35 +0000 |
commit | a7bd0355cc45ab6d77579c6604a835a5fd0e96cb (patch) | |
tree | 5efb94995e1b5dda5a2c3415474e27e2580d3308 | |
parent | f710c017a666621c5b837de1f4624662f6a32e5a (diff) |
vcl: remove unused variable and redundant method
Change-Id: Id3662a21b6a687f9283f93778e5b70183e4f0c04
Reviewed-on: https://gerrit.libreoffice.org/24435
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | include/vcl/gradient.hxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/gradient.cxx | 50 |
2 files changed, 22 insertions, 32 deletions
diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx index b80c79f75c43..6ebff6ded2a2 100644 --- a/include/vcl/gradient.hxx +++ b/include/vcl/gradient.hxx @@ -35,7 +35,6 @@ class SvStream; class Impl_Gradient { public: - sal_uInt32 mnRefCount; GradientStyle meStyle; Color maStartColor; Color maEndColor; @@ -47,9 +46,6 @@ public: sal_uInt16 mnIntensityEnd; sal_uInt16 mnStepCount; - 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 ); diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index 5f2c95f0da53..878b6d942a9f 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -27,7 +27,6 @@ Impl_Gradient::Impl_Gradient() : maStartColor( COL_BLACK ), maEndColor( COL_WHITE ) { - mnRefCount = 1; meStyle = GradientStyle_LINEAR; mnAngle = 0; mnBorder = 0; @@ -42,7 +41,6 @@ Impl_Gradient::Impl_Gradient( const Impl_Gradient& rImplGradient ) : maStartColor( rImplGradient.maStartColor ), maEndColor( rImplGradient.maEndColor ) { - mnRefCount = 1; meStyle = rImplGradient.meStyle; mnAngle = rImplGradient.mnAngle; mnBorder = rImplGradient.mnBorder; @@ -232,46 +230,42 @@ bool Gradient::operator==( const Gradient& rGradient ) const return mpImplGradient == rGradient.mpImplGradient; } -SvStream& ReadImpl_Gradient( SvStream& rIStm, Impl_Gradient& rImpl_Gradient ) +SvStream& ReadGradient( SvStream& rIStm, Gradient& rGradient ) { VersionCompat aCompat( rIStm, StreamMode::READ ); sal_uInt16 nTmp16; - rIStm.ReadUInt16( nTmp16 ); rImpl_Gradient.meStyle = (GradientStyle) nTmp16; + rIStm.ReadUInt16( nTmp16 ); rGradient.mpImplGradient->meStyle = (GradientStyle) nTmp16; - ReadColor( rIStm, rImpl_Gradient.maStartColor ); - ReadColor( rIStm, rImpl_Gradient.maEndColor ); - rIStm.ReadUInt16( rImpl_Gradient.mnAngle ). ReadUInt16( rImpl_Gradient.mnBorder ). ReadUInt16( rImpl_Gradient.mnOfsX ). ReadUInt16( rImpl_Gradient.mnOfsY ). ReadUInt16( rImpl_Gradient.mnIntensityStart ). ReadUInt16( rImpl_Gradient.mnIntensityEnd ). ReadUInt16( rImpl_Gradient.mnStepCount ); + ReadColor( rIStm, rGradient.mpImplGradient->maStartColor ); + ReadColor( rIStm, rGradient.mpImplGradient->maEndColor ); + rIStm.ReadUInt16( rGradient.mpImplGradient->mnAngle ) + .ReadUInt16( rGradient.mpImplGradient->mnBorder ) + .ReadUInt16( rGradient.mpImplGradient->mnOfsX ) + .ReadUInt16( rGradient.mpImplGradient->mnOfsY ) + .ReadUInt16( rGradient.mpImplGradient->mnIntensityStart ) + .ReadUInt16( rGradient.mpImplGradient->mnIntensityEnd ) + .ReadUInt16( rGradient.mpImplGradient->mnStepCount ); return rIStm; } -SvStream& WriteImpl_Gradient( SvStream& rOStm, const Impl_Gradient& rImpl_Gradient ) +SvStream& WriteGradient( SvStream& rOStm, const Gradient& rGradient ) { VersionCompat aCompat( rOStm, StreamMode::WRITE, 1 ); - rOStm.WriteUInt16( rImpl_Gradient.meStyle ); - WriteColor( rOStm, rImpl_Gradient.maStartColor ); - WriteColor( rOStm, rImpl_Gradient.maEndColor ); - rOStm.WriteUInt16( rImpl_Gradient.mnAngle ) - .WriteUInt16( rImpl_Gradient.mnBorder ) - .WriteUInt16( rImpl_Gradient.mnOfsX ) - .WriteUInt16( rImpl_Gradient.mnOfsY ) - .WriteUInt16( rImpl_Gradient.mnIntensityStart ) - .WriteUInt16( rImpl_Gradient.mnIntensityEnd ) - .WriteUInt16( rImpl_Gradient.mnStepCount ); + rOStm.WriteUInt16( rGradient.mpImplGradient->meStyle ); + WriteColor( rOStm, rGradient.mpImplGradient->maStartColor ); + WriteColor( rOStm, rGradient.mpImplGradient->maEndColor ); + rOStm.WriteUInt16( rGradient.mpImplGradient->mnAngle ) + .WriteUInt16( rGradient.mpImplGradient->mnBorder ) + .WriteUInt16( rGradient.mpImplGradient->mnOfsX ) + .WriteUInt16( rGradient.mpImplGradient->mnOfsY ) + .WriteUInt16( rGradient.mpImplGradient->mnIntensityStart ) + .WriteUInt16( rGradient.mpImplGradient->mnIntensityEnd ) + .WriteUInt16( rGradient.mpImplGradient->mnStepCount ); return rOStm; } -SvStream& ReadGradient( SvStream& rIStm, Gradient& rGradient ) -{ - return ReadImpl_Gradient( rIStm, *rGradient.mpImplGradient ); -} - -SvStream& WriteGradient( SvStream& rOStm, const Gradient& rGradient ) -{ - return WriteImpl_Gradient( rOStm, *rGradient.mpImplGradient ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |