summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-08-23 22:32:53 +0300
committerAndras Timar <andras.timar@collabora.com>2020-08-25 14:26:42 +0200
commit5f305e6792c1c166b2a44a1e5085f42f53db50ea (patch)
treeba3b8fe0dbca926fe420f40116ef46307b149a31 /sd
parentfc7b4bfeba39a2479c9a2c9c8ef5ced5ab3c0de7 (diff)
tdf#134174 Fix the rotation of bitmap filled custom shapes.
During import we were rotating only custom shape. Not its bitmap. Custom shape and its bitmap rotated with same rotation value in that commit. Change-Id: I02d19c820670df7b4d1622836156c6bf8ed1c154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101255 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 9fe881410909c5273cef517433411bc4eceee294) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101164 Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf134174.pptxbin0 -> 186296 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf134174.pptx b/sd/qa/unit/data/pptx/tdf134174.pptx
new file mode 100644
index 000000000000..ef722dc501a8
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf134174.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index cec91cfb6387..632872f40084 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -199,6 +199,7 @@ public:
void testTdf100065();
void testTdf90626();
void testTdf114488();
+ void testTdf134174();
void testTdf114913();
void testTdf114821();
void testTdf115394();
@@ -308,6 +309,7 @@ public:
CPPUNIT_TEST(testTdf100065);
CPPUNIT_TEST(testTdf90626);
CPPUNIT_TEST(testTdf114488);
+ CPPUNIT_TEST(testTdf134174);
CPPUNIT_TEST(testTdf114913);
CPPUNIT_TEST(testTdf114821);
CPPUNIT_TEST(testTdf115394);
@@ -2611,6 +2613,23 @@ void SdImportTest::testTdf114488()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf134174()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf134174.pptx"), PPTX);
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT(xShape.is());
+
+ uno::Reference<graphic::XGraphic> xGraphic;
+ xShape->getPropertyValue("FillBitmap") >>= xGraphic;
+ CPPUNIT_ASSERT(xGraphic.is());
+
+ Graphic aGraphic(xGraphic);
+ BitmapEx aBitmap(aGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( Color(9118171), aBitmap.GetPixelColor( 0, 0 ));
+
+ xDocShRef->DoClose();
+}
+
void SdImportTest::testTdf114913()
{
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf114913.pptx"), PPTX);