[Libreoffice-commits] core.git: chart2/source codemaker/source comphelper/source connectivity/source extensions/source i18npool/inc i18npool/source include/comphelper lingucomponent/source linguistic/source reportdesign/source sc/inc sc/source sfx2/qa sfx2/source svl/source svtools/source svx/source vcl/source xmloff/source

Noel Grandin noel at peralex.com
Thu Feb 11 06:22:52 UTC 2016


 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx |   10 -
 chart2/source/inc/CommonConverters.hxx                               |    5 
 chart2/source/tools/CommonConverters.cxx                             |    8 -
 codemaker/source/cppumaker/cpputype.cxx                              |   63 ++++++++++
 comphelper/source/misc/types.cxx                                     |   21 ---
 connectivity/source/commontools/FValue.cxx                           |   19 ---
 extensions/source/propctrlr/eventhandler.cxx                         |   10 -
 i18npool/inc/localedata.hxx                                          |    6 
 i18npool/source/breakiterator/breakiteratorImpl.cxx                  |    4 
 i18npool/source/textconversion/textconversionImpl.cxx                |    4 
 include/comphelper/types.hxx                                         |    9 -
 lingucomponent/source/lingutil/lingutil.hxx                          |    7 -
 linguistic/source/convdiclist.cxx                                    |    7 -
 reportdesign/source/core/api/ReportControlModel.cxx                  |   21 ---
 reportdesign/source/core/inc/ReportControlModel.hxx                  |    7 -
 sc/inc/convuno.hxx                                                   |   29 ----
 sc/inc/dpsave.hxx                                                    |    4 
 sc/source/core/data/dpsave.cxx                                       |   19 ---
 sc/source/filter/oox/stylesbuffer.cxx                                |   13 --
 sfx2/qa/cppunit/test_metadatable.cxx                                 |    5 
 sfx2/source/dialog/dinfdlg.cxx                                       |   13 --
 sfx2/source/doc/SfxDocumentMetaData.cxx                              |   13 --
 sfx2/source/doc/oleprops.cxx                                         |   22 ---
 svl/source/items/srchitem.cxx                                        |    4 
 svtools/source/misc/templatefoldercache.cxx                          |   20 ---
 svx/source/fmcomp/fmgridif.cxx                                       |    2 
 vcl/source/helper/canvastools.cxx                                    |    5 
 xmloff/source/style/PageMasterExportPropMapper.cxx                   |    7 -
 28 files changed, 68 insertions(+), 289 deletions(-)

New commits:
commit 0f8ec3036f44b02aa03795ede3052a790134a90d
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Feb 10 08:43:01 2016 +0200

    [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 at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index cedab39..e22ce76 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 7b42b7f..46288be 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 8571f94..436c105 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 98510c3..1f98590 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 a6bbeff..e70e19e 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 be18ec2..50dbd0a 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 7eac6de..d2ac643 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 d61b92c..0a28ee0 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 6d6e1c6..ac7a861 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 96d7760..2386d44 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 608b21c..0279ccb 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 e0efb95..a6d3962 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 8b028a3..a977062 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 9c1e2e1..3f9d203 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 48b4570..dc855ad 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 897479b..aee327d 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 fb52ffa..2deb35e 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 77318b1..22c3ba5 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 ffc7898..d776f06 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 faada3c..593e4fb 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 6287e71..0b7877b 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 cfdb4d9..686c57d 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 ff3e23f..8e8cc08 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 994aea1..d234969 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 dd56cce..d8d0ea3 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 10899e9..a75a10d 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 ec02393..de6fcaa 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 f556c0d..3aecf06 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;


More information about the Libreoffice-commits mailing list