Kaydet (Commit) c753c0b9 authored tarafından PriyankaGaikwad's avatar PriyankaGaikwad Kaydeden (comit) Markus Mohrhard

fdo#74111 3D Rotation is wrong after Round trip for bar chart

3D Rotation is lost after Round trip for bar chart.

XML Difference:
Original:
 <c:rotX val="30"/>
 <c:rotY val="50"/>
Round Trip:
 <c:rotX val="42"/>
 <c:rotY val="42"/>

Implementation:
The RightAngledAxes should set first then the RotationVertical and RotationHorizontal
because the RightAngledAxes is needed while setting Rotation.

Conflicts:
	chart2/qa/extras/chart2export.cxx

Change-Id: I64f3b6e56f8515bf6c3d935c59dfaf1d440dba31
üst ffb1053b
......@@ -45,6 +45,7 @@ public:
void testDisplayUnits();
void testFdo74115WallGradientFill();
void testFdo74115WallBitmapFill();
void testBarChartRotation();
CPPUNIT_TEST_SUITE(Chart2ExportTest);
CPPUNIT_TEST(test);
......@@ -62,6 +63,7 @@ public:
CPPUNIT_TEST(testDisplayUnits);
CPPUNIT_TEST(testFdo74115WallGradientFill);
CPPUNIT_TEST(testFdo74115WallBitmapFill);
CPPUNIT_TEST(testBarChartRotation);
CPPUNIT_TEST_SUITE_END();
protected:
......@@ -566,6 +568,16 @@ void Chart2ExportTest::testFdo74115WallBitmapFill()
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:blipFill");
}
void Chart2ExportTest::testBarChartRotation()
{
load ("/chart2/qa/extras/data/docx/", "barChartRotation.docx");
xmlDocPtr pXmlDoc = parseExport("word/charts/chart","Office Open XML Text");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotX", "val", "30");
assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:view3D/c:rotY", "val", "50");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
......
......@@ -255,10 +255,10 @@ void View3DConverter::convertFromModel( const Reference< XDiagram >& rxDiagram,
cssd::ProjectionMode eProjMode = bParallel ? cssd::ProjectionMode_PARALLEL : cssd::ProjectionMode_PERSPECTIVE;
// set rotation properties
aPropSet.setProperty( PROP_RightAngledAxes, bRightAngled );
aPropSet.setProperty( PROP_RotationVertical, nRotationY );
aPropSet.setProperty( PROP_RotationHorizontal, nRotationX );
aPropSet.setProperty( PROP_Perspective, nPerspective );
aPropSet.setProperty( PROP_RightAngledAxes, bRightAngled );
aPropSet.setProperty( PROP_D3DScenePerspective, eProjMode );
// set light settings
......
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