diff options
author | Jens Carl <j.carl43@gmx.de> | 2019-03-29 22:06:59 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2019-03-30 22:40:23 +0100 |
commit | 2e0e7a15f66f5cb55f2a424fae6a9050c2c7f9ca (patch) | |
tree | ba1500b99dc070cd0a33eb5acb39c24295cebb6b /include/test | |
parent | bcecc4a2943632030dcd71964bc0aa5690c03735 (diff) |
tdf#45904 Move XFormLayerAccess Java tests to C++
Move XFormLayerAccess Java tests to C++ for ScViewPaneObj.
Change-Id: I7ed6ff51d435b6f3de85daec99a13583e50a450a
Reviewed-on: https://gerrit.libreoffice.org/69942
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/helper/form.hxx | 15 | ||||
-rw-r--r-- | include/test/view/xformlayeraccess.hxx | 43 |
2 files changed, 57 insertions, 1 deletions
diff --git a/include/test/helper/form.hxx b/include/test/helper/form.hxx index f6e035d64fec..d84794cc5b6d 100644 --- a/include/test/helper/form.hxx +++ b/include/test/helper/form.hxx @@ -26,6 +26,19 @@ namespace helper { namespace form { +/** @brief Create a XControlShape of kind "CommandButton". + * + * @param r_xComponent The document. + * @param nX The x-position of the shape. + * @param nY The y-position of the shape. + * @param nHeight The height of the shape. + * @param nWidth The width of the shape. + * @return The created XControlShape. + */ +css::uno::Reference<css::drawing::XControlShape> OOO_DLLPUBLIC_TEST createCommandButton( + const css::uno::Reference<css::lang::XComponent>& r_xComponent, const sal_Int32 nX, + const sal_Int32 nY, const sal_Int32 nHeight, const sal_Int32 nWidth); + /** @brief Create a XControlShape * * @param r_xComponent The document. @@ -34,7 +47,7 @@ namespace form * @param nY The y-position of the shape. * @param nHeight The height of the shape. * @param nWidth The width of the shape. - * @return The create XControlShape. + * @return The created XControlShape. */ css::uno::Reference<css::drawing::XControlShape> OOO_DLLPUBLIC_TEST createControlShape( const css::uno::Reference<css::lang::XComponent>& r_xComponent, const OUString& r_aKind, diff --git a/include/test/view/xformlayeraccess.hxx b/include/test/view/xformlayeraccess.hxx new file mode 100644 index 000000000000..ddd2542ab8ef --- /dev/null +++ b/include/test/view/xformlayeraccess.hxx @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_TEST_VIEW_XFORMLAYERACCESS_HXX +#define INCLUDED_TEST_VIEW_XFORMLAYERACCESS_HXX + +#include <com/sun/star/form/XForm.hpp> +#include <com/sun/star/uno/XInterface.hpp> + +#include <com/sun/star/uno/Reference.hxx> + +#include <test/testdllapi.hxx> + +namespace apitest +{ +class OOO_DLLPUBLIC_TEST XFormLayerAccess +{ +public: + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + void setForm(const css::uno::Reference<css::form::XForm>& r_xForm) { m_xForm = r_xForm; } + + void testGetFormController(); + void testIsFormDesignMode(); + void testSetFormDesignMode(); + +protected: + ~XFormLayerAccess() {} + +private: + css::uno::Reference<css::form::XForm> m_xForm; +}; + +} // namespace apitest + +#endif // INCLUDED_TEST_VIEW_XFORMLAYERACCESS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |