summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 10:47:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-12 11:05:36 +0100
commit1be9938157ab91ab16b938eaf2062651f09a0d69 (patch)
treeb529535cacf313cd8e20f9a5333c4e10de278678 /sw
parent8e173a965d5684372e3fe0ee3d3599032bcb86c2 (diff)
comparison operators should be const
Change-Id: Ifa76e004128223460945d58d1c59c4e23db0f108 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90370 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/inc/tblafmt.hxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/inc/txmsrt.hxx4
-rw-r--r--sw/source/uibase/inc/cnttab.hxx2
6 files changed, 7 insertions, 7 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index fdbde3632a19..be11b793f1af 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -36,7 +36,7 @@ friend class SwAuthorityFieldType;
public:
SwAuthEntry() = default;
SwAuthEntry( const SwAuthEntry& rCopy );
- bool operator==(const SwAuthEntry& rComp);
+ bool operator==(const SwAuthEntry& rComp) const;
inline OUString const & GetAuthorField(ToxAuthorityField ePos) const;
inline void SetAuthorField(ToxAuthorityField ePos,
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index bf6719833766..f9073edff8c5 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -67,7 +67,7 @@ public:
SwBoxAutoFormat& operator=(const SwBoxAutoFormat& rRef);
/// Comparing based of boxes backgrounds.
- bool operator==(const SwBoxAutoFormat& rRight);
+ bool operator==(const SwBoxAutoFormat& rRight) const;
// The get-methods.
const SvxFrameDirectionItem& GetTextOrientation() const { return *m_aTextOrientation; }
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 58756cce6d7f..474a7a7bfd09 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -304,7 +304,7 @@ SwBoxAutoFormat& SwBoxAutoFormat::operator=(const SwBoxAutoFormat& rRef)
return *this;
}
-bool SwBoxAutoFormat::operator==(const SwBoxAutoFormat& rRight)
+bool SwBoxAutoFormat::operator==(const SwBoxAutoFormat& rRight) const
{
return GetBackground().GetColor() == rRight.GetBackground().GetColor();
}
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 018a6d4908f3..48a58c07b61d 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -53,7 +53,7 @@ SwAuthEntry::SwAuthEntry(const SwAuthEntry& rCopy)
m_aAuthFields[i] = rCopy.m_aAuthFields[i];
}
-bool SwAuthEntry::operator==(const SwAuthEntry& rComp)
+bool SwAuthEntry::operator==(const SwAuthEntry& rComp) const
{
for(int i = 0; i < AUTH_FIELD_END; ++i)
if(m_aAuthFields[i] != rComp.m_aAuthFields[i])
diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx
index e6d09240e3ce..df88a60a25e5 100644
--- a/sw/source/core/inc/txmsrt.hxx
+++ b/sw/source/core/inc/txmsrt.hxx
@@ -119,8 +119,8 @@ public:
*/
struct SwTOXSortTabBase
{
- bool operator==(const SwTOXSortTabBase&) = delete;
- bool operator<(const SwTOXSortTabBase&) = delete;
+ bool operator==(const SwTOXSortTabBase&) const = delete;
+ bool operator<(const SwTOXSortTabBase&) const = delete;
std::vector<SwTOXSource> aTOXSources;
css::lang::Locale aLocale;
diff --git a/sw/source/uibase/inc/cnttab.hxx b/sw/source/uibase/inc/cnttab.hxx
index 9e5e132e512c..e95cc5c62b96 100644
--- a/sw/source/uibase/inc/cnttab.hxx
+++ b/sw/source/uibase/inc/cnttab.hxx
@@ -41,7 +41,7 @@ struct CurTOXType
TOXTypes eType;
sal_uInt16 nIndex; //for TOX_USER only
- bool operator==(const CurTOXType& rCmp)
+ bool operator==(const CurTOXType& rCmp) const
{
return eType == rCmp.eType && nIndex == rCmp.nIndex;
}