14#include <condition_variable>
34 std::condition_variable cv;
44 mpObj(
std::move(pObj))
57 throw css::uno::RuntimeException();
60 std::unique_ptr<UIObject> pObj =
mpObj->get_child(rID);
66 std::scoped_lock<std::mutex> lk(mMutex);
75 std::function<void()> mFunc;
77 std::atomic<bool> mbSignal;
82 mFunc(
std::move(func)),
100 Idle aIdle(
"UI Test Idle Handler2");
104 aIdle.SetInvokeHandler(mHandler);
120 throw css::uno::RuntimeException();
122 auto aIdle = std::make_unique<Idle>(
"UI Test Idle Handler");
125 std::function<void()> func = [&rAction, &rPropValues,
this](){
129 for (
const auto& rPropVal : rPropValues)
132 if (!(rPropVal.Value >>= aVal))
135 aMap[rPropVal.Name] = aVal;
141 ExecuteWrapper* pWrapper =
new ExecuteWrapper(std::move(func),
LINK(¬ifier, Notifier, NotifyHdl));
142 aIdle->SetInvokeHandler(
LINK(pWrapper, ExecuteWrapper, ExecuteActionHdl));
149 std::unique_lock<std::mutex> lk(notifier.mMutex);
150 notifier.cv.wait(lk, [¬ifier]{
return notifier.mReady;});
152 pWrapper->setSignal();
162 throw css::uno::RuntimeException();
166 css::uno::Sequence<css::beans::PropertyValue> aProps(
aMap.size());
167 std::transform(
aMap.begin(),
aMap.end(), aProps.getArray(),
169 { return comphelper::makePropertyValue(elem.first, elem.second); });
177 throw css::uno::RuntimeException();
179 std::set<OUString> aChildren;
183 aChildren =
mpObj->get_children();
186 css::uno::Sequence<OUString> aRet(aChildren.size());
187 std::copy(aChildren.begin(), aChildren.end(), aRet.getArray());
195 throw css::uno::RuntimeException();
198 return mpObj->get_type();
203 return "org.libreoffice.uitest.UIObject";
213 return {
"com.sun.star.ui.test.UIObject" };
219 throw css::uno::RuntimeException();
222 return mpObj->dumpHierarchy();
static bool Reschedule(bool bHandleAllCurrentEvents=false)
Attempt to process current pending event(s)
An idle is a timer to be scheduled immediately.
static void ProcessEventsToIdle()
Process all events until none is pending.
css::uno::Reference< css::ui::test::XUIObject > SAL_CALL getChild(const OUString &rID) override
OUString SAL_CALL getType() override
OUString SAL_CALL getHierarchy() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~UIObjectUnoObj() override
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getState() override
css::uno::Sequence< OUString > SAL_CALL getChildren() override
UIObjectUnoObj(std::unique_ptr< UIObject > pObj)
std::unique_ptr< UIObject > mpObj
void SAL_CALL executeAction(const OUString &rAction, const css::uno::Sequence< css::beans::PropertyValue > &xPropValues) override
OUString SAL_CALL getImplementationName() override
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
#define LINK(Instance, Class, Member)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
HashMap_OWString_Interface aMap
@ LOWEST
Low, very idle cleanup tasks.
@ HIGHEST
These events should run very fast!
IMPL_LINK_NOARG(Notifier, NotifyHdl, Timer *, void)
std::map< OUString, OUString > StringMap