writerfilter/qa/cppunittests/rtftok/data/pass/sf_508f4e169fb76c80745d3541bd01b0a2-73462-minimized.rtf |binary writerfilter/source/rtftok/rtfdocumentimpl.cxx | 23 +++++----- 2 files changed, 13 insertions(+), 10 deletions(-)
New commits: commit 28df98abeca9774868cadef29b81559fd325d865 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Aug 19 08:40:20 2014 +0100 empty m_aStates valgrind + bff Change-Id: I7b45e10471de77bd0481adf0bccdbf852c36d815 diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/sf_508f4e169fb76c80745d3541bd01b0a2-73462-minimized.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_508f4e169fb76c80745d3541bd01b0a2-73462-minimized.rtf new file mode 100644 index 0000000..e8e27ee Binary files /dev/null and b/writerfilter/qa/cppunittests/rtftok/data/pass/sf_508f4e169fb76c80745d3541bd01b0a2-73462-minimized.rtf differ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3cbc638..f2bea77 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -5743,16 +5743,19 @@ int RTFDocumentImpl::popState() case DESTINATION_FLYMAINCONTENT: case DESTINATION_SHPPICT: case DESTINATION_SHAPE: - m_aStates.top().aFrame = aState.aFrame; - if (aState.nDestinationState == DESTINATION_SHPPICT && !m_aStates.empty() && m_aStates.top().nDestinationState == DESTINATION_LISTPICTURE) + if (!m_aStates.empty()) { - RTFSprms aAttributes; - aAttributes.set(NS_ooxml::LN_CT_NumPicBullet_numPicBulletId, RTFValue::Pointer_t(new RTFValue(m_nListPictureId++))); - RTFSprms aSprms; - // Dummy value, real picture is already sent to dmapper. - aSprms.set(NS_ooxml::LN_CT_NumPicBullet_pict, RTFValue::Pointer_t(new RTFValue(0))); - RTFValue::Pointer_t pValue(new RTFValue(aAttributes, aSprms)); - m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_numPicBullet, pValue, OVERWRITE_NO_APPEND); + m_aStates.top().aFrame = aState.aFrame; + if (aState.nDestinationState == DESTINATION_SHPPICT && m_aStates.top().nDestinationState == DESTINATION_LISTPICTURE) + { + RTFSprms aAttributes; + aAttributes.set(NS_ooxml::LN_CT_NumPicBullet_numPicBulletId, RTFValue::Pointer_t(new RTFValue(m_nListPictureId++))); + RTFSprms aSprms; + // Dummy value, real picture is already sent to dmapper. + aSprms.set(NS_ooxml::LN_CT_NumPicBullet_pict, RTFValue::Pointer_t(new RTFValue(0))); + RTFValue::Pointer_t pValue(new RTFValue(aAttributes, aSprms)); + m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_numPicBullet, pValue, OVERWRITE_NO_APPEND); + } } break; case DESTINATION_SHAPETEXT: @@ -5780,7 +5783,7 @@ int RTFDocumentImpl::popState() break; default: { - if (m_aStates.size() && m_aStates.top().nDestinationState == DESTINATION_PICT) + if (!m_aStates.empty() && m_aStates.top().nDestinationState == DESTINATION_PICT) m_aStates.top().aPicture = aState.aPicture; } break;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits