diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-03-18 00:48:49 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-03-18 09:15:32 +0100 |
commit | c9e5640c8fcad7beb42a66f9bee0252eee9fe323 (patch) | |
tree | 4d773e9e48124bb5f4a9147568ab2ed9c265d1aa /oox | |
parent | c08271500f6a13e80f739e2609b86ca8351f681e (diff) |
tdf#118693: no need to use convertMm100ToTwip() for line shapes anymore
It was introduced in 11129d89b152db54c86bb2bda58c24b8abb6c5a8
< tdf#85232 WPG import: fix handling of line shapes >
and later in 36bade04d3780bc54c51b46bb0b63e69789658a5
< tdf106792 Get rid of SvxShapePolyPolygonBezier >
ForceMetricToItemPoolMetric was added to SvxShapePolyPolygon::setPropertyValueImpl
to convert from 100thmm to twips as can be read
in the comment in testTdf85232
With this change, xShape->getPosition().X in testTdf85232
is 2267, which was already in twips
Change-Id: I30b757885327a477213f96f8f84541971f435164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112663
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/shape.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 469dc7c30c17..45a7a7e64307 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -852,7 +852,6 @@ Reference< XShape > const & Shape::createAndInsert( uno::Sequence< awt::Point > aPointSequence( nNumPoints ); awt::Point* pPoints = aPointSequence.getArray(); uno::Reference<lang::XServiceInfo> xModelInfo(rFilterBase.getModel(), uno::UNO_QUERY); - bool bIsWriter = xModelInfo->supportsService("com.sun.star.text.TextDocument"); for( i = 0; i < nNumPoints; ++i ) { const basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); @@ -860,13 +859,7 @@ Reference< XShape > const & Shape::createAndInsert( // tdf#106792 Not needed anymore due to the change in SdrPathObj::NbcResize: // tdf#96674: Guard against zero width or height. - if (bIsWriter && bNoTranslation) - // Writer's draw page is in twips, and these points get passed - // to core without any unit conversion when Writer - // postprocesses only the group shape itself. - pPoints[i] = awt::Point(static_cast<sal_Int32>(convertMm100ToTwip(aPoint.getX())), static_cast<sal_Int32>(convertMm100ToTwip(aPoint.getY()))); - else - pPoints[i] = awt::Point(static_cast<sal_Int32>(aPoint.getX()), static_cast<sal_Int32>(aPoint.getY())); + pPoints[i] = awt::Point(static_cast<sal_Int32>(aPoint.getX()), static_cast<sal_Int32>(aPoint.getY())); } uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( 1 ); aPolyPolySequence.getArray()[ 0 ] = aPointSequence; |