1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
10 #ifndef INCLUDED_TEST_HELPER_SHAPE_HXX
11 #define INCLUDED_TEST_HELPER_SHAPE_HXX
13 #include <sal/config.h>
15 #include <string_view>
17 #include <sal/types.h>
18 #include <test/testdllapi.hxx>
20 #include <com/sun/star/drawing/XShape.hpp>
21 #include <com/sun/star/lang/XComponent.hpp>
23 #include <com/sun/star/uno/Reference.hxx>
31 /** @brief Create a XShape of kind "Ellipse".
33 * @param r_xComponent The document
34 * @param nX The x-position of the shape.
35 * @param nY The y-position of the shape.
36 * @param nHeight The height of the shape.
37 * @param nWidth The width of the shape.
38 * @return The created XShape.
40 css::uno::Reference
<css::drawing::XShape
>
41 OOO_DLLPUBLIC_TEST
createEllipse(const css::uno::Reference
<css::lang::XComponent
>& r_xComponent
,
42 const sal_Int32 nX
, const sal_Int32 nY
, const sal_Int32 nWidth
,
43 const sal_Int32 nHeight
);
45 /** @brief Create a XShape of kind "Line".
47 * @param r_xComponent The document
48 * @param nX The x-position of the shape.
49 * @param nY The y-position of the shape.
50 * @param nHeight The height of the shape.
51 * @param nWidth The width of the shape.
52 * @return The created XShape.
54 css::uno::Reference
<css::drawing::XShape
>
55 OOO_DLLPUBLIC_TEST
createLine(const css::uno::Reference
<css::lang::XComponent
>& r_xComponent
,
56 const sal_Int32 nX
, const sal_Int32 nY
, const sal_Int32 nWidth
,
57 const sal_Int32 nHeight
);
59 /** @brief Create a XShape of kind "Rectangle".
61 * @param r_xComponent The document
62 * @param nX The x-position of the shape.
63 * @param nY The y-position of the shape.
64 * @param nHeight The height of the shape.
65 * @param nWidth The width of the shape.
66 * @return The created XShape.
68 css::uno::Reference
<css::drawing::XShape
> OOO_DLLPUBLIC_TEST
69 createRectangle(const css::uno::Reference
<css::lang::XComponent
>& r_xComponent
, const sal_Int32 nX
,
70 const sal_Int32 nY
, const sal_Int32 nWidth
, const sal_Int32 nHeight
);
72 /** @brief Create a XShape.
74 * @param r_xComponent The document
75 * @param r_aKind The kind of shape.
76 * @param nX The x-position of the shape.
77 * @param nY The y-position of the shape.
78 * @param nHeight The height of the shape.
79 * @param nWidth The width of the shape.
80 * @return The created XShape.
82 css::uno::Reference
<css::drawing::XShape
> OOO_DLLPUBLIC_TEST
createShape(
83 const css::uno::Reference
<css::lang::XComponent
>& r_xComponent
, std::u16string_view r_aKind
,
84 const sal_Int32 nX
, const sal_Int32 nY
, const sal_Int32 nWidth
, const sal_Int32 nHeight
);
88 } // namespace apitest
90 #endif // INCLUDED_TEST_HELPER_SHAPE_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */