summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-01-07 01:28:44 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 17:01:20 +0200
commit40f9be70ef94a0aee64c2c849603b416c1bc17d9 (patch)
treea40212ad9daecce69f27d58d0fcf28c7a031abc2 /test
parentdde9b4d86f75159f0d591f22aa10a7d4571aa441 (diff)
uitest: move the uitest files to vcl
This allows us to use them in vcl as well without introducing dependency problems. Change-Id: Ib97af2d559902f1a6b47f9255bb0426411670647
Diffstat (limited to 'test')
-rw-r--r--test/Library_uitest.mk45
-rw-r--r--test/Module_test.mk1
-rw-r--r--test/source/uitest/uiobject.cxx106
-rw-r--r--test/source/uitest/uitest.cxx12
4 files changed, 0 insertions, 164 deletions
diff --git a/test/Library_uitest.mk b/test/Library_uitest.mk
deleted file mode 100644
index 83c15520470d..000000000000
--- a/test/Library_uitest.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Library_Library,uitest))
-
-$(eval $(call gb_Library_add_defs,uitest,\
- -DDLLIMPLEMENTATION_UITEST \
-))
-
-$(eval $(call gb_Library_use_sdk_api,uitest))
-
-$(eval $(call gb_Library_use_externals,uitest,\
- boost_headers \
- cppunit \
- libxml2 \
-))
-
-$(eval $(call gb_Library_use_libraries,uitest,\
- basegfx \
- comphelper \
- cppu \
- cppuhelper \
- drawinglayer \
- i18nlangtag \
- sal \
- svt \
- tl \
- unotest \
- utl \
- vcl \
- $(gb_UWINAPI) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,uitest,\
- test/source/uitest/uitest \
- test/source/uitest/uiobject \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/test/Module_test.mk b/test/Module_test.mk
index c43a11fdf2d9..7482d280e94e 100644
--- a/test/Module_test.mk
+++ b/test/Module_test.mk
@@ -14,7 +14,6 @@ ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,test,\
Library_test \
Library_subsequenttest \
- Library_uitest \
Library_vclbootstrapprotector \
Package_unittest \
))
diff --git a/test/source/uitest/uiobject.cxx b/test/source/uitest/uiobject.cxx
deleted file mode 100644
index f1b0244d9725..000000000000
--- a/test/source/uitest/uiobject.cxx
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include <test/uiobject.hxx>
-
-#include <iostream>
-
-UIObject::~UIObject()
-{
-}
-
-StringMap UIObject::get_state()
-{
- StringMap aMap;
- aMap["NotImplemented"] = "NotImplemented";
- return aMap;
-}
-
-void UIObject::execute(const OUString& /*rAction*/,
- const StringMap& /*rParameters*/)
-{
- // should never be called
- throw std::exception();
-}
-
-UIObjectType UIObject::getType() const
-{
- return UIObjectType::UNKNOWN;
-}
-
-std::unique_ptr<UIObject> UIObject::get_child(const OUString&)
-{
- return std::unique_ptr<UIObject>();
-}
-
-
-WindowUIObject::WindowUIObject(VclPtr<vcl::Window> xWindow):
- mxWindow(xWindow)
-{
-}
-
-StringMap WindowUIObject::get_state()
-{
- StringMap aMap;
- aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
- aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
- if (mxWindow->GetParent())
- aMap["Parent"] = mxWindow->GetParent()->get_id();
-
- return aMap;
-}
-
-void WindowUIObject::execute(const OUString& rAction,
- const StringMap& rParameters)
-{
- if (rAction == "SET")
- {
- for (auto itr = rParameters.begin(); itr != rParameters.end(); ++itr)
- {
- std::cout << itr->first;
- }
- }
-}
-
-UIObjectType WindowUIObject::getType() const
-{
- return UIObjectType::WINDOW;
-}
-
-namespace {
-
-vcl::Window* findChild(vcl::Window* pParent, const OUString& rID)
-{
- if (!pParent)
- return nullptr;
-
- size_t nCount = pParent->GetChildCount();
- for (size_t i = 0; i < nCount; ++i)
- {
- vcl::Window* pChild = pParent->GetChild(i);
- if (pChild && pChild->get_id() == rID)
- return pChild;
-
- vcl::Window* pResult = findChild(pChild, rID);
- if (pResult)
- return pResult;
- }
-}
-
-}
-
-std::unique_ptr<UIObject> WindowUIObject::get_child(const OUString& rID)
-{
- vcl::Window* pWindow = findChild(mxWindow.get(), rID);
-
- if (pWindow)
- return std::unique_ptr<UIObject>(new WindowUIObject(pWindow));
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/test/source/uitest/uitest.cxx b/test/source/uitest/uitest.cxx
deleted file mode 100644
index 92c2f135f47d..000000000000
--- a/test/source/uitest/uitest.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include <test/uitest.hxx>
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */