[Libreoffice-commits] core.git: include/drawinglayer include/oox include/sfx2 include/tools include/vcl sc/inc sd/source sfx2/source vcl/source
Noel Grandin
noel at peralex.com
Mon Feb 8 13:09:28 UTC 2016
include/drawinglayer/geometry/viewinformation2d.hxx | 1 +
include/drawinglayer/primitive2d/baseprimitive2d.hxx | 1 +
include/drawinglayer/primitive3d/baseprimitive3d.hxx | 1 +
include/drawinglayer/texture/texture.hxx | 1 +
include/oox/helper/containerhelper.hxx | 1 +
include/sfx2/sidebar/Context.hxx | 1 +
include/sfx2/sidebar/EnumContext.hxx | 1 +
include/tools/poly.hxx | 4 ++++
include/vcl/alpha.hxx | 2 ++
include/vcl/animate.hxx | 2 ++
include/vcl/cursor.hxx | 2 ++
include/vcl/gdimtf.hxx | 1 +
include/vcl/hatch.hxx | 1 +
include/vcl/image.hxx | 1 +
include/vcl/inputctx.hxx | 2 ++
include/vcl/settings.hxx | 2 ++
include/vcl/textrectinfo.hxx | 2 ++
include/vcl/txtattr.hxx | 2 ++
sc/inc/bigrange.hxx | 2 ++
sd/source/ui/inc/unomodel.hxx | 1 +
sfx2/source/sidebar/Context.cxx | 6 ++++++
sfx2/source/sidebar/EnumContext.cxx | 6 ++++++
vcl/source/app/settings.cxx | 12 ++++++++++++
23 files changed, 55 insertions(+)
New commits:
commit d282dec83e5d4aba749baba857e0f9b4573bc414
Author: Noel Grandin <noel at peralex.com>
Date: Mon Feb 8 14:27:26 2016 +0200
revert part of "loplugin:unusedmethods"
<sberg> noelgrandin, just happen to look at b14224fe again; looks a bit scary to remove == or != from cases where both where declared
<noelgrandin> sberg, ok, I can revert that part
<sberg> noelgrandin, I guess that would be safer (there could be cases where now a different overload could kick in)
Change-Id: I5dc41c05dc4439d5adee0e5b3e0a9e1dfb9de3af
Reviewed-on: https://gerrit.libreoffice.org/22211
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 53fd5f4..72e857c 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -123,6 +123,7 @@ namespace drawinglayer
/// compare operators
bool operator==(const ViewInformation2D& rCandidate) const;
+ bool operator!=(const ViewInformation2D& rCandidate) const { return !operator==(rCandidate); }
/// data access
const basegfx::B2DHomMatrix& getObjectTransformation() const;
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index 79c2b13..80ddeed 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -173,6 +173,7 @@ namespace drawinglayer
Overridden implementations are then based on this implementation
*/
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
+ bool operator!=( const BasePrimitive2D& rPrimitive ) const { return !operator==(rPrimitive); }
/// The default implementation will use getDecomposition results to create the range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
index 0f21afd..26b100e 100644
--- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -110,6 +110,7 @@ namespace drawinglayer
Overridden implementation are then based on this implementation.
*/
virtual bool operator==( const BasePrimitive3D& rPrimitive ) const;
+ bool operator!=( const BasePrimitive3D& rPrimitive ) const { return !operator==(rPrimitive); }
/** This method is for places where using the C++ implementation directly is possible. The subprocessing
and range merging is more efficient when working directly on basegfx::B3DRange. The default implementation
diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx
index ce9e34b..3f1d6d0 100644
--- a/include/drawinglayer/texture/texture.hxx
+++ b/include/drawinglayer/texture/texture.hxx
@@ -41,6 +41,7 @@ namespace drawinglayer
// compare operator
virtual bool operator==(const GeoTexSvx& rGeoTexSvx) const;
+ bool operator!=(const GeoTexSvx& rGeoTexSvx) const { return !operator==(rGeoTexSvx); }
// virtual base methods
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const;
diff --git a/include/oox/helper/containerhelper.hxx b/include/oox/helper/containerhelper.hxx
index 6262146..1c73eb7 100644
--- a/include/oox/helper/containerhelper.hxx
+++ b/include/oox/helper/containerhelper.hxx
@@ -49,6 +49,7 @@ struct ValueRange
explicit ValueRange( sal_Int32 nFirst, sal_Int32 nLast ) : mnFirst( nFirst ), mnLast( nLast ) {}
bool operator==( const ValueRange& rRange ) const { return (mnFirst == rRange.mnFirst) && (mnLast == rRange.mnLast); }
+ bool operator!=( const ValueRange& rRange ) const { return !(*this == rRange); }
bool contains( const ValueRange& rRange ) const { return (mnFirst <= rRange.mnFirst) && (rRange.mnLast <= mnLast); }
bool intersects( const ValueRange& rRange ) const { return (mnFirst <= rRange.mnLast) && (rRange.mnFirst <= mnLast); }
};
diff --git a/include/sfx2/sidebar/Context.hxx b/include/sfx2/sidebar/Context.hxx
index 945cf09..b9430bae 100644
--- a/include/sfx2/sidebar/Context.hxx
+++ b/include/sfx2/sidebar/Context.hxx
@@ -52,6 +52,7 @@ public:
*/
sal_Int32 EvaluateMatch (const Context& rOther) const;
+ bool operator== (const Context& rOther) const;
bool operator!= (const Context& rOther) const;
};
diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx
index dc29753..080a818 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -130,6 +130,7 @@ public:
Application GetApplication_DI() const;
bool operator == (const EnumContext& rOther);
+ bool operator != (const EnumContext& rOther);
/** When two contexts are matched against each other then
application or context name may have the wildcard value 'any'.
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index e4a8421..a956b20 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -161,6 +161,8 @@ public:
tools::Polygon& operator=( const tools::Polygon& rPoly );
bool operator==( const tools::Polygon& rPoly ) const;
+ bool operator!=( const tools::Polygon& rPoly ) const
+ { return !(Polygon::operator==( rPoly )); }
bool IsEqual( const tools::Polygon& rPoly ) const;
// streaming a Polygon does ignore PolyFlags, so use the Write Or Read
@@ -251,6 +253,8 @@ public:
tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly );
bool operator==( const tools::PolyPolygon& rPolyPoly ) const;
+ bool operator!=( const tools::PolyPolygon& rPolyPoly ) const
+ { return !(PolyPolygon::operator==( rPolyPoly )); }
TOOLS_DLLPUBLIC friend SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly );
TOOLS_DLLPUBLIC friend SvStream& WritePolyPolygon( SvStream& rOStream, const tools::PolyPolygon& rPolyPoly );
diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx
index 1bc67b2..9b7e6b4 100644
--- a/include/vcl/alpha.hxx
+++ b/include/vcl/alpha.hxx
@@ -40,6 +40,8 @@ public:
AlphaMask& operator=( const Bitmap& rBitmap );
AlphaMask& operator=( const AlphaMask& rAlphaMask ) { return static_cast<AlphaMask&>( Bitmap::operator=( rAlphaMask ) ); }
bool operator!() const { return Bitmap::operator!(); }
+ bool operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); }
+ bool operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); }
void SetPrefMapMode( const MapMode& rMapMode ) { Bitmap::SetPrefMapMode( rMapMode ); }
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 74d5708..9b3856a 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -102,6 +102,8 @@ public:
Animation& operator=( const Animation& rAnimation );
bool operator==( const Animation& rAnimation ) const;
+ bool operator!=( const Animation& rAnimation ) const
+ { return !(*this==rAnimation); }
void Clear();
diff --git a/include/vcl/cursor.hxx b/include/vcl/cursor.hxx
index 927f60c..038e18f 100644
--- a/include/vcl/cursor.hxx
+++ b/include/vcl/cursor.hxx
@@ -91,6 +91,8 @@ public:
Cursor& operator=( const Cursor& rCursor );
bool operator==( const Cursor& rCursor ) const;
+ bool operator!=( const Cursor& rCursor ) const
+ { return !(Cursor::operator==( rCursor )); }
private:
void ImplRestore();
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 88bc38d..6875a50 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -117,6 +117,7 @@ public:
GDIMetaFile& operator=( const GDIMetaFile& rMtf );
bool operator==( const GDIMetaFile& rMtf ) const;
+ bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
void Clear();
bool Mirror( BmpMirrorFlags nMirrorFlags );
diff --git a/include/vcl/hatch.hxx b/include/vcl/hatch.hxx
index 9a81006..935ea9a 100644
--- a/include/vcl/hatch.hxx
+++ b/include/vcl/hatch.hxx
@@ -66,6 +66,7 @@ public:
Hatch& operator=( const Hatch& rHatch );
bool operator==( const Hatch& rHatch ) const;
+ bool operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); }
HatchStyle GetStyle() const { return mpImplHatch->meStyle; }
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index f63634f..e5c045f 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -124,6 +124,7 @@ public:
ImageList& operator=( const ImageList& rImageList );
bool operator==( const ImageList& rImageList ) const;
+ bool operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); }
private:
diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx
index c2e0f17..d1f3f9f 100644
--- a/include/vcl/inputctx.hxx
+++ b/include/vcl/inputctx.hxx
@@ -68,6 +68,8 @@ public:
InputContext& operator=( const InputContext& rInputContext );
bool operator==( const InputContext& rInputContext ) const;
+ bool operator!=( const InputContext& rInputContext ) const
+ { return !(InputContext::operator==( rInputContext )); }
};
inline InputContext& InputContext::operator=( const InputContext& rInputContext )
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index c911c5d..46de94d 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -671,6 +671,7 @@ public:
sal_uLong GetBalloonDelay() const;
bool operator ==( const HelpSettings& rSet ) const;
+ bool operator !=( const HelpSettings& rSet ) const;
};
@@ -728,6 +729,7 @@ public:
AllSettingsFlags GetChangeFlags( const AllSettings& rSettings ) const;
bool operator ==( const AllSettings& rSet ) const;
+ bool operator !=( const AllSettings& rSet ) const;
static void LocaleSettingsChanged( sal_uInt32 nHint );
SvtSysLocale& GetSysLocale();
};
diff --git a/include/vcl/textrectinfo.hxx b/include/vcl/textrectinfo.hxx
index b5dcf56..8b98e1a 100644
--- a/include/vcl/textrectinfo.hxx
+++ b/include/vcl/textrectinfo.hxx
@@ -41,6 +41,8 @@ public:
{ return ((mnMaxWidth == rInfo.mnMaxWidth) &&
(mnLineCount == rInfo.mnLineCount) &&
(mbEllipsis == rInfo.mbEllipsis)); }
+ bool operator !=( const TextRectInfo& rInfo ) const
+ { return !(TextRectInfo::operator==( rInfo )); }
};
inline TextRectInfo::TextRectInfo()
diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx
index 3dcb28f..43a6adc 100644
--- a/include/vcl/txtattr.hxx
+++ b/include/vcl/txtattr.hxx
@@ -54,6 +54,8 @@ public:
virtual TextAttrib* Clone() const = 0;
virtual bool operator==( const TextAttrib& rAttr ) const = 0;
+ bool operator!=( const TextAttrib& rAttr ) const
+ { return !(*this == rAttr ); }
};
diff --git a/sc/inc/bigrange.hxx b/sc/inc/bigrange.hxx
index 9dfbe2e..c677df1 100644
--- a/sc/inc/bigrange.hxx
+++ b/sc/inc/bigrange.hxx
@@ -69,6 +69,8 @@ public:
{ nCol = r.Col(); nRow = r.Row(); nTab = r.Tab(); return *this; }
bool operator==( const ScBigAddress& r ) const
{ return nCol == r.nCol && nRow == r.nRow && nTab == r.nTab; }
+ bool operator!=( const ScBigAddress& r ) const
+ { return !operator==( r ); }
};
inline void ScBigAddress::PutInOrder( ScBigAddress& r )
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index af9b337..fe09a74 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -138,6 +138,7 @@ public:
static rtl::Reference< SdXImpressDocument > GetModel( SdDrawDocument* pDoc );
// intern
+ bool operator==( const SdXImpressDocument& rModel ) const { return mpDoc == rModel.mpDoc; }
bool operator!=( const SdXImpressDocument& rModel ) const { return mpDoc != rModel.mpDoc; }
::sd::DrawDocShell* GetDocShell() const { return mpDocShell; }
diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx
index 082eaf2..9baf30b 100644
--- a/sfx2/source/sidebar/Context.cxx
+++ b/sfx2/source/sidebar/Context.cxx
@@ -68,6 +68,12 @@ sal_Int32 Context::EvaluateMatch (
return NoMatch;
}
+bool Context::operator== (const Context& rOther) const
+{
+ return msApplication.equals(rOther.msApplication)
+ && msContext.equals(rOther.msContext);
+}
+
bool Context::operator!= (const Context& rOther) const
{
return ( ! msApplication.equals(rOther.msApplication))
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index 56a2207..db80700 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -95,6 +95,12 @@ bool EnumContext::operator== (const EnumContext& rOther)
&& meContext==rOther.meContext;
}
+bool EnumContext::operator!= (const EnumContext& rOther)
+{
+ return meApplication!=rOther.meApplication
+ || meContext!=rOther.meContext;
+}
+
void EnumContext::AddEntry (const ::rtl::OUString& rsName, const Application eApplication)
{
maApplicationMap[rsName] = eApplication;
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index d952dd7..296684b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2678,6 +2678,12 @@ HelpSettings::GetBalloonDelay() const
return mxData->mnBalloonDelay;
}
+bool
+HelpSettings::operator !=( const HelpSettings& rSet ) const
+{
+ return !(*this == rSet);
+}
+
ImplAllSettingsData::ImplAllSettingsData()
:
maLocale( LANGUAGE_SYSTEM ),
@@ -3127,6 +3133,12 @@ AllSettings::GetWindowUpdate() const
return mxData->mnWindowUpdate;
}
+bool
+AllSettings::operator !=( const AllSettings& rSet ) const
+{
+ return !(*this == rSet);
+}
+
SvtSysLocale&
AllSettings::GetSysLocale()
{
More information about the Libreoffice-commits
mailing list