LibreOffice Module test (master) 1
xsheetannotationshapesupplier.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
11
12#include <com/sun/star/drawing/XShape.hpp>
13#include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp>
14
15#include <cppunit/TestAssert.h>
16
17using namespace com::sun::star;
18using namespace com::sun::star::uno;
19
20
21namespace apitest {
22
24{
25 uno::Reference< sheet::XSheetAnnotationShapeSupplier > xSheetAnnotationShapeSupplier(init(), UNO_QUERY_THROW);
26 uno::Reference< drawing::XShape > xShape = xSheetAnnotationShapeSupplier->getAnnotationShape();
27
28 CPPUNIT_ASSERT_EQUAL_MESSAGE("getAnnotationShape() wrong X position",
29 sal_Int32(7373), xShape->getPosition().X);
30 CPPUNIT_ASSERT_EQUAL_MESSAGE("getAnnotationShape() wrong Y position",
31 sal_Int32(451), xShape->getPosition().Y);
32
33 CPPUNIT_ASSERT_EQUAL_MESSAGE("getAnnotationShape() wrong width",
34 sal_Int32(11275), xShape->getSize().Width);
35 CPPUNIT_ASSERT_EQUAL_MESSAGE("getAnnotationShape() wrong height",
36 sal_Int32(1386), xShape->getSize().Height);
37}
38
39}
40
41/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::uno::XInterface > init()=0