diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-01 16:46:54 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-08-04 11:31:06 +0000 |
commit | b28c11025b08cae4cd4685c75fbc474d2c216fb0 (patch) | |
tree | 3fe5176315cb29628c31c1c52884c4088a979a60 /writerfilter | |
parent | e9297597088f36d4072515fd46d1299381dcfe6b (diff) |
RTF import: fix as-char anchored OLE objects
Regression from 2a35f5c7945d00b6f6e21fc7cf5b05b184eba88f (DOCX OLE
import: inherit anchor type from replacement graphic, 2014-02-18), then
problem was that dmapper expected that the anchor type of the
replacement graphic is set, but the RTF tokenizer wasn't adapted to
fulfill this requirement.
(cherry picked from commit 43b88364b0b05def27899d585a1dab46ba3fb729)
Conflicts:
sw/qa/extras/inc/swmodeltestbase.hxx
sw/qa/extras/rtfimport/rtfimport.cxx
Change-Id: I0f7e1a71052f337793d6f844fe5476c3868c03f4
Reviewed-on: https://gerrit.libreoffice.org/10677
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index c716b2fac5d8..5823b7042bb1 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -823,6 +823,9 @@ int RTFDocumentImpl::resolvePict(bool const bInline, aSize.Height = (m_aStates.top().aPicture.nGoalHeight ? m_aStates.top().aPicture.nGoalHeight : m_aStates.top().aPicture.nHeight); xShape->setSize(aSize); + // Replacement graphic is inline by default, see oox::vml::SimpleShape::implConvertAndInsert(). + xPropertySet->setPropertyValue("AnchorType", uno::makeAny(text::TextContentAnchorType_AS_CHARACTER)); + RTFValue::Pointer_t pShapeValue(new RTFValue(xShape)); m_aObjectAttributes.set(NS_ooxml::LN_shape, pShapeValue); return 0; |