1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #include <cppunit/extensions/HelperMacros.h>
12 #include <cppunit/plugin/TestPlugIn.h>
14 #include <vcl/GraphicObject.hxx>
16 #include <test/bootstrapfixture.hxx>
18 #include <tools/stream.hxx>
20 #include <vcl/image.hxx>
22 #include <com/sun/star/frame/Desktop.hpp>
23 #include <officecfg/Office/Common.hxx>
24 #include <unotest/macros_test.hxx>
25 #include <comphelper/processfactory.hxx>
26 #include <unotxdoc.hxx>
36 class GraphicObjectTest
: public test::BootstrapFixture
, public unotest::MacrosTest
42 virtual void setUp() override
44 test::BootstrapFixture::setUp();
46 mxDesktop
.set(css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
50 CPPUNIT_TEST_SUITE(GraphicObjectTest
);
51 CPPUNIT_TEST(testTdf88836
);
52 CPPUNIT_TEST_SUITE_END();
56 void GraphicObjectTest::testTdf88836()
58 // Construction with empty bitmap -> type should be GraphicType::NONE
59 Graphic aGraphic
= Bitmap();
60 CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE
), int(aGraphic
.GetType()));
61 aGraphic
= Graphic(BitmapEx());
62 CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE
), int(aGraphic
.GetType()));
65 CPPUNIT_TEST_SUITE_REGISTRATION(GraphicObjectTest
);
69 CPPUNIT_PLUGIN_IMPLEMENT();
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */