summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-18 00:48:49 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-03-18 13:35:55 +0100
commitb393336817a64f8703607d3f6de37d0b6498d49c (patch)
treef90fca85be39eab513a2ee1dee4b11e4d1fd7665 /oox
parent28757ce2246f2598c8ace45f87225eaabbdaf8f0 (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> (cherry picked from commit c9e5640c8fcad7beb42a66f9bee0252eee9fe323) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112619 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/shape.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index e711a3261bb3..5f3204bf64f2 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -844,7 +844,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 ) );
@@ -852,13 +851,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;