summaryrefslogtreecommitdiff
path: root/test/source
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/source
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/source')
-rw-r--r--test/source/uitest/uiobject.cxx106
-rw-r--r--test/source/uitest/uitest.cxx12
2 files changed, 0 insertions, 118 deletions
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: */