LibreOffice Module vcl (master)  1
weldutils.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 
10 #include <com/sun/star/util/URLTransformer.hpp>
11 #include <com/sun/star/frame/Desktop.hpp>
13 #include <svl/numformat.hxx>
14 #include <svl/zforlist.hxx>
15 #include <svl/zformat.hxx>
16 #include <vcl/builderpage.hxx>
17 #include <vcl/commandevent.hxx>
19 #include <vcl/event.hxx>
20 #include <vcl/toolkit/floatwin.hxx>
21 #include <vcl/settings.hxx>
22 #include <vcl/svapp.hxx>
23 #include <vcl/weldutils.hxx>
24 
26  const OUString& rUIXMLDescription, const OString& rID, bool bIsMobile)
27  : m_pDialogController(pController)
28  , m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription, bIsMobile))
29  , m_xContainer(m_xBuilder->weld_container(rID))
30 {
31 }
32 
34 
36 
37 BuilderPage::~BuilderPage() COVERITY_NOEXCEPT_FALSE {}
38 
39 namespace weld
40 {
41 bool DialogController::runAsync(const std::shared_ptr<DialogController>& rController,
42  const std::function<void(sal_Int32)>& func)
43 {
44  return rController->getDialog()->runAsync(rController, func);
45 }
46 
47 DialogController::~DialogController() COVERITY_NOEXCEPT_FALSE {}
48 
50 
52  const OString& rDialogId, bool bMobile)
53  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile, bMobile))
54  , m_xDialog(m_xBuilder->weld_dialog(rDialogId))
55 {
56 }
57 
59 
61 
63  const OString& rDialogId,
64  const OString& rRelocateId)
65  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile))
66  , m_xDialog(m_xBuilder->weld_message_dialog(rDialogId))
67  , m_xContentArea(m_xDialog->weld_message_area())
68 {
69  if (!rRelocateId.isEmpty())
70  {
71  m_xRelocate = m_xBuilder->weld_container(rRelocateId);
72  m_xOrigParent = m_xRelocate->weld_parent();
73  //fdo#75121, a bit tricky because the widgets we want to align with
74  //don't actually exist in the ui description, they're implied
75  m_xOrigParent->move(m_xRelocate.get(), m_xContentArea.get());
76  }
77 }
78 
80 {
81  if (m_xRelocate)
82  {
83  m_xContentArea->move(m_xRelocate.get(), m_xOrigParent.get());
84  }
85 }
86 
87 AssistantController::AssistantController(weld::Widget* pParent, const OUString& rUIFile,
88  const OString& rDialogId)
89  : m_xBuilder(Application::CreateBuilder(pParent, rUIFile))
90  , m_xAssistant(m_xBuilder->weld_assistant(rDialogId))
91 {
92 }
93 
95 
97 
99 {
100  if (bTriStateEnabled)
101  {
102  switch (eState)
103  {
104  case TRISTATE_INDET:
105  rToggle.set_state(TRISTATE_FALSE);
106  break;
107  case TRISTATE_TRUE:
108  rToggle.set_state(TRISTATE_INDET);
109  break;
110  case TRISTATE_FALSE:
111  rToggle.set_state(TRISTATE_TRUE);
112  break;
113  }
114  }
115  eState = rToggle.get_state();
116 }
117 
119 {
120  if (rTreeView.iter_has_child(rParent))
121  {
122  std::unique_ptr<weld::TreeIter> xNewParent(rTreeView.make_iterator(&rParent));
123  if (!rTreeView.iter_parent(*xNewParent))
124  xNewParent.reset();
125 
126  while (true)
127  {
128  std::unique_ptr<weld::TreeIter> xChild(rTreeView.make_iterator(&rParent));
129  if (!rTreeView.iter_children(*xChild))
130  break;
131  rTreeView.move_subtree(*xChild, xNewParent.get(), -1);
132  }
133  }
134  rTreeView.remove(rParent);
135 }
136 
138  : m_rEntry(rSpinButton)
139  , m_pSpinButton(&rSpinButton)
140  , m_eOptions(Application::GetSettings().GetStyleSettings().GetSelectionOptions())
141 {
142  Init();
143 }
144 
146  : m_rEntry(rEntry)
147  , m_pSpinButton(nullptr)
148  , m_eOptions(Application::GetSettings().GetStyleSettings().GetSelectionOptions())
149 {
150  Init();
151 }
152 
154 {
157  if (m_pSpinButton)
158  m_pSpinButton->SetFormatter(nullptr);
159 }
160 
162 {
163  m_rEntry.connect_changed(LINK(this, EntryFormatter, ModifyHdl));
164  m_rEntry.connect_focus_out(LINK(this, EntryFormatter, FocusOutHdl));
165  if (m_pSpinButton)
167 }
168 
170 {
171  int nStartPos, nEndPos;
172  m_rEntry.get_selection_bounds(nStartPos, nEndPos);
173  return Selection(nStartPos, nEndPos);
174 }
175 
176 OUString EntryFormatter::GetEntryText() const { return m_rEntry.get_text(); }
177 
178 void EntryFormatter::SetEntryText(const OUString& rText, const Selection& rSel)
179 {
180  m_rEntry.set_text(rText);
181  auto nMin = rSel.Min();
182  auto nMax = rSel.Max();
183  m_rEntry.select_region(nMin < 0 ? 0 : nMin, nMax == SELECTION_MAX ? -1 : nMax);
184 }
185 
187 {
188  m_rEntry.set_font_color(pColor ? *pColor : COL_AUTO);
189 }
190 
191 void EntryFormatter::UpdateCurrentValue(double dCurrentValue)
192 {
193  Formatter::UpdateCurrentValue(dCurrentValue);
194  if (m_pSpinButton)
196 }
197 
199 {
201  if (m_pSpinButton)
203 }
204 
206 {
208  if (m_pSpinButton)
210 }
211 
213 {
215  if (m_pSpinButton)
217 }
218 
220 {
222  if (m_pSpinButton)
224 }
225 
226 void EntryFormatter::SetSpinSize(double dStep)
227 {
228  Formatter::SetSpinSize(dStep);
229  if (m_pSpinButton)
231 }
232 
234 
236 
238 {
239  // This leads to FieldModified getting called at the end of Modify() and
240  // FieldModified then calls any modification callback
241  Modify();
242 }
243 
245 {
246  EntryLostFocus();
247  if (m_pSpinButton)
248  m_pSpinButton->signal_value_changed();
249  m_aFocusOutHdl.Call(m_rEntry);
250 }
251 
253  : EntryFormatter(rEntry)
254 {
256 }
257 
259  : EntryFormatter(rSpinButton)
260 {
262 }
263 
265 
267 {
270 }
271 
272 bool DoubleNumericFormatter::CheckText(const OUString& sText) const
273 {
274  // We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
275  // recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
276  // Thus, the roundabout way via a regular expression
277  return m_pNumberValidator->isValidNumericFragment(sText);
278 }
279 
281 {
282  // the thousands and the decimal separator are language dependent
283  const SvNumberformat* pFormatEntry = GetOrCreateFormatter()->GetEntry(m_nFormatKey);
284 
285  sal_Unicode cSeparatorThousand = ',';
286  sal_Unicode cSeparatorDecimal = '.';
287  if (pFormatEntry)
288  {
289  LocaleDataWrapper aLocaleInfo(LanguageTag(pFormatEntry->GetLanguage()));
290 
291  OUString sSeparator = aLocaleInfo.getNumThousandSep();
292  if (!sSeparator.isEmpty())
293  cSeparatorThousand = sSeparator[0];
294 
295  sSeparator = aLocaleInfo.getNumDecimalSep();
296  if (!sSeparator.isEmpty())
297  cSeparatorDecimal = sSeparator[0];
298  }
299 
300  m_pNumberValidator.reset(
301  new validation::NumberValidator(cSeparatorThousand, cSeparatorDecimal));
302 }
303 
305  : EntryFormatter(rEntry)
306  , m_bThousandSep(true)
307 {
308  Init();
309 }
310 
312  : EntryFormatter(rSpinButton)
313  , m_bThousandSep(true)
314 {
315  Init();
316 }
317 
319 {
320  SetOutputHdl(LINK(this, LongCurrencyFormatter, FormatOutputHdl));
321  SetInputHdl(LINK(this, LongCurrencyFormatter, ParseInputHdl));
322 }
323 
325 {
326  m_bThousandSep = b;
327  ReFormat();
328 }
329 
331 {
332  m_aCurrencySymbol = rStr;
333  ReFormat();
334 }
335 
337 
339  : EntryFormatter(rEntry)
340  , m_eFormat(TimeFieldFormat::F_NONE)
341  , m_eTimeFormat(TimeFormat::Hour24)
342  , m_bDuration(false)
343 {
344  Init();
345 }
346 
348  : EntryFormatter(rSpinButton)
349  , m_eFormat(TimeFieldFormat::F_NONE)
350  , m_eTimeFormat(TimeFormat::Hour24)
351  , m_bDuration(false)
352 {
353  Init();
354 }
355 
357 {
358  DisableRemainderFactor(); //so with hh::mm::ss, incrementing mm will not reset ss
359 
360  SetOutputHdl(LINK(this, TimeFormatter, FormatOutputHdl));
361  SetInputHdl(LINK(this, TimeFormatter, ParseInputHdl));
362 
363  SetMin(tools::Time(0, 0));
364  SetMax(tools::Time(23, 59, 59, 999999999));
365 
366  // so the spin size can depend on which zone the cursor is in
367  get_widget().connect_cursor_position(LINK(this, TimeFormatter, CursorChangedHdl));
368  // and set the initial spin size
369  CursorChangedHdl(get_widget());
370 }
371 
373 {
374  switch (eFormat)
375  {
377  {
379  m_bDuration = false;
381  }
382  break;
384  {
386  m_bDuration = false;
388  }
389  break;
391  {
393  m_bDuration = false;
395  }
396  break;
398  {
400  m_bDuration = false;
402  }
403  break;
405  {
406  m_bDuration = true;
408  }
409  break;
411  {
412  m_bDuration = true;
414  }
415  break;
416  }
417 
418  ReFormat();
419 }
420 
421 void TimeFormatter::SetDuration(bool bDuration)
422 {
423  m_bDuration = bDuration;
424  ReFormat();
425 }
426 
428 {
429  m_eFormat = eTimeFormat;
430  ReFormat();
431 }
432 
434 
436  : EntryFormatter(rEntry)
437  , m_eFormat(ExtDateFieldFormat::SystemShort)
438 {
439  Init();
440 }
441 
443 {
444  SetOutputHdl(LINK(this, DateFormatter, FormatOutputHdl));
445  SetInputHdl(LINK(this, DateFormatter, ParseInputHdl));
446 
447  SetMin(Date(1, 1, 1900));
448  SetMax(Date(31, 12, 2200));
449 }
450 
452 {
453  m_eFormat = eFormat;
454  ReFormat();
455 }
456 
458 
460  : m_rEntry(rEntry)
461  , m_bStrictFormat(false)
462  , m_bSameMask(true)
463  , m_bReformat(false)
464  , m_bInPattKeyInput(false)
465 {
466  m_rEntry.connect_changed(LINK(this, PatternFormatter, ModifyHdl));
467  m_rEntry.connect_focus_in(LINK(this, PatternFormatter, FocusInHdl));
468  m_rEntry.connect_focus_out(LINK(this, PatternFormatter, FocusOutHdl));
469  m_rEntry.connect_key_press(LINK(this, PatternFormatter, KeyInputHdl));
470 }
471 
473 
475 {
476  EntryLostFocus();
477  m_aFocusOutHdl.Call(m_rEntry);
478 }
479 
481 {
482  EntryGainFocus();
483  m_aFocusInHdl.Call(m_rEntry);
484 }
485 
487 {
490 }
491 
493 {
494  // load this little .ui just to measure the height of an Entry
495  std::unique_ptr<weld::Builder> xBuilder(
496  Application::CreateBuilder(nullptr, "cui/ui/namedialog.ui"));
497  std::unique_ptr<weld::Entry> xEntry(xBuilder->weld_entry("name_entry"));
498  return xEntry->get_preferred_size().Height();
499 }
500 
502  : mWidget(widget)
503 {
504  css::uno::Reference<css::uno::XComponentContext> xContext
505  = ::comphelper::getProcessComponentContext();
506  css::uno::Reference<css::frame::XDesktop2> xDesktop = css::frame::Desktop::create(xContext);
507 
508  css::uno::Reference<css::frame::XFrame> xFrame(xDesktop->getActiveFrame());
509  if (!xFrame.is())
510  xFrame = xDesktop;
511 
512  mxFrame = xFrame;
513 
514  maCommandURL.Complete = aCommand;
515  css::uno::Reference<css::util::XURLTransformer> xParser
516  = css::util::URLTransformer::create(xContext);
517  xParser->parseStrict(maCommandURL);
518 }
519 
521 {
522  if (mxDispatch.is())
523  mxDispatch->removeStatusListener(this, maCommandURL);
524 
525  css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(mxFrame,
526  css::uno::UNO_QUERY);
527  if (!xDispatchProvider.is())
528  return;
529 
530  mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, "", 0);
531  if (mxDispatch.is())
532  mxDispatch->addStatusListener(this, maCommandURL);
533 }
534 
535 void WidgetStatusListener::statusChanged(const css::frame::FeatureStateEvent& rEvent)
536 {
537  mWidget->set_sensitive(rEvent.IsEnabled);
538 }
539 
540 void WidgetStatusListener::disposing(const css::lang::EventObject& /*Source*/)
541 {
542  mxDispatch.clear();
543 }
544 
546 {
547  if (mxDispatch.is())
548  {
549  mxDispatch->removeStatusListener(this, maCommandURL);
550  mxDispatch.clear();
551  }
552  mxFrame.clear();
553  mWidget = nullptr;
554 }
555 
557  const Link<const CommandEvent&, void>& rContextLink)
558  : m_rButton(rButton)
559  , m_aRepeat("vcl ButtonPressRepeater m_aRepeat")
560  , m_aLink(rLink)
561  , m_aContextLink(rContextLink)
562  , m_bModKey(false)
563 {
564  // instead of connect_clicked because we want a button held down to
565  // repeat the next/prev
566  m_rButton.connect_mouse_press(LINK(this, ButtonPressRepeater, MousePressHdl));
567  m_rButton.connect_mouse_release(LINK(this, ButtonPressRepeater, MouseReleaseHdl));
568 
569  m_aRepeat.SetInvokeHandler(LINK(this, ButtonPressRepeater, RepeatTimerHdl));
570 }
571 
572 IMPL_LINK(ButtonPressRepeater, MousePressHdl, const MouseEvent&, rMouseEvent, bool)
573 {
574  if (rMouseEvent.IsRight())
575  {
576  m_aContextLink.Call(
577  CommandEvent(rMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true));
578  return false;
579  }
580  m_bModKey = rMouseEvent.IsMod1();
581  if (!m_rButton.get_sensitive())
582  return false;
583  auto self = weak_from_this();
584  RepeatTimerHdl(nullptr);
585  if (!self.lock())
586  return false;
587  if (!m_rButton.get_sensitive())
588  return false;
590  m_aRepeat.Start();
591  return true;
592 }
593 
594 IMPL_LINK_NOARG(ButtonPressRepeater, MouseReleaseHdl, const MouseEvent&, bool)
595 {
596  m_bModKey = false;
597  m_aRepeat.Stop();
598  return true;
599 }
600 
601 IMPL_LINK_NOARG(ButtonPressRepeater, RepeatTimerHdl, Timer*, void)
602 {
603  m_aRepeat.SetTimeout(Application::GetSettings().GetMouseSettings().GetButtonRepeat());
604  m_aLink.Call(m_rButton);
605 }
606 
608 {
609  rRect.SetPos(rOutWin.OutputToScreenPixel(rRect.TopLeft()));
610  rRect = FloatingWindow::ImplConvertToAbsPos(&rOutWin, rRect);
611 
612  vcl::Window* pWin = rOutWin.GetFrameWindow();
613 
614  rRect = FloatingWindow::ImplConvertToRelPos(pWin, rRect);
615  rRect.SetPos(pWin->ScreenToOutputPixel(rRect.TopLeft()));
616 
617  return rOutWin.GetFrameWeld();
618 }
619 
620 void SetPointFont(OutputDevice& rDevice, const vcl::Font& rFont)
621 {
622  auto pDefaultDevice = Application::GetDefaultDevice();
623  if (pDefaultDevice)
624  if (vcl::Window* pDefaultWindow = pDefaultDevice->GetOwnerWindow())
625  pDefaultWindow->SetPointFont(rDevice, rFont);
626 }
627 
629  : DropTargetHelper(rTreeView.get_drop_target())
630  , m_rTreeView(rTreeView)
631 {
632 }
633 
635 {
636  // to enable the autoscroll when we're close to the edges
637  m_rTreeView.get_dest_row_at_pos(rEvt.maPosPixel, nullptr, true);
638  return DND_ACTION_MOVE;
639 }
640 
642 {
644  // only dragging within the same widget allowed
645  if (!pSource || pSource != &m_rTreeView)
646  return DND_ACTION_NONE;
647 
648  std::unique_ptr<weld::TreeIter> xSource(m_rTreeView.make_iterator());
649  if (!m_rTreeView.get_selected(xSource.get()))
650  return DND_ACTION_NONE;
651 
652  std::unique_ptr<weld::TreeIter> xTarget(m_rTreeView.make_iterator());
653  int nTargetPos = -1;
654  if (m_rTreeView.get_dest_row_at_pos(rEvt.maPosPixel, xTarget.get(), true))
656  m_rTreeView.move_subtree(*xSource, nullptr, nTargetPos);
657 
658  return DND_ACTION_NONE;
659 }
660 }
661 
662 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tools::Long Max() const
PatternFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:459
std::shared_ptr< weld::Dialog > m_xDialog
Definition: weld.hxx:2548
void SetPos(const Point &rPoint)
TimeFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:338
virtual void connect_changed(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1688
virtual int get_iter_index_in_parent(const TreeIter &rIter) const =0
virtual void connect_focus_out(const Link< Widget &, void > &rLink)
Definition: weld.hxx:227
virtual SAL_DLLPRIVATE void SetMinValue(double dMin) override
Definition: weldutils.cxx:205
LongCurrencyFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:304
void set_state(TriState eState)
Definition: weld.hxx:1479
void SetDuration(bool bDuration)
Definition: weldutils.cxx:421
ExtTimeFieldFormat
Definition: vclenum.hxx:147
void SetCurrencySymbol(const OUString &rStr)
Definition: weldutils.cxx:330
AutoTimer m_aRepeat
TimeFieldFormat
Definition: vclenum.hxx:28
virtual bool iter_parent(TreeIter &rIter) const =0
void SetInputHdl(const Link< sal_Int64 *, TriState > &rLink)
Definition: formatter.hxx:238
virtual Dialog * getDialog() override
Definition: weldutils.cxx:94
virtual SAL_DLLPRIVATE void SetEntryText(const OUString &rText, const Selection &rSel) override
Definition: weldutils.cxx:178
virtual SAL_DLLPRIVATE SelectionOptions GetEntrySelectionOptions() const override
Definition: weldutils.cxx:233
signed char sal_Int8
SelectionOptions
Definition: settings.hxx:178
virtual void ClearMaxValue()
Definition: formatter.hxx:168
Reference< XFrame > xFrame
static const AllSettings & GetSettings()
Gets the application's settings.
Definition: svapp.cxx:760
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
Definition: weldutils.cxx:641
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
SAL_DLLPRIVATE void ResetConformanceTester()
Definition: weldutils.cxx:280
virtual TreeView * get_drag_source() const =0
FORMAT_CHANGE_TYPE
Definition: formatter.hxx:76
Reference< XInterface > xTarget
void SetTimeFormat(TimeFieldFormat eTimeFormat)
Definition: weldutils.cxx:427
Link< weld::Entry &, void > m_aModifyHdl
Definition: weldutils.hxx:247
virtual ~TimeFormatter() override
Definition: field2.cxx:2691
the first 4 of these are only used by base/dbaccess
SAL_DLLPRIVATE void SAL_CALL disposing(const css::lang::EventObject &) override
Definition: weldutils.cxx:540
std::unique_ptr< weld::Builder > m_xBuilder
Definition: weld.hxx:2560
std::unique_ptr< weld::Widget > m_xRelocate
Definition: weld.hxx:2563
virtual ~MessageDialogController() override
Definition: weldutils.cxx:79
weld::TreeView & m_rTreeView
Definition: weldutils.hxx:439
void SetExtFormat(ExtTimeFieldFormat eFormat)
Definition: weldutils.cxx:372
void DisableRemainderFactor()
Definition: fmtfield.cxx:870
ReorderingDropTarget(weld::TreeView &rTreeView)
Definition: weldutils.cxx:628
TimeFormat m_eTimeFormat
Definition: weldutils.hxx:327
virtual Dialog * getDialog() override
Definition: weldutils.cxx:49
virtual void set_text(const OUString &rText)=0
TRISTATE_TRUE
virtual void SetMinValue(double dMin)
Definition: fmtfield.cxx:703
void ReFormat()
Definition: fmtfield.cxx:687
virtual ~BuilderPage() COVERITY_NOEXCEPT_FALSE
Definition: weldutils.cxx:37
virtual void sync_increments_from_formatter()=0
virtual std::unique_ptr< TreeIter > make_iterator(const TreeIter *pOrig=nullptr) const =0
virtual SAL_DLLPRIVATE void ClearMinValue() override
Definition: weldutils.cxx:198
#define DND_ACTION_MOVE
Definition: transfer.hxx:68
static OutputDevice * GetDefaultDevice()
Get the default "device" (in this case the default window).
Definition: svapp.cxx:1164
std::unique_ptr< weld::Container > m_xOrigParent
Definition: weld.hxx:2564
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
Definition: weldutils.cxx:41
weld::Window * GetFrameWeld() const
Definition: window2.cxx:871
sal_uInt16 sal_Unicode
Reference< XNameAccess > m_xContainer
ButtonPressRepeater(weld::Button &rButton, const Link< Button &, void > &rLink, const Link< const CommandEvent &, void > &rContextLink=Link< const CommandEvent &, void >())
Definition: weldutils.cxx:556
virtual ~DateFormatter() override
Definition: field2.cxx:1730
static tools::Rectangle ImplConvertToRelPos(vcl::Window *pReference, const tools::Rectangle &rRect)
Definition: floatwin.cxx:526
virtual SAL_DLLPRIVATE void ClearMaxValue() override
Definition: weldutils.cxx:212
TimeFormat
Definition: vclenum.hxx:142
vcl::Window * GetFrameWindow() const
Definition: window2.cxx:877
virtual SAL_DLLPRIVATE void SetMaxValue(double dMin) override
Definition: weldutils.cxx:219
IMPL_LINK(CustomWeld, DoResize, const Size &, rSize, void)
Definition: customweld.cxx:46
virtual void UpdateCurrentValue(double dCurrentValue)
Definition: formatter.hxx:313
css::uno::Reference< css::frame::XDispatch > mxDispatch
The widget on which actions are performed.
Definition: weldutils.hxx:188
virtual void connect_mouse_release(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:272
#define DND_ACTION_NONE
Definition: transfer.hxx:66
void RemoveParentKeepChildren(weld::TreeView &rTreeView, const weld::TreeIter &rParent)
Definition: weldutils.cxx:118
virtual SAL_DLLPRIVATE bool CheckText(const OUString &sText) const override
Definition: weldutils.cxx:272
void ButtonToggled(Toggleable &rToggle)
Definition: weldutils.cxx:98
void SetOutputHdl(const Link< LinkParamNone *, bool > &rLink)
Definition: formatter.hxx:239
css::util::URL maCommandURL
Definition: weldutils.hxx:189
virtual void Deactivate()
Definition: weldutils.cxx:35
ExtDateFieldFormat m_eFormat
Definition: weldutils.hxx:357
TRISTATE_INDET
weld::Entry & m_rEntry
Definition: weldutils.hxx:245
AssistantController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId)
Definition: weldutils.cxx:87
const OUString & getNumDecimalSep() const
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual ~DialogController() COVERITY_NOEXCEPT_FALSE
Definition: weldutils.cxx:47
virtual void ClearMinValue()
Definition: formatter.hxx:163
virtual bool get_dest_row_at_pos(const Point &rPos, weld::TreeIter *pResult, bool bDnDMode)=0
virtual ~GenericDialogController() COVERITY_NOEXCEPT_FALSE override
Definition: weldutils.cxx:58
virtual SAL_DLLPRIVATE OUString GetEntryText() const override
Definition: weldutils.cxx:176
virtual SAL_DLLPRIVATE void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override
Definition: weldutils.cxx:266
weld::Window * GetPopupParent(vcl::Window &rOutWin, tools::Rectangle &rRect)
Definition: weldutils.cxx:607
virtual void connect_cursor_position(const Link< Entry &, void > &rLink)
Definition: weld.hxx:1692
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat)
Definition: fmtfield.cxx:628
TRISTATE_FALSE
virtual bool iter_has_child(const TreeIter &rIter) const =0
static Point ImplConvertToAbsPos(vcl::Window *pReference, const Point &rPos)
Definition: floatwin.cxx:481
std::unique_ptr< weld::Container > m_xContentArea
Definition: weld.hxx:2562
virtual void select_region(int nStartPos, int nEndPos)=0
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:175
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
Definition: timer.cxx:83
SAL_DLLPRIVATE void Init()
Definition: weldutils.cxx:442
virtual SAL_DLLPRIVATE ~DoubleNumericFormatter() override
TimeFieldFormat m_eFormat
Definition: weldutils.hxx:326
weld::Entry & get_widget()
Definition: weldutils.hxx:211
virtual void connect_focus_in(const Link< Widget &, void > &rLink)
Definition: weld.hxx:221
virtual SAL_DLLPRIVATE Selection GetEntrySelection() const override
Definition: weldutils.cxx:169
virtual sal_Int8 AcceptDrop(const AcceptDropEvent &rEvt) override
Definition: weldutils.cxx:634
Base class used mainly for the LibreOffice Desktop class.
Definition: svapp.hxx:233
virtual void SetMaxValue(double dMax)
Definition: fmtfield.cxx:713
void SetTimeout(sal_uInt64 nTimeoutMs)
Definition: timer.cxx:90
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2814
void SetUseThousandSep(bool b)
Definition: weldutils.cxx:324
virtual void connect_key_press(const Link< const KeyEvent &, bool > &rLink)
Definition: weld.hxx:248
virtual OUString get_text() const =0
WidgetStatusListener(weld::Widget *widget, const OUString &rCommand)
Definition: weldutils.cxx:501
constexpr Point TopLeft() const
void SetMax(const Date &rNewMax)
Definition: field2.cxx:1773
virtual void Activate()
Definition: weldutils.cxx:33
SAL_DLLPRIVATE void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &rEvent) override
Definition: weldutils.cxx:535
virtual bool iter_children(TreeIter &rIter) const =0
virtual void remove(int pos)=0
virtual SAL_DLLPRIVATE void UpdateCurrentValue(double dCurrentValue) override
Definition: weldutils.cxx:191
ExtDateFieldFormat
Definition: vclenum.hxx:155
EntryFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:145
void SetMin(const Date &rNewMin)
Definition: field2.cxx:1766
virtual Dialog * getDialog() override
Definition: weldutils.cxx:60
IMPL_LINK_NOARG(HexColorControl, OnAsyncModifyHdl, void *, void)
void Stop()
Definition: scheduler.cxx:590
TriState get_state() const
Definition: weld.hxx:1470
virtual SAL_DLLPRIVATE ~EntryFormatter() override
Definition: weldutils.cxx:153
virtual bool get_selected(TreeIter *pIter) const =0
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
void SetExtDateFormat(ExtDateFieldFormat eFormat)
Definition: weldutils.cxx:451
std::unique_ptr< validation::NumberValidator > m_pNumberValidator
Definition: weldutils.hxx:272
tools::Long Min() const
virtual void connect_mouse_press(const Link< const MouseEvent &, bool > &rLink)
Definition: weld.hxx:260
virtual ~AssistantController() override
Definition: weldutils.cxx:96
virtual SAL_DLLPRIVATE void FieldModified() override
Definition: weldutils.cxx:235
void SetPointFont(OutputDevice &rDevice, const vcl::Font &rFont)
Definition: weldutils.cxx:620
Reference< XExecutableDialog > m_xDialog
virtual void sync_value_from_formatter()=0
Point maPosPixel
Definition: transfer.hxx:93
weld::Button & m_rButton
Definition: weldutils.hxx:409
css::uno::Reference< css::frame::XFrame > mxFrame
Definition: weldutils.hxx:190
void SetInvokeHandler(const Link< Timer *, void > &rLink)
Definition: timer.hxx:56
DateFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:435
SAL_DLLPRIVATE void Init()
Definition: weldutils.cxx:161
virtual SAL_DLLPRIVATE void SetEntryTextColor(const Color *pColor) override
Definition: weldutils.cxx:186
const OUString & getNumThousandSep() const
virtual SAL_DLLPRIVATE ~LongCurrencyFormatter() override
Definition: longcurr.cxx:286
SvNumberFormatter * GetOrCreateFormatter() const
Definition: formatter.hxx:194
#define SELECTION_MAX
virtual void sync_range_from_formatter()=0
weld::Entry & m_rEntry
Definition: weldutils.hxx:385
Definition: timer.hxx:26
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2808
SelectionOptions m_eOptions
Definition: weldutils.hxx:249
virtual void SetFormatter(weld::EntryFormatter *pFormatter)=0
void SetMax(const tools::Time &rNewMax)
Definition: field2.cxx:2707
std::unique_ptr< weld::Assistant > m_xAssistant
Definition: weld.hxx:2590
std::shared_ptr< osl::Mutex > const & lock()
std::unique_ptr< weld::MessageDialog > m_xDialog
Definition: weld.hxx:2561
SAL_DLLPRIVATE void Init()
Definition: weldutils.cxx:318
int GetMinimumEditHeight()
Definition: weldutils.cxx:492
sal_uLong m_nFormatKey
Definition: formatter.hxx:125
LanguageType GetLanguage() const
virtual void move_subtree(TreeIter &rNode, const TreeIter *pNewParent, int nIndexInNewParent)=0
virtual void set_sensitive(bool sensitive)=0
virtual void set_font_color(const Color &rColor)=0
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
Definition: builder.cxx:184
virtual void SetSpinSize(double dStep)
Definition: formatter.hxx:226
DoubleNumericFormatter(weld::Entry &rEntry)
Definition: weldutils.cxx:252
static sal_Int32 GetButtonStartRepeat()
GenericDialogController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, bool bMobile=false)
Definition: weldutils.cxx:51
MessageDialogController(weld::Widget *pParent, const OUString &rUIFile, const OString &rDialogId, const OString &rRelocateId=OString())
Definition: weldutils.cxx:62
SAL_DLLPRIVATE void Init()
Definition: weldutils.cxx:356
BuilderPage(weld::Widget *pParent, weld::DialogController *pController, const OUString &rUIXMLDescription, const OString &rID, bool bIsMobile=false)
Definition: weldutils.cxx:25
bool m_bDetectedRangeSegmentation false
void SetMin(const tools::Time &rNewMin)
Definition: field2.cxx:2700
virtual SAL_DLLPRIVATE void SetSpinSize(double dStep) override
Definition: weldutils.cxx:226
weld::FormattedSpinButton * m_pSpinButton
Definition: weldutils.hxx:246