diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-02-13 21:49:57 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-02-14 07:47:26 +0100 |
commit | 1b02ba03bd62a712e15c15384a3d105d2c088120 (patch) | |
tree | b46f383c7ea60de65dbbede5b658a7babd813610 /sd/qa/unit/import-tests.cxx | |
parent | 733d77570771e2536d5ce1f18ba82f68ac6c22ee (diff) |
shapes: don't use "GraphicURL" property, always use "Graphic"
With GraphicURL property on shapes (XShape) we transported the
external or internal URL to the model, which also included the
GraphicObject uniqueID style URLs. This changes that - now we
always use "Graphic" property and transfer XGraphic to and from
graphic filters. "Graphic" property is already present for XShape
so it wasn't needed to add it.
Filters changed are: OOXML (oox), ODF (xmloff), RTF and
binary MS (esherex).
Also start using originURL on Graphic which now transports the
URL of the external (linked) graphic/image if it was created that
way.
Change-Id: Ic338c60b7cfaaae354cf1e1ca3ae7a6373220230
Reviewed-on: https://gerrit.libreoffice.org/49648
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd/qa/unit/import-tests.cxx')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 257a59fbd05f..2ed7337438fd 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -2323,10 +2323,12 @@ void SdImportTest::testTdf114488() // This doc has two images - one WMF and the other PNG (fallback image). // When loading this doc, the WMF image should be preferred over the PNG image. sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/odg/tdf114488.fodg"), FODG); - uno::Reference< beans::XPropertySet > xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW); - OUString sGraphicUrl; - xShape->getPropertyValue("GraphicURL") >>= sGraphicUrl; - OUString sMimeType(comphelper::GraphicMimeTypeHelper::GetMimeTypeForImageUrl(sGraphicUrl)); + uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW); + uno::Reference<graphic::XGraphic> xGraphic; + xShape->getPropertyValue("Graphic") >>= xGraphic; + CPPUNIT_ASSERT(xGraphic.is()); + Graphic aGraphic(xGraphic); + OUString sMimeType(comphelper::GraphicMimeTypeHelper::GetMimeTypeForXGraphic(xGraphic)); CPPUNIT_ASSERT_EQUAL(OUString("image/x-wmf"), sMimeType); } |