summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-03-15 10:37:36 +0000
committerOliver Bolte <obo@openoffice.org>2005-03-15 10:37:36 +0000
commit933b37efeb1bdec26d8d71367bbfefe09fb102a4 (patch)
tree3323fc9a89733efe7da8be78f77a780f27c4b40f /svtools
parent78c701659567ae06c4694e3d5d06192c9facfcfb (diff)
INTEGRATION: CWS mav17 (1.4.46); FILE MERGED
2005/02/28 11:06:10 mav 1.4.46.1: #i42398# handle impossibility to get visual area
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/embedtransfer.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index 2ec1d711b5d8..bcf6d7cfb982 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: embedtransfer.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: rt $ $Date: 2005-01-31 09:00:57 $
+ * last change: $Author: obo $ $Date: 2005-03-15 11:37:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,9 @@
#ifndef _COM_SUN_STAR_EMBED_XEMBEDPERSIST_HPP_
#include <com/sun/star/embed/XEmbedPersist.hpp>
#endif
+#ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_
+#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
+#endif
#ifndef _COM_SUN_STAR_DATATRANSFER_XTRANSFERABLE_HPP_
#include <com/sun/star/datatransfer/XTransferable.hpp>
#endif
@@ -225,7 +228,18 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
//TODO/LATER: status needs to become sal_Int64
rDesc.mnOle2Misc = xObj->getStatus( rDesc.mnViewAspect );
- awt::Size aSz = xObj->getVisualAreaSize( rDesc.mnViewAspect );
+
+ awt::Size aSz;
+ try
+ {
+ aSz = xObj->getVisualAreaSize( rDesc.mnViewAspect );
+ }
+ catch( embed::NoVisualAreaSizeException& )
+ {
+ OSL_ENSURE( sal_False, "Can not get visual area size!\n" );
+ aSz.Width = 5000;
+ aSz.Height = 5000;
+ }
// TODO/LEAN: getMapUnit can switch object to running state
MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( rDesc.mnViewAspect ) );