diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-24 09:08:56 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-09-28 08:31:52 +0200 |
commit | a576ecd60ae0dde894d319b94fa4651c3e4f48f4 (patch) | |
tree | 77ab4b6e04441ab2b891f5695a1ea84730f9dea4 /writerfilter | |
parent | 87e3ee9c3c5d84f8f3cb460e7069d8c6ed487eda (diff) |
tdf#89698 DOCX import: inline picture should have no spacing
Commit 3d7e168a2a43c2414b0633379102ddb29437e75b (n#783638 DOCX import of
wp:inline's distT/B/L/R attributes, 2012-10-11) was about a picture that
had non-zero spacing in LO, but zero in Word. The hope was that the
problem is just that the value is not imported.
Then commit a88ac708403c03d0f950f09ec29c0d5a1e5a85b4 (fdo#63685
wp:inline's distT/B/L/R is in EMU's, not twips, 2013-04-19) was about a
picture that had so large spacing that the picture become invisible.
Fixing the unit of the spacing value made the picture visible again.
What was missed is that this value is just stored in the doc model, but
layout in Word doesn't use it at all till the anchoring is as-char.
Given that in LO as-char anchoring supports real spacing, just don't
import these values to have the same layout. That's what the WW8 import
does, too.
(cherry picked from commit 9781a8786da5c32e2250cbe1ae97bd10f84f39bb)
Reviewed-on: https://gerrit.libreoffice.org/16786
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit e3afafb236e273516b94bf6ed3fc9de403843245)
Conflicts:
writerfilter/source/dmapper/GraphicImport.cxx
Change-Id: I1244269e06c5d190e8340349ddc12ae7b0572a4d
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index e36f1b5e8380..0401201aa5d4 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -808,16 +808,16 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) } break; case NS_ooxml::LN_CT_Inline_distT: - m_pImpl->nTopMargin = ConversionHelper::convertEMUToMM100(nIntValue); + m_pImpl->nTopMargin = 0; break; case NS_ooxml::LN_CT_Inline_distB: - m_pImpl->nBottomMargin = ConversionHelper::convertEMUToMM100(nIntValue); + m_pImpl->nBottomMargin = 0; break; case NS_ooxml::LN_CT_Inline_distL: - m_pImpl->nLeftMargin = ConversionHelper::convertEMUToMM100(nIntValue); + m_pImpl->nLeftMargin = 0; break; case NS_ooxml::LN_CT_Inline_distR: - m_pImpl->nRightMargin = ConversionHelper::convertEMUToMM100(nIntValue); + m_pImpl->nRightMargin = 0; break; case NS_ooxml::LN_CT_GraphicalObjectData_uri: rValue.getString(); |