diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-12-19 22:22:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-12-20 17:36:53 +0100 |
commit | a0bf3da7a610e35862878687fed01b63ee5e5308 (patch) | |
tree | 3a2e015c4abe71133eab55e6a7d76c271ad076b9 /svtools | |
parent | c75bc340346cd75c03cd87da66c46bf0c8482df8 (diff) |
tdf#139063 crash when add a new sheet to a RTL sheet
Change-Id: Icbfb45036f93ed92e5c83039cd4c3b536f0df0d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108036
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/tabbar.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 1beda5faeff6..640d767477d6 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -426,9 +426,9 @@ public: std::unique_ptr<weld::Button> m_xNextButton; std::unique_ptr<weld::Button> m_xLastButton; std::unique_ptr<weld::Button> m_xAddButton; - std::unique_ptr<weld::ButtonPressRepeater> m_xAddRepeater; - std::unique_ptr<weld::ButtonPressRepeater> m_xPrevRepeater; - std::unique_ptr<weld::ButtonPressRepeater> m_xNextRepeater; + std::shared_ptr<weld::ButtonPressRepeater> m_xAddRepeater; + std::shared_ptr<weld::ButtonPressRepeater> m_xPrevRepeater; + std::shared_ptr<weld::ButtonPressRepeater> m_xNextRepeater; TabButtons(TabBar* pParent) : InterimItemWindow(pParent, @@ -780,8 +780,8 @@ void TabBar::ImplInitControls() if (mnWinStyle & WB_INSERTTAB) { Link<weld::Button&,void> aLink = LINK(this, TabBar, ImplAddClickHandler); - mpImpl->mxButtonBox->m_xAddRepeater.reset(new weld::ButtonPressRepeater( - *mpImpl->mxButtonBox->m_xAddButton, aLink, aContextLink)); + mpImpl->mxButtonBox->m_xAddRepeater = std::make_shared<weld::ButtonPressRepeater>( + *mpImpl->mxButtonBox->m_xAddButton, aLink, aContextLink); mpImpl->mxButtonBox->m_xAddButton->show(); } @@ -789,11 +789,11 @@ void TabBar::ImplInitControls() if (mnWinStyle & (WB_MINSCROLL | WB_SCROLL)) { - mpImpl->mxButtonBox->m_xPrevRepeater.reset(new weld::ButtonPressRepeater( - *mpImpl->mxButtonBox->m_xPrevButton, aLink, aContextLink)); + mpImpl->mxButtonBox->m_xPrevRepeater = std::make_shared<weld::ButtonPressRepeater>( + *mpImpl->mxButtonBox->m_xPrevButton, aLink, aContextLink); mpImpl->mxButtonBox->m_xPrevButton->show(); - mpImpl->mxButtonBox->m_xNextRepeater.reset(new weld::ButtonPressRepeater( - *mpImpl->mxButtonBox->m_xNextButton, aLink, aContextLink)); + mpImpl->mxButtonBox->m_xNextRepeater = std::make_shared<weld::ButtonPressRepeater>( + *mpImpl->mxButtonBox->m_xNextButton, aLink, aContextLink); mpImpl->mxButtonBox->m_xNextButton->show(); } |