[Libreoffice-commits] .: Branch 'feature/calc-xml-source' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 3 07:00:46 PDT 2012


 sc/source/filter/orcus/orcusfiltersimpl.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit a017989394f3e420647678d0b7e8eb882794c6ed
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Oct 3 10:00:36 2012 -0400

    Pass the 'repeat' flag of each element too, for recurring elements.
    
    Change-Id: I2d5ad0724b45d448b18a04ec58f5f06c7aa86e2b

diff --git a/sc/source/filter/orcus/orcusfiltersimpl.cxx b/sc/source/filter/orcus/orcusfiltersimpl.cxx
index b07647b..721e5ee 100644
--- a/sc/source/filter/orcus/orcusfiltersimpl.cxx
+++ b/sc/source/filter/orcus/orcusfiltersimpl.cxx
@@ -175,8 +175,10 @@ bool ScOrcusFiltersImpl::importCSV(ScDocument& rDoc, const OUString& rPath) cons
 
 void populateTree(
    SvTreeListBox& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
-   const orcus::xml_structure_tree::element_name& rElemName, SvLBoxEntry* pParent)
+   const orcus::xml_structure_tree::element_name& rElemName, bool bRepeat, SvLBoxEntry* pParent)
 {
+    // TODO: Make use of bRepeat flag.
+
     OUString aName(rElemName.name.get(), rElemName.name.size(), RTL_TEXTENCODING_UTF8);
     SvLBoxEntry* pEntry = rTreeCtrl.InsertEntry(aName, pParent);
     if (pParent)
@@ -189,8 +191,8 @@ void populateTree(
     orcus::xml_structure_tree::element_names_type::const_iterator itEnd = aChildElements.end();
     for (; it != itEnd; ++it)
     {
-        rWalker.descend(*it);
-        populateTree(rTreeCtrl, rWalker, *it, pEntry);
+        orcus::xml_structure_tree::element aElem = rWalker.descend(*it);
+        populateTree(rTreeCtrl, rWalker, *it, aElem.repeat, pEntry);
         rWalker.ascend();
     }
 }
@@ -220,7 +222,7 @@ bool ScOrcusFiltersImpl::loadXMLStructure(const OUString& rPath, SvTreeListBox&
 
         // Root element.
         orcus::xml_structure_tree::element aElem = aWalker.root();
-        populateTree(rTreeCtrl, aWalker, aElem.name, NULL);
+        populateTree(rTreeCtrl, aWalker, aElem.name, aElem.repeat, NULL);
     }
     catch (const std::exception&)
     {


More information about the Libreoffice-commits mailing list