writerfilter/source/ooxml/model.xml | 4 +--- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 13 +++++++++---- 2 files changed, 10 insertions(+), 7 deletions(-)
New commits: commit 487c48b8b5369df224657b3ceb745102747c2163 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Aug 13 19:55:24 2014 +0200 Remove unused action element There are other action elements directly under <resource>, those are used, but not this one. Change-Id: Iba0f844230fa91fc33ff3b1f2a40a651819fa2cb diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 8baefe1..23fcf9b 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -18897,9 +18897,7 @@ <element name="proofErr" tokenid="ooxml:EG_RunLevelElts_proofErr"/> <element name="permStart" tokenid="ooxml:EG_RunLevelElts_permStart"/> <element name="permEnd" tokenid="ooxml:EG_RunLevelElts_permEnd"/> - <element name="ins" tokenid="ooxml:EG_RunLevelElts_ins"> - <action name="newProperty" id="ooxml:ins" value="1"/> - </element> + <element name="ins" tokenid="ooxml:EG_RunLevelElts_ins"/> <element name="del" tokenid="ooxml:EG_RunLevelElts_del"/> <element name="moveFrom" tokenid="ooxml:EG_RunLevelElts_moveFrom"/> <element name="moveTo" tokenid="ooxml:EG_RunLevelElts_moveTo"/> commit 4dd5338f3836a0ed8b72f47bf90929fb376ea04e Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Aug 13 19:52:25 2014 +0200 RTF import: let SHPRW == 4 imply ooxml:EG_WrapType_wrapTight This does not have an effect on the resulting document yet, but handling "tight" properly is necessary to support wrap polygons in the future. Change-Id: Iff057a1f9aff792b9c0ad5e601f2024bc60383cf diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 67a6710..431ab54 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -897,15 +897,15 @@ int RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XSh sal_Int32 nWrap = -1; for (RTFSprms::Iterator_t i = m_aStates.top().aCharacterSprms.begin(); i != m_aStates.top().aCharacterSprms.end(); ++i) { - if (i->first == NS_ooxml::LN_EG_WrapType_wrapNone) + if (i->first == NS_ooxml::LN_EG_WrapType_wrapNone || i->first == NS_ooxml::LN_EG_WrapType_wrapTight) { - nWrap = NS_ooxml::LN_EG_WrapType_wrapNone; + nWrap = i->first; aAnchorSprms.set(i->first, i->second); } } RTFValue::Pointer_t pAnchorWrapValue(new RTFValue(aAnchorWrapAttributes)); aAnchorSprms.set(NS_ooxml::LN_CT_Anchor_extent, pExtentValue); - if (aAnchorWrapAttributes.size() && nWrap != NS_ooxml::LN_EG_WrapType_wrapNone) + if (aAnchorWrapAttributes.size() && nWrap == -1) aAnchorSprms.set(NS_ooxml::LN_EG_WrapType_wrapSquare, pAnchorWrapValue); // See OOXMLFastContextHandler::positionOffset(), we can't just put offset values in an RTFValue. @@ -3956,7 +3956,11 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) break; } RTFValue::Pointer_t pValue(new RTFValue(nValue)); - m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_WrapSquare_wrapText, pValue); + RTFValue::Pointer_t pTight = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_EG_WrapType_wrapTight); + if (pTight) + pTight->getAttributes().set(NS_ooxml::LN_CT_WrapTight_wrapText, pValue); + else + m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_WrapSquare_wrapText, pValue); } break; case RTF_SHPWR: @@ -3975,6 +3979,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) break; case 4: m_aStates.top().aShape.nWrap = com::sun::star::text::WrapTextMode_PARALLEL; + m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_WrapType_wrapTight, RTFValue::Pointer_t(new RTFValue())); break; case 5: m_aStates.top().aShape.nWrap = com::sun::star::text::WrapTextMode_THROUGHT; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits