diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-06 16:11:31 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-07 09:03:39 +0000 |
commit | 0af5348f5d724abc6047055d1585fe3fda9ee6e1 (patch) | |
tree | 59451a4640e5787da20d3b70e5c9bf21899255c4 | |
parent | 6991df819033bb515014444f412709aa0add1930 (diff) |
tdf#103756 fix crash of this on 5-2 with initial backport
This crashing when the user hits ctrl-Z, because when I backported:
commit d1909ab7940109ce7d43da04e480db4e82b8310f
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Tue Nov 8 16:15:55 2016 +0200
tdf#103756 - CTRL+Z not working to undo changes performed through
Navigator
I missed that the older version of SdPageObjsTLB has two constructors
while the new version (on master) only has one, and I only added the new
line of code to one of them.
Change-Id: Ic5bc59a20e26fecb823f5b0fadba874b947e77ad
Reviewed-on: https://gerrit.libreoffice.org/31680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 78223678b7513ffe46804cb08f2dc5bc899b2bab)
Reviewed-on: https://gerrit.libreoffice.org/31708
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 0aeab054e253..5f1a7c5789c6 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -224,6 +224,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, const SdResId& rSdResId ) SetDragDropMode( DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY | DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP ); + + m_pAccel = ::svt::AcceleratorExecute::createAcceleratorHelper(); } SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) @@ -262,12 +264,9 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle ) void SdPageObjsTLB::SetViewFrame( SfxViewFrame* pViewFrame ) { mpFrame = pViewFrame; - if (m_pAccel) - { - sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); - const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); - m_pAccel->init(::comphelper::getProcessComponentContext(), xFrame); - } + sd::ViewShellBase* pBase = sd::ViewShellBase::GetViewShellBase(pViewFrame); + const css::uno::Reference< css::frame::XFrame > xFrame = pBase->GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(); + m_pAccel->init(::comphelper::getProcessComponentContext(), xFrame); } |