summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/docxattributeoutput.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-04-17 12:36:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-04-17 17:27:29 +0100
commit67ef5f22aa3c8f060ab5caf5b816e9806c610654 (patch)
treef2abcc0a55a408a6f579945f79de007cbda6912f /sw/source/filter/ww8/docxattributeoutput.hxx
parent7b3c07a78b8db73a966a0999153c6a914cbedae5 (diff)
SwTableLines::size is an unreliable way to count rows
pathological old-school writer tables can have one line here for merged rows The table writer knows about these things, so use that, keep it up to date, and make that up to date cheaper to do Change-Id: I3433206a54c7cb096b699ac0b61653358e647115
Diffstat (limited to 'sw/source/filter/ww8/docxattributeoutput.hxx')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 4da101b4beeb..2b253d269559 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -138,6 +138,29 @@ struct TableReference
}
};
+class DocxWriteTable : public SwWriteTable
+{
+public:
+ DocxWriteTable(const SwTable* pTable, const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
+ bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX,
+ sal_uInt16 nInLeftSub=0, sal_uInt16 nInRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0)
+ : SwWriteTable(rLines, nWidth, nBWidth,
+ bRel, nMaxDepth, nInLeftSub, nInRightSub, nNumOfRowsToRepeat)
+ , m_pTable(pTable)
+ {
+ }
+
+ DocxWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayoutInfo )
+ : SwWriteTable(pLayoutInfo)
+ , m_pTable(pTable)
+ {
+ }
+
+ const SwTable* getTable() const { return m_pTable; }
+private:
+ const SwTable* m_pTable;
+};
+
/// The class that has handlers for various resource types when exporting as DOCX.
class DocxAttributeOutput : public AttributeOutputBase, public oox::vml::VMLTextExport, public oox::drawingml::DMLTextExport
{
@@ -795,7 +818,7 @@ private:
std::vector<css::beans::PropertyValue> m_aTextEffectsGrabBag;
/// The current table helper
- std::unique_ptr<SwWriteTable> m_pTableWrt;
+ std::unique_ptr<DocxWriteTable> m_xTableWrt;
sw::Frame* m_pCurrentFrame;