[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-4' - sd/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Dec 7 09:04:06 UTC 2016


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

New commits:
commit 0af5348f5d724abc6047055d1585fe3fda9ee6e1
Author: Noel Grandin <noel.grandin at 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.grandin at 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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 78223678b7513ffe46804cb08f2dc5bc899b2bab)
    Reviewed-on: https://gerrit.libreoffice.org/31708
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

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);
 }
 
 


More information about the Libreoffice-commits mailing list