diff options
author | David Tardon <dtardon@redhat.com> | 2015-06-19 13:52:49 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-06-19 13:55:27 +0200 |
commit | b12cd99fd46e81e710479e2530e80c75404f3443 (patch) | |
tree | 6974af14523cea45d3c1cbcd983b58b65268b3cf /sc | |
parent | ab9663ed187ba4776d9ff3d9c21f83eed478a268 (diff) |
rhbz#1233420 handle inexistent cond. format
Change-Id: I3fbbd0f3b42a3be1c2a9c54eb8f35dd18f550b16
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/table4.cxx | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index a1bc8ee56cd5..bc8e40e1d020 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -618,9 +618,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, itr != itrEnd; ++itr) { ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); - ScRangeList aRange = pCondFormat->GetRange(); - aRange.Join(ScRange(nCol, nY1, nTab, nCol, nY2, nTab)); - pCondFormat->SetRange(aRange); + if (pCondFormat) + { + ScRangeList aRange = pCondFormat->GetRange(); + aRange.Join(ScRange(nCol, nY1, nTab, nCol, nY2, nTab)); + pCondFormat->SetRange(aRange); + } } } @@ -648,9 +651,12 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, itr != itrEnd; ++itr) { ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); - ScRangeList aRange = pCondFormat->GetRange(); - aRange.Join(ScRange(nCol, nRow, nTab, nCol, nRow, nTab)); - pCondFormat->SetRange(aRange); + if (pCondFormat) + { + ScRangeList aRange = pCondFormat->GetRange(); + aRange.Join(ScRange(nCol, nRow, nTab, nCol, nRow, nTab)); + pCondFormat->SetRange(aRange); + } } } @@ -1568,9 +1574,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, itr != itrEnd; ++itr) { ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); - ScRangeList aRange = pCondFormat->GetRange(); - aRange.Join(ScRange(nCol, nIMin, nTab, nCol, nIMax, nTab)); - pCondFormat->SetRange(aRange); + if (pCondFormat) + { + ScRangeList aRange = pCondFormat->GetRange(); + aRange.Join(ScRange(nCol, nIMin, nTab, nCol, nIMax, nTab)); + pCondFormat->SetRange(aRange); + } } } else @@ -1585,9 +1594,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, itr != itrEnd; ++itr) { ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); - ScRangeList aRange = pCondFormat->GetRange(); - aRange.Join(ScRange(nCol, nAtRow, nTab, nCol, nAtRow, nTab)); - pCondFormat->SetRange(aRange); + if (pCondFormat) + { + ScRangeList aRange = pCondFormat->GetRange(); + aRange.Join(ScRange(nCol, nAtRow, nTab, nCol, nAtRow, nTab)); + pCondFormat->SetRange(aRange); + } } } } @@ -1603,9 +1615,12 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, itr != itrEnd; ++itr) { ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); - ScRangeList aRange = pCondFormat->GetRange(); - aRange.Join(ScRange(nAtCol, static_cast<SCROW>(nRow), nTab, nAtCol, static_cast<SCROW>(nRow), nTab)); - pCondFormat->SetRange(aRange); + if (pCondFormat) + { + ScRangeList aRange = pCondFormat->GetRange(); + aRange.Join(ScRange(nAtCol, static_cast<SCROW>(nRow), nTab, nAtCol, static_cast<SCROW>(nRow), nTab)); + pCondFormat->SetRange(aRange); + } } } } |