[Libreoffice-commits] core.git: sw/qa sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Jan 27 00:57:44 PST 2014
sw/qa/core/exportdata/rtf/pass/abi7407.odt |binary
sw/source/filter/ww8/rtfattributeoutput.cxx | 14 ++++++++++++++
2 files changed, 14 insertions(+)
New commits:
commit 172fa280c08cc238ff6895cd63fadf45a1f93828
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jan 27 09:51:38 2014 +0100
abi#7407 RTF export: fix crash on table-in-textframe anchored inside a table
Change-Id: Ia6df265a7f121930b3d9e676e3f76dbbbd4cef4d
diff --git a/sw/qa/core/exportdata/rtf/pass/abi7407.odt b/sw/qa/core/exportdata/rtf/pass/abi7407.odt
new file mode 100644
index 0000000..70bf677
Binary files /dev/null and b/sw/qa/core/exportdata/rtf/pass/abi7407.odt differ
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index beeb4db..6de5e07 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1617,6 +1617,14 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_rExport.Strm().WriteCharPtr( "{" OOO_STRING_SVTOOLS_RTF_SHPTXT );
{
+ // Save table state, in case the inner text also contains a table.
+ ww8::WW8TableInfo::Pointer_t pTableInfoOrig = m_rExport.mpTableInfo;
+ m_rExport.mpTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ SwWriteTable* pTableWrt = m_pTableWrt;
+ m_pTableWrt = 0;
+ sal_uInt32 nTableDepth = m_nTableDepth;
+
+ m_nTableDepth = 0;
/*
* Save m_aRun as we should not loose the opening brace.
* OTOH, just drop the contents of m_aRunText in case something
@@ -1644,6 +1652,12 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_aRunText.clear();
m_bInRun = bInRunOrig;
m_bSingleEmptyRun = bSingleEmptyRunOrig;
+
+ // Restore table state.
+ m_rExport.mpTableInfo = pTableInfoOrig;
+ delete m_pTableWrt;
+ m_pTableWrt = pTableWrt;
+ m_nTableDepth = nTableDepth;
}
m_rExport.mpParentFrame = NULL;
More information about the Libreoffice-commits
mailing list