Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 09/05/2012 05:57 PM, Libreoffice Gerrit user wrote:
commit bedbb471c3f49e0860dd63b17c1faeee837096ae
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Mon Sep 3 19:30:26 2012 +0200

     better import of conditional format from old ODF structure

     The old ODF storage is style based and so the sam cond format can be
     divided up into several single stlyes which resulted in several new
     style cond formats.

     Now we check for old stlye cond formats if there is a equal cond format
     and in this case just extend the area. This should make it easier to
     transform old documents into the new range based cond formats.

     Change-Id: I51a5148922e19e6860de9915abfc59d49b18d96e

diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 1ef7cda..5776d72 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -492,13 +408,11 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext(
      if( (XML_NAMESPACE_STYLE == nPrefix) &&
          IsXMLToken(rLocalName, XML_MAP ) )
      {
-        pContext = new ScXMLMapContext(GetImport(), nPrefix, rLocalName, xAttrList);
-
-        ScXMLMapContent aMap;
-        aMap.sCondition = ((ScXMLMapContext*)pContext)->GetCondition();
-        aMap.sApplyStyle = ((ScXMLMapContext*)pContext)->GetApplyStyle();
-        aMap.sBaseCell = ((ScXMLMapContext*)pContext)->GetBaseCell();
-        aMaps.push_back(aMap);
+        if(!mpCondFormat)
+            mpCondFormat = new ScConditionalFormat( 0, GetScImport().GetDocument() );
+        ScXMLMapContext* pMapContext = new ScXMLMapContext(GetImport(), nPrefix, rLocalName, 
xAttrList);
+        pContext = pContext;

Should that rather be pContext = pMapContext?

Stephan

+        mpCondFormat->AddEntry(pMapContext->CreateConditionEntry());
      }
      if (!pContext)
          pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName,


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.