summaryrefslogtreecommitdiff
path: root/sc/source/ui/app/client.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-03-15 10:42:46 +0000
committerOliver Bolte <obo@openoffice.org>2005-03-15 10:42:46 +0000
commit4a75505e724942b2bdee14ea166aa6d7098e3dac (patch)
tree46327a98278e94546bf568a7b46a4f2fe99640d0 /sc/source/ui/app/client.cxx
parent5ebc557ce7f118dccf754ff6daf4bd7960b783d4 (diff)
INTEGRATION: CWS mav17 (1.13.42); FILE MERGED
2005/02/28 11:00:05 mav 1.13.42.1: #i42398# handle impossibility to get visual area
Diffstat (limited to 'sc/source/ui/app/client.cxx')
-rw-r--r--sc/source/ui/app/client.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index 5a22f6057e50..23f0539f7921 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: client.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: rt $ $Date: 2005-01-31 09:07:18 $
+ * last change: $Author: obo $ $Date: 2005-03-15 11:42:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,6 +70,9 @@
#ifndef _COM_SUN_STAR_EMBED_XEMBEDDEDOBJECT_HPP_
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#endif
+#ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#endif
#include <toolkit/helper/vclunohelper.hxx>
#include <sfx2/objsh.hxx>
@@ -219,7 +222,14 @@ void __EXPORT ScClient::ViewChanged()
uno::Reference < embed::XEmbeddedObject > xObj = GetObject();
// TODO/LEAN: working with Visual Area can switch object to running state
- awt::Size aSz = xObj->getVisualAreaSize( GetAspect() );
+ awt::Size aSz;
+ try {
+ aSz = xObj->getVisualAreaSize( GetAspect() );
+ } catch ( embed::NoVisualAreaSizeException& )
+ {
+ DBG_ERROR("The visual area size must be available!\n");
+ }
+
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( GetAspect() ) );
Size aVisSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aMapUnit, MAP_100TH_MM );