diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-09 17:15:56 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-01-24 16:06:08 +0100 |
commit | bacd7f92003991689c48806e2597456635d00c84 (patch) | |
tree | 596b77e71bac494337bb5aaea4c75d907a4a5a92 /sw/source | |
parent | f41efa94a0be35f9cae65d6a44246a5b13865122 (diff) |
abi#10076 RTF export: handle frames without a valid anchor point
Ideally all frames have an anchor point in the maFrames vector, as
provided by MSWordExportBase. If that's not the case, then we have no
idea what would be a valid anchor point: just export those as inline, as
we did before.
Change-Id: I81134d9fb8dc4ca166084964d277ac02ceccde7b
(cherry picked from commit 2f33111510c87ca310fde346e223bd6e750b2248)
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 20a49e200265..bebfb71c8310 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3707,7 +3707,6 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw break; } } - assert(pFrame); /* If the graphic is not of type WMF then we will have to store two @@ -3716,7 +3715,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw a wmf already then we don't need any such wrapping */ bool bIsWMF = pBLIPType && std::strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE) == 0; - if (pFrame->IsInline()) + if (!pFrame || pFrame->IsInline()) { if (!bIsWMF) m_rExport.Strm().WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); @@ -3748,7 +3747,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw m_rExport.Strm().WriteCharPtr("{" OOO_STRING_SVTOOLS_RTF_SP "{" OOO_STRING_SVTOOLS_RTF_SN " pib" "}{" OOO_STRING_SVTOOLS_RTF_SV " "); } - bool bWritePicProp = pFrame->IsInline(); + bool bWritePicProp = !pFrame || pFrame->IsInline(); if (pBLIPType) ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); else @@ -3763,7 +3762,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); } - if (pFrame->IsInline()) + if (!pFrame || pFrame->IsInline()) { if (!bIsWMF) { |