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
This commit is contained in:
Oliver Bolte
2005-03-15 10:22:40 +00:00
parent faa9345ac2
commit a044c44ece

View File

@@ -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 <com/sun/star/embed/NoVisualAreaSizeException.hpp>
#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() ) );