diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-09 09:29:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-09 12:42:34 +0200 |
commit | e933ffe1b863128471353c5d5e439bddccea4975 (patch) | |
tree | ce037c4615da8c9312fe5d412e4dd38f4cabfa82 /sc | |
parent | 17f84b71233f67809946073ccea7c43812bf648a (diff) |
cid#1448346 Improper use of negative value
Change-Id: I30b1bf8fd1dcbbdf0804f33b04133bf450eced55
Reviewed-on: https://gerrit.libreoffice.org/80526
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xepivotxml.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index dcf18e6e2b0a..d2dedf012c46 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -523,9 +523,12 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( XclExpXmlStream& rStrm, const Entr ScDPSaveData* pSaveData = pDPObject->GetSaveData(); assert(pSaveData); + const ScDPSaveGroupDimension* pDim = pSaveData->GetDimensionData()->GetNamedGroupDim(aName); assert(pDim); - const size_t nBase = rCache.GetDimensionIndex(pDim->GetSourceDimName()); + + const SCCOL nBase = rCache.GetDimensionIndex(pDim->GetSourceDimName()); + assert(nBase >= 0); pDefStrm->startElement(XML_cacheField, XML_name, aName.toUtf8(), XML_numFmtId, OString::number(0), XML_databaseField, ToPsz10(false)); |