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>
This commit is contained in:
@@ -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 );
|
||||
|
@@ -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++)
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user