LibreOffice Module vcl (master) 1
uitest/uiobject.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
13
14#include <vcl/svapp.hxx>
16#include <vcl/event.hxx>
18#include <vcl/menu.hxx>
19#include <vcl/tabpage.hxx>
20#include <vcl/tabctrl.hxx>
22#include <vcl/toolkit/spin.hxx>
28#include <vcl/toolkit/edit.hxx>
29#include <vcl/toolkit/field.hxx>
35#include <vcl/uitest/logger.hxx>
36#include <uiobject-internal.hxx>
37#include <verticaltabctrl.hxx>
38#include <vcl/toolbox.hxx>
39
40#include <comphelper/string.hxx>
41#include <comphelper/lok.hxx>
42
43#include <rtl/ustrbuf.hxx>
44#include <sal/log.hxx>
45
46#include <iostream>
47#include <memory>
48#include <vector>
49
51{
52}
53
55{
57 aMap["NotImplemented"] = "NotImplemented";
58 return aMap;
59}
60
61void UIObject::execute(const OUString& /*rAction*/,
62 const StringMap& /*rParameters*/)
63{
64 // should never be called
65 throw std::exception();
66}
67
68OUString UIObject::get_type() const
69{
70 return "Generic UIObject";
71}
72
73std::unique_ptr<UIObject> UIObject::get_child(const OUString&)
74{
75 return std::unique_ptr<UIObject>();
76}
77
78std::set<OUString> UIObject::get_children() const
79{
80 return std::set<OUString>();
81}
82
83OUString UIObject::dumpState() const
84{
85 return OUString();
86}
87
89{
90 return OUString();
91}
92
93OUString UIObject::get_action(VclEventId /*nEvent*/) const
94{
95 return OUString();
96}
97
98namespace {
99
100bool isDialogWindow(vcl::Window const * pWindow)
101{
102 WindowType nType = pWindow->GetType();
103 if (nType == WindowType::DIALOG || nType == WindowType::MODELESSDIALOG)
104 return true;
105
106 // MESSBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX
107 if (nType >= WindowType::MESSBOX && nType <= WindowType::QUERYBOX)
108 return true;
109
110 if (nType == WindowType::TABDIALOG)
111 return true;
112
113 return false;
114}
115
116bool isTopWindow(vcl::Window const * pWindow)
117{
118 WindowType eType = pWindow->GetType();
119 if (eType == WindowType::FLOATINGWINDOW)
120 {
121 return pWindow->GetStyle() & WB_SYSTEMFLOATWIN;
122 }
123 return false;
124}
125
126vcl::Window* get_top_parent(vcl::Window* pWindow)
127{
128 if (isDialogWindow(pWindow) || isTopWindow(pWindow))
129 return pWindow;
130
131 vcl::Window* pParent = pWindow->GetParent();
132 if (!pParent)
133 return pWindow;
134
135 return get_top_parent(pParent);
136}
137
138std::vector<KeyEvent> generate_key_events_from_text(std::u16string_view rStr)
139{
140 std::vector<KeyEvent> aEvents;
141 vcl::KeyCode aCode;
142 for (size_t i = 0, n = rStr.size(); i != n; ++i)
143 {
144 aEvents.emplace_back(rStr[i], aCode);
145 }
146 return aEvents;
147}
148
149sal_uInt16 get_key(sal_Unicode cChar, bool& bShift)
150{
151 bShift = false;
152 if (cChar >= 'a' && cChar <= 'z')
153 return KEY_A + (cChar - 'a');
154 else if (cChar >= 'A' && cChar <= 'Z')
155 {
156 bShift = true;
157 return KEY_A + (cChar - 'A');
158 }
159 else if (cChar >= '0' && cChar <= '9')
160 return KEY_0 + (cChar - 'A');
161
162 return cChar;
163}
164
165bool isFunctionKey(const OUString& rStr, sal_uInt16& rKeyCode)
166{
167 std::map<OUString, sal_uInt16> aFunctionKeyMap = {
168 {"F1", KEY_F1},
169 {"F2", KEY_F2},
170 {"F3", KEY_F3},
171 {"F4", KEY_F4},
172 {"F5", KEY_F5},
173 {"F6", KEY_F6},
174 {"F7", KEY_F7},
175 {"F8", KEY_F8},
176 {"F9", KEY_F9},
177 {"F10", KEY_F10},
178 {"F11", KEY_F11},
179 {"F12", KEY_F12}
180 };
181
182 rKeyCode = 0;
183 auto itr = aFunctionKeyMap.find(rStr);
184 if (itr == aFunctionKeyMap.end())
185 return false;
186
187 rKeyCode = itr->second;
188 return true;
189}
190
191std::vector<KeyEvent> generate_key_events_from_keycode(std::u16string_view rStr)
192{
193 std::vector<KeyEvent> aEvents;
194
195 std::map<OUString, sal_uInt16> aKeyMap = {
196 {"ESC", KEY_ESCAPE},
197 {"TAB", KEY_TAB},
198 {"DOWN", KEY_DOWN},
199 {"UP", KEY_UP},
200 {"LEFT", KEY_LEFT},
201 {"RIGHT", KEY_RIGHT},
202 {"DELETE", KEY_DELETE},
203 {"INSERT", KEY_INSERT},
204 {"SPACE", KEY_SPACE},
205 {"BACKSPACE", KEY_BACKSPACE},
206 {"RETURN", KEY_RETURN},
207 {"HOME", KEY_HOME},
208 {"END", KEY_END},
209 {"PAGEUP", KEY_PAGEUP},
210 {"PAGEDOWN", KEY_PAGEDOWN}
211 };
212
213 // split string along '+'
214 // then translate to keycodes
215 bool bShift = false;
216 bool bMod1 = false;
217 bool bMod2 = false;
218 OUString aRemainingText;
219
220 std::vector<OUString> aTokens = comphelper::string::split(rStr, '+');
221 for (auto const& token : aTokens)
222 {
223 OUString aToken = token.trim();
224 if (aToken == "CTRL")
225 {
226 bMod1 = true;
227 }
228 else if (aToken == "SHIFT")
229 {
230 bShift = true;
231 }
232 else if (aToken == "ALT")
233 {
234 bMod2 = true;
235 }
236 else
237 aRemainingText = aToken;
238 }
239
240 sal_uInt16 nFunctionKey = 0;
241 if (isFunctionKey(aRemainingText, nFunctionKey))
242 {
243 vcl::KeyCode aCode(nFunctionKey, bShift, bMod1, bMod2, false);
244 aEvents.emplace_back(0, aCode);
245 }
246 else if (aKeyMap.find(aRemainingText) != aKeyMap.end())
247 {
248 sal_uInt16 nKey = aKeyMap[aRemainingText];
249 vcl::KeyCode aCode(nKey, bShift, bMod1, bMod2, false);
250 aEvents.emplace_back( 'a', aCode);
251 }
252 else
253 {
254 for (sal_Int32 i = 0; i < aRemainingText.getLength(); ++i)
255 {
256 bool bShiftThroughKey = false;
257 sal_uInt16 nKey = get_key(aRemainingText[i], bShiftThroughKey);
258 vcl::KeyCode aCode(nKey, bShift || bShiftThroughKey, bMod1, bMod2, false);
259 aEvents.emplace_back(aRemainingText[i], aCode);
260 }
261 }
262
263 return aEvents;
264}
265
266OUString to_string(const Point& rPos)
267{
268 OUString sStr = OUString::number(rPos.X())
269 + "x"
270 + OUString::number(rPos.Y());
271
272 return sStr;
273}
274
275OUString to_string(const Size& rSize)
276{
277 OUString sStr = OUString::number(rSize.Width())
278 + "x"
279 + OUString::number(rSize.Height());
280
281 return sStr;
282}
283
284}
285
287 mxWindow(xWindow)
288{
289}
290
292{
293 // Double-buffering is not interesting for uitesting, but can result in direct paint for a
294 // double-buffered widget, which is incorrect.
297
299 aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
300 aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible());
301 aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
302 aMap["HasFocus"] = OUString::boolean(mxWindow->HasChildPathFocus());
303 aMap["WindowType"] = OUString::number(static_cast<sal_uInt16>(mxWindow->GetType()), 16);
304
305 Point aPos = mxWindow->GetPosPixel();
306 aMap["RelPosition"] = to_string(aPos);
307 aMap["Size"] = to_string(mxWindow->GetSizePixel());
308 aMap["ID"] = mxWindow->get_id();
309 vcl::Window* pParent = mxWindow->GetParent();
310 if (pParent)
311 aMap["Parent"] = mxWindow->GetParent()->get_id();
312
313 bool bIgnoreAllExceptTop = isDialogWindow(mxWindow.get());
314 while(pParent)
315 {
316 Point aParentPos = pParent->GetPosPixel();
317 if (!bIgnoreAllExceptTop)
318 aPos += aParentPos;
319
320 if (isDialogWindow(pParent))
321 {
322 bIgnoreAllExceptTop = true;
323 }
324
325 pParent = pParent->GetParent();
326
327 if (!pParent && bIgnoreAllExceptTop)
328 aPos += aParentPos;
329 }
330 aMap["AbsPosition"] = to_string(aPos);
331 aMap["Text"] = mxWindow->GetText();
332 aMap["DisplayText"] = mxWindow->GetDisplayText();
333
334 return aMap;
335}
336
337void WindowUIObject::execute(const OUString& rAction,
338 const StringMap& rParameters)
339{
340 if (rAction == "SET")
341 {
342 for (auto const& parameter : rParameters)
343 {
344 std::cout << parameter.first;
345 }
346 }
347 else if (rAction == "TYPE")
348 {
349 auto it = rParameters.find("TEXT");
350 if (it != rParameters.end())
351 {
352 const OUString& rText = it->second;
353 auto aKeyEvents = generate_key_events_from_text(rText);
354 for (auto const& keyEvent : aKeyEvents)
355 {
356 mxWindow->KeyInput(keyEvent);
357 }
358 }
359 else if (rParameters.find("KEYCODE") != rParameters.end())
360 {
361 auto itr = rParameters.find("KEYCODE");
362 const OUString rText = itr->second;
363 auto aKeyEvents = generate_key_events_from_keycode(rText);
364 for (auto const& keyEvent : aKeyEvents)
365 {
366 mxWindow->KeyInput(keyEvent);
367 }
368 }
369 else
370 {
371 OStringBuffer buf;
372 for (auto const & rPair : rParameters)
373 buf.append("," + rPair.first.toUtf8() + "=" + rPair.second.toUtf8());
374 SAL_WARN("vcl.uitest", "missing parameter TEXT to action TYPE "
375 << buf.makeStringAndClear());
376 throw std::logic_error("missing parameter TEXT to action TYPE");
377 }
378 }
379 else if (rAction == "FOCUS")
380 {
382 }
383 else
384 {
385 OStringBuffer buf;
386 for (auto const & rPair : rParameters)
387 buf.append("," + rPair.first.toUtf8() + "=" + rPair.second.toUtf8());
388 SAL_WARN("vcl.uitest", "unknown action for " << get_name()
389 << ". Action: " << rAction << buf.makeStringAndClear());
390 throw std::logic_error("unknown action");
391 }
392}
393
395{
396 return get_name();
397}
398
399namespace {
400
401vcl::Window* findChild(vcl::Window* pParent, const OUString& rID, bool bRequireVisible = false)
402{
403 if (!pParent || pParent->isDisposed())
404 return nullptr;
405
406 if (pParent->get_id() == rID)
407 return pParent;
408
409 size_t nCount = pParent->GetChildCount();
410 for (size_t i = 0; i < nCount; ++i)
411 {
412 vcl::Window* pChild = pParent->GetChild(i);
413 bool bCandidate = !bRequireVisible || pChild->IsVisible();
414 if (!bCandidate)
415 continue;
416
417 if (pChild->get_id() == rID)
418 return pChild;
419
420 vcl::Window* pResult = findChild(pChild, rID);
421 if (pResult)
422 return pResult;
423 }
424
425 return nullptr;
426}
427
428void addChildren(vcl::Window const * pParent, std::set<OUString>& rChildren)
429{
430 if (!pParent)
431 return;
432
433 size_t nCount = pParent->GetChildCount();
434 for (size_t i = 0; i < nCount; ++i)
435 {
436 vcl::Window* pChild = pParent->GetChild(i);
437 if (pChild)
438 {
439 OUString aId = pChild->get_id();
440 if (!aId.isEmpty())
441 {
442 auto ret = rChildren.insert(aId);
443 SAL_WARN_IF(!ret.second, "vcl.uitest", "duplicate ids '" << aId << "' for ui elements. violates locally unique requirement");
444 }
445
446 addChildren(pChild, rChildren);
447 }
448 }
449}
450
451}
452
453std::unique_ptr<UIObject> WindowUIObject::get_child(const OUString& rID)
454{
455 // in a first step try the real children before moving to the top level parent
456 // This makes it easier to handle cases with the same ID as there is a way
457 // to resolve conflicts
458 vcl::Window* pWindow = findChild(mxWindow.get(), rID);
459 if (!pWindow)
460 {
461 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
462 pWindow = findChild(pDialogParent, rID);
463 }
464
465 if (!pWindow)
466 throw css::uno::RuntimeException("Could not find child with id: " + rID);
467
468 FactoryFunction aFunction = pWindow->GetUITestFactory();
469 return aFunction(pWindow);
470}
471
472std::unique_ptr<UIObject> WindowUIObject::get_visible_child(const OUString& rID)
473{
474 // in a first step try the real children before moving to the top level parent
475 // This makes it easier to handle cases with the same ID as there is a way
476 // to resolve conflicts
477 vcl::Window* pWindow = findChild(mxWindow.get(), rID, true);
478 if (!pWindow)
479 {
480 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
481 pWindow = findChild(pDialogParent, rID, true);
482 }
483
484 if (!pWindow)
485 throw css::uno::RuntimeException("Could not find child with id: " + rID);
486
487 FactoryFunction aFunction = pWindow->GetUITestFactory();
488 return aFunction(pWindow);
489}
490
491std::set<OUString> WindowUIObject::get_children() const
492{
493 std::set<OUString> aChildren;
494 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
495 if (!pDialogParent->isDisposed())
496 {
497 aChildren.insert(pDialogParent->get_id());
498 addChildren(pDialogParent, aChildren);
499 }
500 return aChildren;
501}
502
504{
505 return "WindowUIObject";
506}
507
508namespace {
509
510OUString escape(const OUString& rStr)
511{
512 return rStr.replaceAll("\"", "\\\"");
513}
514
515}
516
518{
519 OUStringBuffer aStateString = "{\"name\":\"" + mxWindow->get_id() + "\"";
520 aStateString.append(", \"ImplementationName\":\"").appendAscii(typeid(*mxWindow).name()).append("\"");
521 StringMap aState = const_cast<WindowUIObject*>(this)->get_state();
522 for (auto const& elem : aState)
523 {
524 OUString property = ",\"" + elem.first + "\":\"" + escape(elem.second) + "\"";
525 aStateString.append(property);
526 }
527
528 size_t nCount = mxWindow->GetChildCount();
529
530 if (nCount)
531 aStateString.append(",\"children\":[");
532
533 for (size_t i = 0; i < nCount; ++i)
534 {
535 if (i != 0)
536 {
537 aStateString.append(",");
538 }
539 vcl::Window* pChild = mxWindow->GetChild(i);
540 std::unique_ptr<UIObject> pChildWrapper =
541 pChild->GetUITestFactory()(pChild);
542 OUString children = pChildWrapper->dumpState();
543 aStateString.append(children);
544 }
545
546 if (nCount)
547 aStateString.append("]");
548
549 aStateString.append("}");
550
551 OUString aString = aStateString.makeStringAndClear();
552 return aString.replaceAll("\n", "\\n");
553}
554
556{
557 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
558 std::unique_ptr<UIObject> pParentWrapper =
559 pDialogParent->GetUITestFactory()(pDialogParent);
560 return pParentWrapper->dumpState();
561}
562
564{
565
566 OUString aActionName;
567 switch (nEvent)
568 {
571 return OUString();
572
575 aActionName = "CLICK";
576 break;
577
579 aActionName = "TYPE";
580 break;
581 default:
582 aActionName = OUString::number(static_cast<int>(nEvent));
583 }
584 return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName;
585}
586
587std::unique_ptr<UIObject> WindowUIObject::create(vcl::Window* pWindow)
588{
589 return std::unique_ptr<UIObject>(new WindowUIObject(pWindow));
590}
591
593 WindowUIObject(xButton),
594 mxButton(xButton)
595{
596}
597
599{
600}
601
603{
605 // Move that to a Control base class
606 aMap["Label"] = mxButton->GetDisplayText();
607
608 return aMap;
609}
610
611void ButtonUIObject::execute(const OUString& rAction,
612 const StringMap& rParameters)
613{
614 if (rAction == "CLICK")
615 {
616 //Click doesn't call toggle when it's a pushbutton tweaked to be a toggle-button
617 if (PushButton *pPushButton = (mxButton->GetStyle() & WB_TOGGLE) ? dynamic_cast<PushButton*>(mxButton.get()) : nullptr)
618 {
619 pPushButton->Check(!pPushButton->IsChecked());
620 pPushButton->Toggle();
621 return;
622 }
623 mxButton->Click();
624 }
625 else
626 WindowUIObject::execute(rAction, rParameters);
627}
628
630{
631 return "ButtonUIObject";
632}
633
635{
636 if (nEvent == VclEventId::ButtonClick)
637 {
638 if(mxButton->get_id()=="writer_all")
639 {
641 return "Start writer" ;
642 }
643 else if(mxButton->get_id()=="calc_all")
644 {
646 return "Start calc" ;
647 }
648 else if(mxButton->get_id()=="impress_all")
649 {
651 return "Start impress" ;
652 }
653 else if(mxButton->get_id()=="draw_all")
654 {
656 return "Start draw" ;
657 }
658 else if(mxButton->get_id()=="math_all")
659 {
661 return "Start math" ;
662 }
663 else if(mxButton->get_id()=="database_all")
664 {
666 return "Start database" ;
667 }
668 else{
669 if (get_top_parent(mxButton)->get_id().isEmpty()){
670 //This part because if we don't have parent
671 return "Click on '" + mxButton->get_id() ;
672 }
673 return "Click on '" + mxButton->get_id() + "' from "+
674 get_top_parent(mxButton)->get_id();
675 }
676 }
677 else
678 return WindowUIObject::get_action(nEvent);
679}
680
681std::unique_ptr<UIObject> ButtonUIObject::create(vcl::Window* pWindow)
682{
683 Button* pButton = dynamic_cast<Button*>(pWindow);
684 assert(pButton);
685 return std::unique_ptr<UIObject>(new ButtonUIObject(pButton));
686}
687
689 WindowUIObject(xDialog),
690 mxDialog(xDialog)
691{
692}
693
695{
696}
697
699{
701 aMap["Modal"] = OUString::boolean(mxDialog->IsModalInputMode());
702
703 return aMap;
704}
705
707{
708 return "DialogUIObject";
709}
710
711std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow)
712{
713 Dialog* pDialog = dynamic_cast<Dialog*>(pWindow);
714 assert(pDialog);
715 return std::unique_ptr<UIObject>(new DialogUIObject(pDialog));
716}
717
719 WindowUIObject(xEdit),
720 mxEdit(xEdit)
721{
722}
723
725{
726}
727
728void EditUIObject::execute(const OUString& rAction,
729 const StringMap& rParameters)
730{
731 bool bHandled = true;
732 if (rAction == "TYPE")
733 {
734 auto it = rParameters.find("TEXT");
735 if (it != rParameters.end())
736 {
737 const OUString& rText = it->second;
738 auto aKeyEvents = generate_key_events_from_text(rText);
739 for (auto const& keyEvent : aKeyEvents)
740 {
741 mxEdit->KeyInput(keyEvent);
742 }
743 }
744 else
745 {
746 bHandled = false;
747 }
748 }
749 else if (rAction == "SET")
750 {
751 auto it = rParameters.find("TEXT");
752 if (it != rParameters.end())
753 {
754 mxEdit->SetText(it->second);
755 mxEdit->Modify();
756 }
757 else
758 bHandled = false;
759 }
760 else if (rAction == "SELECT")
761 {
762 if (rParameters.find("FROM") != rParameters.end() &&
763 rParameters.find("TO") != rParameters.end())
764 {
765 tools::Long nMin = rParameters.find("FROM")->second.toInt32();
766 tools::Long nMax = rParameters.find("TO")->second.toInt32();
767 Selection aSelection(nMin, nMax);
768 mxEdit->SetSelection(aSelection);
769 }
770 }
771 else if (rAction == "CLEAR")
772 {
773 mxEdit->SetText("");
774 mxEdit->Modify();
775 bHandled = true;
776 }
777 else
778 {
779 bHandled = false;
780 }
781
782 if (!bHandled)
783 WindowUIObject::execute(rAction, rParameters);
784}
785
787{
789 aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
790 aMap["QuickHelpText"] = mxEdit->GetQuickHelpText();
791 aMap["SelectedText"] = mxEdit->GetSelected();
792 aMap["Text"] = mxEdit->GetText();
793
794 return aMap;
795}
796
798{
800 {
801 const Selection& rSelection = mxEdit->GetSelection();
802 tools::Long nMin = rSelection.Min();
803 tools::Long nMax = rSelection.Max();
804 if(get_top_parent(mxEdit)->get_id().isEmpty()){
805 //This part because if we don't have parent
806 return "Select in '" +
807 mxEdit->get_id() +
808 "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
809 OUString::number(nMax) + "\"}"
810 ;
811 }
812 return "Select in '" +
813 mxEdit->get_id() +
814 "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
815 OUString::number(nMax) + "\"} from "
816 + get_top_parent(mxEdit)->get_id()
817 ;
818 }
819 else
820 return WindowUIObject::get_action(nEvent);
821}
822
824{
825 return "EditUIObject";
826}
827
828std::unique_ptr<UIObject> EditUIObject::create(vcl::Window* pWindow)
829{
830 Edit* pEdit = dynamic_cast<Edit*>(pWindow);
831 assert(pEdit);
832 return std::unique_ptr<UIObject>(new EditUIObject(pEdit));
833}
834
836 WindowUIObject(xEdit),
837 mxEdit(xEdit)
838{
839}
840
842{
843}
844
845void MultiLineEditUIObject::execute(const OUString& rAction,
846 const StringMap& rParameters)
847{
848 bool bHandled = true;
849 if (rAction == "TYPE")
850 {
851 WindowUIObject aChildObj(mxEdit->GetTextWindow());
852 aChildObj.execute(rAction, rParameters);
853 }
854 else if (rAction == "SELECT")
855 {
856 if (rParameters.find("FROM") != rParameters.end() &&
857 rParameters.find("TO") != rParameters.end())
858 {
859 tools::Long nMin = rParameters.find("FROM")->second.toInt32();
860 tools::Long nMax = rParameters.find("TO")->second.toInt32();
861 Selection aSelection(nMin, nMax);
862 mxEdit->SetSelection(aSelection);
863 }
864 }
865 else
866 {
867 bHandled = false;
868 }
869
870 if (!bHandled)
871 WindowUIObject::execute(rAction, rParameters);
872}
873
875{
877 aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
878 aMap["SelectedText"] = mxEdit->GetSelected();
879 aMap["Text"] = mxEdit->GetText();
880
881 return aMap;
882}
883
885{
886 return "MultiLineEditUIObject";
887}
888
889std::unique_ptr<UIObject> MultiLineEditUIObject::create(vcl::Window* pWindow)
890{
891 VclMultiLineEdit* pEdit = dynamic_cast<VclMultiLineEdit*>(pWindow);
892 assert(pEdit);
893 return std::unique_ptr<UIObject>(new MultiLineEditUIObject(pEdit));
894}
895
897 : WindowUIObject(xExpander)
898 , mxExpander(xExpander)
899{
900}
901
903{
904}
905
906void ExpanderUIObject::execute(const OUString& rAction, const StringMap& rParameters)
907{
908 if (rAction == "EXPAND")
909 {
911 }
912 else if (rAction == "COLLAPSE")
913 {
914 mxExpander->set_expanded(false);
915 }
916 else
917 WindowUIObject::execute(rAction, rParameters);
918}
919
921{
923 aMap["Expanded"] = OUString::boolean(mxExpander->get_expanded());
924 return aMap;
925}
926
928{
929 return "ExpanderUIObject";
930}
931
932std::unique_ptr<UIObject> ExpanderUIObject::create(vcl::Window* pWindow)
933{
934 VclExpander* pVclExpander = dynamic_cast<VclExpander*>(pWindow);
935 assert(pVclExpander);
936 return std::unique_ptr<UIObject>(new ExpanderUIObject(pVclExpander));
937}
938
940 WindowUIObject(xCheckbox),
941 mxCheckBox(xCheckbox)
942{
943}
944
946{
947}
948
949void CheckBoxUIObject::execute(const OUString& rAction,
950 const StringMap& rParameters)
951{
952 if (rAction == "CLICK")
953 {
954 // don't use toggle directly, it does not set the value
956 }
957 else
958 WindowUIObject::execute(rAction, rParameters);
959}
960
962{
964 aMap["Selected"] = OUString::boolean(mxCheckBox->IsChecked());
965 aMap["TriStateEnabled"] = OUString::boolean(mxCheckBox->IsTriStateEnabled());
966 return aMap;
967}
968
970{
971 return "CheckBoxUIObject";
972}
973
975{
976 if (nEvent == VclEventId::CheckboxToggle)
977 {
978 if(get_top_parent(mxCheckBox)->get_id().isEmpty()){
979 //This part because if we don't have parent
980 return "Toggle '" + mxCheckBox->get_id() + "' CheckBox";
981 }
982 return "Toggle '" + mxCheckBox->get_id() + "' CheckBox from " +
983 get_top_parent(mxCheckBox)->get_id();
984 }
985 else
986 return WindowUIObject::get_action(nEvent);
987}
988
989std::unique_ptr<UIObject> CheckBoxUIObject::create(vcl::Window* pWindow)
990{
991 CheckBox* pCheckBox = dynamic_cast<CheckBox*>(pWindow);
992 assert(pCheckBox);
993 return std::unique_ptr<UIObject>(new CheckBoxUIObject(pCheckBox));
994}
995
997 WindowUIObject(xRadioButton),
998 mxRadioButton(xRadioButton)
999{
1000}
1001
1003{
1004}
1005
1006void RadioButtonUIObject::execute(const OUString& rAction,
1007 const StringMap& rParameters)
1008{
1009 if (rAction == "CLICK")
1010 {
1012 }
1013 else
1014 WindowUIObject::execute(rAction, rParameters);
1015}
1016
1018{
1020 aMap["Checked"] = OUString::boolean(mxRadioButton->IsChecked());
1021 aMap["Enabled"] = OUString::boolean(mxRadioButton->IsEnabled());
1022
1023 return aMap;
1024}
1025
1027{
1028 return "RadioButtonUIObject";
1029}
1030
1032{
1033 if (nEvent == VclEventId::RadiobuttonToggle)
1034 {
1035 if(get_top_parent(mxRadioButton)->get_id().isEmpty()){
1036 //This part because if we don't have parent
1037 return "Select '" + mxRadioButton->get_id() + "' RadioButton";
1038 }
1039 return "Select '" + mxRadioButton->get_id() + "' RadioButton from " +
1040 get_top_parent(mxRadioButton)->get_id();
1041 }
1042 else
1043 return WindowUIObject::get_action(nEvent);
1044}
1045
1046std::unique_ptr<UIObject> RadioButtonUIObject::create(vcl::Window* pWindow)
1047{
1048 RadioButton* pRadioButton = dynamic_cast<RadioButton*>(pWindow);
1049 assert(pRadioButton);
1050 return std::unique_ptr<UIObject>(new RadioButtonUIObject(pRadioButton));
1051}
1052
1054 WindowUIObject(xTabPage),
1055 mxTabPage(xTabPage)
1056{
1057}
1058
1060{
1061}
1062
1063void TabPageUIObject::execute(const OUString& rAction,
1064 const StringMap& rParameters)
1065{
1066 WindowUIObject::execute(rAction, rParameters);
1067}
1068
1070{
1072
1073 return aMap;
1074}
1075
1077{
1078 return "TabPageUIObject";
1079}
1080
1082 WindowUIObject(xListBox),
1083 mxListBox(xListBox)
1084{
1085}
1086
1088{
1089}
1090
1091void ListBoxUIObject::execute(const OUString& rAction,
1092 const StringMap& rParameters)
1093{
1094 if (!mxListBox->IsEnabled())
1095 return;
1096
1097 bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
1098 if (!isTiledRendering && !mxListBox->IsReallyVisible())
1099 return;
1100
1101 if (rAction == "SELECT")
1102 {
1103 bool bSelect = true;
1104 if (rParameters.find("POS") != rParameters.end())
1105 {
1106 auto itr = rParameters.find("POS");
1107 OUString aVal = itr->second;
1108 sal_Int32 nPos = aVal.toInt32();
1109 mxListBox->SelectEntryPos(nPos, bSelect);
1110 }
1111 else if (rParameters.find("TEXT") != rParameters.end())
1112 {
1113 auto itr = rParameters.find("TEXT");
1114 OUString aText = itr->second;
1115 mxListBox->SelectEntry(aText, bSelect);
1116 }
1117 mxListBox->Select();
1118 }
1119 else
1120 WindowUIObject::execute(rAction, rParameters);
1121}
1122
1124{
1126 aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly());
1127 aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
1128 aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount());
1129 aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount());
1130 aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos());
1131 aMap["SelectEntryText"] = mxListBox->GetSelectedEntry();
1132
1133 return aMap;
1134}
1135
1137{
1138 return "ListBoxUIObject";
1139}
1140
1142{
1143 if (nEvent == VclEventId::ListboxSelect)
1144 {
1145 sal_Int32 nPos = mxListBox->GetSelectedEntryPos();
1146 if(get_top_parent(mxListBox)->get_id().isEmpty()){
1147 //This part because if we don't have parent
1148 return "Select element with position " + OUString::number(nPos) +
1149 " in '" + mxListBox->get_id();
1150 }
1151 return "Select element with position " + OUString::number(nPos) +
1152 " in '" + mxListBox->get_id() +"' from" + get_top_parent(mxListBox)->get_id() ;
1153 }
1154 else if (nEvent == VclEventId::ListboxFocus)
1155 {
1156 if(get_top_parent(mxListBox)->get_id().isEmpty())
1157 {
1158 //This part because if we don't have parent
1159 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id();
1160 }
1161 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id() +
1162 " Parent:" + get_top_parent(mxListBox)->get_id();
1163 }
1164 else
1165 return WindowUIObject::get_action(nEvent);
1166}
1167
1168std::unique_ptr<UIObject> ListBoxUIObject::create(vcl::Window* pWindow)
1169{
1170 ListBox* pListBox = dynamic_cast<ListBox*>(pWindow);
1171 assert(pListBox);
1172 return std::unique_ptr<UIObject>(new ListBoxUIObject(pListBox));
1173}
1174
1176 WindowUIObject(xComboBox),
1177 mxComboBox(xComboBox)
1178{
1179}
1180
1182{
1183}
1184
1185void ComboBoxUIObject::execute(const OUString& rAction,
1186 const StringMap& rParameters)
1187{
1188 if (rAction == "SELECT")
1189 {
1190 if (rParameters.find("POS") != rParameters.end())
1191 {
1192 auto itr = rParameters.find("POS");
1193 OUString aVal = itr->second;
1194 sal_Int32 nPos = aVal.toInt32();
1196 }
1197 else if(rParameters.find("TEXT") != rParameters.end()){
1198 auto itr = rParameters.find("TEXT");
1199 OUString aVal = itr->second;
1200 sal_Int32 nPos = mxComboBox->GetEntryPos(aVal);
1202 }
1203 mxComboBox->Select();
1204 }
1205 else if ( rAction == "TYPE" || rAction == "SET" || rAction == "CLEAR" ){
1206 if (mxComboBox->GetSubEdit())
1207 {
1208 Edit* pEdit = mxComboBox->GetSubEdit();
1209 std::unique_ptr<UIObject> pObj = EditUIObject::create(pEdit);
1210 pObj->execute(rAction, rParameters);
1211 }
1212 else
1213 WindowUIObject::execute(rAction, rParameters);
1214 }
1215 else
1216 WindowUIObject::execute(rAction, rParameters);
1217}
1218
1220{
1222 aMap["SelectedText"] = mxComboBox->GetSelected();
1223 return aMap;
1224}
1225
1227{
1228 return "ComboBoxUIObject";
1229}
1230
1232{
1233 if (nEvent == VclEventId::ComboboxSelect)
1234 {
1235 sal_Int32 nPos = mxComboBox->GetSelectedEntryPos();
1236 if (get_top_parent(mxComboBox)->get_id().isEmpty()){
1237 //This part because if we don't have parent
1238 return "Select in '" + mxComboBox->get_id() +
1239 "' ComboBox item number " + OUString::number(nPos);
1240 }
1241 return "Select in '" + mxComboBox->get_id() +
1242 "' ComboBox item number " + OUString::number(nPos) +
1243 " from " + get_top_parent(mxComboBox)->get_id();
1244 }
1245 else
1246 return WindowUIObject::get_action(nEvent);
1247}
1248
1249std::unique_ptr<UIObject> ComboBoxUIObject::create(vcl::Window* pWindow)
1250{
1251 ComboBox* pComboBox = dynamic_cast<ComboBox*>(pWindow);
1252 assert(pComboBox);
1253 return std::unique_ptr<UIObject>(new ComboBoxUIObject(pComboBox));
1254}
1255
1257 WindowUIObject(xSpinButton),
1258 mxSpinButton(xSpinButton)
1259{
1260}
1261
1263{
1264}
1265
1266void SpinUIObject::execute(const OUString& rAction,
1267 const StringMap& rParameters)
1268{
1269 if (rAction == "UP")
1270 {
1271 mxSpinButton->Up();
1272 }
1273 else if (rAction == "DOWN")
1274 {
1275 mxSpinButton->Down();
1276 }
1277 else
1278 WindowUIObject::execute(rAction, rParameters);
1279}
1280
1282{
1284 aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
1285 aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
1286 aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
1287 aMap["Value"] = OUString::number(mxSpinButton->GetValue());
1288
1289 return aMap;
1290}
1291
1293{
1294 if (nEvent == VclEventId::SpinbuttonUp)
1295 {
1296 return this->get_type() + " Action:UP Id:" + mxSpinButton->get_id() +
1297 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1298 }
1299 else if (nEvent == VclEventId::SpinbuttonDown)
1300 {
1301 return this->get_type() + " Action:DOWN Id:" + mxSpinButton->get_id() +
1302 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1303 }
1304 else
1305 return WindowUIObject::get_action(nEvent);
1306}
1307
1309{
1310 return "SpinUIObject";
1311}
1312
1314 EditUIObject(xSpinField),
1315 mxSpinField(xSpinField)
1316{
1317}
1318
1320{
1321}
1322
1323void SpinFieldUIObject::execute(const OUString& rAction,
1324 const StringMap& rParameters)
1325{
1326 if (rAction == "UP")
1327 {
1328 mxSpinField->Up();
1329 }
1330 else if (rAction == "DOWN")
1331 {
1332 mxSpinField->Down();
1333 }
1334 else if (rAction == "TYPE")
1335 {
1336 if (mxSpinField->GetSubEdit())
1337 {
1338 Edit* pSubEdit = mxSpinField->GetSubEdit();
1339 EditUIObject aSubObject(pSubEdit);
1340 aSubObject.execute(rAction, rParameters);
1341 }
1342 }
1343 else
1344 EditUIObject::execute(rAction, rParameters);
1345}
1346
1348{
1350
1351 return aMap;
1352}
1353
1355{
1356 if (nEvent == VclEventId::SpinfieldUp)
1357 {
1358 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1359 {
1360 //This part because if we don't have parent
1361 return "Increase '" + mxSpinField->get_id();
1362 }
1363 return "Increase '" + mxSpinField->get_id() +
1364 "' from " + get_top_parent(mxSpinField)->get_id();
1365 }
1366 else if (nEvent == VclEventId::SpinfieldDown)
1367 {
1368 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1369 {
1370 //This part because if we don't have parent
1371 return "Decrease '" + mxSpinField->get_id();
1372 }
1373 return "Decrease '" + mxSpinField->get_id() +
1374 "' from " + get_top_parent(mxSpinField)->get_id();
1375 }
1376 else
1377 return WindowUIObject::get_action(nEvent);
1378}
1379
1381{
1382 return "SpinFieldUIObject";
1383}
1384
1385std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow)
1386{
1387 SpinField* pSpinField = dynamic_cast<SpinField*>(pWindow);
1388 assert(pSpinField);
1389 return std::unique_ptr<UIObject>(new SpinFieldUIObject(pSpinField));
1390}
1391
1392
1394 SpinFieldUIObject(xMetricField),
1395 mxMetricField(xMetricField)
1396{
1397}
1398
1400{
1401}
1402
1403void MetricFieldUIObject::execute(const OUString& rAction,
1404 const StringMap& rParameters)
1405{
1406 if (rAction == "VALUE")
1407 {
1408 auto itPos = rParameters.find("VALUE");
1409 if (itPos != rParameters.end())
1410 {
1411 mxMetricField->SetValueFromString(itPos->second);
1412 }
1413 }
1414 else
1415 SpinFieldUIObject::execute(rAction, rParameters);
1416}
1417
1419{
1421 aMap["Value"] = mxMetricField->GetValueString();
1422
1423 return aMap;
1424}
1425
1427{
1428 return "MetricFieldUIObject";
1429}
1430
1431std::unique_ptr<UIObject> MetricFieldUIObject::create(vcl::Window* pWindow)
1432{
1433 MetricField* pMetricField = dynamic_cast<MetricField*>(pWindow);
1434 assert(pMetricField);
1435 return std::unique_ptr<UIObject>(new MetricFieldUIObject(pMetricField));
1436}
1437
1439 SpinFieldUIObject(xFormattedField),
1440 mxFormattedField(xFormattedField)
1441{
1442}
1443
1445{
1446}
1447
1448void FormattedFieldUIObject::execute(const OUString& rAction,
1449 const StringMap& rParameters)
1450{
1451 if (rAction == "VALUE")
1452 {
1453 auto itPos = rParameters.find("VALUE");
1454 if (itPos != rParameters.end())
1455 {
1456 mxFormattedField->SetValueFromString(itPos->second);
1457 }
1458 }
1459 else
1460 SpinFieldUIObject::execute(rAction, rParameters);
1461}
1462
1464{
1466 aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue());
1467
1468 return aMap;
1469}
1470
1472{
1473 return "FormattedFieldUIObject";
1474}
1475
1476std::unique_ptr<UIObject> FormattedFieldUIObject::create(vcl::Window* pWindow)
1477{
1478 FormattedField* pFormattedField = dynamic_cast<FormattedField*>(pWindow);
1479 assert(pFormattedField);
1480 return std::unique_ptr<UIObject>(new FormattedFieldUIObject(pFormattedField));
1481}
1482
1484 WindowUIObject(xTabControl),
1485 mxTabControl(xTabControl)
1486{
1487}
1488
1490{
1491}
1492
1493void TabControlUIObject::execute(const OUString& rAction,
1494 const StringMap& rParameters)
1495{
1496 if (rAction == "SELECT")
1497 {
1498 if (rParameters.find("POS") != rParameters.end())
1499 {
1500 auto itr = rParameters.find("POS");
1501 sal_uInt32 nPos = itr->second.toUInt32();
1502 std::vector<sal_uInt16> aIds = mxTabControl->GetPageIDs();
1504 }
1505 }
1506 else
1507 WindowUIObject::execute(rAction, rParameters);
1508}
1509
1511{
1513 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1514
1515 sal_uInt16 nPageId = mxTabControl->GetCurPageId();
1516 aMap["CurrPageId"] = OUString::number(nPageId);
1517 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1518
1519 return aMap;
1520}
1521
1523{
1524 if (nEvent == VclEventId::TabpageActivate)
1525 {
1526 sal_Int32 nPageId = mxTabControl->GetCurPageId();
1527
1528 if(get_top_parent(mxTabControl)->get_id().isEmpty()){
1529 //This part because if we don't have parent
1530 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1531 " in '" + mxTabControl->get_id();
1532 }
1533 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1534 " in '" + mxTabControl->get_id()+
1535 "' from " + get_top_parent(mxTabControl)->get_id() ;
1536 }
1537 else
1538 return WindowUIObject::get_action(nEvent);
1539}
1540
1542{
1543 return "TabControlUIObject";
1544}
1545
1546std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
1547{
1548 TabControl* pTabControl = dynamic_cast<TabControl*>(pWindow);
1549 assert(pTabControl);
1550 return std::unique_ptr<UIObject>(new TabControlUIObject(pTabControl));
1551}
1552
1554 WindowUIObject(xRoadmapWizard),
1555 mxRoadmapWizard(xRoadmapWizard)
1556{
1557}
1558
1560{
1561}
1562
1563void RoadmapWizardUIObject::execute(const OUString& rAction,
1564 const StringMap& rParameters)
1565{
1566 if (rAction == "SELECT")
1567 {
1568 if (rParameters.find("POS") != rParameters.end())
1569 {
1570 auto itr = rParameters.find("POS");
1571 sal_uInt32 nPos = itr->second.toUInt32();
1573 }
1574 }
1575 else
1576 WindowUIObject::execute(rAction, rParameters);
1577}
1578
1580{
1582
1583 aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
1584
1585 return aMap;
1586}
1587
1589{
1590 return "RoadmapWizardUIObject";
1591}
1592
1593std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
1594{
1595 vcl::RoadmapWizard* pRoadmapWizard = dynamic_cast<vcl::RoadmapWizard*>(pWindow);
1596 assert(pRoadmapWizard);
1597 return std::unique_ptr<UIObject>(new RoadmapWizardUIObject(pRoadmapWizard));
1598}
1599
1601 WindowUIObject(xTabControl),
1602 mxTabControl(xTabControl)
1603{
1604}
1605
1607{
1608}
1609
1610void VerticalTabControlUIObject::execute(const OUString& rAction,
1611 const StringMap& rParameters)
1612{
1613 if (rAction == "SELECT")
1614 {
1615 if (rParameters.find("POS") != rParameters.end())
1616 {
1617 auto itr = rParameters.find("POS");
1618 sal_uInt32 nPos = itr->second.toUInt32();
1619 OString xid = mxTabControl->GetPageId(nPos);
1621 }
1622 }
1623 else
1624 WindowUIObject::execute(rAction, rParameters);
1625}
1626
1628{
1630 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1631
1632 OString nPageId = mxTabControl->GetCurPageId();
1633 aMap["CurrPageTitel"] = mxTabControl->GetPageText(nPageId);
1634 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1635
1636 return aMap;
1637}
1638
1640{
1641 return "VerticalTabControlUIObject";
1642}
1643
1644std::unique_ptr<UIObject> VerticalTabControlUIObject::create(vcl::Window* pWindow)
1645{
1646 VerticalTabControl* pTabControl = dynamic_cast<VerticalTabControl*>(pWindow);
1647 assert(pTabControl);
1648 return std::unique_ptr<UIObject>(new VerticalTabControlUIObject(pTabControl));
1649}
1650
1651
1653 WindowUIObject(xToolBox),
1654 mxToolBox(xToolBox)
1655{
1656}
1657
1659{
1660}
1661
1662void ToolBoxUIObject::execute(const OUString& rAction,
1663 const StringMap& rParameters)
1664{
1665 if (rAction == "CLICK")
1666 {
1667 if (rParameters.find("POS") != rParameters.end())
1668 {
1669 auto itr = rParameters.find("POS");
1670 sal_uInt16 nPos = itr->second.toUInt32();
1672 mxToolBox->Click();
1673 mxToolBox->Select();
1674 }
1675 }
1676 else
1677 WindowUIObject::execute(rAction, rParameters);
1678}
1679
1681{
1682 if (nEvent == VclEventId::ToolboxClick)
1683 {
1684 return "Click on item number " + OUString::number(sal_uInt16(mxToolBox->GetCurItemId())) +
1685 " in " + mxToolBox->get_id();
1686 }
1687 else
1688 return WindowUIObject::get_action(nEvent);
1689}
1690
1692{
1694 aMap["CurrSelectedItemID"] = OUString::number(sal_uInt16(mxToolBox->GetCurItemId()));
1695 aMap["CurrSelectedItemText"] = mxToolBox->GetItemText(mxToolBox->GetCurItemId());
1696 aMap["CurrSelectedItemCommand"] = mxToolBox->GetItemCommand(mxToolBox->GetCurItemId());
1697 aMap["ItemCount"] = OUString::number(mxToolBox->GetItemCount());
1698 return aMap;
1699}
1700
1702{
1703 return "ToolBoxUIObject";
1704}
1705
1706std::unique_ptr<UIObject> ToolBoxUIObject::create(vcl::Window* pWindow)
1707{
1708 ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
1709 assert(pToolBox);
1710 return std::unique_ptr<UIObject>(new ToolBoxUIObject(pToolBox));
1711}
1712
1714 WindowUIObject(xMenuButton),
1715 mxMenuButton(xMenuButton)
1716{
1717}
1718
1720{
1721}
1722
1724{
1726 aMap["Label"] = mxMenuButton->GetDisplayText();
1727 aMap["CurrentItem"] = OUString::createFromAscii(mxMenuButton->GetCurItemIdent());
1728 return aMap;
1729}
1730
1731void MenuButtonUIObject::execute(const OUString& rAction,
1732 const StringMap& rParameters)
1733{
1734 if (rAction == "CLICK")
1735 {
1738 }
1739 else if (rAction == "OPENLIST")
1740 {
1742 }
1743 else if (rAction == "OPENFROMLIST")
1744 {
1745 auto itr = rParameters.find("POS");
1746 sal_uInt32 nPos = itr->second.toUInt32();
1747
1748 sal_uInt32 nId = mxMenuButton->GetPopupMenu()->GetItemId(nPos);
1752 }
1753 else if (rAction == "CLOSELIST")
1754 {
1756 }
1757 else
1758 WindowUIObject::execute(rAction, rParameters);
1759}
1760
1762{
1763 return "MenuButtonUIObject";
1764}
1765
1766std::unique_ptr<UIObject> MenuButtonUIObject::create(vcl::Window* pWindow)
1767{
1768 MenuButton* pMenuButton = dynamic_cast<MenuButton*>(pWindow);
1769 assert(pMenuButton);
1770 return std::unique_ptr<UIObject>(new MenuButtonUIObject(pMenuButton));
1771}
1772
1774 : WindowUIObject(rDrawingArea)
1775 , mxDrawingArea(dynamic_cast<VclDrawingArea*>(rDrawingArea.get()))
1776{
1777 assert(mxDrawingArea);
1779}
1780
1782{
1783}
1784
1785void DrawingAreaUIObject::execute(const OUString& rAction, const StringMap& rParameters)
1786{
1787 if (rAction == "CLICK")
1788 {
1789 // POSX and POSY are percentage of width/height dimensions
1790 if (rParameters.find("POSX") != rParameters.end() &&
1791 rParameters.find("POSY") != rParameters.end())
1792 {
1793 auto aPosX = rParameters.find("POSX");
1794 auto aPosY = rParameters.find("POSY");
1795
1796 OString sPosX2 = OUStringToOString(aPosX->second, RTL_TEXTENCODING_ASCII_US);
1797 OString sPoxY2 = OUStringToOString(aPosY->second, RTL_TEXTENCODING_ASCII_US);
1798
1799 if (!sPosX2.isEmpty() && !sPoxY2.isEmpty())
1800 {
1801 double fPosX = std::atof(sPosX2.getStr());
1802 double fPosY = std::atof(sPoxY2.getStr());
1803
1804 fPosX = fPosX * mxDrawingArea->GetOutputSizePixel().Width();
1805 fPosY = fPosY * mxDrawingArea->GetOutputSizePixel().Height();
1806
1810 }
1811 }
1812 }
1813 else
1814 WindowUIObject::execute(rAction, rParameters);
1815}
1816
1817std::unique_ptr<UIObject> DrawingAreaUIObject::create(vcl::Window* pWindow)
1818{
1819 VclDrawingArea* pVclDrawingArea = dynamic_cast<VclDrawingArea*>(pWindow);
1820 assert(pVclDrawingArea);
1821 return std::unique_ptr<UIObject>(new DrawingAreaUIObject(pVclDrawingArea));
1822}
1823
1825 TreeListUIObject(xIconView)
1826{
1827}
1828
1830{
1832
1834
1835 OUString* pId = static_cast<OUString*>(pEntry->GetUserData());
1836 if (pId)
1837 aMap["SelectedItemId"] = *pId;
1838
1839 SvTreeList* pModel = mxTreeList->GetModel();
1840 if (pModel)
1841 aMap["SelectedItemPos"] = OUString::number(pModel->GetAbsPos(pEntry));
1842
1843 return aMap;
1844}
1845
1847{
1848 return "IconViewUIObject";
1849}
1850
1851std::unique_ptr<UIObject> IconViewUIObject::create(vcl::Window* pWindow)
1852{
1853 SvTreeListBox* pTreeList = dynamic_cast<SvTreeListBox*>(pWindow);
1854 assert(pTreeList);
1855 return std::unique_ptr<UIObject>(new IconViewUIObject(pTreeList));
1856}
1857
1858/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AnyEventRef aEvent
sal_uInt16 nPageId
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
VclPtr< Button > mxButton
Definition: uiobject.hxx:156
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
ButtonUIObject(const VclPtr< Button > &xButton)
virtual ~ButtonUIObject() override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void Click()
Definition: button.cxx:128
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual ~CheckBoxUIObject() override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
CheckBoxUIObject(const VclPtr< CheckBox > &xCheckbox)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
VclPtr< CheckBox > mxCheckBox
Definition: uiobject.hxx:263
virtual OUString get_name() const override
SAL_DLLPRIVATE void ImplCheck()
Definition: button.cxx:3227
bool IsTriStateEnabled() const
Definition: button.hxx:356
bool IsChecked() const
Definition: button.hxx:350
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~ComboBoxUIObject() override
VclPtr< ComboBox > mxComboBox
Definition: uiobject.hxx:354
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
ComboBoxUIObject(const VclPtr< ComboBox > &xListBox)
A widget used to choose from a list of items and which has an entry.
Definition: combobox.hxx:39
sal_Int32 GetEntryPos(std::u16string_view rStr) const
Definition: combobox.cxx:946
void Select()
Definition: combobox.cxx:504
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: combobox.cxx:1359
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: combobox.cxx:1377
virtual OUString GetDisplayText() const override
Definition: ctrl.cxx:219
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
VclPtr< Dialog > mxDialog
Definition: uiobject.hxx:178
virtual OUString get_name() const override
virtual ~DialogUIObject() override
DialogUIObject(const VclPtr< Dialog > &xDialog)
bool IsModalInputMode() const
Definition: dialog.hxx:150
virtual ~DrawingAreaUIObject() override
VclPtr< VclDrawingArea > mxDrawingArea
Definition: uiobject.hxx:577
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
weld::CustomWidgetController * mpController
Definition: uiobject.hxx:579
DrawingAreaUIObject(const VclPtr< vcl::Window > &rDrawingArea)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
EditUIObject(const VclPtr< Edit > &xEdit)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~EditUIObject() override
VclPtr< Edit > mxEdit
Definition: uiobject.hxx:196
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
Definition: edit.hxx:56
virtual void Modify()
Definition: edit.cxx:2347
virtual void SetText(const OUString &rStr) override
Definition: edit.cxx:2578
virtual sal_Int32 GetMaxTextLen() const
Definition: edit.hxx:181
virtual const Selection & GetSelection() const
Definition: edit.cxx:2501
Edit * GetSubEdit() const
Definition: edit.hxx:217
virtual void SetSelection(const Selection &rSelection)
Definition: edit.cxx:2427
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: edit.cxx:1727
virtual OUString GetSelected() const
Definition: edit.cxx:2528
virtual OUString GetText() const override
Definition: edit.cxx:2597
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~ExpanderUIObject() override
VclPtr< VclExpander > mxExpander
Definition: uiobject.hxx:240
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
ExpanderUIObject(const VclPtr< VclExpander > &xExpander)
FormattedFieldUIObject(const VclPtr< FormattedField > &xEdit)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
VclPtr< FormattedField > mxFormattedField
virtual ~FormattedFieldUIObject() override
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
void SetValueFromString(const OUString &rStr)
Definition: fmtfield.cxx:1329
Formatter & GetFormatter()
Definition: fmtfield.cxx:1312
double GetValue()
Definition: fmtfield.cxx:861
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
IconViewUIObject(const VclPtr< SvTreeListBox > &xIconView)
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~ListBoxUIObject() override
virtual OUString get_name() const override
VclPtr< ListBox > mxListBox
Definition: uiobject.hxx:329
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
ListBoxUIObject(const VclPtr< ListBox > &xListBox)
A widget used to choose from a list of items and which has no entry.
Definition: lstbox.hxx:83
bool IsMultiSelectionEnabled() const
Definition: listbox.cxx:1130
void Select()
Definition: listbox.cxx:889
sal_Int32 GetSelectedEntryCount() const
Definition: listbox.cxx:986
bool IsReadOnly() const
Definition: listbox.cxx:1337
sal_Int32 GetEntryCount() const
Definition: listbox.cxx:974
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: listbox.cxx:1018
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:993
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
Definition: listbox.cxx:1013
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:981
MenuButtonUIObject(const VclPtr< MenuButton > &xMenuButton)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual ~MenuButtonUIObject() override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
VclPtr< MenuButton > mxMenuButton
Definition: uiobject.hxx:555
void Select()
Definition: menubtn.cxx:233
OString const & GetCurItemIdent() const
Definition: menubtn.hxx:87
PopupMenu * GetPopupMenu() const
Definition: menubtn.hxx:82
void ExecuteMenu()
Definition: menubtn.cxx:56
void SetCurItemId()
Definition: menubtn.cxx:263
sal_uInt16 GetItemId(sal_uInt16 nPos) const
Definition: menu.cxx:623
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
VclPtr< MetricField > mxMetricField
virtual ~MetricFieldUIObject() override
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
MetricFieldUIObject(const VclPtr< MetricField > &xEdit)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const override
MultiLineEditUIObject(const VclPtr< VclMultiLineEdit > &xEdit)
virtual ~MultiLineEditUIObject() override
VclPtr< VclMultiLineEdit > mxEdit
Definition: uiobject.hxx:219
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
void SetSelectedEntry(sal_uInt16 nId)
Definition: menu.cxx:2737
void EndExecute()
Definition: menu.cxx:2700
void Toggle()
Definition: button.cxx:1625
void Check(bool bCheck=true)
Definition: button.hxx:223
bool IsChecked() const
Definition: button.hxx:228
virtual ~RadioButtonUIObject() override
VclPtr< RadioButton > mxRadioButton
Definition: uiobject.hxx:286
RadioButtonUIObject(const VclPtr< RadioButton > &xCheckbox)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
bool IsChecked() const
Definition: button.hxx:455
SAL_DLLPRIVATE void ImplCallClick(bool bGrabFocus=false, GetFocusFlags nFocusFlags=GetFocusFlags::NONE)
Definition: button.cxx:2380
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
RoadmapWizardUIObject(const VclPtr< vcl::RoadmapWizard > &xRoadmapWizard)
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual ~RoadmapWizardUIObject() override
VclPtr< vcl::RoadmapWizard > mxRoadmapWizard
tools::Long Min() const
tools::Long Max() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
SpinFieldUIObject(const VclPtr< SpinField > &xEdit)
VclPtr< SpinField > mxSpinField
Definition: uiobject.hxx:401
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual OUString get_name() const override
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~SpinFieldUIObject() override
virtual void Down()
Definition: spinfld.cxx:364
virtual void Up()
Definition: spinfld.cxx:359
virtual OUString get_name() const override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
SpinUIObject(const VclPtr< SpinButton > &xSpinButton)
VclPtr< SpinButton > mxSpinButton
Definition: uiobject.hxx:378
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~SpinUIObject() override
SvTreeListEntry * FirstSelected() const
Definition: treelist.hxx:252
SvTreeList * GetModel() const
void * GetUserData() const
sal_uInt32 GetAbsPos(const SvTreeListEntry *pEntry) const
Definition: treelist.cxx:821
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
TabControlUIObject(const VclPtr< TabControl > &mxTabControl)
virtual ~TabControlUIObject() override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
VclPtr< TabControl > mxTabControl
Definition: uiobject.hxx:425
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
sal_uInt16 GetPageCount() const
Definition: tabctrl.cxx:1789
std::vector< sal_uInt16 > GetPageIDs() const
Definition: tabctrl.cxx:2195
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
Definition: tabctrl.cxx:1801
void SelectTabPage(sal_uInt16 nPageId)
Definition: tabctrl.cxx:1873
sal_uInt16 GetCurPageId() const
Definition: tabctrl.cxx:1865
virtual OUString get_name() const override
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
TabPageUIObject(const VclPtr< TabPage > &xTabPage)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~TabPageUIObject() override
ToolBoxUIObject(const VclPtr< ToolBox > &mxToolBox)
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual ~ToolBoxUIObject() override
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual OUString get_name() const override
VclPtr< ToolBox > mxToolBox
Definition: uiobject.hxx:532
A toolbar: contains all those icons, typically below the menu bar.
Definition: toolbox.hxx:74
ToolBoxItemId GetItemId(ImplToolItems::size_type nPos) const
Definition: toolbox2.cxx:746
virtual void Click()
Definition: toolbox2.cxx:331
OUString GetItemCommand(ToolBoxItemId nItemId) const
Definition: toolbox2.cxx:1311
void SetCurItemId(ToolBoxItemId CurID)
Definition: toolbox.hxx:83
ImplToolItems::size_type GetItemCount() const
Definition: toolbox2.cxx:712
ToolBoxItemId GetCurItemId() const
Definition: toolbox.hxx:353
virtual void Select()
Definition: toolbox2.cxx:368
const OUString & GetItemText(ToolBoxItemId nItemId) const
Definition: toolbox2.cxx:1048
VclPtr< SvTreeListBox > mxTreeList
Definition: uiobject.hxx:488
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_action(VclEventId nEvent) const
Gets the corresponding Action string for the event.
virtual ~UIObject()
virtual std::unique_ptr< UIObject > get_child(const OUString &rID)
Returns the child of the current UIObject with the corresponding id.
virtual OUString dumpHierarchy() const
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual void execute(const OUString &rAction, const StringMap &rParameters)
Executes an action on the wrapped UI object, possibly with some additional parameters.
virtual std::set< OUString > get_children() const
Returns a set containing all descendants of the object.
virtual OUString dumpState() const
Currently an internal method to dump the state of the current UIObject as represented by get_state().
virtual StringMap get_state()
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_type() const
Returns the type of the UIObject.
void setAppName(OUString name)
Definition: logger.hxx:61
static UITestLogger & getInstance()
Definition: logger.cxx:611
void * GetUserData() const
Definition: layout.hxx:721
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: layout.hxx:708
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: layout.hxx:703
bool get_expanded() const
Definition: layout.cxx:1653
void set_expanded(bool bExpanded)
Definition: layout.cxx:1658
virtual OUString GetSelected() const override
Definition: vclmedit.cxx:1089
virtual sal_Int32 GetMaxTextLen() const override
Definition: vclmedit.cxx:1074
virtual void SetSelection(const Selection &rSelection) override
Definition: vclmedit.cxx:1147
OUString GetText() const override
Definition: vclmedit.cxx:1119
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:1477
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool isDisposed() const
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const override
VerticalTabControlUIObject(const VclPtr< VerticalTabControl > &mxTabControl)
virtual ~VerticalTabControlUIObject() override
VclPtr< VerticalTabControl > mxTabControl
Definition: uiobject.hxx:449
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
const OString & GetPageId(sal_uInt16 nIndex) const
Definition: ivctrl.cxx:550
const OString & GetCurPageId() const
sal_uInt16 GetPagePos(std::string_view rPageId) const
Definition: ivctrl.cxx:598
sal_uInt16 GetPageCount() const
void SetCurPageId(const OString &rId)
Definition: ivctrl.cxx:522
OUString GetPageText(std::string_view rPageId) const
Definition: ivctrl.cxx:614
static std::unique_ptr< UIObject > create(vcl::Window *pWindow)
virtual std::set< OUString > get_children() const override
Returns a set containing all descendants of the object.
virtual OUString get_type() const override
Returns the type of the UIObject.
virtual OUString get_action(VclEventId nEvent) const override
Gets the corresponding Action string for the event.
WindowUIObject(const VclPtr< vcl::Window > &xWindow)
VclPtr< vcl::Window > mxWindow
Definition: uiobject.hxx:120
virtual OUString dumpHierarchy() const override
Currently an internal method to dump the parent-child relationship starting from the current top focu...
virtual OUString dumpState() const override
Currently an internal method to dump the state of the current UIObject as represented by get_state().
virtual std::unique_ptr< UIObject > get_child(const OUString &rID) override
Returns the child of the current UIObject with the corresponding id.
std::unique_ptr< UIObject > get_visible_child(const OUString &rID)
virtual StringMap get_state() override
Returns the state of the wrapped UI object as a string key value map.
virtual OUString get_name() const
virtual void execute(const OUString &rAction, const StringMap &rParameters) override
Executes an action on the wrapped UI object, possibly with some additional parameters.
wizard for a roadmap
Definition: wizdlg.hxx:65
int GetCurrentRoadmapItemID() const
void SelectRoadmapItemByID(int nId, bool bGrabFocus=true)
bool IsReallyVisible() const
Definition: window2.cxx:1138
vcl::Window * GetParent() const
Definition: window2.cxx:1128
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3011
const OUString & get_id() const
Get the ID of the window.
Definition: window.cxx:3936
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1001
WindowType GetType() const
Definition: window2.cxx:1005
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly?
Definition: window.cxx:3861
void GrabFocus()
Definition: window.cxx:2983
virtual Point GetPosPixel() const
Definition: window.cxx:2798
WinBits GetStyle() const
Definition: window2.cxx:984
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1809
virtual OUString GetDisplayText() const
Definition: window.cxx:3068
void RequestDoubleBuffering(bool bRequest)
Enable/disable double-buffering of the frame window and all its children.
Definition: window.cxx:3866
virtual Size GetSizePixel() const
Definition: window.cxx:2406
Size GetOutputSizePixel() const
Definition: window3.cxx:89
bool IsVisible() const
Definition: window2.cxx:1133
virtual OUString GetText() const
Definition: window.cxx:3062
const OUString & GetQuickHelpText() const
Definition: window2.cxx:1263
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1017
bool IsEnabled() const
Definition: window2.cxx:1153
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3942
int nCount
#define MOUSE_LEFT
Definition: event.hxx:102
DocumentType eType
std::function< std::unique_ptr< UIObject >(vcl::Window *)> FactoryFunction
constexpr sal_uInt16 KEY_RETURN
Definition: keycodes.hxx:119
constexpr sal_uInt16 KEY_0
Definition: keycodes.hxx:45
constexpr sal_uInt16 KEY_F2
Definition: keycodes.hxx:84
constexpr sal_uInt16 KEY_F3
Definition: keycodes.hxx:85
constexpr sal_uInt16 KEY_ESCAPE
Definition: keycodes.hxx:120
constexpr sal_uInt16 KEY_HOME
Definition: keycodes.hxx:114
constexpr sal_uInt16 KEY_LEFT
Definition: keycodes.hxx:112
constexpr sal_uInt16 KEY_F4
Definition: keycodes.hxx:86
constexpr sal_uInt16 KEY_F5
Definition: keycodes.hxx:87
constexpr sal_uInt16 KEY_PAGEDOWN
Definition: keycodes.hxx:117
constexpr sal_uInt16 KEY_TAB
Definition: keycodes.hxx:121
constexpr sal_uInt16 KEY_F6
Definition: keycodes.hxx:88
constexpr sal_uInt16 KEY_UP
Definition: keycodes.hxx:111
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
constexpr sal_uInt16 KEY_F9
Definition: keycodes.hxx:91
constexpr sal_uInt16 KEY_F7
Definition: keycodes.hxx:89
constexpr sal_uInt16 KEY_F1
Definition: keycodes.hxx:83
constexpr sal_uInt16 KEY_A
Definition: keycodes.hxx:56
constexpr sal_uInt16 KEY_RIGHT
Definition: keycodes.hxx:113
constexpr sal_uInt16 KEY_DELETE
Definition: keycodes.hxx:125
constexpr sal_uInt16 KEY_F8
Definition: keycodes.hxx:90
constexpr sal_uInt16 KEY_F12
Definition: keycodes.hxx:94
constexpr sal_uInt16 KEY_DOWN
Definition: keycodes.hxx:110
constexpr sal_uInt16 KEY_SPACE
Definition: keycodes.hxx:123
constexpr sal_uInt16 KEY_PAGEUP
Definition: keycodes.hxx:116
constexpr sal_uInt16 KEY_F11
Definition: keycodes.hxx:93
constexpr sal_uInt16 KEY_INSERT
Definition: keycodes.hxx:124
constexpr sal_uInt16 KEY_BACKSPACE
Definition: keycodes.hxx:122
constexpr sal_uInt16 KEY_END
Definition: keycodes.hxx:115
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
std::vector< OUString > split(std::u16string_view rStr, sal_Unicode cSeparator)
int i
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
HashMap_OWString_Interface aMap
sal_Int16 nId
QPRO_FUNC_TYPE nType
sal_uInt16 sal_Unicode
VclEventId
Definition: vclevent.hxx:38
@ EditSelectionChanged
WindowType
Definition: wintypes.hxx:27
WinBits const WB_TOGGLE
Definition: wintypes.hxx:185
WinBits const WB_SYSTEMFLOATWIN
Definition: wintypes.hxx:169
std::map< OUString, OUString > StringMap