lotuswordpro/qa/cppunit/data/fail/reference-2.lwp |binary
 lotuswordpro/source/filter/lwprowlayout.cxx       |    4 ++--
 lotuswordpro/source/filter/lwprowlayout.hxx       |    4 ++--
 lotuswordpro/source/filter/lwptablelayout.cxx     |   15 +++++++--------
 lotuswordpro/source/filter/lwptablelayout.hxx     |   14 +++++++-------
 5 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit 19dde56de6f4d8613f156148f1e60256a8f5172a
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu May 5 20:28:06 2016 +0100

    fftester: double use of XFTable, ref this up
    
    Change-Id: I8e0c2319b2f43b66686fbce372c5df63c75b343a

diff --git a/lotuswordpro/qa/cppunit/data/fail/reference-2.lwp 
b/lotuswordpro/qa/cppunit/data/fail/reference-2.lwp
new file mode 100644
index 0000000..d2101d8
Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/fail/reference-2.lwp 
differ
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx 
b/lotuswordpro/source/filter/lwprowlayout.cxx
index a936f0e..1e83779 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -177,7 +177,7 @@ void LwpRowLayout::Read()
  * @short   Parse rows with connect cell
  * @param  pXFTable - pointer to created XFTable
  */
-void LwpRowLayout::ConvertRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 
nEndCol)
+void LwpRowLayout::ConvertRow(rtl::Reference<XFTable> const & 
pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol)
 {
     LwpTableLayout* pTableLayout = GetParentTableLayout();
     LwpTable* pTable = pTableLayout->GetTable();
@@ -361,7 +361,7 @@ sal_uInt16 LwpRowLayout::GetCurMaxSpannedRows(sal_uInt8 
nStartCol,sal_uInt8 nEnd
  * @param   nStartCol - start column ID
  * @param   nEndCol - end column ID
  */
-void LwpRowLayout::ConvertCommonRow(XFTable* pXFTable,sal_uInt8 
nStartCol,sal_uInt8 nEndCol)
+void LwpRowLayout::ConvertCommonRow(rtl::Reference<XFTable> const & pXFTable, 
sal_uInt8 nStartCol, sal_uInt8 nEndCol)
 {
     LwpTableLayout* pTableLayout = GetParentTableLayout();
     if (!pTableLayout)
diff --git a/lotuswordpro/source/filter/lwprowlayout.hxx 
b/lotuswordpro/source/filter/lwprowlayout.hxx
index 20309d6..6494c22 100644
--- a/lotuswordpro/source/filter/lwprowlayout.hxx
+++ b/lotuswordpro/source/filter/lwprowlayout.hxx
@@ -101,8 +101,8 @@ private:
     sal_Int32 FindNextMarkConnCell(sal_uInt16 nMarkConnCell,sal_uInt8 nEndCol);
 
 public:
-    void ConvertRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol);
-    void ConvertCommonRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 
nEndCol);
+    void ConvertRow(rtl::Reference<XFTable> const & pXFTable, sal_uInt8 
nStartCol, sal_uInt8 nEndCol);
+    void ConvertCommonRow(rtl::Reference<XFTable> const & pXFTable, sal_uInt8 
nStartCol, sal_uInt8 nEndCol);
     void CollectMergeInfo();
     void SetCellSplit(sal_uInt16 nEffectRows);
     bool GetMergeCellFlag();
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index 42a8e87..4eaa7ce 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -419,7 +419,6 @@ LwpTableLayout::LwpTableLayout(LwpObjectHeader &objHdr, 
LwpSvStream* pStrm)
     , m_nCols(0)
     , m_pDefaultCellLayout(nullptr)
     , m_pColumns(nullptr)
-    , m_pXFTable(nullptr)
 {
     m_CellsMap.clear();
 }
@@ -829,7 +828,7 @@ void LwpTableLayout::Read()
 void LwpTableLayout::XFConvert(XFContentContainer* pCont)
 {
 
-    pCont->Add(m_pXFTable);
+    pCont->Add(m_pXFTable.get());
 }
 /**
  * @short   convert heading row
@@ -838,7 +837,7 @@ void LwpTableLayout::XFConvert(XFContentContainer* pCont)
  * @param  nEndRow - end heading row ID
  */
 sal_uInt16 LwpTableLayout::ConvertHeadingRow(
-        XFTable* pXFTable,sal_uInt16 nStartHeadRow,sal_uInt16 nEndHeadRow)
+        rtl::Reference<XFTable> const & pXFTable, sal_uInt16 nStartHeadRow, 
sal_uInt16 nEndHeadRow)
 {
     sal_uInt16 nContentRow;
     sal_uInt8 nCol = static_cast<sal_uInt8>(GetTable()->GetColumn());
@@ -880,7 +879,7 @@ sal_uInt16 LwpTableLayout::ConvertHeadingRow(
     return nContentRow;
 }
 
-void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable,XFTable* pXFTable,
+void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable, 
rtl::Reference<XFTable> const & pXFTable,
         sal_uInt8 nFirstColSpann,sal_uInt8* pCellMark)
 {
     sal_uInt16 i;
@@ -1059,7 +1058,7 @@ bool  LwpTableLayout::FindSplitColMark(XFTable* pXFTable, 
sal_uInt8* pCellMark,
  * @param  nStartCol - start column ID
  * @param  nEndCol - end column ID
  */
-void LwpTableLayout::ConvertTable(XFTable* pXFTable,sal_uInt16 nStartRow,
+void LwpTableLayout::ConvertTable(rtl::Reference<XFTable> const & pXFTable, 
sal_uInt16 nStartRow,
                 sal_uInt16 nEndRow,sal_uInt8 nStartCol,sal_uInt8 nEndCol)
 {
     //out put column info TO BE CHANGED
@@ -1249,7 +1248,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, 
sal_uInt16 nRowID, sal_
  * @short   Parse all cols of table
  * @param  pXFTable - pointer to created XFTable
  */
-void LwpTableLayout::ConvertColumn(XFTable *pXFTable,sal_uInt8 
nStartCol,sal_uInt8 nEndCol)
+void LwpTableLayout::ConvertColumn(rtl::Reference<XFTable> const & pXFTable, 
sal_uInt8 nStartCol, sal_uInt8 nEndCol)
 {
     LwpTable * pTable = GetTable();
     if (!pTable)
@@ -1337,8 +1336,8 @@ void LwpTableLayout::SplitConflictCells()
  * @param   nEndCol  - end column
  * @return   pXFTable
  */
-void LwpTableLayout::ConvertDefaultRow(XFTable* pXFTable,sal_uInt8 nStartCol,
-         sal_uInt8 nEndCol,sal_uInt16 nRowID)
+void LwpTableLayout::ConvertDefaultRow(rtl::Reference<XFTable> const & 
pXFTable, sal_uInt8 nStartCol,
+         sal_uInt8 nEndCol, sal_uInt16 nRowID)
 {
     // current row doesn't exist in the file
     XFRow * pRow = new XFRow();
diff --git a/lotuswordpro/source/filter/lwptablelayout.hxx 
b/lotuswordpro/source/filter/lwptablelayout.hxx
index 3dfd32f..d17f734 100644
--- a/lotuswordpro/source/filter/lwptablelayout.hxx
+++ b/lotuswordpro/source/filter/lwptablelayout.hxx
@@ -127,7 +127,7 @@ private:
 
 public:
     void XFConvert(XFContentContainer* pCont) override;
-    void ConvertTable(XFTable* pXFTable,sal_uInt16 nStartRow,
+    void ConvertTable(rtl::Reference<XFTable> const & pXFTable, sal_uInt16 
nStartRow,
                 sal_uInt16 nEndRow,sal_uInt8 nStartCol,sal_uInt8 nEndCol);
     const OUString& GetDefaultRowStyleName(){return m_DefaultRowStyleName;}
     void SetCellsMap(sal_uInt16 nRow,sal_uInt8 nCol,XFCell* pXFCell);
@@ -135,17 +135,17 @@ public:
    const  std::map<sal_uInt16,LwpRowLayout*>& GetRowsMap(){return m_RowsMap;}
     LwpRowLayout* GetRowLayout(sal_uInt16 nRow);
 private:
-    void ConvertDefaultRow(XFTable* pXFTable,sal_uInt8 nStartCol,
-                sal_uInt8 nEndCol,sal_uInt16 nRowID);
-    void ConvertColumn(XFTable *pXFTable,sal_uInt8 nStartCol,sal_uInt8 
nEndCol);
-    sal_uInt16 ConvertHeadingRow(XFTable* pXFTable,sal_uInt16 
nStartHeadRow,sal_uInt16 nEndHeadRow);
+    void ConvertDefaultRow(rtl::Reference<XFTable> const & pXFTable, sal_uInt8 
nStartCol,
+                sal_uInt8 nEndCol, sal_uInt16 nRowID);
+    void ConvertColumn(rtl::Reference<XFTable> const & pXFTable, sal_uInt8 
nStartCol, sal_uInt8 nEndCol);
+    sal_uInt16 ConvertHeadingRow(rtl::Reference<XFTable> const & 
pXFTable,sal_uInt16 nStartHeadRow,sal_uInt16 nEndHeadRow);
     static bool FindSplitColMark(XFTable* pXFTable,sal_uInt8* 
pCellMark,sal_uInt8& nMaxColSpan);
-    void SplitRowToCells(XFTable* pTmpTable,XFTable* pXFTable,
+    void SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> const & 
pXFTable,
                 sal_uInt8 nFirstColSpann,sal_uInt8* pCellMark);
 
     std::map<sal_uInt16,LwpRowLayout*> m_RowsMap;
     void SplitConflictCells();
-    XFTable* m_pXFTable;
+    rtl::Reference<XFTable> m_pXFTable;
     std::map<std::pair<sal_uInt16,sal_uInt8>,XFCell*> m_CellsMap;
 
     void PutCellVals(LwpFoundry* pFoundry, LwpObjectID aTableID);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to