sd/source/ui/dlg/sdtreelb.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 78223678b7513ffe46804cb08f2dc5bc899b2bab
Author: Noel Grandin <noel.gran...@collabora.co.uk>
Date:   Tue Dec 6 16:11:31 2016 +0200

    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.gran...@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 <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 0aeab05..5f1a7c5 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);
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to