bump product version to 6.3.0.0.beta1
[LibreOffice.git] / svtools / qa / unit / GraphicObjectTest.cxx
blob3f6c69b7e051c06bd44c5c4ea89ae09ee8600dcc
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 */
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>
27 #include <docsh.hxx>
28 #include <doc.hxx>
29 #include <ndgrf.hxx>
31 using namespace css;
33 namespace
36 class GraphicObjectTest: public test::BootstrapFixture, public unotest::MacrosTest
39 public:
40 void testTdf88836();
42 virtual void setUp() override
44 test::BootstrapFixture::setUp();
46 mxDesktop.set(css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
49 private:
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: */