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, OUStringBuffer* debug = nullptr)
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 if (debug)
421 debug->append(pChild->get_id() + " ");
422
423 vcl::Window* pResult = findChild(pChild, rID, bRequireVisible, debug);
424 if (pResult)
425 return pResult;
426 }
427
428 return nullptr;
429}
430
431void addChildren(vcl::Window const * pParent, std::set<OUString>& rChildren)
432{
433 if (!pParent)
434 return;
435
436 size_t nCount = pParent->GetChildCount();
437 for (size_t i = 0; i < nCount; ++i)
438 {
439 vcl::Window* pChild = pParent->GetChild(i);
440 if (pChild)
441 {
442 OUString aId = pChild->get_id();
443 if (!aId.isEmpty())
444 {
445 auto ret = rChildren.insert(aId);
446 SAL_WARN_IF(!ret.second, "vcl.uitest", "duplicate ids '" << aId << "' for ui elements. violates locally unique requirement");
447 }
448
449 addChildren(pChild, rChildren);
450 }
451 }
452}
453
454}
455
456std::unique_ptr<UIObject> WindowUIObject::get_child(const OUString& rID)
457{
458 // in a first step try the real children before moving to the top level parent
459 // This makes it easier to handle cases with the same ID as there is a way
460 // to resolve conflicts
461 OUStringBuffer debug;
462 vcl::Window* pWindow = findChild(mxWindow.get(), rID, false, &debug);
463 if (!pWindow)
464 {
465 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
466 pWindow = findChild(pDialogParent, rID, false, &debug);
467 }
468
469 if (!pWindow)
470 throw css::uno::RuntimeException("Could not find child with id: " + rID + " children were " + std::u16string_view(debug));
471
472 FactoryFunction aFunction = pWindow->GetUITestFactory();
473 return aFunction(pWindow);
474}
475
476std::unique_ptr<UIObject> WindowUIObject::get_visible_child(const OUString& rID)
477{
478 // in a first step try the real children before moving to the top level parent
479 // This makes it easier to handle cases with the same ID as there is a way
480 // to resolve conflicts
481 vcl::Window* pWindow = findChild(mxWindow.get(), rID, true);
482 if (!pWindow)
483 {
484 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
485 pWindow = findChild(pDialogParent, rID, true);
486 }
487
488 if (!pWindow)
489 throw css::uno::RuntimeException("Could not find child with id: " + rID);
490
491 FactoryFunction aFunction = pWindow->GetUITestFactory();
492 return aFunction(pWindow);
493}
494
495std::set<OUString> WindowUIObject::get_children() const
496{
497 std::set<OUString> aChildren;
498 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
499 if (!pDialogParent->isDisposed())
500 {
501 aChildren.insert(pDialogParent->get_id());
502 addChildren(pDialogParent, aChildren);
503 }
504 return aChildren;
505}
506
508{
509 return "WindowUIObject";
510}
511
512namespace {
513
514OUString escape(const OUString& rStr)
515{
516 return rStr.replaceAll("\"", "\\\"");
517}
518
519}
520
522{
523 OUStringBuffer aStateString = "{\"name\":\"" + mxWindow->get_id() + "\"";
524 aStateString.append(", \"ImplementationName\":\"").appendAscii(typeid(*mxWindow).name()).append("\"");
525 StringMap aState = const_cast<WindowUIObject*>(this)->get_state();
526 for (auto const& elem : aState)
527 {
528 OUString property = ",\"" + elem.first + "\":\"" + escape(elem.second) + "\"";
529 aStateString.append(property);
530 }
531
532 size_t nCount = mxWindow->GetChildCount();
533
534 if (nCount)
535 aStateString.append(",\"children\":[");
536
537 for (size_t i = 0; i < nCount; ++i)
538 {
539 if (i != 0)
540 {
541 aStateString.append(",");
542 }
543 vcl::Window* pChild = mxWindow->GetChild(i);
544 std::unique_ptr<UIObject> pChildWrapper =
545 pChild->GetUITestFactory()(pChild);
546 OUString children = pChildWrapper->dumpState();
547 aStateString.append(children);
548 }
549
550 if (nCount)
551 aStateString.append("]");
552
553 aStateString.append("}");
554
555 OUString aString = aStateString.makeStringAndClear();
556 return aString.replaceAll("\n", "\\n");
557}
558
560{
561 vcl::Window* pDialogParent = get_top_parent(mxWindow.get());
562 std::unique_ptr<UIObject> pParentWrapper =
563 pDialogParent->GetUITestFactory()(pDialogParent);
564 return pParentWrapper->dumpState();
565}
566
568{
569
570 OUString aActionName;
571 switch (nEvent)
572 {
575 return OUString();
576
579 aActionName = "CLICK";
580 break;
581
583 aActionName = "TYPE";
584 break;
585 default:
586 aActionName = OUString::number(static_cast<int>(nEvent));
587 }
588 return "Action on element: " + mxWindow->get_id() + " with action : " + aActionName;
589}
590
591std::unique_ptr<UIObject> WindowUIObject::create(vcl::Window* pWindow)
592{
593 return std::unique_ptr<UIObject>(new WindowUIObject(pWindow));
594}
595
597 WindowUIObject(xButton),
598 mxButton(xButton)
599{
600}
601
603{
604}
605
607{
609 // Move that to a Control base class
610 aMap["Label"] = mxButton->GetDisplayText();
611
612 return aMap;
613}
614
615void ButtonUIObject::execute(const OUString& rAction,
616 const StringMap& rParameters)
617{
618 if (rAction == "CLICK")
619 {
620 //Click doesn't call toggle when it's a pushbutton tweaked to be a toggle-button
621 if (PushButton *pPushButton = (mxButton->GetStyle() & WB_TOGGLE) ? dynamic_cast<PushButton*>(mxButton.get()) : nullptr)
622 {
623 pPushButton->Check(!pPushButton->IsChecked());
624 pPushButton->Toggle();
625 return;
626 }
627 mxButton->Click();
628 }
629 else
630 WindowUIObject::execute(rAction, rParameters);
631}
632
634{
635 return "ButtonUIObject";
636}
637
639{
640 if (nEvent == VclEventId::ButtonClick)
641 {
642 if(mxButton->get_id()=="writer_all")
643 {
645 return "Start writer" ;
646 }
647 else if(mxButton->get_id()=="calc_all")
648 {
650 return "Start calc" ;
651 }
652 else if(mxButton->get_id()=="impress_all")
653 {
655 return "Start impress" ;
656 }
657 else if(mxButton->get_id()=="draw_all")
658 {
660 return "Start draw" ;
661 }
662 else if(mxButton->get_id()=="math_all")
663 {
665 return "Start math" ;
666 }
667 else if(mxButton->get_id()=="database_all")
668 {
670 return "Start database" ;
671 }
672 else{
673 if (get_top_parent(mxButton)->get_id().isEmpty()){
674 //This part because if we don't have parent
675 return "Click on '" + mxButton->get_id() ;
676 }
677 return "Click on '" + mxButton->get_id() + "' from "+
678 get_top_parent(mxButton)->get_id();
679 }
680 }
681 else
682 return WindowUIObject::get_action(nEvent);
683}
684
685std::unique_ptr<UIObject> ButtonUIObject::create(vcl::Window* pWindow)
686{
687 Button* pButton = dynamic_cast<Button*>(pWindow);
688 assert(pButton);
689 return std::unique_ptr<UIObject>(new ButtonUIObject(pButton));
690}
691
693 WindowUIObject(xDialog),
694 mxDialog(xDialog)
695{
696}
697
699{
700}
701
703{
705 aMap["Modal"] = OUString::boolean(mxDialog->IsModalInputMode());
706
707 return aMap;
708}
709
711{
712 return "DialogUIObject";
713}
714
715std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow)
716{
717 Dialog* pDialog = dynamic_cast<Dialog*>(pWindow);
718 assert(pDialog);
719 return std::unique_ptr<UIObject>(new DialogUIObject(pDialog));
720}
721
723 WindowUIObject(xEdit),
724 mxEdit(xEdit)
725{
726}
727
729{
730}
731
732void EditUIObject::execute(const OUString& rAction,
733 const StringMap& rParameters)
734{
735 bool bHandled = true;
736 if (rAction == "TYPE")
737 {
738 auto it = rParameters.find("TEXT");
739 if (it != rParameters.end())
740 {
741 const OUString& rText = it->second;
742 auto aKeyEvents = generate_key_events_from_text(rText);
743 for (auto const& keyEvent : aKeyEvents)
744 {
745 mxEdit->KeyInput(keyEvent);
746 }
747 }
748 else
749 {
750 bHandled = false;
751 }
752 }
753 else if (rAction == "SET")
754 {
755 auto it = rParameters.find("TEXT");
756 if (it != rParameters.end())
757 {
758 mxEdit->SetText(it->second);
759 mxEdit->Modify();
760 }
761 else
762 bHandled = false;
763 }
764 else if (rAction == "SELECT")
765 {
766 if (rParameters.find("FROM") != rParameters.end() &&
767 rParameters.find("TO") != rParameters.end())
768 {
769 tools::Long nMin = rParameters.find("FROM")->second.toInt32();
770 tools::Long nMax = rParameters.find("TO")->second.toInt32();
771 Selection aSelection(nMin, nMax);
772 mxEdit->SetSelection(aSelection);
773 }
774 }
775 else if (rAction == "CLEAR")
776 {
777 mxEdit->SetText("");
778 mxEdit->Modify();
779 bHandled = true;
780 }
781 else
782 {
783 bHandled = false;
784 }
785
786 if (!bHandled)
787 WindowUIObject::execute(rAction, rParameters);
788}
789
791{
793 aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
794 aMap["QuickHelpText"] = mxEdit->GetQuickHelpText();
795 aMap["SelectedText"] = mxEdit->GetSelected();
796 aMap["Text"] = mxEdit->GetText();
797
798 return aMap;
799}
800
802{
804 {
805 const Selection& rSelection = mxEdit->GetSelection();
806 tools::Long nMin = rSelection.Min();
807 tools::Long nMax = rSelection.Max();
808 if(get_top_parent(mxEdit)->get_id().isEmpty()){
809 //This part because if we don't have parent
810 return "Select in '" +
811 mxEdit->get_id() +
812 "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
813 OUString::number(nMax) + "\"}"
814 ;
815 }
816 return "Select in '" +
817 mxEdit->get_id() +
818 "' {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
819 OUString::number(nMax) + "\"} from "
820 + get_top_parent(mxEdit)->get_id()
821 ;
822 }
823 else
824 return WindowUIObject::get_action(nEvent);
825}
826
828{
829 return "EditUIObject";
830}
831
832std::unique_ptr<UIObject> EditUIObject::create(vcl::Window* pWindow)
833{
834 Edit* pEdit = dynamic_cast<Edit*>(pWindow);
835 assert(pEdit);
836 return std::unique_ptr<UIObject>(new EditUIObject(pEdit));
837}
838
840 WindowUIObject(xEdit),
841 mxEdit(xEdit)
842{
843}
844
846{
847}
848
849void MultiLineEditUIObject::execute(const OUString& rAction,
850 const StringMap& rParameters)
851{
852 bool bHandled = true;
853 if (rAction == "TYPE")
854 {
855 WindowUIObject aChildObj(mxEdit->GetTextWindow());
856 aChildObj.execute(rAction, rParameters);
857 }
858 else if (rAction == "SELECT")
859 {
860 if (rParameters.find("FROM") != rParameters.end() &&
861 rParameters.find("TO") != rParameters.end())
862 {
863 tools::Long nMin = rParameters.find("FROM")->second.toInt32();
864 tools::Long nMax = rParameters.find("TO")->second.toInt32();
865 Selection aSelection(nMin, nMax);
866 mxEdit->SetSelection(aSelection);
867 }
868 }
869 else
870 {
871 bHandled = false;
872 }
873
874 if (!bHandled)
875 WindowUIObject::execute(rAction, rParameters);
876}
877
879{
881 aMap["MaxTextLength"] = OUString::number(mxEdit->GetMaxTextLen());
882 aMap["SelectedText"] = mxEdit->GetSelected();
883 aMap["Text"] = mxEdit->GetText();
884
885 return aMap;
886}
887
889{
890 return "MultiLineEditUIObject";
891}
892
893std::unique_ptr<UIObject> MultiLineEditUIObject::create(vcl::Window* pWindow)
894{
895 VclMultiLineEdit* pEdit = dynamic_cast<VclMultiLineEdit*>(pWindow);
896 assert(pEdit);
897 return std::unique_ptr<UIObject>(new MultiLineEditUIObject(pEdit));
898}
899
901 : WindowUIObject(xExpander)
902 , mxExpander(xExpander)
903{
904}
905
907{
908}
909
910void ExpanderUIObject::execute(const OUString& rAction, const StringMap& rParameters)
911{
912 if (rAction == "EXPAND")
913 {
915 }
916 else if (rAction == "COLLAPSE")
917 {
918 mxExpander->set_expanded(false);
919 }
920 else
921 WindowUIObject::execute(rAction, rParameters);
922}
923
925{
927 aMap["Expanded"] = OUString::boolean(mxExpander->get_expanded());
928 return aMap;
929}
930
932{
933 return "ExpanderUIObject";
934}
935
936std::unique_ptr<UIObject> ExpanderUIObject::create(vcl::Window* pWindow)
937{
938 VclExpander* pVclExpander = dynamic_cast<VclExpander*>(pWindow);
939 assert(pVclExpander);
940 return std::unique_ptr<UIObject>(new ExpanderUIObject(pVclExpander));
941}
942
944 WindowUIObject(xCheckbox),
945 mxCheckBox(xCheckbox)
946{
947}
948
950{
951}
952
953void CheckBoxUIObject::execute(const OUString& rAction,
954 const StringMap& rParameters)
955{
956 if (rAction == "CLICK")
957 {
958 // don't use toggle directly, it does not set the value
960 }
961 else
962 WindowUIObject::execute(rAction, rParameters);
963}
964
966{
968 aMap["Selected"] = OUString::boolean(mxCheckBox->IsChecked());
969 aMap["TriStateEnabled"] = OUString::boolean(mxCheckBox->IsTriStateEnabled());
970 return aMap;
971}
972
974{
975 return "CheckBoxUIObject";
976}
977
979{
980 if (nEvent == VclEventId::CheckboxToggle)
981 {
982 if(get_top_parent(mxCheckBox)->get_id().isEmpty()){
983 //This part because if we don't have parent
984 return "Toggle '" + mxCheckBox->get_id() + "' CheckBox";
985 }
986 return "Toggle '" + mxCheckBox->get_id() + "' CheckBox from " +
987 get_top_parent(mxCheckBox)->get_id();
988 }
989 else
990 return WindowUIObject::get_action(nEvent);
991}
992
993std::unique_ptr<UIObject> CheckBoxUIObject::create(vcl::Window* pWindow)
994{
995 CheckBox* pCheckBox = dynamic_cast<CheckBox*>(pWindow);
996 assert(pCheckBox);
997 return std::unique_ptr<UIObject>(new CheckBoxUIObject(pCheckBox));
998}
999
1001 WindowUIObject(xRadioButton),
1002 mxRadioButton(xRadioButton)
1003{
1004}
1005
1007{
1008}
1009
1010void RadioButtonUIObject::execute(const OUString& rAction,
1011 const StringMap& rParameters)
1012{
1013 if (rAction == "CLICK")
1014 {
1016 }
1017 else
1018 WindowUIObject::execute(rAction, rParameters);
1019}
1020
1022{
1024 aMap["Checked"] = OUString::boolean(mxRadioButton->IsChecked());
1025 aMap["Enabled"] = OUString::boolean(mxRadioButton->IsEnabled());
1026
1027 return aMap;
1028}
1029
1031{
1032 return "RadioButtonUIObject";
1033}
1034
1036{
1037 if (nEvent == VclEventId::RadiobuttonToggle)
1038 {
1039 if(get_top_parent(mxRadioButton)->get_id().isEmpty()){
1040 //This part because if we don't have parent
1041 return "Select '" + mxRadioButton->get_id() + "' RadioButton";
1042 }
1043 return "Select '" + mxRadioButton->get_id() + "' RadioButton from " +
1044 get_top_parent(mxRadioButton)->get_id();
1045 }
1046 else
1047 return WindowUIObject::get_action(nEvent);
1048}
1049
1050std::unique_ptr<UIObject> RadioButtonUIObject::create(vcl::Window* pWindow)
1051{
1052 RadioButton* pRadioButton = dynamic_cast<RadioButton*>(pWindow);
1053 assert(pRadioButton);
1054 return std::unique_ptr<UIObject>(new RadioButtonUIObject(pRadioButton));
1055}
1056
1058 WindowUIObject(xTabPage),
1059 mxTabPage(xTabPage)
1060{
1061}
1062
1064{
1065}
1066
1067void TabPageUIObject::execute(const OUString& rAction,
1068 const StringMap& rParameters)
1069{
1070 WindowUIObject::execute(rAction, rParameters);
1071}
1072
1074{
1076
1077 return aMap;
1078}
1079
1081{
1082 return "TabPageUIObject";
1083}
1084
1086 WindowUIObject(xListBox),
1087 mxListBox(xListBox)
1088{
1089}
1090
1092{
1093}
1094
1095void ListBoxUIObject::execute(const OUString& rAction,
1096 const StringMap& rParameters)
1097{
1098 if (!mxListBox->IsEnabled())
1099 return;
1100
1101 bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
1102 if (!isTiledRendering && !mxListBox->IsReallyVisible())
1103 return;
1104
1105 if (rAction == "SELECT")
1106 {
1107 bool bSelect = true;
1108 if (rParameters.find("POS") != rParameters.end())
1109 {
1110 auto itr = rParameters.find("POS");
1111 OUString aVal = itr->second;
1112 sal_Int32 nPos = aVal.toInt32();
1113 mxListBox->SelectEntryPos(nPos, bSelect);
1114 }
1115 else if (rParameters.find("TEXT") != rParameters.end())
1116 {
1117 auto itr = rParameters.find("TEXT");
1118 OUString aText = itr->second;
1119 mxListBox->SelectEntry(aText, bSelect);
1120 }
1121 mxListBox->Select();
1122 }
1123 else
1124 WindowUIObject::execute(rAction, rParameters);
1125}
1126
1128{
1130 aMap["ReadOnly"] = OUString::boolean(mxListBox->IsReadOnly());
1131 aMap["MultiSelect"] = OUString::boolean(mxListBox->IsMultiSelectionEnabled());
1132 aMap["EntryCount"] = OUString::number(mxListBox->GetEntryCount());
1133 aMap["SelectEntryCount"] = OUString::number(mxListBox->GetSelectedEntryCount());
1134 aMap["SelectEntryPos"] = OUString::number(mxListBox->GetSelectedEntryPos());
1135 aMap["SelectEntryText"] = mxListBox->GetSelectedEntry();
1136
1137 return aMap;
1138}
1139
1141{
1142 return "ListBoxUIObject";
1143}
1144
1146{
1147 if (nEvent == VclEventId::ListboxSelect)
1148 {
1149 sal_Int32 nPos = mxListBox->GetSelectedEntryPos();
1150 if(get_top_parent(mxListBox)->get_id().isEmpty()){
1151 //This part because if we don't have parent
1152 return "Select element with position " + OUString::number(nPos) +
1153 " in '" + mxListBox->get_id();
1154 }
1155 return "Select element with position " + OUString::number(nPos) +
1156 " in '" + mxListBox->get_id() +"' from" + get_top_parent(mxListBox)->get_id() ;
1157 }
1158 else if (nEvent == VclEventId::ListboxFocus)
1159 {
1160 if(get_top_parent(mxListBox)->get_id().isEmpty())
1161 {
1162 //This part because if we don't have parent
1163 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id();
1164 }
1165 return this->get_type() + " Action:FOCUS Id:" + mxListBox->get_id() +
1166 " Parent:" + get_top_parent(mxListBox)->get_id();
1167 }
1168 else
1169 return WindowUIObject::get_action(nEvent);
1170}
1171
1172std::unique_ptr<UIObject> ListBoxUIObject::create(vcl::Window* pWindow)
1173{
1174 ListBox* pListBox = dynamic_cast<ListBox*>(pWindow);
1175 assert(pListBox);
1176 return std::unique_ptr<UIObject>(new ListBoxUIObject(pListBox));
1177}
1178
1180 WindowUIObject(xComboBox),
1181 mxComboBox(xComboBox)
1182{
1183}
1184
1186{
1187}
1188
1189void ComboBoxUIObject::execute(const OUString& rAction,
1190 const StringMap& rParameters)
1191{
1192 if (rAction == "SELECT")
1193 {
1194 if (rParameters.find("POS") != rParameters.end())
1195 {
1196 auto itr = rParameters.find("POS");
1197 OUString aVal = itr->second;
1198 sal_Int32 nPos = aVal.toInt32();
1200 }
1201 else if(rParameters.find("TEXT") != rParameters.end()){
1202 auto itr = rParameters.find("TEXT");
1203 OUString aVal = itr->second;
1204 sal_Int32 nPos = mxComboBox->GetEntryPos(aVal);
1206 }
1207 mxComboBox->Select();
1208 }
1209 else if ( rAction == "TYPE" || rAction == "SET" || rAction == "CLEAR" ){
1210 if (mxComboBox->GetSubEdit())
1211 {
1212 Edit* pEdit = mxComboBox->GetSubEdit();
1213 std::unique_ptr<UIObject> pObj = EditUIObject::create(pEdit);
1214 pObj->execute(rAction, rParameters);
1215 }
1216 else
1217 WindowUIObject::execute(rAction, rParameters);
1218 }
1219 else
1220 WindowUIObject::execute(rAction, rParameters);
1221}
1222
1224{
1226 aMap["SelectedText"] = mxComboBox->GetSelected();
1227 aMap["EntryCount"] = OUString::number(mxComboBox->GetEntryCount());
1228 return aMap;
1229}
1230
1232{
1233 return "ComboBoxUIObject";
1234}
1235
1237{
1238 if (nEvent == VclEventId::ComboboxSelect)
1239 {
1240 sal_Int32 nPos = mxComboBox->GetSelectedEntryPos();
1241 if (get_top_parent(mxComboBox)->get_id().isEmpty()){
1242 //This part because if we don't have parent
1243 return "Select in '" + mxComboBox->get_id() +
1244 "' ComboBox item number " + OUString::number(nPos);
1245 }
1246 return "Select in '" + mxComboBox->get_id() +
1247 "' ComboBox item number " + OUString::number(nPos) +
1248 " from " + get_top_parent(mxComboBox)->get_id();
1249 }
1250 else
1251 return WindowUIObject::get_action(nEvent);
1252}
1253
1254std::unique_ptr<UIObject> ComboBoxUIObject::create(vcl::Window* pWindow)
1255{
1256 ComboBox* pComboBox = dynamic_cast<ComboBox*>(pWindow);
1257 assert(pComboBox);
1258 return std::unique_ptr<UIObject>(new ComboBoxUIObject(pComboBox));
1259}
1260
1262 WindowUIObject(xSpinButton),
1263 mxSpinButton(xSpinButton)
1264{
1265}
1266
1268{
1269}
1270
1271void SpinUIObject::execute(const OUString& rAction,
1272 const StringMap& rParameters)
1273{
1274 if (rAction == "UP")
1275 {
1276 mxSpinButton->Up();
1277 }
1278 else if (rAction == "DOWN")
1279 {
1280 mxSpinButton->Down();
1281 }
1282 else
1283 WindowUIObject::execute(rAction, rParameters);
1284}
1285
1287{
1289 aMap["Min"] = OUString::number(mxSpinButton->GetRangeMin());
1290 aMap["Max"] = OUString::number(mxSpinButton->GetRangeMax());
1291 aMap["Step"] = OUString::number(mxSpinButton->GetValueStep());
1292 aMap["Value"] = OUString::number(mxSpinButton->GetValue());
1293
1294 return aMap;
1295}
1296
1298{
1299 if (nEvent == VclEventId::SpinbuttonUp)
1300 {
1301 return this->get_type() + " Action:UP Id:" + mxSpinButton->get_id() +
1302 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1303 }
1304 else if (nEvent == VclEventId::SpinbuttonDown)
1305 {
1306 return this->get_type() + " Action:DOWN Id:" + mxSpinButton->get_id() +
1307 " Parent:" + get_top_parent(mxSpinButton)->get_id();
1308 }
1309 else
1310 return WindowUIObject::get_action(nEvent);
1311}
1312
1314{
1315 return "SpinUIObject";
1316}
1317
1319 EditUIObject(xSpinField),
1320 mxSpinField(xSpinField)
1321{
1322}
1323
1325{
1326}
1327
1328void SpinFieldUIObject::execute(const OUString& rAction,
1329 const StringMap& rParameters)
1330{
1331 if (rAction == "UP")
1332 {
1333 mxSpinField->Up();
1334 }
1335 else if (rAction == "DOWN")
1336 {
1337 mxSpinField->Down();
1338 }
1339 else if (rAction == "TYPE")
1340 {
1341 if (mxSpinField->GetSubEdit())
1342 {
1343 Edit* pSubEdit = mxSpinField->GetSubEdit();
1344 EditUIObject aSubObject(pSubEdit);
1345 aSubObject.execute(rAction, rParameters);
1346 }
1347 }
1348 else
1349 EditUIObject::execute(rAction, rParameters);
1350}
1351
1353{
1355
1356 return aMap;
1357}
1358
1360{
1361 if (nEvent == VclEventId::SpinfieldUp)
1362 {
1363 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1364 {
1365 //This part because if we don't have parent
1366 return "Increase '" + mxSpinField->get_id();
1367 }
1368 return "Increase '" + mxSpinField->get_id() +
1369 "' from " + get_top_parent(mxSpinField)->get_id();
1370 }
1371 else if (nEvent == VclEventId::SpinfieldDown)
1372 {
1373 if(get_top_parent(mxSpinField)->get_id().isEmpty())
1374 {
1375 //This part because if we don't have parent
1376 return "Decrease '" + mxSpinField->get_id();
1377 }
1378 return "Decrease '" + mxSpinField->get_id() +
1379 "' from " + get_top_parent(mxSpinField)->get_id();
1380 }
1381 else
1382 return WindowUIObject::get_action(nEvent);
1383}
1384
1386{
1387 return "SpinFieldUIObject";
1388}
1389
1390std::unique_ptr<UIObject> SpinFieldUIObject::create(vcl::Window* pWindow)
1391{
1392 SpinField* pSpinField = dynamic_cast<SpinField*>(pWindow);
1393 assert(pSpinField);
1394 return std::unique_ptr<UIObject>(new SpinFieldUIObject(pSpinField));
1395}
1396
1397
1399 SpinFieldUIObject(xMetricField),
1400 mxMetricField(xMetricField)
1401{
1402}
1403
1405{
1406}
1407
1408void MetricFieldUIObject::execute(const OUString& rAction,
1409 const StringMap& rParameters)
1410{
1411 if (rAction == "VALUE")
1412 {
1413 auto itPos = rParameters.find("VALUE");
1414 if (itPos != rParameters.end())
1415 {
1416 mxMetricField->SetValueFromString(itPos->second);
1417 }
1418 }
1419 else
1420 SpinFieldUIObject::execute(rAction, rParameters);
1421}
1422
1424{
1426 aMap["Value"] = mxMetricField->GetValueString();
1427
1428 return aMap;
1429}
1430
1432{
1433 return "MetricFieldUIObject";
1434}
1435
1436std::unique_ptr<UIObject> MetricFieldUIObject::create(vcl::Window* pWindow)
1437{
1438 MetricField* pMetricField = dynamic_cast<MetricField*>(pWindow);
1439 assert(pMetricField);
1440 return std::unique_ptr<UIObject>(new MetricFieldUIObject(pMetricField));
1441}
1442
1444 SpinFieldUIObject(xFormattedField),
1445 mxFormattedField(xFormattedField)
1446{
1447}
1448
1450{
1451}
1452
1453void FormattedFieldUIObject::execute(const OUString& rAction,
1454 const StringMap& rParameters)
1455{
1456 if (rAction == "VALUE")
1457 {
1458 auto itPos = rParameters.find("VALUE");
1459 if (itPos != rParameters.end())
1460 {
1461 mxFormattedField->SetValueFromString(itPos->second);
1462 }
1463 }
1464 else
1465 SpinFieldUIObject::execute(rAction, rParameters);
1466}
1467
1469{
1471 aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue());
1472
1473 return aMap;
1474}
1475
1477{
1478 return "FormattedFieldUIObject";
1479}
1480
1481std::unique_ptr<UIObject> FormattedFieldUIObject::create(vcl::Window* pWindow)
1482{
1483 FormattedField* pFormattedField = dynamic_cast<FormattedField*>(pWindow);
1484 assert(pFormattedField);
1485 return std::unique_ptr<UIObject>(new FormattedFieldUIObject(pFormattedField));
1486}
1487
1489 WindowUIObject(xTabControl),
1490 mxTabControl(xTabControl)
1491{
1492}
1493
1495{
1496}
1497
1498void TabControlUIObject::execute(const OUString& rAction,
1499 const StringMap& rParameters)
1500{
1501 if (rAction == "SELECT")
1502 {
1503 if (rParameters.find("POS") != rParameters.end())
1504 {
1505 auto itr = rParameters.find("POS");
1506 sal_uInt32 nPos = itr->second.toUInt32();
1507 std::vector<sal_uInt16> aIds = mxTabControl->GetPageIDs();
1509 }
1510 }
1511 else
1512 WindowUIObject::execute(rAction, rParameters);
1513}
1514
1516{
1518 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1519
1520 sal_uInt16 nPageId = mxTabControl->GetCurPageId();
1521 aMap["CurrPageId"] = OUString::number(nPageId);
1522 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1523
1524 return aMap;
1525}
1526
1528{
1529 if (nEvent == VclEventId::TabpageActivate)
1530 {
1531 sal_Int32 nPageId = mxTabControl->GetCurPageId();
1532
1533 if(get_top_parent(mxTabControl)->get_id().isEmpty()){
1534 //This part because if we don't have parent
1535 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1536 " in '" + mxTabControl->get_id();
1537 }
1538 return "Choose Tab number " + OUString::number(mxTabControl->GetPagePos(nPageId)) +
1539 " in '" + mxTabControl->get_id()+
1540 "' from " + get_top_parent(mxTabControl)->get_id() ;
1541 }
1542 else
1543 return WindowUIObject::get_action(nEvent);
1544}
1545
1547{
1548 return "TabControlUIObject";
1549}
1550
1551std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
1552{
1553 TabControl* pTabControl = dynamic_cast<TabControl*>(pWindow);
1554 assert(pTabControl);
1555 return std::unique_ptr<UIObject>(new TabControlUIObject(pTabControl));
1556}
1557
1559 WindowUIObject(xRoadmapWizard),
1560 mxRoadmapWizard(xRoadmapWizard)
1561{
1562}
1563
1565{
1566}
1567
1568void RoadmapWizardUIObject::execute(const OUString& rAction,
1569 const StringMap& rParameters)
1570{
1571 if (rAction == "SELECT")
1572 {
1573 if (rParameters.find("POS") != rParameters.end())
1574 {
1575 auto itr = rParameters.find("POS");
1576 sal_uInt32 nPos = itr->second.toUInt32();
1578 }
1579 }
1580 else
1581 WindowUIObject::execute(rAction, rParameters);
1582}
1583
1585{
1587
1588 aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
1589
1590 return aMap;
1591}
1592
1594{
1595 return "RoadmapWizardUIObject";
1596}
1597
1598std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
1599{
1600 vcl::RoadmapWizard* pRoadmapWizard = dynamic_cast<vcl::RoadmapWizard*>(pWindow);
1601 assert(pRoadmapWizard);
1602 return std::unique_ptr<UIObject>(new RoadmapWizardUIObject(pRoadmapWizard));
1603}
1604
1606 WindowUIObject(xTabControl),
1607 mxTabControl(xTabControl)
1608{
1609}
1610
1612{
1613}
1614
1615void VerticalTabControlUIObject::execute(const OUString& rAction,
1616 const StringMap& rParameters)
1617{
1618 if (rAction == "SELECT")
1619 {
1620 if (rParameters.find("POS") != rParameters.end())
1621 {
1622 auto itr = rParameters.find("POS");
1623 sal_uInt32 nPos = itr->second.toUInt32();
1624 OUString xid = mxTabControl->GetPageId(nPos);
1626 }
1627 }
1628 else
1629 WindowUIObject::execute(rAction, rParameters);
1630}
1631
1633{
1635 aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount());
1636
1637 OUString nPageId = mxTabControl->GetCurPageId();
1638 aMap["CurrPageTitel"] = mxTabControl->GetPageText(nPageId);
1639 aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId));
1640
1641 return aMap;
1642}
1643
1645{
1646 return "VerticalTabControlUIObject";
1647}
1648
1649std::unique_ptr<UIObject> VerticalTabControlUIObject::create(vcl::Window* pWindow)
1650{
1651 VerticalTabControl* pTabControl = dynamic_cast<VerticalTabControl*>(pWindow);
1652 assert(pTabControl);
1653 return std::unique_ptr<UIObject>(new VerticalTabControlUIObject(pTabControl));
1654}
1655
1656
1658 WindowUIObject(xToolBox),
1659 mxToolBox(xToolBox)
1660{
1661}
1662
1664{
1665}
1666
1667void ToolBoxUIObject::execute(const OUString& rAction,
1668 const StringMap& rParameters)
1669{
1670 if (rAction == "CLICK")
1671 {
1672 if (rParameters.find("POS") != rParameters.end())
1673 {
1674 auto itr = rParameters.find("POS");
1675 sal_uInt16 nPos = itr->second.toUInt32();
1677 mxToolBox->Click();
1678 mxToolBox->Select();
1679 }
1680 }
1681 else
1682 WindowUIObject::execute(rAction, rParameters);
1683}
1684
1686{
1687 if (nEvent == VclEventId::ToolboxClick)
1688 {
1689 return "Click on item number " + OUString::number(sal_uInt16(mxToolBox->GetCurItemId())) +
1690 " in " + mxToolBox->get_id();
1691 }
1692 else
1693 return WindowUIObject::get_action(nEvent);
1694}
1695
1697{
1699 aMap["CurrSelectedItemID"] = OUString::number(sal_uInt16(mxToolBox->GetCurItemId()));
1700 aMap["CurrSelectedItemText"] = mxToolBox->GetItemText(mxToolBox->GetCurItemId());
1701 aMap["CurrSelectedItemCommand"] = mxToolBox->GetItemCommand(mxToolBox->GetCurItemId());
1702 aMap["ItemCount"] = OUString::number(mxToolBox->GetItemCount());
1703 return aMap;
1704}
1705
1707{
1708 return "ToolBoxUIObject";
1709}
1710
1711std::unique_ptr<UIObject> ToolBoxUIObject::create(vcl::Window* pWindow)
1712{
1713 ToolBox* pToolBox = dynamic_cast<ToolBox*>(pWindow);
1714 assert(pToolBox);
1715 return std::unique_ptr<UIObject>(new ToolBoxUIObject(pToolBox));
1716}
1717
1719 WindowUIObject(xMenuButton),
1720 mxMenuButton(xMenuButton)
1721{
1722}
1723
1725{
1726}
1727
1729{
1731 aMap["Label"] = mxMenuButton->GetDisplayText();
1732 aMap["CurrentItem"] = mxMenuButton->GetCurItemIdent();
1733 return aMap;
1734}
1735
1736void MenuButtonUIObject::execute(const OUString& rAction,
1737 const StringMap& rParameters)
1738{
1739 if (rAction == "CLICK")
1740 {
1743 }
1744 else if (rAction == "OPENLIST")
1745 {
1747 }
1748 else if (rAction == "OPENFROMLIST")
1749 {
1750 auto itr = rParameters.find("POS");
1751 sal_uInt32 nPos = itr->second.toUInt32();
1752
1753 sal_uInt32 nId = mxMenuButton->GetPopupMenu()->GetItemId(nPos);
1757 }
1758 else if (rAction == "CLOSELIST")
1759 {
1761 }
1762 else
1763 WindowUIObject::execute(rAction, rParameters);
1764}
1765
1767{
1768 return "MenuButtonUIObject";
1769}
1770
1771std::unique_ptr<UIObject> MenuButtonUIObject::create(vcl::Window* pWindow)
1772{
1773 MenuButton* pMenuButton = dynamic_cast<MenuButton*>(pWindow);
1774 assert(pMenuButton);
1775 return std::unique_ptr<UIObject>(new MenuButtonUIObject(pMenuButton));
1776}
1777
1779 : WindowUIObject(rDrawingArea)
1780 , mxDrawingArea(dynamic_cast<VclDrawingArea*>(rDrawingArea.get()))
1781{
1782 assert(mxDrawingArea);
1784}
1785
1787{
1788}
1789
1790void DrawingAreaUIObject::execute(const OUString& rAction, const StringMap& rParameters)
1791{
1792 if (rAction == "CLICK")
1793 {
1794 // POSX and POSY are percentage of width/height dimensions
1795 if (rParameters.find("POSX") != rParameters.end() &&
1796 rParameters.find("POSY") != rParameters.end())
1797 {
1798 auto aPosX = rParameters.find("POSX");
1799 auto aPosY = rParameters.find("POSY");
1800
1801 OString sPosX2 = OUStringToOString(aPosX->second, RTL_TEXTENCODING_ASCII_US);
1802 OString sPoxY2 = OUStringToOString(aPosY->second, RTL_TEXTENCODING_ASCII_US);
1803
1804 if (!sPosX2.isEmpty() && !sPoxY2.isEmpty())
1805 {
1806 double fPosX = std::atof(sPosX2.getStr());
1807 double fPosY = std::atof(sPoxY2.getStr());
1808
1809 fPosX = fPosX * mxDrawingArea->GetOutputSizePixel().Width();
1810 fPosY = fPosY * mxDrawingArea->GetOutputSizePixel().Height();
1811
1815 }
1816 }
1817 }
1818 else
1819 WindowUIObject::execute(rAction, rParameters);
1820}
1821
1822std::unique_ptr<UIObject> DrawingAreaUIObject::create(vcl::Window* pWindow)
1823{
1824 VclDrawingArea* pVclDrawingArea = dynamic_cast<VclDrawingArea*>(pWindow);
1825 assert(pVclDrawingArea);
1826 return std::unique_ptr<UIObject>(new DrawingAreaUIObject(pVclDrawingArea));
1827}
1828
1830 TreeListUIObject(xIconView)
1831{
1832}
1833
1835{
1837
1839
1840 OUString* pId = static_cast<OUString*>(pEntry->GetUserData());
1841 if (pId)
1842 aMap["SelectedItemId"] = *pId;
1843
1844 SvTreeList* pModel = mxTreeList->GetModel();
1845 if (pModel)
1846 aMap["SelectedItemPos"] = OUString::number(pModel->GetAbsPos(pEntry));
1847
1848 return aMap;
1849}
1850
1852{
1853 return "IconViewUIObject";
1854}
1855
1856std::unique_ptr<UIObject> IconViewUIObject::create(vcl::Window* pWindow)
1857{
1858 SvTreeListBox* pTreeList = dynamic_cast<SvTreeListBox*>(pWindow);
1859 assert(pTreeList);
1860 return std::unique_ptr<UIObject>(new IconViewUIObject(pTreeList));
1861}
1862
1863/* 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:3226
bool IsTriStateEnabled() const
Definition: button.hxx:360
bool IsChecked() const
Definition: button.hxx:354
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
sal_Int32 GetEntryCount() const
Definition: combobox.cxx:963
void Select()
Definition: combobox.cxx:504
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: combobox.cxx:1358
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: combobox.cxx:1376
virtual OUString GetDisplayText() const override
Definition: ctrl.cxx:213
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:2320
virtual void SetText(const OUString &rStr) override
Definition: edit.cxx:2551
virtual sal_Int32 GetMaxTextLen() const
Definition: edit.hxx:181
virtual const Selection & GetSelection() const
Definition: edit.cxx:2474
Edit * GetSubEdit() const
Definition: edit.hxx:217
virtual void SetSelection(const Selection &rSelection)
Definition: edit.cxx:2400
virtual void KeyInput(const KeyEvent &rKEvt) override
Definition: edit.cxx:1702
virtual OUString GetSelected() const
Definition: edit.cxx:2501
virtual OUString GetText() const override
Definition: edit.cxx:2570
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:1328
Formatter & GetFormatter()
Definition: fmtfield.cxx:1311
double GetValue()
Definition: fmtfield.cxx:866
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:1144
void Select()
Definition: listbox.cxx:903
sal_Int32 GetSelectedEntryCount() const
Definition: listbox.cxx:1000
bool IsReadOnly() const
Definition: listbox.cxx:1351
sal_Int32 GetEntryCount() const
Definition: listbox.cxx:988
void SelectEntryPos(sal_Int32 nPos, bool bSelect=true)
Definition: listbox.cxx:1032
sal_Int32 GetSelectedEntryPos(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:1007
void SelectEntry(std::u16string_view rStr, bool bSelect=true)
Definition: listbox.cxx:1027
OUString GetSelectedEntry(sal_Int32 nSelIndex=0) const
Definition: listbox.cxx:995
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
OUString const & GetCurItemIdent() const
Definition: menubtn.hxx:87
void Select()
Definition: menubtn.cxx:233
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:641
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)
constexpr tools::Long Y() const
constexpr tools::Long X() const
void SetSelectedEntry(sal_uInt16 nId)
Definition: menu.cxx:2765
void EndExecute()
Definition: menu.cxx:2728
void Toggle()
Definition: button.cxx:1625
void Check(bool bCheck=true)
Definition: button.hxx:227
bool IsChecked() const
Definition: button.hxx:232
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:459
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:251
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:1777
std::vector< sal_uInt16 > GetPageIDs() const
Definition: tabctrl.cxx:2121
sal_uInt16 GetPagePos(sal_uInt16 nPageId) const
Definition: tabctrl.cxx:1789
void SelectTabPage(sal_uInt16 nPageId)
Definition: tabctrl.cxx:1861
sal_uInt16 GetCurPageId() const
Definition: tabctrl.cxx:1853
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:722
virtual void MouseButtonUp(const MouseEvent &rMEvt) override
Definition: layout.hxx:704
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
Definition: layout.hxx:699
bool get_expanded() const
Definition: layout.cxx:1686
void set_expanded(bool bExpanded)
Definition: layout.cxx:1691
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.
void SetCurPageId(const OUString &rId)
Definition: ivctrl.cxx:522
sal_uInt16 GetPagePos(std::u16string_view rPageId) const
Definition: ivctrl.cxx:598
const OUString & GetCurPageId() const
OUString GetPageText(std::u16string_view rPageId) const
Definition: ivctrl.cxx:614
sal_uInt16 GetPageCount() const
const OUString & GetPageId(sal_uInt16 nIndex) const
Definition: ivctrl.cxx:550
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:1133
vcl::Window * GetParent() const
Definition: window2.cxx:1123
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3004
const OUString & get_id() const
Get the ID of the window.
Definition: window.cxx:3935
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1002
WindowType GetType() const
Definition: window2.cxx:1000
bool SupportsDoubleBuffering() const
Can the widget derived from this Window do the double-buffering via RenderContext properly?
Definition: window.cxx:3860
void GrabFocus()
Definition: window.cxx:2976
virtual Point GetPosPixel() const
Definition: window.cxx:2794
WinBits GetStyle() const
Definition: window2.cxx:979
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1805
virtual OUString GetDisplayText() const
Definition: window.cxx:3061
void RequestDoubleBuffering(bool bRequest)
Enable/disable double-buffering of the frame window and all its children.
Definition: window.cxx:3865
virtual Size GetSizePixel() const
Definition: window.cxx:2402
Size GetOutputSizePixel() const
Definition: window3.cxx:89
bool IsVisible() const
Definition: window2.cxx:1128
virtual OUString GetText() const
Definition: window.cxx:3055
const OUString & GetQuickHelpText() const
Definition: window2.cxx:1258
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1018
bool IsEnabled() const
Definition: window2.cxx:1148
virtual FactoryFunction GetUITestFactory() const
Definition: window.cxx:3941
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