diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-28 20:14:17 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-09-28 20:17:05 +0200 |
commit | c5d4e2cf96e5c28634ed6968f87b476e8a2a5850 (patch) | |
tree | ef12d74339b5da9400d304f9d5ebaa32ec60344a /sc/source/filter/xml/xmlstyli.cxx | |
parent | halt corrupted styles with multi-saved xlsx document fdo#55418 (diff) | |
download | core-c5d4e2cf96e5c28634ed6968f87b476e8a2a5850.tar.gz core-c5d4e2cf96e5c28634ed6968f87b476e8a2a5850.zip |
fetime of mpCondFormat is more complex, fdo#55379
Change-Id: I2b34f9fefdfdfa245ab73f8691090cbde8bcd34e
Diffstat (limited to 'sc/source/filter/xml/xmlstyli.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index a05276fd5373..2b6c58b2615e 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -390,12 +390,15 @@ XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport, nNumberFormat(-1), nLastSheet(-1), bParentSet(false), - mpCondFormat(NULL) + mpCondFormat(NULL), + mbDeleteCondFormat(true) { } XMLTableStyleContext::~XMLTableStyleContext() { + if(mbDeleteCondFormat) + delete mpCondFormat; } SvXMLImportContext *XMLTableStyleContext::CreateChildContext( @@ -442,11 +445,6 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequence<table::CellRangeAddres { if(itr->EqualEntries(*mpCondFormat)) { - // we don't need the new cond format entry now - // the found one is the same and we just need to add the range to it - delete mpCondFormat; - mpCondFormat = NULL; - ScRangeList& rRangeList = itr->GetRangeList(); sal_uInt32 nCondId = itr->GetKey(); size_t n = rRange.size(); @@ -468,6 +466,7 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequence<table::CellRangeAddres if(mpCondFormat) { + mbDeleteCondFormat = false; sal_uLong nIndex = pDoc->AddCondFormat(mpCondFormat, nTab ); mpCondFormat->SetKey(nIndex); mpCondFormat->AddRange(rRange); |