diff options
author | Miklos Vajna <vmiklos@openoffice.org> | 2010-10-17 03:42:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@openoffice.org> | 2010-10-17 03:42:19 +0200 |
commit | 0be573b69e18f507b432e4ae00574a3bb843b2ea (patch) | |
tree | ceed1f2fc8f08d4a25f6715116bd6532c17c0f61 | |
parent | e390b069feb70e7deb0e5f82ac5946cfc33222a3 (diff) |
vmiklos01: #i113532# fix non-text frames
Previously the exporter just crashed when the document contained a non-text
frame (e.g. table). Fix this by properly calling MSWordExportBase::WriteText()
instead of our custom method that handled text frames only.
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.hxx | 1 |
3 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index dcab8af823..aa5e9be8ed 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1461,7 +1461,16 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi */ OString aSave = m_aRun.makeStringAndClear(); m_rExport.bRTFFlySyntax = true; - m_rExport.OutContent(*rFrame.GetContent()); + + const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( ); + const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; + ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; + m_rExport.SaveData( nStt, nEnd ); + m_rExport.mpParentFrame = &rFrame; + m_rExport.WriteText( ); + m_rExport.RestoreData(); + m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_PARD; m_rExport.bRTFFlySyntax = false; m_aRun.append(aSave); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 640cd77905..554243b448 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -1124,11 +1124,6 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) } } -void RtfExport::OutContent( const SwNode& rNode ) -{ - OutputContentNode(*rNode.GetCntntNode()); -} - void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { OSL_TRACE("%s start", OSL_THIS_FUNC); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index a7f825f810..fe626203c5 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -174,7 +174,6 @@ public: static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc); static rtl::OString OutHex(ULONG nHex, BYTE nLen); void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ); - void OutContent( const SwNode& rNode ); USHORT GetColor( const Color& rColor ) const; void InsColor( const Color& rCol ); |