summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/viewshe2.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-03-15 10:22:40 +0000
committerOliver Bolte <obo@openoffice.org>2005-03-15 10:22:40 +0000
commita044c44ece2035c3c087012ae29e64a69ebc4ba7 (patch)
tree23fe2fac3b6792df2a90f823d4cdd97353571941 /sd/source/ui/view/viewshe2.cxx
parentfaa9345ac2de57e6127171c7d6c8a04a690586a0 (diff)
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
Diffstat (limited to 'sd/source/ui/view/viewshe2.cxx')
-rw-r--r--sd/source/ui/view/viewshe2.cxx21
1 files 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 <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() ) );