[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sfx2/source

Caolán McNamara caolanm at redhat.com
Fri Aug 30 13:01:11 PDT 2013


 sfx2/source/appl/appserv.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 47134ddc12e130ff65848cb8faa72fa3a4a61c77
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 30 16:06:44 2013 +0100

    Related: fdo#66700 don't crash on setting zoom state with no SfxObjectShell
    
    (cherry picked from commit dd0f6c737b6af659389e473296e939ec6cfa5f4e)
    
    Conflicts:
    	sfx2/source/appl/appserv.cxx
    
    Change-Id: Id2943c92ce6deaae3e4d507a35c08466db21cece
    Reviewed-on: https://gerrit.libreoffice.org/5697
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Tested-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 92ac7af..d4d8fff 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -601,6 +601,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_ZOOM_ENTIRE_PAGE:
         case SID_ZOOM_PAGE_WIDTH:
         {
+            SfxObjectShell* pCurrentShell = SfxObjectShell::Current();
+            if (!pCurrentShell)
+                return;
+
             // make sure aZoom is initialized with a proper value if SetType
             // doesn't work
             SvxZoomItem aZoom( SVX_ZOOM_PERCENT, 100 );
@@ -633,7 +637,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
                     break;
             }
 
-            SfxViewFrame::Current()->GetDispatcher()->Execute(SID_ATTR_ZOOM, SFX_CALLMODE_ASYNCHRON, &aZoom, 0L);
+            pCurrentShell->GetDispatcher()->Execute(SID_ATTR_ZOOM, SFX_CALLMODE_ASYNCHRON, &aZoom, 0L);
 
             break;
         }


More information about the Libreoffice-commits mailing list