diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:43:57 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:43:57 +0000 |
commit | f0cd2a2538ba31c9a7be1cdb67628cdaa2f337ed (patch) | |
tree | f31b23d093d236c02020585acab7cbf51d8e4515 | |
parent | 2117c73dcd2cfe73c55249b7df7e48b9cf3ec083 (diff) |
INTEGRATION: CWS mav17 (1.23.42); FILE MERGED
2005/02/28 11:00:07 mav 1.23.42.1: #i42398# handle impossibility to get visual area
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 216e9a13d976..9d4fea48e61b 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tabvwshb.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: rt $ $Date: 2005-01-31 09:08:14 $ + * last change: $Author: obo $ $Date: 2005-03-15 11:43:57 $ * * 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 <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#endif + #ifdef PCH #include "ui_pch.hxx" #endif @@ -130,7 +134,18 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) Rectangle aRect = pObj->GetLogicRect(); Size aDrawSize = aRect.GetSize(); - awt::Size aSz = xObj->getVisualAreaSize( pClient->GetAspect() ); + awt::Size aSz; + try + { + aSz = xObj->getVisualAreaSize( pClient->GetAspect() ); + } + catch ( embed::NoVisualAreaSizeException& ) + { + DBG_ERROR( "Can't get visual area size from the object!\n" ); + aSz.Width = 5000; + aSz.Height = 5000; + } + Size aOleSize( aSz.Width, aSz.Height ); // sichtbarer Ausschnitt wird nur inplace veraendert! @@ -171,7 +186,18 @@ BOOL ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) Rectangle aRect = pObj->GetLogicRect(); Size aDrawSize = aRect.GetSize(); - awt::Size aSz = xObj->getVisualAreaSize( pClient->GetAspect() ); + awt::Size aSz; + try + { + aSz = xObj->getVisualAreaSize( pClient->GetAspect() ); + } + catch ( embed::NoVisualAreaSizeException& ) + { + DBG_ERROR( "Can't get visual area size from the object!\n" ); + aSz.Width = 5000; + aSz.Height = 5000; + } + Size aOleSize( aSz.Width, aSz.Height ); MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( pClient->GetAspect() ) ); |