summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-01 11:32:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-06 16:28:17 +0200
commit5c365c62aafc12f16bfcfe3804f95f2bb45c7421 (patch)
treed85976cea2f125db22f500003aea2b1cc332fec4
parent64f673238cf9b645a751e8f8137ca14e595a779a (diff)
cid#1509199 silence Constant expression result
rename IsEqualData -> HasSameData Change-Id: I6294c847c284888e5537e04dc4f84314586c4b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139514 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/inc/autoform.hxx2
-rw-r--r--sc/source/core/data/table4.cxx8
-rw-r--r--sc/source/core/tool/autoform.cxx2
3 files changed, 6 insertions, 6 deletions
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 15df248510d5..ee57b435f090 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -163,7 +163,7 @@ public:
const ScNumFormatAbbrev& GetNumFormat( sal_uInt16 nIndex ) const;
- bool IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const;
+ bool HasSameData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const;
void FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, const ScDocument& rDoc ) const;
void GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat );
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 64a73215d70f..6cf97e5d9caf 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -2617,7 +2617,7 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
// Left top corner
AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo);
// Left column
- if (pData->IsEqualData(4, 8))
+ if (pData->HasSameData(4, 8))
AutoFormatArea(nStartCol, nStartRow + 1, nStartCol, nEndRow - 1, *pPatternAttrs[4], nFormatNo);
else
{
@@ -2641,7 +2641,7 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
nIndex = 3;
AutoFormatArea(nCol, nRow, nCol, nRow, *pPatternAttrs[nIndex], nFormatNo);
// Right column
- if (pData->IsEqualData(7, 11))
+ if (pData->HasSameData(7, 11))
AutoFormatArea(nEndCol, nStartRow + 1, nEndCol, nEndRow - 1, *pPatternAttrs[7], nFormatNo);
else
{
@@ -2681,11 +2681,11 @@ void ScTable::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW
nIndex = 13;
}
// Body
- if ((pData->IsEqualData(5, 6)) && (pData->IsEqualData(9, 10)) && (pData->IsEqualData(5, 9)))
+ if ((pData->HasSameData(5, 6)) && (pData->HasSameData(9, 10)) && (pData->HasSameData(5, 9)))
AutoFormatArea(nStartCol + 1, nStartRow + 1, nEndCol-1, nEndRow - 1, *pPatternAttrs[5], nFormatNo);
else
{
- if ((pData->IsEqualData(5, 9)) && (pData->IsEqualData(6, 10)))
+ if ((pData->HasSameData(5, 9)) && (pData->HasSameData(6, 10)))
{
nIndex = 5;
for (nCol = nStartCol + 1; nCol < nEndCol; nCol++)
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 55676816bc15..32fde79e5735 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -378,7 +378,7 @@ const ScNumFormatAbbrev& ScAutoFormatData::GetNumFormat( sal_uInt16 nIndex ) con
return GetField( nIndex ).GetNumFormat();
}
-bool ScAutoFormatData::IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const
+bool ScAutoFormatData::HasSameData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const
{
bool bEqual = true;
const ScAutoFormatDataField& rField1 = GetField( nIndex1 );