diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:25:26 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-03-15 10:25:26 +0000 |
commit | 0da51a3bd41944a87594dd26e08549e8474146d3 (patch) | |
tree | 3a98649b62ae6e65c14ea6dd3ffcb85109777b3f /sw/source/core/unocore | |
parent | cc94fc302606ca062138c673d1c6aa782fa106fd (diff) |
INTEGRATION: CWS mav17 (1.96.72); FILE MERGED
2005/03/02 17:03:59 mav 1.96.72.2: RESYNC: (1.96-1.97); FILE MERGED
2005/02/28 11:09:34 mav 1.96.72.1: #i42398# handle impossibility to get visual area
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 762495ee8ad9..c89297ee61db 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoframe.cxx,v $ * - * $Revision: 1.97 $ + * $Revision: 1.98 $ * - * last change: $Author: vg $ $Date: 2005-02-25 09:27:49 $ + * last change: $Author: obo $ $Date: 2005-03-15 11:25:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,6 +61,9 @@ #pragma hdrstop +#ifndef _COM_SUN_STAR_EMBED_NOVISUALAREASIZEEXCEPTION_HPP_ +#include <com/sun/star/embed/NoVisualAreaSizeException.hpp> +#endif #ifndef _COM_SUN_STAR_EMBED_XCLASSIFIEDOBJECT_HPP_ #include <com/sun/star/embed/XClassifiedObject.hpp> #endif @@ -2263,7 +2266,16 @@ void SwXFrame::attachToRange(const uno::Reference< XTextRange > & xTextRange) // TODO/LEAN: VisualArea may switch object to running state //The Size should be suggested by the OLE server if not manually set MapUnit aRefMap = VCLUnoHelper::UnoEmbed2VCLMapUnit( xIPObj->getMapUnit( nAspect ) ); - awt::Size aSize = xIPObj->getVisualAreaSize( nAspect ); + awt::Size aSize; + try + { + aSize = xIPObj->getVisualAreaSize( nAspect ); + } + catch ( embed::NoVisualAreaSizeException& ) + { + // the default size will be set later + } + Size aSz( aSize.Width, aSize.Height ); if ( !aSz.Width() || !aSz.Height() ) { |