Kaydet (Commit) c5d4e2cf authored tarafından Markus Mohrhard's avatar Markus Mohrhard

fetime of mpCondFormat is more complex, fdo#55379

Change-Id: I2b34f9fefdfdfa245ab73f8691090cbde8bcd34e
üst a705c6ca
......@@ -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);
......
......@@ -101,6 +101,7 @@ class XMLTableStyleContext : public XMLPropStyleContext
SCTAB nLastSheet;
bool bParentSet;
ScConditionalFormat* mpCondFormat;
bool mbDeleteCondFormat;
const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment