[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 27 07:27:51 PST 2016


 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   18 ++++++++-------
 writerfilter/source/dmapper/DomainMapperTableHandler.hxx |    2 -
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 697007006fcad5d0603a53d3a3841bf9136f76dc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 27 16:25:45 2016 +0100

    writerfilter: uno::Sequence -> std::vector for table cell ranges
    
    Change-Id: I858aa0f97d70f245cf5a3d24909de512b33b1249

diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 95168fa..b7363b6 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1188,10 +1188,11 @@ void DomainMapperTableHandler::startCell(const css::uno::Reference< css::text::X
 #endif
 
     //add a new 'row' of properties
-    m_aCellSeq = CellSequence_t(2);
-    if (!start.get())
-        return;
-    m_aCellSeq[0] = start->getStart();
+    m_aCellRange.clear();
+    uno::Reference<text::XTextRange> xStart;
+    if (start.get())
+        xStart = start->getStart();
+    m_aCellRange.push_back(xStart);
 }
 
 void DomainMapperTableHandler::endCell(const css::uno::Reference< css::text::XTextRange > & end)
@@ -1203,10 +1204,11 @@ void DomainMapperTableHandler::endCell(const css::uno::Reference< css::text::XTe
     TagLogger::getInstance().endElement();
 #endif
 
-    if (!end.get())
-        return;
-    m_aCellSeq[1] = end->getEnd();
-    m_aRowSeq[m_nCellIndex] = m_aCellSeq;
+    uno::Reference<text::XTextRange> xEnd;
+    if (end.get())
+        xEnd = end->getEnd();
+    m_aCellRange.push_back(xEnd);
+    m_aRowSeq[m_nCellIndex] = comphelper::containerToSequence(m_aCellRange);
     ++m_nCellIndex;
 }
 
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
index 669ea30ef..fd48aa3 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx
@@ -62,7 +62,7 @@ class DomainMapperTableHandler
 {
     css::uno::Reference<css::text::XTextAppendAndConvert>  m_xText;
     DomainMapper_Impl&      m_rDMapper_Impl;
-    CellSequence_t m_aCellSeq;
+    std::vector< css::uno::Reference<css::text::XTextRange> > m_aCellRange;
     RowSequence_t    m_aRowSeq;
     TableSequence_t m_aTableSeq;
 


More information about the Libreoffice-commits mailing list