summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-03-08 17:54:37 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-03-09 04:19:38 +0100
commitfb29e6eeeaad5255bb924ff59162a83ed80bfb0a (patch)
tree60120ccea958738568a3c78f146dbd40e8055afc /sc
parentd4347f5d585232e1b025b4199ded53e6619d6242 (diff)
svx: removing GraphicURL and OWN_ATTR_GRAFURL, fix writerfilter
Change-Id: I5b84788a324cc68e3c4561e9a7376fcb1cfeeb67 Reviewed-on: https://gerrit.libreoffice.org/50933 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx47
1 files changed, 17 insertions, 30 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ff4063f8ed84..fe073203818b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -74,6 +74,7 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/graphic/GraphicType.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -3151,16 +3152,13 @@ void ScExportTest::testSwappedOutImageExport()
uno::Reference<drawing::XShape> xImage(xDraws->getByIndex(0), uno::UNO_QUERY);
uno::Reference< beans::XPropertySet > XPropSet( xImage, uno::UNO_QUERY_THROW );
- // Check URL
- {
- OUString sURL;
- XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
- }
- // Check size
+
+ // Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic->getType() != graphic::GraphicType::EMPTY);
uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xBitmap.is());
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(610), xBitmap->getSize().Width );
@@ -3169,16 +3167,13 @@ void ScExportTest::testSwappedOutImageExport()
// Second Image
xImage.set(xDraws->getByIndex(1), uno::UNO_QUERY);
XPropSet.set( xImage, uno::UNO_QUERY_THROW );
- // Check URL
- {
- OUString sURL;
- XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
- }
- // Check size
+
+ // Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic->getType() != graphic::GraphicType::EMPTY);
uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xBitmap.is());
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(900), xBitmap->getSize().Width );
@@ -3302,17 +3297,13 @@ void ScExportTest::testImageWithSpecialID()
uno::Reference<drawing::XShape> xImage(xDraws->getByIndex(0), uno::UNO_QUERY);
uno::Reference< beans::XPropertySet > XPropSet( xImage, uno::UNO_QUERY_THROW );
- // Check URL
- {
- OUString sURL;
- XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), !sURL.isEmpty());
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
- }
- // Check size
+
+ // Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic->getType() != graphic::GraphicType::EMPTY);
uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xBitmap.is());
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(610), xBitmap->getSize().Width );
@@ -3321,17 +3312,13 @@ void ScExportTest::testImageWithSpecialID()
// Second Image
xImage.set(xDraws->getByIndex(1), uno::UNO_QUERY);
XPropSet.set( xImage, uno::UNO_QUERY_THROW );
- // Check URL
- {
- OUString sURL;
- XPropSet->getPropertyValue("GraphicURL") >>= sURL;
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), !sURL.isEmpty());
- CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), sURL != "vnd.sun.star.GraphicObject:00000000000000000000000000000000");
- }
- // Check size
+
+ // Check Graphic, Size
{
uno::Reference<graphic::XGraphic> xGraphic;
XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic.is());
+ CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xGraphic->getType() != graphic::GraphicType::EMPTY);
uno::Reference<awt::XBitmap> xBitmap(xGraphic, uno::UNO_QUERY);
CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), xBitmap.is());
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(900), xBitmap->getSize().Width );