diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-18 21:05:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-18 21:05:42 +0100 |
commit | 980ab387851a9ac0b2f39a648bc01b8cba855715 (patch) | |
tree | 6758b7efb736a11def7a2f14a755e6015af9e038 /sw/source/filter/ww8/rtfattributeoutput.cxx | |
parent | fix 500+ new assert failures on export (diff) | |
download | core-980ab387851a9ac0b2f39a648bc01b8cba855715.tar.gz core-980ab387851a9ac0b2f39a648bc01b8cba855715.zip |
fix export to rtf of ooo87305-1.odt
fold DocxWriteTable into SwWriteTable and make the same improvement to the rtf
filter as the docx filter to keep the table writer in sync with the current
table, and mirroring the cache improvement of the docx filter into the rtf one
Change-Id: Ia0d5972acbe6524da67497defdcbcd26cfdc44fb
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 738887ef8245..4f7ce74f8a83 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -543,8 +543,7 @@ void RtfAttributeOutput::TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t /*pT void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) { - if (!m_pTableWrt) - InitTableHelper(pTableTextNodeInfoInner); + InitTableHelper(pTableTextNodeInfoInner); const SwTable* pTbl = pTableTextNodeInfoInner->getTable(); SwFrmFmt* pFmt = pTbl->GetFrmFmt(); @@ -844,21 +843,24 @@ void RtfAttributeOutput::TableRowEnd(sal_uInt32 /*nDepth*/) void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) { + const SwTable* pTable = pTableTextNodeInfoInner->getTable(); + if (m_pTableWrt && pTable == m_pTableWrt->GetTable()) + return; + long nPageSize = 0; bool bRelBoxSize = false; // Create the SwWriteTable instance to use col spans GetTablePageSize(pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize); - const SwTable* pTable = pTableTextNodeInfoInner->getTable(); const SwFrmFmt* pFmt = pTable->GetFrmFmt(); const sal_uInt32 nTblSz = static_cast<sal_uInt32>(pFmt->GetFrmSize().GetWidth()); const SwHTMLTableLayout* pLayout = pTable->GetHTMLTableLayout(); if (pLayout && pLayout->IsExportable()) - m_pTableWrt = new SwWriteTable(pLayout); + m_pTableWrt = new SwWriteTable(pTable, pLayout); else - m_pTableWrt = new SwWriteTable(pTable->GetTabLines(), nPageSize, nTblSz, false); + m_pTableWrt = new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTblSz, false); } void RtfAttributeOutput::StartTable(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/) |