From 75f0bdfd74a22e80cd87a8ca2e5c36a9ce31056f Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Mon, 18 Apr 2005 10:15:21 +0000 Subject: [PATCH] INTEGRATION: CWS impress46 (1.11.88); FILE MERGED 2005/04/08 17:53:27 cl 1.11.88.1: #i46862# catch exceptions from getVisualAreaSize --- sd/source/ui/docshell/sdclient.cxx | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx index 05ecb06241f7..aaf861d02686 100644 --- a/sd/source/ui/docshell/sdclient.cxx +++ b/sd/source/ui/docshell/sdclient.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sdclient.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: rt $ $Date: 2005-01-31 09:04:52 $ + * last change: $Author: obo $ $Date: 2005-04-18 11:15:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,10 @@ #include "Client.hxx" +#ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_ +#include +#endif + #ifndef _SVDOOLE2_HXX //autogen #include #endif @@ -193,7 +197,26 @@ void Client::ViewChanged() MapMode aMap100( MAP_100TH_MM ); MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ); Rectangle aVisArea; - awt::Size aSz = GetObject()->getVisualAreaSize( GetAspect() ); + awt::Size aSz; + try + { + aSz = GetObject()->getVisualAreaSize( GetAspect() ); + } + catch( embed::NoVisualAreaSizeException& e ) + { + (void)e; + DBG_ERROR( "sd::Client::ViewChanged(), can not get visual area size!\n" ); + aSz.Width = 5000; + aSz.Height = 5000; + } + catch( uno::Exception& e ) + { + (void)e; + DBG_ERROR( "sd::Client::ViewChanged(), unexcpected exception catched!\n" ); + aSz.Width = 5000; + aSz.Height = 5000; + } + aVisArea.SetSize( Size( aSz.Width, aSz.Height ) ); aVisArea = OutputDevice::LogicToLogic( aVisArea, aMapUnit, aMap100 ); Rectangle aLogicRect( pSdrOle2Obj->GetLogicRect() );