20#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
21#include <com/sun/star/embed/EmbedStates.hpp>
22#include <com/sun/star/embed/UnreachableStateException.hpp>
23#include <com/sun/star/embed/WrongStateException.hpp>
24#include <com/sun/star/embed/Aspects.hpp>
25#include <com/sun/star/util/XCloseable.hpp>
26#include <com/sun/star/lang/DisposedException.hpp>
27#include <com/sun/star/embed/EmbedMapUnits.hpp>
30#include <osl/diagnose.h>
48 uno::Any aReturn = ::cppu::queryInterface( rType,
49 static_cast< embed::XEmbeddedObject*
>(
this ),
50 static_cast< embed::XInplaceObject*
>(
this ),
51 static_cast< embed::XCommonEmbedPersist*
>(
static_cast< embed::XEmbedPersist*
>(
this ) ),
52 static_cast< embed::XVisualObject*
>(
this ),
53 static_cast< embed::XClassifiedObject*
>(
this ),
54 static_cast< embed::XComponentSupplier*
>(
this ),
55 static_cast< util::XCloseable*
>(
this ),
56 static_cast< lang::XServiceInfo*
>(
this ),
57 static_cast< lang::XTypeProvider*
>(
this ),
58 static_cast< document::XEventBroadcaster*
>(
this ) );
62 return ::cppu::OWeakObject::queryInterface( rType ) ;
69 ::osl::MutexGuard aGuard(
m_aMutex );
71 throw lang::DisposedException();
75 throw embed::WrongStateException(
"The own object has no model!",
78 OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON,
"For iconified objects no graphical replacement is required!" );
79 if ( nAspect == embed::Aspects::MSOLE_ICON )
81 throw embed::WrongStateException(
"Illegal call!",
85 embed::VisualRepresentation aVisualRepresentation;
86 return aVisualRepresentation;
91 ::osl::MutexGuard aGuard(
m_aMutex );
93 throw lang::DisposedException();
95 OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON,
"For iconified objects no graphical replacement is required!" );
96 if ( nAspect == embed::Aspects::MSOLE_ICON )
98 throw embed::WrongStateException(
"Illegal call!",
106 ::osl::MutexGuard aGuard(
m_aMutex );
108 throw lang::DisposedException();
110 OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON,
"For iconified objects no graphical replacement is required!" );
111 if ( nAspect == embed::Aspects::MSOLE_ICON )
113 throw embed::WrongStateException(
"Illegal call!",
117 throw embed::WrongStateException(
"The own object has no model!",
125 ::osl::MutexGuard aGuard(
m_aMutex );
127 throw lang::DisposedException();
129 OSL_ENSURE( nAspect != embed::Aspects::MSOLE_ICON,
"For iconified objects no graphical replacement is required!" );
130 if ( nAspect == embed::Aspects::MSOLE_ICON )
132 throw embed::WrongStateException(
"Illegal call!",
135 return embed::EmbedMapUnits::ONE_100TH_MM;
140 if ( nNewState == embed::EmbedStates::UI_ACTIVE )
141 nNewState = embed::EmbedStates::INPLACE_ACTIVE;
147 ::osl::MutexGuard aGuard(
m_aMutex );
149 throw lang::DisposedException();
152 throw embed::WrongStateException(
"The object has no persistence!",
158 uno::Reference < ui::dialogs::XExecutableDialog > xDlg(
m_xDocHolder->GetComponent(), uno::UNO_QUERY );
160 throw embed::UnreachableStateException();
168 const uno::Sequence< beans::PropertyValue >&,
169 const uno::Sequence< beans::PropertyValue >&)
177 return "com.sun.star.comp.embed.OSpecialEmbeddedObject";
187 return {
"com.sun.star.comp.embed.OSpecialEmbeddedObject" };
Represents an OLE object that has native data and we loaded that data into a document model successfu...
virtual void SAL_CALL changeState(sal_Int32 nNewState) override
void SetInplaceActiveState()
rtl::Reference< DocumentHolder > m_xDocHolder
virtual void SAL_CALL doVerb(sal_Int32 nVerbID) override
virtual void SAL_CALL reload(const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Sequence< css::beans::PropertyValue > &lObjArgs) override
virtual void SAL_CALL doVerb(sal_Int32 nVerbID) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
OUString SAL_CALL getImplementationName() override
virtual sal_Int32 SAL_CALL getMapUnit(sal_Int64 nAspect) override
OSpecialEmbeddedObject(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::NamedValue > &aObjectProps)
virtual css::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation(::sal_Int64 nAspect) override
virtual void SAL_CALL changeState(sal_Int32 nNewState) override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::awt::Size SAL_CALL getVisualAreaSize(sal_Int64 nAspect) override
virtual void SAL_CALL setVisualAreaSize(sal_Int64 nAspect, const css::awt::Size &aSize) override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)