diff options
Diffstat (limited to 'fpicker/source/office/PlacesListBox.cxx')
-rw-r--r-- | fpicker/source/office/PlacesListBox.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx index 050cee39c113..86bd505179a3 100644 --- a/fpicker/source/office/PlacesListBox.cxx +++ b/fpicker/source/office/PlacesListBox.cxx @@ -29,6 +29,7 @@ PlacesListBox::PlacesListBox(std::unique_ptr<weld::TreeView> xControl, mxImpl->connect_changed( LINK( this, PlacesListBox, Selection ) ); mxImpl->connect_row_activated( LINK( this, PlacesListBox, DoubleClick ) ) ; + mxImpl->connect_query_tooltip(LINK(this, PlacesListBox, QueryTooltipHdl)); } PlacesListBox::~PlacesListBox( ) @@ -136,6 +137,17 @@ IMPL_LINK_NOARG( PlacesListBox, DoubleClick, weld::TreeView&, bool ) return true; } +IMPL_LINK(PlacesListBox, QueryTooltipHdl, const weld::TreeIter&, rIter, OUString) +{ + const OUString sText = mxImpl->get_text(rIter); + for (const auto& pPlace : maPlaces) + { + if (pPlace->GetName() == sText) + return pPlace->GetUrlObject().GetMainURL(INetURLObject::DecodeMechanism::Unambiguous); + } + return OUString(); +} + void PlacesListBox::updateView( ) { sal_uInt32 nSelected = mxImpl->get_cursor_index(); |