summaryrefslogtreecommitdiff
path: root/vcl/source/app/salvtables.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/salvtables.cxx')
-rw-r--r--vcl/source/app/salvtables.cxx65
1 files changed, 30 insertions, 35 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 46d51c2c2cee..67cb0e5805ee 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -418,6 +418,15 @@ void SalInstanceWidget::set_tooltip_text(const OUString& rTip)
OUString SalInstanceWidget::get_tooltip_text() const { return m_xWidget->GetQuickHelpText(); }
+void SalInstanceWidget::set_cursor_data(void* pData)
+{
+ vcl::Cursor* pCursor = static_cast<vcl::Cursor*>(pData);
+ if (!pCursor)
+ return;
+
+ m_xWidget->SetCursor(pCursor);
+}
+
void SalInstanceWidget::connect_focus_in(const Link<Widget&, void>& rLink)
{
ensure_event_listener();
@@ -510,6 +519,11 @@ void SalInstanceWidget::thaw()
void SalInstanceWidget::set_busy_cursor(bool bBusy)
{
+ if (!m_xWidget)
+ {
+ return;
+ }
+
if (bBusy)
m_xWidget->EnterWait();
else
@@ -1542,6 +1556,11 @@ weld::ScreenShotCollection SalInstanceWindow::collect_screenshot_data()
return aRet;
}
+const vcl::ILibreOfficeKitNotifier* SalInstanceWindow::GetLOKNotifier()
+{
+ return m_xWindow ? m_xWindow->GetLOKNotifier() : nullptr;
+}
+
SalInstanceWindow::~SalInstanceWindow()
{
// tdf#129745 only undo overriding child help for the normal case, not for
@@ -4943,29 +4962,17 @@ SalInstanceTreeView::~SalInstanceTreeView()
m_xTreeView->SetSelectHdl(Link<SvTreeListBox*, void>());
m_xTreeView->SetDeselectHdl(Link<SvTreeListBox*, void>());
m_xTreeView->SetScrolledHdl(Link<SvTreeListBox*, void>());
- m_xTreeView->SetTooltipHdl(Link<const HelpEvent&, bool>());
+ m_xTreeView->SetTooltipHdl({});
m_xTreeView->SetCustomRenderHdl(Link<svtree_render_args, void>());
m_xTreeView->SetCustomMeasureHdl(Link<svtree_measure_args, Size>());
}
-IMPL_LINK(SalInstanceTreeView, TooltipHdl, const HelpEvent&, rHEvt, bool)
+IMPL_LINK(SalInstanceTreeView, TooltipHdl, SvTreeListEntry*, pEntry, OUString)
{
- if (notify_events_disabled())
- return false;
- Point aPos(m_xTreeView->ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
- SvTreeListEntry* pEntry = m_xTreeView->GetEntry(aPos);
- if (pEntry)
- {
- SalInstanceTreeIter aIter(pEntry);
- OUString aTooltip = signal_query_tooltip(aIter);
- if (aTooltip.isEmpty())
- return false;
- Size aSize(m_xTreeView->GetOutputSizePixel().Width(), m_xTreeView->GetEntryHeight());
- tools::Rectangle aScreenRect(
- m_xTreeView->OutputToScreenPixel(m_xTreeView->GetEntryPosition(pEntry)), aSize);
- Help::ShowQuickHelp(m_xTreeView, aScreenRect, aTooltip);
- }
- return true;
+ if (pEntry && !notify_events_disabled())
+ return signal_query_tooltip(SalInstanceTreeIter(pEntry));
+
+ return {};
}
IMPL_LINK(SalInstanceTreeView, CustomRenderHdl, svtree_render_args, payload, void)
@@ -5319,24 +5326,12 @@ void SalInstanceIconView::insert_separator(int pos, const OUString* /* pId */)
pViewData->SetSelectable(false);
}
-IMPL_LINK(SalInstanceIconView, TooltipHdl, const HelpEvent&, rHEvt, bool)
+IMPL_LINK(SalInstanceIconView, TooltipHdl, SvTreeListEntry*, pEntry, OUString)
{
- if (notify_events_disabled())
- return false;
- Point aPos(m_xIconView->ScreenToOutputPixel(rHEvt.GetMousePosPixel()));
- SvTreeListEntry* pEntry = m_xIconView->GetEntry(aPos);
- if (pEntry)
- {
- SalInstanceTreeIter aIter(pEntry);
- OUString aTooltip = signal_query_tooltip(aIter);
- if (aTooltip.isEmpty())
- return false;
- Size aSize(m_xIconView->GetOutputSizePixel().Width(), m_xIconView->GetEntryHeight());
- tools::Rectangle aScreenRect(
- m_xIconView->OutputToScreenPixel(m_xIconView->GetEntryPosition(pEntry)), aSize);
- Help::ShowQuickHelp(m_xIconView, aScreenRect, aTooltip);
- }
- return true;
+ if (pEntry && !notify_events_disabled())
+ return signal_query_tooltip(SalInstanceTreeIter(pEntry));
+
+ return {};
}
IMPL_LINK(SalInstanceIconView, EntryAccessibleDescriptionHdl, SvTreeListEntry*, pEntry, OUString)