From a044c44ece2035c3c087012ae29e64a69ebc4ba7 Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 15 Mar 2005 10:22:40 +0000 Subject: [PATCH] INTEGRATION: CWS mav17 (1.36.6); FILE MERGED 2005/03/02 16:44:12 mav 1.36.6.2: RESYNC: (1.36-1.37); FILE MERGED 2005/02/28 11:01:49 mav 1.36.6.1: #i42398# handle impossibility to get visual area --- sd/source/ui/view/viewshe2.cxx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 07df9691ffd3..99fba01d8eec 100644 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewshe2.cxx,v $ * - * $Revision: 1.37 $ + * $Revision: 1.38 $ * - * last change: $Author: vg $ $Date: 2005-02-16 17:03:50 $ + * last change: $Author: obo $ $Date: 2005-03-15 11:22:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -59,6 +59,10 @@ * ************************************************************************/ +#ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_ +#include +#endif + #include "ViewShell.hxx" #include "ViewShellHint.hxx" @@ -1028,7 +1032,18 @@ BOOL ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) Size aDrawSize = aRect.GetSize(); // TODO/LEAN: getMapUnit may switch object to running state - awt::Size aSz = pObj->GetObjRef()->getVisualAreaSize( pSdClient->GetAspect() ); + awt::Size aSz; + try + { + aSz = pObj->GetObjRef()->getVisualAreaSize( pSdClient->GetAspect() ); + } + catch( embed::NoVisualAreaSizeException& ) + { + OSL_ENSURE ( sal_False, "Can not get visual area size!\n" ); + aSz.Width = 5000; + aSz.Height = 5000; + } + Size aObjAreaSize( aSz.Width, aSz.Height ); MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( pObj->GetObjRef()->getMapUnit( pSdClient->GetAspect() ) );