summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-07 12:17:36 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2022-01-09 13:37:04 +0100
commit6c191f339c8bd8717e01085baea93ccfb2416c82 (patch)
treed026289de6cf16e658d7e3ac1ceefe7e559586a9
parent30582ba78dc6682a55f193905461b4abbec3e35e (diff)
Resolves: tdf#129745 don't override child help for application frames
the glue WindowInstance is created on demand, and on creation descends into any existing open dialogs and changes their help handlers. We could not descend into child dialogs, but we shouldn't change the app frame help handler anyway. Change-Id: I8d149d324f04824fbe9eec517d8c482fd96b125b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128076 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--vcl/source/app/salvtables.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 54199b1284b3..5525ec7d39c5 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1427,7 +1427,10 @@ SalInstanceWindow::SalInstanceWindow(vcl::Window* pWindow, SalInstanceBuilder* p
: SalInstanceContainer(pWindow, pBuilder, bTakeOwnership)
, m_xWindow(pWindow)
{
- override_child_help(m_xWindow);
+ // tdf#129745 only override child help for the normal case, not for
+ // m_pBuilder of null which is the toplevel application frame case.
+ if (m_pBuilder)
+ override_child_help(m_xWindow);
}
void SalInstanceWindow::set_title(const OUString& rTitle) { m_xWindow->SetText(rTitle); }
@@ -1528,7 +1531,13 @@ weld::ScreenShotCollection SalInstanceWindow::collect_screenshot_data()
return aRet;
}
-SalInstanceWindow::~SalInstanceWindow() { clear_child_help(m_xWindow); }
+SalInstanceWindow::~SalInstanceWindow()
+{
+ // tdf#129745 only undo overriding child help for the normal case, not for
+ // m_pBuilder of null which is the toplevel application frame case.
+ if (m_pBuilder)
+ clear_child_help(m_xWindow);
+}
IMPL_LINK_NOARG(SalInstanceWindow, HelpHdl, vcl::Window&, bool)
{