diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-25 09:25:34 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-05-04 12:48:22 +0200 |
commit | 81a8995e0e5219da6f48baa81fbed5c9e38acf34 (patch) | |
tree | b376a9b843b1e029f76427b0ffce4ec86bff3184 /writerfilter/source | |
parent | upgrade to language-subtag-registry-2017-04-19 (diff) | |
download | core-81a8995e0e5219da6f48baa81fbed5c9e38acf34.tar.gz core-81a8995e0e5219da6f48baa81fbed5c9e38acf34.zip |
tdf#107104 DOCX drawingML import: fix invisible arrow shape
This is the drawingML equivalent of commit
3d9ebded1358395ed81db7a63629b046aec2aeac (Misc improvements for docx VML
import, 2010-10-06), which made sure that shapes are never invisible
just because they have zero height or width.
For this particular bugdoc the Word-produced WW8 equivalent width is 20
twips, but let's be consistent with the VML import and just round up to
1 mm100.
Also fix two existing tests that wanted to test something else, but
implicitly asserted that some shapes indeed have zero width/height.
(cherry picked from commit e6e5a68f52f4e06b73f0ece3a3886f3bfc30f56d)
Change-Id: I9600424520d0a3deecc711b44622eccc041a59da
Reviewed-on: https://gerrit.libreoffice.org/36953
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 7d3baea4a726d6c0cf6cb0d6a8b2c83cef4f580d)
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index f9458182505f..991b1461ed8d 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -543,6 +543,12 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) case NS_ooxml::LN_CT_PositiveSize2D_cy: { sal_Int32 nDim = oox::drawingml::convertEmuToHmm(nIntValue); + // drawingML equivalent of oox::vml::ShapeType::getAbsRectangle(): + // make sure a shape isn't hidden implicitly just because it has + // zero height or width. + if (nDim == 0) + nDim = 1; + if( nName == NS_ooxml::LN_CT_PositiveSize2D_cx ) m_pImpl->setXSize(nDim); else |