diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-31 04:29:49 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-08-31 15:50:15 +0200 |
commit | 10efe1bcedfa450e95cbc3f08642d239ba2ab579 (patch) | |
tree | 0a73f7867ad55e389e19355fe76b97254150d96e | |
parent | 3cf91a21fc5089fb7f051bf8a04d2049da88179f (diff) |
handle missing cond format entries more gracefully, related fdo#52340
Change-Id: Id1cf7d99a13c04541e87ad00c5418dd4f766d268
-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 12c9212bbb8e..afb9c6b26935 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -669,6 +669,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 |