[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Sat Sep 23 18:54:02 UTC 2017
sc/source/core/data/fillinfo.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 7ef066a63376995b0b5e9c6085653a585804bc4c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 23 16:16:17 2017 +0100
coverity#1418341 Dereference after null check
Change-Id: I525895b3a37a52e05a06ad4f2e1663ecd9d7ce52
Reviewed-on: https://gerrit.libreoffice.org/42692
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index d2a771e82cc3..0d3a6bc36967 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -286,7 +286,7 @@ void initColWidths(RowInfo* pRowInfo, const ScDocument* pDoc, double fColScale,
}
}
-bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const std::vector<sal_uInt32>& rCondFormats,
+bool handleConditionalFormat(ScConditionalFormatList& rCondFormList, const std::vector<sal_uInt32>& rCondFormats,
CellInfo* pInfo, ScStyleSheetPool* pStlPool,
const ScAddress& rAddr, bool& bHidden, bool& bHideFormula, bool bTabProtect)
{
@@ -295,7 +295,7 @@ bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const std::
for(std::vector<sal_uInt32>::const_iterator itr = rCondFormats.begin();
itr != rCondFormats.end() && !bFound; ++itr)
{
- ScConditionalFormat* pCondForm = pCondFormList->GetFormat(*itr);
+ ScConditionalFormat* pCondForm = rCondFormList.GetFormat(*itr);
if(!pCondForm)
continue;
@@ -438,7 +438,7 @@ void ScDocument::FillInfo(
initColWidths(pRowInfo, this, fColScale, nTab, nCol2, nRotMax);
ScConditionalFormatList* pCondFormList = GetCondFormList(nTab);
- if(pCondFormList)
+ if (pCondFormList)
pCondFormList->startRendering();
for (SCCOL nArrCol=0; nArrCol<=nCol2+2; nArrCol++) // left & right + 1
@@ -584,9 +584,9 @@ void ScDocument::FillInfo(
pThisRowInfo->bEmptyBack = false;
}
- if (bContainsCondFormat)
+ if (bContainsCondFormat && pCondFormList)
{
- bAnyCondition |= handleConditionalFormat(pCondFormList, rCondFormats, pInfo, pStlPool, ScAddress(nX, nCurRow, nTab),
+ bAnyCondition |= handleConditionalFormat(*pCondFormList, rCondFormats, pInfo, pStlPool, ScAddress(nX, nCurRow, nTab),
bHidden, bHideFormula, bTabProtect);
}
@@ -653,7 +653,7 @@ void ScDocument::FillInfo(
// STD_COL_WIDTH farthest to the left and right is needed for DrawExtraShadow
}
- if(pCondFormList)
+ if (pCondFormList)
pCondFormList->endRendering();
// bedingte Formatierung auswerten
More information about the Libreoffice-commits
mailing list