summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-05 20:28:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-05 20:31:17 +0100
commit19dde56de6f4d8613f156148f1e60256a8f5172a (patch)
tree1d368687adf0d519f4d14cc64cc77d70170b5247 /lotuswordpro
parentfd99dc83659b8c9e4dff9c55ed43c936f9a5b7fd (diff)
fftester: double use of XFTable, ref this up
Change-Id: I8e0c2319b2f43b66686fbce372c5df63c75b343a
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/qa/cppunit/data/fail/reference-2.lwpbin0 -> 82326 bytes
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx4
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.hxx4
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx15
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.hxx14
5 files changed, 18 insertions, 19 deletions
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 000000000000..d2101d8feb77
--- /dev/null
+++ b/lotuswordpro/qa/cppunit/data/fail/reference-2.lwp
Binary files differ
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index a936f0e1e251..1e83779de626 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 20309d6f0c6d..6494c2223f19 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 42a8e875df39..4eaa7ce3955a 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 3dfd32f369df..d17f734d1bb4 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);