INTEGRATION: CWS opofxmlstorage (1.4.40); FILE MERGED

2006/06/30 15:03:42 mav 1.4.40.4: resync to m173: fix warnings
2006/06/29 12:54:11 mav 1.4.40.3: RESYNC: (1.4-1.5); FILE MERGED
2006/05/23 15:45:58 mav 1.4.40.2: #122878# Iconified object replacement image must be handled by the container
2006/05/23 15:11:12 mav 1.4.40.1: #122878# Iconified object replacement image must be handled by the container
This commit is contained in:
Oliver Bolte 2006-10-13 10:31:55 +00:00
parent 296f8db090
commit 2bf02a1598

View file

@ -4,9 +4,9 @@
*
* $RCSfile: specialobject.cxx,v $
*
* $Revision: 1.7 $
* $Revision: 1.8 $
*
* last change: $Author: obo $ $Date: 2006-10-12 11:20:53 $
* last change: $Author: obo $ $Date: 2006-10-13 11:31:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -57,6 +57,9 @@
#ifndef _COM_SUN_STAR_EMBED_XWINDOWSUPPLIER_HPP_
#include <com/sun/star/embed/XWindowSupplier.hpp>
#endif
#ifndef _COM_SUN_STAR_EMBED_ASPECTS_HPP_
#include <com/sun/star/embed/Aspects.hpp>
#endif
#ifndef _COM_SUN_STAR_AWT_XWINDOWPEER_HPP_
#include <com/sun/star/awt/XWindowPeer.hpp>
#endif
@ -146,7 +149,7 @@ uno::Sequence< uno::Type > SAL_CALL OSpecialEmbeddedObject::getTypes()
}
embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualRepresentation( sal_Int64 /*nAspect*/ )
embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualRepresentation( sal_Int64 nAspect )
throw ( lang::IllegalArgumentException,
embed::WrongStateException,
uno::Exception,
@ -161,6 +164,12 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no model!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" );
if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
// TODO: return for the aspect of the document
embed::VisualRepresentation aVisualRepresentation;
/*
@ -179,7 +188,7 @@ embed::VisualRepresentation SAL_CALL OSpecialEmbeddedObject::getPreferredVisualR
return aVisualRepresentation;
}
void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 /*nAspect*/, const awt::Size& aSize )
void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt::Size& aSize )
throw ( lang::IllegalArgumentException,
embed::WrongStateException,
uno::Exception,
@ -189,10 +198,16 @@ void SAL_CALL OSpecialEmbeddedObject::setVisualAreaSize( sal_Int64 /*nAspect*/,
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" );
if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
maSize = aSize;
}
awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 /*nAspect*/ )
awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
throw ( lang::IllegalArgumentException,
embed::WrongStateException,
uno::Exception,
@ -202,14 +217,21 @@ awt::Size SAL_CALL OSpecialEmbeddedObject::getVisualAreaSize( sal_Int64 /*nAspec
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" );
if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
if ( m_nObjectState == -1 )
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The own object has no model!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
awt::Size aResult;
return maSize;
}
sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 /*nAspect*/ )
sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 nAspect )
throw ( uno::Exception,
uno::RuntimeException)
{
@ -217,6 +239,12 @@ sal_Int32 SAL_CALL OSpecialEmbeddedObject::getMapUnit( sal_Int64 /*nAspect*/ )
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON, "For iconified objects no graphical replacement is required!\n" );
if ( nAspect == embed::Aspects::MSOLE_ICON )
// no representation can be retrieved
throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "Illegal call!\n" ),
uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) );
return embed::EmbedMapUnits::ONE_100TH_MM;
}