diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-31 04:29:49 +0200 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-31 10:23:54 -0400 |
commit | 4bcd9947774c05df6031e3b2228939150aa8c78b (patch) | |
tree | 05d7c7a65b443b1ced97ea95d73e31d6906fde9a | |
parent | c3148ae81b8458624b7ee829d34629dea29f8cdf (diff) |
handle missing cond format entries more gracefully, related fdo#52340
Change-Id: Id1cf7d99a13c04541e87ad00c5418dd4f766d268
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
-rw-r--r-- | sc/source/core/data/table2.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 9dd2afbb4f33..21d9307f89d4 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -667,6 +667,12 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO if (aOldIdToNewId.find(nId) == aOldIdToNewId.end()) { ScConditionalFormat* pFormat = pOldCondFormatList->GetFormat(nId); + if(!pFormat) + { + // may happen in some strange circumstances where cell storage and + // cond format storage are not in sync + continue; + } ScConditionalFormat* pNewFormat = pFormat->Clone(pDocument); pNewFormat->SetKey(0); //not in list => create entries in both maps and new format |