summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-10 08:43:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-11 06:22:28 +0000
commit0f8ec3036f44b02aa03795ede3052a790134a90d (patch)
treea7cbba9eb70fcee3f793c07f8d8db6c092d0e594
parenta6f876d45bd4e41a7143594a6cb11b6893a0f620 (diff)
[API CHANGE] add operator==/!= to UNO structs
this is useful now that we are storing UNO structs in std::vector Change-Id: Ic558bcd669bd2b3cdf9eb8393269eb906ac52369 Reviewed-on: https://gerrit.libreoffice.org/22257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx10
-rw-r--r--chart2/source/inc/CommonConverters.hxx5
-rw-r--r--chart2/source/tools/CommonConverters.cxx8
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx63
-rw-r--r--comphelper/source/misc/types.cxx21
-rw-r--r--connectivity/source/commontools/FValue.cxx19
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx10
-rw-r--r--i18npool/inc/localedata.hxx6
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx4
-rw-r--r--i18npool/source/textconversion/textconversionImpl.cxx4
-rw-r--r--include/comphelper/types.hxx9
-rw-r--r--lingucomponent/source/lingutil/lingutil.hxx7
-rw-r--r--linguistic/source/convdiclist.cxx7
-rw-r--r--reportdesign/source/core/api/ReportControlModel.cxx21
-rw-r--r--reportdesign/source/core/inc/ReportControlModel.hxx7
-rw-r--r--sc/inc/convuno.hxx29
-rw-r--r--sc/inc/dpsave.hxx4
-rw-r--r--sc/source/core/data/dpsave.cxx19
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx13
-rw-r--r--sfx2/qa/cppunit/test_metadatable.cxx5
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx13
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx13
-rw-r--r--sfx2/source/doc/oleprops.cxx22
-rw-r--r--svl/source/items/srchitem.cxx4
-rw-r--r--svtools/source/misc/templatefoldercache.cxx20
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx5
-rw-r--r--xmloff/source/style/PageMasterExportPropMapper.cxx7
28 files changed, 68 insertions, 289 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index cedab3995913..e22ce7685466 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -44,16 +44,6 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::Property;
-namespace com { namespace sun { namespace star { namespace awt {
-
-// this operator is not defined by default
-bool operator!=( const awt::Size & rSize1, const awt::Size & rSize2 )
-{
- return (rSize1.Width != rSize2.Width) || (rSize1.Height != rSize2.Height);
-}
-
-} } } }
-
namespace chart
{
namespace wrapper
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index 7b42b7fad5a0..46288be417b5 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -134,11 +134,6 @@ OOO_DLLPUBLIC_CHARTTOOLS com::sun::star::drawing::Direction3D
operator-( const com::sun::star::drawing::Position3D& rPos1
, const com::sun::star::drawing::Position3D& rPos2);
-/** Position3D == Position3D ?
-*/
-OOO_DLLPUBLIC_CHARTTOOLS
-bool operator==( const com::sun::star::drawing::Position3D& rPos1
- , const com::sun::star::drawing::Position3D& rPos2);
/** awt::Rect --> awt::Point (2D)
*/
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 8571f94defad..436c1050ac6c 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -360,14 +360,6 @@ drawing::Direction3D operator-( const drawing::Position3D& rPos1
);
}
-bool operator==( const drawing::Position3D& rPos1
- , const drawing::Position3D& rPos2)
-{
- return rPos1.PositionX == rPos2.PositionX
- && rPos1.PositionY == rPos2.PositionY
- && rPos1.PositionZ == rPos2.PositionZ;
-}
-
awt::Point Position3DToAWTPoint( const drawing::Position3D& rPos )
{
awt::Point aRet;
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 98510c367ff9..1f98590e2a0f 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -1942,6 +1942,33 @@ void PlainStructType::dumpHppFile(
dec();
out << "{\n}\n\n";
}
+ // print the operator==
+ out << "\ninline bool operator==(const " << id_ << "& the_lhs, const " << id_ << "& the_rhs)\n";
+ out << "{\n";
+ inc();
+ out << indent() << "return ";
+ bFirst = true;
+ if (!base.isEmpty()) {
+ out << "operator==( static_cast< " << codemaker::cpp::scopedCppName(u2b(base))
+ << ">(the_lhs), static_cast< " << codemaker::cpp::scopedCppName(u2b(base)) << ">(the_rhs) )\n";
+ bFirst = false;
+ }
+ for (const unoidl::PlainStructTypeEntity::Member& member : entity_->getDirectMembers())
+ {
+ if (!bFirst)
+ out << "\n" << indent() << indent() << "&& ";
+ out << "the_lhs." << member.name << " == the_rhs." << member.name;
+ bFirst = false;
+ }
+ out << ";\n";
+ dec();
+ out << "}\n";
+ // print the operator!=
+ out << "\ninline bool operator!=(const " << id_ << "& the_lhs, const " << id_ << "& the_rhs)\n";
+ out << "{\n";
+ out << indent() << "return !operator==(the_lhs, the_rhs);\n";
+ out << "}\n";
+ // close namespace
if (codemaker::cppumaker::dumpNamespaceClose(out, name_, false)) {
out << "\n";
}
@@ -2233,6 +2260,7 @@ void PolyStructType::dumpDeclaration(FileStream & out) {
out << " " << i->name << "_";
}
out << ");\n\n";
+ // print the member fields
for (const unoidl::PolymorphicStructTypeTemplateEntity::Member& member :
entity_->getMembers())
{
@@ -2260,6 +2288,7 @@ void PolyStructType::dumpHppFile(
out << "\n";
}
out << "\n";
+ // dump default (no-arg) constructor
dumpTemplateHead(out);
out << "inline " << id_;
dumpTemplateParameters(out);
@@ -2277,6 +2306,7 @@ void PolyStructType::dumpHppFile(
dec();
out << "{\n}\n\n";
if (!entity_->getMembers().empty()) {
+ // dump takes-all-fields constructor
dumpTemplateHead(out);
out << "inline " << id_;
dumpTemplateParameters(out);
@@ -2309,6 +2339,7 @@ void PolyStructType::dumpHppFile(
}
dec();
out << "{\n}\n\n" << indent();
+ // dump make_T method
dumpTemplateHead(out);
out << "\n" << indent() << "inline " << id_;
dumpTemplateParameters(out);
@@ -2348,6 +2379,38 @@ void PolyStructType::dumpHppFile(
dec();
out << indent() << "}\n\n";
}
+ // print the operator==
+ dumpTemplateHead(out);
+ out << " inline bool operator==(const " << id_;
+ dumpTemplateParameters(out);
+ out << "& the_lhs, const " << id_;
+ dumpTemplateParameters(out);
+ out << "& the_rhs)\n";
+ out << "{\n";
+ inc();
+ out << indent() << "return ";
+ bool bFirst = true;
+ for (const unoidl::PolymorphicStructTypeTemplateEntity::Member& member : entity_->getMembers())
+ {
+ if (!bFirst)
+ out << "\n" << indent() << indent() << "&& ";
+ out << "the_lhs." << member.name << " == the_rhs." << member.name;
+ bFirst = false;
+ }
+ out << ";\n";
+ dec();
+ out << "}\n";
+ // print the operator!=
+ dumpTemplateHead(out);
+ out << " inline bool operator!=(const " << id_;
+ dumpTemplateParameters(out);
+ out << "& the_lhs, const " << id_;
+ dumpTemplateParameters(out);
+ out << "& the_rhs)\n";
+ out << "{\n";
+ out << indent() << "return !operator==(the_lhs, the_rhs);\n";
+ out << "}\n";
+ // close namespace
if (codemaker::cppumaker::dumpNamespaceClose(out, name_, false)) {
out << "\n";
}
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index a6bbeffaa51e..e70e19e1419b 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -131,27 +131,6 @@ bool isAssignableFrom(const Type& _rAssignable, const Type& _rFrom)
return typelib_typedescription_isAssignableFrom(pAssignable, pFrom);
}
-bool operator ==(const FontDescriptor& _rLeft, const FontDescriptor& _rRight)
-{
- return ( _rLeft.Name.equals( _rRight.Name ) ) &&
- ( _rLeft.Height == _rRight.Height ) &&
- ( _rLeft.Width == _rRight.Width ) &&
- ( _rLeft.StyleName.equals( _rRight.StyleName ) ) &&
- ( _rLeft.Family == _rRight.Family ) &&
- ( _rLeft.CharSet == _rRight.CharSet ) &&
- ( _rLeft.Pitch == _rRight.Pitch ) &&
- ( _rLeft.CharacterWidth == _rRight.CharacterWidth ) &&
- ( _rLeft.Weight == _rRight.Weight ) &&
- ( _rLeft.Slant == _rRight.Slant ) &&
- ( _rLeft.Underline == _rRight.Underline ) &&
- ( _rLeft.Strikeout == _rRight.Strikeout ) &&
- ( _rLeft.Orientation == _rRight.Orientation ) &&
- ( _rLeft.Kerning == _rRight.Kerning ) &&
- ( _rLeft.WordLineMode == _rRight.WordLineMode ) &&
- ( _rLeft.Type == _rRight.Type ) ;
-}
-
-
Type getSequenceElementType(const Type& _rSequenceType)
{
OSL_ENSURE(_rSequenceType.getTypeClass() == TypeClass_SEQUENCE,
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index be18ec286b1e..50dbd0af34c7 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -816,25 +816,6 @@ ORowSetValue& ORowSetValue::operator=(const Any& _rAny)
}
-bool operator==(const Date& _rLH, const Date& _rRH)
-{
- return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year;
-}
-
-
-bool operator==(const css::util::Time& _rLH, const css::util::Time& _rRH)
-{
- return _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds;
-}
-
-
-bool operator==(const DateTime& _rLH, const DateTime& _rRH)
-{
- return _rLH.Day == _rRH.Day && _rLH.Month == _rRH.Month && _rLH.Year == _rRH.Year &&
- _rLH.Minutes == _rRH.Minutes && _rLH.Hours == _rRH.Hours && _rLH.Seconds == _rRH.Seconds && _rLH.NanoSeconds == _rRH.NanoSeconds;
-}
-
-
bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
{
if ( m_bNull != _rRH.isNull() )
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 7eac6defe14a..d2ac643643b5 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -308,16 +308,6 @@ namespace pcr
::std::copy( aListeners.begin(), aListeners.end(),
::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) );
}
-
- bool operator ==( const ScriptEventDescriptor& _lhs, const ScriptEventDescriptor& _rhs )
- {
- return ( ( _lhs.ListenerType == _rhs.ListenerType )
- && ( _lhs.EventMethod == _rhs.EventMethod )
- && ( _lhs.AddListenerParam == _rhs.AddListenerParam )
- && ( _lhs.ScriptType == _rhs.ScriptType )
- && ( _lhs.ScriptCode == _rhs.ScriptCode )
- );
- }
}
typedef ::cppu::WeakImplHelper < css::container::XNameReplace
diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx
index d61b92c94aa1..0a28ee0301f6 100644
--- a/i18npool/inc/localedata.hxx
+++ b/i18npool/inc/localedata.hxx
@@ -58,10 +58,6 @@ struct LocaleDataLookupTableItem;
namespace com { namespace sun { namespace star { namespace i18n {
-inline bool operator ==(const css::lang::Locale& l1, const css::lang::Locale& l2) {
- return l1.Language == l2.Language && l1.Country == l2.Country && l1.Variant == l2.Variant;
-};
-
class LocaleDataImpl : public cppu::WeakImplHelper
<
css::i18n::XLocaleData4,
@@ -122,8 +118,6 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
private:
- friend bool operator ==(const css::lang::Locale& l1, const css::lang::Locale& l2);
-
::std::unique_ptr< LocaleDataLookupTableItem > cachedItem;
css::i18n::Calendar2 ref_cal;
OUString ref_name;
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 6d6e1c67144f..ac7a861296d4 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -523,10 +523,6 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar)
return nRet;
}
-static inline bool operator == (const Locale& l1, const Locale& l2) {
- return l1.Language == l2.Language && l1.Country == l2.Country && l1.Variant == l2.Variant;
-}
-
bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocaleName) throw( RuntimeException )
{
// to share service between same Language but different Country code, like zh_CN and zh_TW
diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx
index 96d77604f413..2386d44ccb63 100644
--- a/i18npool/source/textconversion/textconversionImpl.cxx
+++ b/i18npool/source/textconversion/textconversionImpl.cxx
@@ -76,10 +76,6 @@ TextConversionImpl::interactiveConversion( const Locale& rLocale, sal_Int16 nTex
return xTC->interactiveConversion(rLocale, nTextConversionType, nTextConversionOptions);
}
-static inline bool operator != (const Locale& l1, const Locale& l2) {
- return l1.Language != l2.Language || l1.Country != l2.Country || l1.Variant != l2.Variant;
-}
-
void SAL_CALL
TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw( NoSupportException )
{
diff --git a/include/comphelper/types.hxx b/include/comphelper/types.hxx
index 608b21c22d02..0279ccb3bccf 100644
--- a/include/comphelper/types.hxx
+++ b/include/comphelper/types.hxx
@@ -36,15 +36,6 @@ namespace com { namespace sun { namespace star { namespace awt {
namespace comphelper
{
- /** compare two FontDescriptor's
- */
- COMPHELPER_DLLPUBLIC bool operator ==(const css::awt::FontDescriptor& _rLeft, const css::awt::FontDescriptor& _rRight);
- inline bool operator !=(const css::awt::FontDescriptor& _rLeft, const css::awt::FontDescriptor& _rRight)
- {
- return !(_rLeft == _rRight);
- }
-
-
/// returns sal_True if objects of the types given are "compatible"
COMPHELPER_DLLPUBLIC bool isAssignableFrom(const css::uno::Type& _rAssignable, const css::uno::Type& _rFrom);
diff --git a/lingucomponent/source/lingutil/lingutil.hxx b/lingucomponent/source/lingutil/lingutil.hxx
index e0efb95d2526..a6d396277bc9 100644
--- a/lingucomponent/source/lingutil/lingutil.hxx
+++ b/lingucomponent/source/lingutil/lingutil.hxx
@@ -41,13 +41,6 @@ struct lt_rtl_OUString
}
};
-inline bool operator == ( const css::lang::Locale &rL1, const css::lang::Locale &rL2 )
-{
- return rL1.Language == rL2.Language &&
- rL1.Country == rL2.Country &&
- rL1.Variant == rL2.Variant;
-}
-
#if defined(WNT)
// to be use to get a path name with long path prefix
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 8b028a3c1ea3..a977062bce83 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -58,13 +58,6 @@ using namespace linguistic;
#define SN_CONV_DICTIONARY_LIST "com.sun.star.linguistic2.ConversionDictionaryList"
-bool operator == ( const Locale &r1, const Locale &r2 )
-{
- return r1.Language == r2.Language &&
- r1.Country == r2.Country &&
- r1.Variant == r2.Variant;
-}
-
OUString GetConvDicMainURL( const OUString &rDicName, const OUString &rDirectoryURL )
{
// build URL to use for new (persistent) dictionaries
diff --git a/reportdesign/source/core/api/ReportControlModel.cxx b/reportdesign/source/core/api/ReportControlModel.cxx
index 9c1e2e168a9e..3f9d20307fc3 100644
--- a/reportdesign/source/core/api/ReportControlModel.cxx
+++ b/reportdesign/source/core/api/ReportControlModel.cxx
@@ -24,27 +24,6 @@ namespace reportdesign
using namespace com::sun::star;
using namespace comphelper;
-bool operator==( const css::awt::FontDescriptor& _lhs, const css::awt::FontDescriptor& _rhs )
-{
- return ( _lhs.Name == _rhs.Name )
- && ( _lhs.Height == _rhs.Height )
- && ( _lhs.Width == _rhs.Width )
- && ( _lhs.StyleName == _rhs.StyleName )
- && ( _lhs.Family == _rhs.Family )
- && ( _lhs.CharSet == _rhs.CharSet )
- && ( _lhs.Pitch == _rhs.Pitch )
- && ( _lhs.CharacterWidth == _rhs.CharacterWidth )
- && ( _lhs.Weight == _rhs.Weight )
- && ( _lhs.Slant == _rhs.Slant )
- && ( _lhs.Underline == _rhs.Underline )
- && ( _lhs.Strikeout == _rhs.Strikeout )
- && ( _lhs.Orientation == _rhs.Orientation )
- && ( _lhs.Kerning == _rhs.Kerning )
- && ( _lhs.WordLineMode == _rhs.WordLineMode )
- && ( _lhs.Type == _rhs.Type );
-}
-
-
// XContainer
void OReportControlModel::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
{
diff --git a/reportdesign/source/core/inc/ReportControlModel.hxx b/reportdesign/source/core/inc/ReportControlModel.hxx
index 48b457041efb..dc855adf8e0f 100644
--- a/reportdesign/source/core/inc/ReportControlModel.hxx
+++ b/reportdesign/source/core/inc/ReportControlModel.hxx
@@ -33,13 +33,6 @@
namespace reportdesign
{
- bool operator==( const css::awt::FontDescriptor& _lhs, const css::awt::FontDescriptor& _rhs );
-
- inline bool operator!=( const css::awt::FontDescriptor& _lhs, const css::awt::FontDescriptor& _rhs )
- {
- return !( _lhs == _rhs );
- }
-
struct OFormatProperties
{
::sal_Int16 nAlign;
diff --git a/sc/inc/convuno.hxx b/sc/inc/convuno.hxx
index 897479b8a244..aee327dc6516 100644
--- a/sc/inc/convuno.hxx
+++ b/sc/inc/convuno.hxx
@@ -127,35 +127,6 @@ inline bool ScUnoConversion::Contains(
(rApiOuter.StartRow <= rApiInner.StartRow) && (rApiInner.EndRow <= rApiOuter.EndRow);
}
-inline bool operator==(
- const css::table::CellAddress& rApiAddress1,
- const css::table::CellAddress& rApiAddress2 )
-{
- return
- (rApiAddress1.Column == rApiAddress2.Column) &&
- (rApiAddress1.Row == rApiAddress2.Row) &&
- (rApiAddress1.Sheet == rApiAddress2.Sheet);
-}
-
-inline bool operator==(
- const css::table::CellRangeAddress& rApiRange1,
- const css::table::CellRangeAddress& rApiRange2 )
-{
- return
- (rApiRange1.StartColumn == rApiRange2.StartColumn) &&
- (rApiRange1.StartRow == rApiRange2.StartRow) &&
- (rApiRange1.EndColumn == rApiRange2.EndColumn) &&
- (rApiRange1.EndRow == rApiRange2.EndRow) &&
- (rApiRange1.Sheet == rApiRange2.Sheet);
-}
-
-inline bool operator!=(
- const css::table::CellRangeAddress& rApiRange1,
- const css::table::CellRangeAddress& rApiRange2 )
-{
- return !(rApiRange1 == rApiRange2);
-}
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index fb52ffa63326..2deb35e5517d 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -89,10 +89,6 @@ public:
#endif
};
-bool operator == (const css::sheet::DataPilotFieldSortInfo &l, const css::sheet::DataPilotFieldSortInfo &r );
-bool operator == (const css::sheet::DataPilotFieldAutoShowInfo &l, const css::sheet::DataPilotFieldAutoShowInfo &r );
-bool operator == (const css::sheet::DataPilotFieldReference &l, const css::sheet::DataPilotFieldReference &r );
-
class SC_DLLPUBLIC ScDPSaveDimension
{
private:
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 77318b1ef699..22c3ba58ba89 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -1501,23 +1501,4 @@ void ScDPSaveData::DimensionsChanged()
mpDimOrder.reset();
}
-bool operator == (const css::sheet::DataPilotFieldSortInfo &l, const css::sheet::DataPilotFieldSortInfo &r )
-{
- return l.Field == r.Field && l.IsAscending == r.IsAscending && l.Mode == r.Mode;
-}
-bool operator == (const css::sheet::DataPilotFieldAutoShowInfo &l, const css::sheet::DataPilotFieldAutoShowInfo &r )
-{
- return l.IsEnabled == r.IsEnabled &&
- l.ShowItemsMode == r.ShowItemsMode &&
- l.ItemCount == r.ItemCount &&
- l.DataField == r.DataField;
-}
-bool operator == (const css::sheet::DataPilotFieldReference &l, const css::sheet::DataPilotFieldReference &r )
-{
- return l.ReferenceType == r.ReferenceType &&
- l.ReferenceField == r.ReferenceField &&
- l.ReferenceItemType == r.ReferenceItemType &&
- l.ReferenceItemName == r.ReferenceItemName;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index ffc7898f3f16..d776f068bda2 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1463,19 +1463,6 @@ bool ApiBorderData::hasAnyOuterBorder() const
( ( lcl_isBorder( maRight ) && maRight.OuterLineWidth > 0 ) );
}
-namespace {
-
-bool operator==( const BorderLine& rLeft, const BorderLine& rRight )
-{
- return
- (rLeft.Color == rRight.Color) &&
- (rLeft.InnerLineWidth == rRight.InnerLineWidth) &&
- (rLeft.OuterLineWidth == rRight.OuterLineWidth) &&
- (rLeft.LineDistance == rRight.LineDistance);
-}
-
-} // namespace
-
bool operator==( const ApiBorderData& rLeft, const ApiBorderData& rRight )
{
return
diff --git a/sfx2/qa/cppunit/test_metadatable.cxx b/sfx2/qa/cppunit/test_metadatable.cxx
index faada3c8ae6a..593e4fb98776 100644
--- a/sfx2/qa/cppunit/test_metadatable.cxx
+++ b/sfx2/qa/cppunit/test_metadatable.cxx
@@ -86,11 +86,6 @@ public:
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override { return nullptr; }
};
-static bool operator==(beans::StringPair p1, beans::StringPair p2)
-{
- return p1.First == p2.First && p1.Second == p2.Second;
-}
-
void MetadatableTest::test()
{
std::unique_ptr< ::sfx2::IXmlIdRegistry > const pReg(
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 6287e7141b3e..0b7877beee6f 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -90,19 +90,6 @@ struct CustomProperty
m_sName( sName ), m_aValue( rValue ) {}
};
-static
-bool operator==(const util::DateTime &i_rLeft, const util::DateTime &i_rRight)
-{
- return i_rLeft.Year == i_rRight.Year
- && i_rLeft.Month == i_rRight.Month
- && i_rLeft.Day == i_rRight.Day
- && i_rLeft.Hours == i_rRight.Hours
- && i_rLeft.Minutes == i_rRight.Minutes
- && i_rLeft.Seconds == i_rRight.Seconds
- && i_rLeft.NanoSeconds == i_rRight.NanoSeconds
- && i_rLeft.IsUTC == i_rRight.IsUTC;
-}
-
SfxPoolItem* SfxDocumentInfoItem::CreateDefault() { return new SfxDocumentInfoItem; }
const sal_uInt16 HI_NAME = 1;
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index cfdb4d9bf23d..686c57d8e8cc 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -391,19 +391,6 @@ public:
}
};
-bool operator== (const css::util::DateTime &i_rLeft,
- const css::util::DateTime &i_rRight)
-{
- return i_rLeft.Year == i_rRight.Year
- && i_rLeft.Month == i_rRight.Month
- && i_rLeft.Day == i_rRight.Day
- && i_rLeft.Hours == i_rRight.Hours
- && i_rLeft.Minutes == i_rRight.Minutes
- && i_rLeft.Seconds == i_rRight.Seconds
- && i_rLeft.NanoSeconds == i_rRight.NanoSeconds
- && i_rLeft.IsUTC == i_rRight.IsUTC;
-}
-
// NB: keep these two arrays in sync!
const char* s_stdStatAttrs[] = {
"meta:page-count",
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index ff3e23fb5f25..8e8cc0808d56 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -41,28 +41,6 @@ using namespace ::com::sun::star;
/// Invalid value for date to create invalid instance of TimeStamp.
#define TIMESTAMP_INVALID_UTILDATE (util::Date(1, 1, 1601))
-static
-bool operator==(const util::DateTime &i_rLeft, const util::DateTime &i_rRight)
-{
- return i_rLeft.Year == i_rRight.Year
- && i_rLeft.Month == i_rRight.Month
- && i_rLeft.Day == i_rRight.Day
- && i_rLeft.Hours == i_rRight.Hours
- && i_rLeft.Minutes == i_rRight.Minutes
- && i_rLeft.Seconds == i_rRight.Seconds
- && i_rLeft.NanoSeconds == i_rRight.NanoSeconds
- && i_rLeft.IsUTC == i_rRight.IsUTC;
-}
-
-static
-bool operator==(const util::Date &i_rLeft, const util::Date &i_rRight)
-{
- return i_rLeft.Year == i_rRight.Year
- && i_rLeft.Month == i_rRight.Month
- && i_rLeft.Day == i_rRight.Day;
-}
-
-
/** Property representing a signed 32-bit integer value. */
class SfxOleInt32Property : public SfxOlePropertyBase
{
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 994aea1007e5..d234969f52d0 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -232,7 +232,7 @@ SfxPoolItem* SvxSearchItem::Clone( SfxItemPool *) const
//! used below
-static bool operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
+static bool equalsWithoutLocale( const SearchOptions& rItem1, const SearchOptions& rItem2 )
{
return rItem1.algorithmType == rItem2.algorithmType &&
rItem1.searchFlag == rItem2.searchFlag &&
@@ -262,7 +262,7 @@ bool SvxSearchItem::operator==( const SfxPoolItem& rItem ) const
( m_nCellType == rSItem.m_nCellType ) &&
( m_nAppFlag == rSItem.m_nAppFlag ) &&
( m_bAsianOptions == rSItem.m_bAsianOptions ) &&
- ( m_aSearchOpt == rSItem.m_aSearchOpt ) &&
+ ( equalsWithoutLocale(m_aSearchOpt,rSItem.m_aSearchOpt )) &&
( m_bNotes == rSItem.m_bNotes );
}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index dd56ccebb715..d8d0ea386ab5 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -91,26 +91,6 @@ namespace svt
return _rStorage;
}
-
- bool operator == ( const util::DateTime& _rLHS, const util::DateTime& _rRHS )
- {
- return _rLHS.NanoSeconds == _rRHS.NanoSeconds
- && _rLHS.Seconds == _rRHS.Seconds
- && _rLHS.Minutes == _rRHS.Minutes
- && _rLHS.Hours == _rRHS.Hours
- && _rLHS.Day == _rRHS.Day
- && _rLHS.Month == _rRHS.Month
- && _rLHS.Year == _rRHS.Year
- && _rLHS.IsUTC == _rRHS.IsUTC;
- }
-
-
- bool operator != ( const util::DateTime& _rLHS, const util::DateTime& _rRHS )
- {
- return !( _rLHS == _rRHS );
- }
-
-
//= TemplateContent
struct TemplateContent;
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 10899e920301..a75a10ddd879 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1902,7 +1902,7 @@ void FmXGridPeer::setProperty( const OUString& PropertyName, const Any& Value) t
if (Value >>= aFont)
{
vcl::Font aNewVclFont;
- if (::comphelper::operator!=(aFont, ::comphelper::getDefaultFont())) // ist das der Default
+ if (aFont != ::comphelper::getDefaultFont()) // ist das der Default
aNewVclFont = ImplCreateFont( aFont );
// need to add relief and emphasis (they're stored in a VCL-Font, but not in a FontDescriptor
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index ec023935a860..de6fcaa44b7d 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -74,7 +74,7 @@ namespace vcl
namespace
{
- inline bool operator==( const rendering::IntegerBitmapLayout& rLHS,
+ inline bool equalsLayout( const rendering::IntegerBitmapLayout& rLHS,
const rendering::IntegerBitmapLayout& rRHS )
{
return
@@ -85,7 +85,6 @@ namespace vcl
rLHS.Palette == rRHS.Palette &&
rLHS.IsMsbFirst == rRHS.IsMsbFirst;
}
-
bool readBmp( sal_Int32 nWidth,
sal_Int32 nHeight,
const rendering::IntegerBitmapLayout& rLayout,
@@ -111,7 +110,7 @@ namespace vcl
// re-read bmp from the start
return false;
}
- if( !(aCurrLayout == rLayout) )
+ if( !equalsLayout(aCurrLayout, rLayout) )
return false; // re-read bmp from the start
if( rAlphaAcc.get() )
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx
index f556c0d42b72..3aecf06b96d7 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -42,13 +42,6 @@ static inline bool lcl_HasSameLineWidth( const table::BorderLine2& rLine1, const
(rLine1.LineWidth == rLine2.LineWidth);
}
-inline bool operator==( const table::BorderLine2& rLine1, const table::BorderLine2& rLine2 )
-{
- return (rLine1.Color == rLine2.Color) &&
- lcl_HasSameLineWidth( rLine1, rLine2 ) &&
- ( rLine1.LineStyle == rLine2.LineStyle );
-}
-
static inline void lcl_RemoveState( XMLPropertyState* pState )
{
pState->mnIndex = -1;