Kaydet (Commit) 60635557 authored tarafından Miklos Vajna's avatar Miklos Vajna

drawingML export: fix position of shape in case rotation is 180 degrees

This is the other case when position shouldn't be adjusted.

Change-Id: I9265bf1c762fd519e3a12e97d767b5d213644e6d
üst 30a561c0
......@@ -28,6 +28,8 @@
#include <tools/poly.hxx>
#include <filter/msfilter/escherex.hxx>
#ifndef PPTX_EXPORT_ROTATE_CLOCKWISIFY
// Our rotation is counter-clockwise and is in 100ths of a degree.
// drawingML rotation is clockwise and is in 60000ths of a degree.
#define PPTX_EXPORT_ROTATE_CLOCKWISIFY(input) ((21600000-input*600)%21600000)
#endif
......
......@@ -751,7 +751,7 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
{
SdrObject* pShape = (SdrObject*) GetSdrObjectFromXShape( rXShape );
nRotation=pShape->GetRotateAngle();
if (nRotation)
if (nRotation != 0 && nRotation != 18000)
{
int faccos=bFlipV ? -1 : 1;
int facsin=bFlipH ? -1 : 1;
......
......@@ -2492,6 +2492,10 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
// Connector was incorrectly shifted towards the top left corner, X was 552, Y was 0.
CPPUNIT_ASSERT_EQUAL(sal_Int32(4018), xShape->getPosition().X);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1256), xShape->getPosition().Y);
xShape.set(xGroup->getByIndex(5), uno::UNO_QUERY);
// This was incorrectly shifted towards the top of the page, Y was 106.
CPPUNIT_ASSERT_EQUAL(sal_Int32(1016), xShape->getPosition().Y);
}
DECLARE_OOXMLEXPORT_TEST(testDrawinglayerPicPos, "drawinglayer-pic-pos.docx")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment