summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2016-10-29 15:31:29 +0300
committerAndras Timar <andras.timar@collabora.com>2017-02-08 11:56:05 +0100
commit14329f9b41e5640f658e66b3ae3f4dea0f48f89a (patch)
treefb70e011dd863dc8a98d8041446059fe4ff1ff36 /sd
parent6bb8e3a89b8399b1a7a2d12e5b1be9282b1c5249 (diff)
tdf#103473: Ensure positive rectangle size
Also remove conversion of both negative scales into rotation, because it is handled by flip; use strict comparison instead of approximate float less because it's correct here, and also because basegfx::fTools::less ultimately uses rtl_math_approxEqual, which description states: attention approxEqual( value!=0.0, 0.0 ) _never_ yields true. Unit test included. Reviewed-on: https://gerrit.libreoffice.org/30373 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 1c708eee636c0cdf3da2ec62849618f3262044bc) Reviewed-on: https://gerrit.libreoffice.org/30378 (cherry picked from commit 92d0b2bc79033e8f2cd70c298ad746b38b4eea03) Change-Id: Ia878fce360cf8aed539d95f2d4a1a3ad94379978
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf103473.pptxbin0 -> 26752 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx18
2 files changed, 18 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf103473.pptx b/sd/qa/unit/data/pptx/tdf103473.pptx
new file mode 100644
index 000000000000..5b31b761d22c
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf103473.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 6e89764d972b..9fdd516f0dbb 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -114,6 +114,7 @@ public:
void testTdf93097();
void testTdf93124();
void testTdf93868();
+ void testTdf103473();
void testTdf103792();
void testTdf103876();
void testTdf104015();
@@ -163,6 +164,7 @@ public:
CPPUNIT_TEST(testTdf93097);
CPPUNIT_TEST(testTdf93124);
CPPUNIT_TEST(testTdf93868);
+ CPPUNIT_TEST(testTdf103473);
CPPUNIT_TEST(testTdf103792);
CPPUNIT_TEST(testTdf103876);
CPPUNIT_TEST(testTdf104015);
@@ -1403,6 +1405,22 @@ void SdImportTest::testTdf104445()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf103473()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/pptx/tdf103473.pptx"), PPTX);
+
+ const SdrPage *pPage = GetPage(1, xDocShRef);
+ SdrTextObj *const pObj = dynamic_cast<SdrTextObj *const>(pPage->GetObj(0));
+ CPPUNIT_ASSERT(pObj);
+ Rectangle aRect = pObj->GetGeoRect();
+ CPPUNIT_ASSERT_EQUAL(3629L, aRect.Left());
+ CPPUNIT_ASSERT_EQUAL(4431L, aRect.Top());
+ CPPUNIT_ASSERT_EQUAL(8353L, aRect.Right());
+ CPPUNIT_ASSERT_EQUAL(9155L, aRect.Bottom());
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();