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
1022 return aMap;
1023}
1024
1026{
1027 return "RadioButtonUIObject";
1028}
1029
1031{
1032 if (nEvent == VclEventId::RadiobuttonToggle)
1033 {
1034 if(get_top_parent(mxRadioButton)->get_id().isEmpty()){
1035 //This part because if we don't have parent
1036 return "Select '" + mxRadioButton->get_id() + "' RadioButton";
1037 }
1038 return "Select '" + mxRadioButton->get_id() + "' RadioButton from " +
1039 get_top_parent(mxRadioButton)->get_id();
1040 }
1041 else
1042 return WindowUIObject::get_action(nEvent);
1043}
1044
1045std::unique_ptr<UIObject> RadioButtonUIObject::create(vcl::Window* pWindow)
1046{
1047 RadioButton* pRadioButton = dynamic_cast<RadioButton*>(pWindow);
1048 assert(pRadioButton);
1049 return std::unique_ptr<UIObject>(new RadioButtonUIObject(pRadioButton));
1050}
1051
1053 WindowUIObject(xTabPage),
1054 mxTabPage(xTabPage)
1055{
1056}
1057
1059{
1060}
1061
1062void TabPageUIObject::execute(const OUString& rAction,
1063 const StringMap& rParameters)
1064{
1065 WindowUIObject::execute(rAction, rParameters);
1066}
1067
1069{
1071
1072 return aMap;
1073}
1074
1076{
1077 return "TabPageUIObject";
1078}
1079
1081 WindowUIObject(xListBox),
1082 mxListBox(xListBox)
1083{
1084}
1085
1087{
1088}
1089
1090void ListBoxUIObject::execute(const OUString& rAction,
1091 const StringMap& rParameters)
1092{
1093 if (!mxListBox->IsEnabled())
1094 return;
1095
1096 bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
1097 if (!isTiledRendering && !mxListBox->IsReallyVisible())
1098 return;
1099
1100 if (rAction == "SELECT")
1101 {
1102 bool bSelect = true;
1103 if (rParameters.find("POS") != rParameters.end())
1104 {
1105 auto itr = rParameters.find("POS");
1106 OUString aVal = itr->second;
1107 sal_Int32 nPos = aVal.toInt32();
1108 mxListBox->SelectEntryPos(nPos, bSelect);
1109 }
1110 else if (rParameters.find("TEXT") != rParameters.end())
1111 {
1112 auto itr = rParameters.find("TEXT");
1113 OUString aText = itr->second;
1114 mxListBox->SelectEntry(aText, bSelect);
1115 }
1116 mxListBox->Select();
1117 }
1118 else
1119 WindowUIObject::execute(rAction, rParameters);
1120}
1121
1123{
1125 aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly());
1126 aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
1127 aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount());
1128 aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount());
1129 aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos());
1130 aMap["SelectEntryText"] = mxListBox->GetSelectedEntry();
1131
1132 return aMap;
1133}
1134
1136{
1137 return "ListBoxUIObject";
1138}
1139
1141{
1142 if (nEvent == VclEventId::ListboxSelect)
1143 {
1144 sal_Int32 nPos = mxListBox->GetSelectedEntryPos();
1145 if(get_top_parent(mxListBox)->get_id().isEmpty()){
1146 //This part because if we don't have parent
1147 return "Select element with position " + OUString::number(nPos) +
1148 " in '" + mxListBox->get_id();
1149 }
1150 return "Select element with position " + OUString::number(nPos) +
1151 " in '" + mxListBox->get_id() +"' from" + get_top_parent(mxListBox)->get_id() ;
1152 }
1153 else if (nEvent == VclEventId::ListboxFocus)
1154 {
1155 if(get_top_parent(mxListBox)->get_id().isEmpty())
1156 {
1157 //This part because if we don't have parent
1158 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id();
1159 }
1160 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id() +
1161 " Parent:" + get_top_parent(mxListBox)->get_id();
1162 }
1163 else
1164 return WindowUIObject::get_action(nEvent);
1165}
1166
1167std::unique_ptr<UIObject> ListBoxUIObject::create(vcl::Window* pWindow)
1168{
1169 ListBox* pListBox = dynamic_cast<ListBox*>(pWindow);
1170 assert(pListBox);
1171 return std::unique_ptr<UIObject>(new ListBoxUIObject(pListBox));
1172}
1173
1175 WindowUIObject(xComboBox),
1176 mxComboBox(xComboBox)
1177{
1178}
1179
1181{
1182}
1183
1184void ComboBoxUIObject::execute(const OUString& rAction,
1185 const StringMap& rParameters)
1186{
1187 if (rAction == "SELECT")
1188 {
1189 if (rParameters.find("POS") != rParameters.end())
1190 {
1191 auto itr = rParameters.find("POS");
1192 OUString aVal = itr->second;
1193 sal_Int32 nPos = aVal.toInt32();
1195 }
1196 else if(rParameters.find("TEXT") != rParameters.end()){
1197 auto itr = rParameters.find("TEXT");
1198 OUString aVal = itr->second;
1199 sal_Int32 nPos = mxComboBox->GetEntryPos(aVal);
1201 }
1202 mxComboBox->Select();
1203 }
1204 else if ( rAction == "TYPE" || rAction == "SET" || rAction == "CLEAR" ){
1205 if (mxComboBox->GetSubEdit())
1206 {
1207 Edit* pEdit = mxComboBox->GetSubEdit();
1208 std::unique_ptr<UIObject> pObj = EditUIObject::create(pEdit);
1209 pObj->execute(rAction, rParameters);
1210 }
1211 else
1212 WindowUIObject::execute(rAction, rParameters);
1213 }
1214 else
1215 WindowUIObject::execute(rAction, rParameters);
1216}
1217
1219{
1221 aMap["SelectedText"] = mxComboBox->GetSelected();
1222 return aMap;
1223}
1224
1226{
1227 return "ComboBoxUIObject";
1228}
1229
1231{
1232 if (nEvent == VclEventId::ComboboxSelect)
1233 {
1234 sal_Int32 nPos = mxComboBox->GetSelectedEntryPos();
1235 if (get_top_parent(mxComboBox)->get_id().isEmpty()){
1236 //This part because if we don't have parent
1237 return "Select in '" + mxComboBox->get_id() +
1238 "' ComboBox item number " + OUString::number(nPos);
1239 }
1240 return "Select in '" + mxComboBox->get_id() +
1241 "' ComboBox item number " + OUString::number(nPos) +
1242 " from " + get_top_parent(mxComboBox)->get_id();
1243 }
1244 else
1245 return WindowUIObject::get_action(nEvent);
1246}
1247
1248std::unique_ptr<UIObject> ComboBoxUIObject::create(vcl::Window* pWindow)
1249{
1250 ComboBox* pComboBox = dynamic_cast<ComboBox*>(pWindow);
1251 assert(pComboBox);
1252 return std::unique_ptr<UIObject>(new ComboBoxUIObject(pComboBox));
1253}
1254
1256 WindowUIObject(xSpinButton),
1257 mxSpinButton(xSpinButton)
1258{
1259}
1260
1262{
1263}
1264
1265void SpinUIObject::execute(const OUString& rAction,
1266 const StringMap& rParameters)
1267{
1268 if (rAction == "UP")
1269 {
1270 mxSpinButton->Up();
1271 }
1272 else if (rAction == "DOWN")
1273 {
1274 mxSpinButton->Down();
1275 }
1276 else
1277 WindowUIObject::execute(rAction, rParameters);
1278}
1279
1281{
1283 aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
1284 aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
1285 aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
1286 aMap["Value"] = OUString::number(mxSpinButton->GetValue());
1287
1288 return aMap;
1289}
1290
1292{
1293 if (nEvent == VclEventId::SpinbuttonUp)
1294 {
1295 return this->get_type() + " Action:UP Id:" + mxSpinButton->get_id() +
1296 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1297 }
1298 else if (nEvent == VclEventId::SpinbuttonDown)
1299 {
1300 return this->get_type() + " Action:DOWN Id:" + mxSpinButton->get_id() +
1301 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1302 }
1303 else
1304 return WindowUIObject::get_action(nEvent);
1305}
1306
1308{
1309 return "SpinUIObject";
1310}
1311
1313 EditUIObject(xSpinField),
1314 mxSpinField(xSpinField)
1315{
1316}
1317
1319{
1320}
1321
1322void SpinFieldUIObject::execute(const OUString& rAction,
1323 const StringMap& rParameters)
1324{
1325 if (rAction == "UP")
1326 {
1327 mxSpinField->Up();
1328 }
1329 else if (rAction == "DOWN")
1330 {
1331 mxSpinField->Down();
1332 }
1333 else if (rAction == "TYPE")
1334 {
1335 if (mxSpinField->GetSubEdit())
1336 {
1337 Edit* pSubEdit = mxSpinField->GetSubEdit();
1338 EditUIObject aSubObject(pSubEdit);
1339 aSubObject.execute(rAction, rParameters);
1340 }
1341 }
1342 else
1343 EditUIObject::execute(rAction, rParameters);
1344}
1345
1347{
1349
1350 return aMap;
1351}
1352
1354{
1355 if (nEvent == VclEventId::SpinfieldUp)
1356 {
1357 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1358 {
1359 //This part because if we don't have parent
1360 return "Increase '" + mxSpinField->get_id();
1361 }
1362 return "Increase '" + mxSpinField->get_id() +
1363 "' from " + get_top_parent(mxSpinField)->get_id();
1364 }
1365 else if (nEvent == VclEventId::SpinfieldDown)
1366 {
1367 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1368 {
1369 //This part because if we don't have parent
1370 return "Decrease '" + mxSpinField->get_id();
1371 }
1372 return "Decrease '" + mxSpinField->get_id() +
1373 "' from " + get_top_parent(mxSpinField)->get_id();
1374 }
1375 else
1376 return WindowUIObject::get_action(nEvent);
1377}
1378
1380{
1381 return "SpinFieldUIObject";
1382}
1383
1384std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow)
1385{
1386 SpinField* pSpinField = dynamic_cast<SpinField*>(pWindow);
1387 assert(pSpinField);
1388 return std::unique_ptr<UIObject>(new SpinFieldUIObject(pSpinField));
1389}
1390
1391
1393 SpinFieldUIObject(xMetricField),
1394 mxMetricField(xMetricField)
1395{
1396}
1397
1399{
1400}
1401
1402void MetricFieldUIObject::execute(const OUString& rAction,
1403 const StringMap& rParameters)
1404{
1405 if (rAction == "VALUE")
1406 {
1407 auto itPos = rParameters.find("VALUE");
1408 if (itPos != rParameters.end())
1409 {
1410 mxMetricField->SetValueFromString(itPos->second);
1411 }
1412 }
1413 else
1414 SpinFieldUIObject::execute(rAction, rParameters);
1415}
1416
1418{
1420 aMap["Value"] = mxMetricField->GetValueString();
1421
1422 return aMap;
1423}
1424
1426{
1427 return "MetricFieldUIObject";
1428}
1429
1430std::unique_ptr<UIObject> MetricFieldUIObject::create(vcl::Window* pWindow)
1431{
1432 MetricField* pMetricField = dynamic_cast<MetricField*>(pWindow);
1433 assert(pMetricField);
1434 return std::unique_ptr<UIObject>(new MetricFieldUIObject(pMetricField));
1435}
1436
1438 SpinFieldUIObject(xFormattedField),
1439 mxFormattedField(xFormattedField)
1440{
1441}
1442
1444{
1445}
1446
1447void FormattedFieldUIObject::execute(const OUString& rAction,
1448 const StringMap& rParameters)
1449{
1450 if (rAction == "VALUE")
1451 {
1452 auto itPos = rParameters.find("VALUE");
1453 if (itPos != rParameters.end())
1454 {
1455 mxFormattedField->SetValueFromString(itPos->second);
1456 }
1457 }
1458 else
1459 SpinFieldUIObject::execute(rAction, rParameters);
1460}
1461
1463{
1465 aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue());
1466
1467 return aMap;
1468}
1469
1471{
1472 return "FormattedFieldUIObject";
1473}
1474
1475std::unique_ptr<UIObject> FormattedFieldUIObject::create(vcl::Window* pWindow)
1476{
1477 FormattedField* pFormattedField = dynamic_cast<FormattedField*>(pWindow);
1478 assert(pFormattedField);
1479 return std::unique_ptr<UIObject>(new FormattedFieldUIObject(pFormattedField));
1480}
1481
1483 WindowUIObject(xTabControl),
1484 mxTabControl(xTabControl)
1485{
1486}
1487
1489{
1490}
1491
1492void TabControlUIObject::execute(const OUString& rAction,
1493 const StringMap& rParameters)
1494{
1495 if (rAction == "SELECT")
1496 {
1497 if (rParameters.find("POS") != rParameters.end())
1498 {
1499 auto itr = rParameters.find("POS");
1500 sal_uInt32 nPos = itr->second.toUInt32();
1501 std::vector<sal_uInt16> aIds = mxTabControl->GetPageIDs();
1503 }
1504 }
1505 else
1506 WindowUIObject::execute(rAction, rParameters);
1507}
1508
1510{
1512 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1513
1514 sal_uInt16 nPageId = mxTabControl->GetCurPageId();
1515 aMap["CurrPageId"] = OUString::number(nPageId);
1516 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1517
1518 return aMap;
1519}
1520
1522{
1523 if (nEvent == VclEventId::TabpageActivate)
1524 {
1525 sal_Int32 nPageId = mxTabControl->GetCurPageId();
1526
1527 if(get_top_parent(mxTabControl)->get_id().isEmpty()){
1528 //This part because if we don't have parent
1529 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1530 " in '" + mxTabControl->get_id();
1531 }
1532 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1533 " in '" + mxTabControl->get_id()+
1534 "' from " + get_top_parent(mxTabControl)->get_id() ;
1535 }
1536 else
1537 return WindowUIObject::get_action(nEvent);
1538}
1539
1541{
1542 return "TabControlUIObject";
1543}
1544
1545std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
1546{
1547 TabControl* pTabControl = dynamic_cast<TabControl*>(pWindow);
1548 assert(pTabControl);
1549 return std::unique_ptr<UIObject>(new TabControlUIObject(pTabControl));
1550}
1551
1553 WindowUIObject(xRoadmapWizard),
1554 mxRoadmapWizard(xRoadmapWizard)
1555{
1556}
1557
1559{
1560}
1561
1562void RoadmapWizardUIObject::execute(const OUString& rAction,
1563 const StringMap& rParameters)
1564{
1565 if (rAction == "SELECT")
1566 {
1567 if (rParameters.find("POS") != rParameters.end())
1568 {
1569 auto itr = rParameters.find("POS");
1570 sal_uInt32 nPos = itr->second.toUInt32();
1572 }
1573 }
1574 else
1575 WindowUIObject::execute(rAction, rParameters);
1576}
1577
1579{
1581
1582 aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
1583
1584 return aMap;
1585}
1586
1588{
1589 return "RoadmapWizardUIObject";
1590}
1591
1592std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
1593{
1594 vcl::RoadmapWizard* pRoadmapWizard = dynamic_cast<vcl::RoadmapWizard*>(pWindow);
1595 assert(pRoadmapWizard);
1596 return std::unique_ptr<UIObject>(new RoadmapWizardUIObject(pRoadmapWizard));
1597}
1598
1600 WindowUIObject(xTabControl),
1601 mxTabControl(xTabControl)
1602{
1603}
1604
1606{
1607}
1608
1609void VerticalTabControlUIObject::execute(const OUString& rAction,
1610 const StringMap& rParameters)
1611{
1612 if (rAction == "SELECT")
1613 {
1614 if (rParameters.find("POS") != rParameters.end())
1615 {
1616 auto itr = rParameters.find("POS");
1617 sal_uInt32 nPos = itr->second.toUInt32();
1618 OString xid = mxTabControl->GetPageId(nPos);
1620 }
1621 }
1622 else
1623 WindowUIObject::execute(rAction, rParameters);
1624}
1625
1627{
1629 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1630
1631 OString nPageId = mxTabControl->GetCurPageId();
1632 aMap["CurrPageTitel"] = mxTabControl->GetPageText(nPageId);
1633 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1634
1635 return aMap;
1636}
1637
1639{
1640 return "VerticalTabControlUIObject";
1641}
1642
1643std::unique_ptr<UIObject> VerticalTabControlUIObject::create(vcl::Window* pWindow)
1644{
1645 VerticalTabControl* pTabControl = dynamic_cast<VerticalTabControl*>(pWindow);
1646 assert(pTabControl);
1647 return std::unique_ptr<UIObject>(new VerticalTabControlUIObject(pTabControl));
1648}
1649
1650
1652 WindowUIObject(xToolBox),
1653 mxToolBox(xToolBox)
1654{
1655}
1656
1658{
1659}
1660
1661void ToolBoxUIObject::execute(const OUString& rAction,
1662 const StringMap& rParameters)
1663{
1664 if (rAction == "CLICK")
1665 {
1666 if (rParameters.find("POS") != rParameters.end())
1667 {
1668 auto itr = rParameters.find("POS");
1669 sal_uInt16 nPos = itr->second.toUInt32();
1671 mxToolBox->Click();
1672 mxToolBox->Select();
1673 }
1674 }
1675 else
1676 WindowUIObject::execute(rAction, rParameters);
1677}
1678
1680{
1681 if (nEvent == VclEventId::ToolboxClick)
1682 {
1683 return "Click on item number " + OUString::number(sal_uInt16(mxToolBox->GetCurItemId())) +
1684 " in " + mxToolBox->get_id();
1685 }
1686 else
1687 return WindowUIObject::get_action(nEvent);
1688}
1689
1691{
1693 aMap["CurrSelectedItemID"] = OUString::number(sal_uInt16(mxToolBox->GetCurItemId()));
1694 aMap["CurrSelectedItemText"] = mxToolBox->GetItemText(mxToolBox->GetCurItemId());
1695 aMap["CurrSelectedItemCommand"] = mxToolBox->GetItemCommand(mxToolBox->GetCurItemId());
1696 aMap["ItemCount"] = OUString::number(mxToolBox->GetItemCount());
1697 return aMap;
1698}
1699
1701{
1702 return "ToolBoxUIObject";
1703}
1704
1705std::unique_ptr<UIObject> ToolBoxUIObject::create(vcl::Window* pWindow)
1706{
1707 ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
1708 assert(pToolBox);
1709 return std::unique_ptr<UIObject>(new ToolBoxUIObject(pToolBox));
1710}
1711
1713 WindowUIObject(xMenuButton),
1714 mxMenuButton(xMenuButton)
1715{
1716}
1717
1719{
1720}
1721
1723{
1725 aMap["Label"] = mxMenuButton->GetDisplayText();
1726 aMap["CurrentItem"] = OUString::createFromAscii(mxMenuButton->GetCurItemIdent());
1727 return aMap;
1728}
1729
1730void MenuButtonUIObject::execute(const OUString& rAction,
1731 const StringMap& rParameters)
1732{
1733 if (rAction == "CLICK")
1734 {
1737 }
1738 else if (rAction == "OPENLIST")
1739 {
1741 }
1742 else if (rAction == "OPENFROMLIST")
1743 {
1744 auto itr = rParameters.find("POS");
1745 sal_uInt32 nPos = itr->second.toUInt32();
1746
1747 sal_uInt32 nId = mxMenuButton->GetPopupMenu()->GetItemId(nPos);
1751 }
1752 else if (rAction == "CLOSELIST")
1753 {
1755 }
1756 else
1757 WindowUIObject::execute(rAction, rParameters);
1758}
1759
1761{
1762 return "MenuButtonUIObject";
1763}
1764
1765std::unique_ptr<UIObject> MenuButtonUIObject::create(vcl::Window* pWindow)
1766{
1767 MenuButton* pMenuButton = dynamic_cast<MenuButton*>(pWindow);
1768 assert(pMenuButton);
1769 return std::unique_ptr<UIObject>(new MenuButtonUIObject(pMenuButton));
1770}
1771
1773 : WindowUIObject(rDrawingArea)
1774 , mxDrawingArea(dynamic_cast<VclDrawingArea*>(rDrawingArea.get()))
1775{
1776 assert(mxDrawingArea);
1778}
1779
1781{
1782}
1783
1784void DrawingAreaUIObject::execute(const OUString& rAction, const StringMap& rParameters)
1785{
1786 if (rAction == "CLICK")
1787 {
1788 // POSX and POSY are percentage of width/height dimensions
1789 if (rParameters.find("POSX") != rParameters.end() &&
1790 rParameters.find("POSY") != rParameters.end())
1791 {
1792 auto aPosX = rParameters.find("POSX");
1793 auto aPosY = rParameters.find("POSY");
1794
1795 OString sPosX2 = OUStringToOString(aPosX->second, RTL_TEXTENCODING_ASCII_US);
1796 OString sPoxY2 = OUStringToOString(aPosY->second, RTL_TEXTENCODING_ASCII_US);
1797
1798 if (!sPosX2.isEmpty() && !sPoxY2.isEmpty())
1799 {
1800 double fPosX = std::atof(sPosX2.getStr());
1801 double fPosY = std::atof(sPoxY2.getStr());
1802
1803 fPosX = fPosX * mxDrawingArea->GetOutputSizePixel().Width();
1804 fPosY = fPosY * mxDrawingArea->GetOutputSizePixel().Height();
1805
1809 }
1810 }
1811 }
1812 else
1813 WindowUIObject::execute(rAction, rParameters);
1814}
1815
1816std::unique_ptr<UIObject> DrawingAreaUIObject::create(vcl::Window* pWindow)
1817{
1818 VclDrawingArea* pVclDrawingArea = dynamic_cast<VclDrawingArea*>(pWindow);
1819 assert(pVclDrawingArea);
1820 return std::unique_ptr<UIObject>(new DrawingAreaUIObject(pVclDrawingArea));
1821}
1822
1824 TreeListUIObject(xIconView)
1825{
1826}
1827
1829{
1831
1833
1834 OUString* pId = static_cast<OUString*>(pEntry->GetUserData());
1835 if (pId)
1836 aMap["SelectedItemId"] = *pId;
1837
1838 SvTreeList* pModel = mxTreeList->GetModel();
1839 if (pModel)
1840 aMap["SelectedItemPos"] = OUString::number(pModel->GetAbsPos(pEntry));
1841
1842 return aMap;
1843}
1844
1846{
1847 return "IconViewUIObject";
1848}
1849
1850std::unique_ptr<UIObject> IconViewUIObject::create(vcl::Window* pWindow)
1851{
1852 SvTreeListBox* pTreeList = dynamic_cast<SvTreeListBox*>(pWindow);
1853 assert(pTreeList);
1854 return std::unique_ptr<UIObject>(new IconViewUIObject(pTreeList));
1855}
1856
1857/* 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:3208
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:2316
virtual void SetText(const OUString &rStr) override
Definition: edit.cxx:2547
virtual sal_Int32 GetMaxTextLen() const
Definition: edit.hxx:181
virtual const Selection & GetSelection() const
Definition: edit.cxx:2470
Edit * GetSubEdit() const
Definition: edit.hxx:217
virtual void SetSelection(const Selection &rSelection)
Definition: edit.cxx:2396
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: edit.cxx:1712
virtual OUString GetSelected() const
Definition: edit.cxx:2497
virtual OUString GetText() const override
Definition: edit.cxx:2566
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:1138
void Select()
Definition: listbox.cxx:897
sal_Int32 GetSelectedEntryCount() const
Definition: listbox.cxx:994
bool IsReadOnly() const
Definition: listbox.cxx:1345
sal_Int32 GetEntryCount() const
Definition: listbox.cxx:982
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: listbox.cxx:1026
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:1001
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
Definition: listbox.cxx:1021
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:989
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)
OUString GetValueString() const
Definition: field.cxx:641
void SetValueFromString(const OUString &rStr)
Definition: field.cxx:648
void SetSelectedEntry(sal_uInt16 nId)
Definition: menu.cxx:2737
void EndExecute()
Definition: menu.cxx:2700
void Toggle()
Definition: button.cxx:1606
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:2361
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:1783
std::vector< sal_uInt16 > GetPageIDs() const
Definition: tabctrl.cxx:2189
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
Definition: tabctrl.cxx:1795
void SelectTabPage(sal_uInt16 nPageId)
Definition: tabctrl.cxx:1867
sal_uInt16 GetCurPageId() const
Definition: tabctrl.cxx:1859
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:1078
virtual sal_Int32 GetMaxTextLen() const override
Definition: vclmedit.cxx:1063
virtual void SetSelection(const Selection &rSelection) override
Definition: vclmedit.cxx:1136
OUString GetText() const override
Definition: vclmedit.cxx:1108
TextWindow * GetTextWindow()
Definition: vclmedit.cxx:1466
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:66
int GetCurrentRoadmapItemID() const
void SelectRoadmapItemByID(int nId, bool bGrabFocus=true)
bool IsReallyVisible() const
Definition: window2.cxx:1131
vcl::Window * GetParent() const
Definition: window2.cxx:1121
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3009
const OUString & get_id() const
Get the ID of the window.
Definition: window.cxx:3934
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1001
WindowType GetType() const
Definition: window2.cxx:998
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly?
Definition: window.cxx:3859
void GrabFocus()
Definition: window.cxx:2981
virtual Point GetPosPixel() const
Definition: window.cxx:2796
WinBits GetStyle() const
Definition: window2.cxx:977
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1807
virtual OUString GetDisplayText() const
Definition: window.cxx:3066
void RequestDoubleBuffering(bool bRequest)
Enable/disable double-buffering of the frame window and all its children.
Definition: window.cxx:3864
virtual Size GetSizePixel() const
Definition: window.cxx:2404
Size GetOutputSizePixel() const
Definition: window3.cxx:89
bool IsVisible() const
Definition: window2.cxx:1126
virtual OUString GetText() const
Definition: window.cxx:3060
const OUString & GetQuickHelpText() const
Definition: window2.cxx:1256
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1017
bool IsEnabled() const
Definition: window2.cxx:1146
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3940
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