summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-03-18 00:48:49 +0100
committerAndras Timar <andras.timar@collabora.com>2021-03-22 16:21:46 +0100
commit17658100e22dae3bccb98fcf93d02c0f869de4b3 (patch)
treeff4ef105228959ef2027720700b042faf7160c1d /oox
parent70d1b1a32ff3805f5e56b5a76f8bc2d871cbb23e (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112671 (cherry picked from commit ddf13fc815903238c90aa963af7e0ea96fe7280d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112800 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
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 ec29618dd8f9..9e324ef69ed1 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -848,7 +848,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 ) );
@@ -856,13 +855,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;