summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-02 12:56:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-03 14:44:15 +0100
commit4359ee40b42a6c3febd5ff8f8286303d20d245e9 (patch)
tree76124067e11b15b5be8effe5103c246bf281eb04 /vcl/source/app
parentb1541d16d51db3e4131cc5f9e758667470727534 (diff)
tdf#129068 try dialog content area help before dialog itself
we already check current notebook page before the dialog, now check the content area before the dialog Change-Id: Ieedb5727ddec6d24adc6e70144977b5c3063c0fd Reviewed-on: https://gerrit.libreoffice.org/84245 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/salvtables.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f45f550e5985..96195407f1a0 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6589,6 +6589,20 @@ void SalInstanceWindow::help()
OString sPageId = m_pBuilder->get_current_page_help_id();
if (!sPageId.isEmpty())
sHelpId = sPageId;
+ else
+ {
+ // tdf#129068 likewise the help for the wrapping dialog is less
+ // helpful than the help for the content area could be
+ vcl::Window *pContentArea = nullptr;
+ if (::Dialog* pDialog = dynamic_cast<::Dialog*>(m_xWindow.get()))
+ pContentArea = pDialog->get_content_area();
+ if (pContentArea)
+ {
+ vcl::Window* pContentWidget = pContentArea->GetWindow(GetWindowType::LastChild);
+ if (pContentWidget)
+ sHelpId = pContentWidget->GetHelpId();
+ }
+ }
}
pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pSource);
}