tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / svtools / qa / unit / GraphicObjectTest.cxx
blob766baea6b1cb5ae5573f55846742f6d3710b23e8
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 <test/bootstrapfixture.hxx>
16 #include <com/sun/star/frame/Desktop.hpp>
17 #include <unotest/macros_test.hxx>
18 #include <comphelper/processfactory.hxx>
20 using namespace css;
22 namespace
24 class GraphicObjectTest : public test::BootstrapFixture, public unotest::MacrosTest
26 public:
27 void testTdf88836();
29 virtual void setUp() override
31 test::BootstrapFixture::setUp();
33 mxDesktop.set(
34 css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
37 private:
38 CPPUNIT_TEST_SUITE(GraphicObjectTest);
39 CPPUNIT_TEST(testTdf88836);
40 CPPUNIT_TEST_SUITE_END();
43 void GraphicObjectTest::testTdf88836()
45 // Construction with empty bitmap -> type should be GraphicType::NONE
46 Graphic aGraphic = BitmapEx(Bitmap());
47 CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE), int(aGraphic.GetType()));
48 aGraphic = Graphic(BitmapEx());
49 CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE), int(aGraphic.GetType()));
52 CPPUNIT_TEST_SUITE_REGISTRATION(GraphicObjectTest);
55 CPPUNIT_PLUGIN_IMPLEMENT();
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */