diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-11-05 14:34:27 +0100 |
commit | ef15a5a4acd3174752484c6aeb570d4d6444b645 (patch) | |
tree | 3d1d5b58f85737aa46241aea4c4dabea520cecc2 /sc/source/filter/xml/xmlstyli.cxx | |
parent | a1b0ce05e851e9724c046888a01869eddf9e9db2 (diff) | |
parent | c309ce0227a14330094191c1ef15fa00899defcb (diff) |
Merge remote-tracking branch 'origin/libreoffice-3-6-3' into suse-3.6
Conflicts:
desktop/source/app/sofficemain.cxx
instsetoo_native/util/openoffice.lst
solenv/inc/minor.mk
Change-Id: I3e9510067c7173f6c71368e70ba6dfe168c5318e
Diffstat (limited to 'sc/source/filter/xml/xmlstyli.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 7388d86e283f..59d1fe43749e 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -392,12 +392,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( @@ -444,11 +447,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(); @@ -464,12 +462,13 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequence<table::CellRangeAddres aMarkData.MarkFromRangeList(rRange, true); pDoc->ApplySelectionPattern( aPattern , aMarkData); - break; + return; } } - if(mpCondFormat) + if(mpCondFormat && mbDeleteCondFormat) { + mbDeleteCondFormat = false; sal_uLong nIndex = pDoc->AddCondFormat(mpCondFormat, nTab ); mpCondFormat->SetKey(nIndex); mpCondFormat->AddRange(rRange); |