23#include <com/sun/star/awt/XControlContainer.hpp>
24#include <com/sun/star/beans/PropertyAttribute.hpp>
25#include <com/sun/star/frame/Frame.hpp>
26#include <com/sun/star/frame/FrameSearchFlag.hpp>
27#include <com/sun/star/frame/XDispatch.hpp>
28#include <com/sun/star/util/URLTransformer.hpp>
29#include <com/sun/star/util/XURLTransformer.hpp>
32#include <osl/diagnose.h>
37using namespace ::
cppu;
78 Any aReturn ( ::cppu::queryInterface( rType ,
79 static_cast< XControlModel*
> (
this ) ,
80 static_cast< XConnectionPointContainer*
> (
this )
85 if ( !aReturn.hasValue() )
88 aReturn = OPropertySetHelper::queryInterface( rType );
89 if ( !aReturn.hasValue() )
124 static OTypeCollection ourTypeCollection(
130 return ourTypeCollection.getTypes();
135 return "stardiv.UnoControls.FrameControl";
140 return {
"com.sun.star.frame.FrameControl" };
146 const Reference< XWindowPeer >& xParentPeer )
171 return Reference< XControlModel >();
195 return Reference< XGraphics >();
217 const Reference< XInterface >& xListener )
226 const Reference< XInterface >& xListener )
239 bool bReturn =
false;
242 case PropertyHandle::Componenturl : rConvertedValue = rValue;
247 case PropertyHandle::Loaderarguments : rConvertedValue = rValue;
255 throw IllegalArgumentException(
"unknown handle " + OUString::number(
nHandle), getXWeak(), 1);
280 default : OSL_ENSURE (
nHandle == -1,
"This is an invalid property handle." );
287 sal_Int32 nHandle )
const
289 MutexGuard aGuard ( Mutex::getGlobalMutex() );
299 case PropertyHandle::Frame : rRet <<=
m_xFrame;
302 default : OSL_ENSURE (
nHandle == -1,
"This is an invalid property handle." );
312 static OPropertyArrayHelper ourPropertyInfo(
315 PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ),
317 PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT ),
318 Property(
"LoaderArguments", PropertyHandle::Loaderarguments,
cppu::UnoType<Sequence<PropertyValue>>::get(),
319 PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED )
323 return ourPropertyInfo;
341 WindowDescriptor aDescriptor;
343 aDescriptor.Type = WindowClass_CONTAINER;
344 aDescriptor.ParentIndex = -1;
345 aDescriptor.Parent = xParentPeer;
347 aDescriptor.WindowAttributes = 0;
355 const OUString& rURL ,
356 const Sequence< PropertyValue >& rArguments )
358 Reference< XFrame2 > xOldFrame;
359 Reference< XFrame2 > xNewFrame;
368 Reference< XWindow > xWP ( xPeer, UNO_QUERY );
369 xNewFrame->initialize ( xWP );
377 aURL.Complete = rURL;
378 xTrans->parseStrict(
aURL );
380 Reference< XDispatch > xDisp = xNewFrame->queryDispatch (
aURL, OUString (), FrameSearchFlag::SELF );
383 xDisp->dispatch (
aURL, rArguments );
393 sal_Int32 nFrameId = PropertyHandle::Frame;
397 fire ( &nFrameId, &aNewFrame, &aOldFrame, 1,
false );
401 xOldFrame->dispose ();
409 Reference< XFrame2 > xOldFrame;
410 Reference< XFrame2 > xNullFrame;
420 sal_Int32 nFrameId = PropertyHandle::Frame;
423 fire( &nFrameId, &aNewFrame, &aOldFrame, 1,
false );
427 xOldFrame->dispose();
433extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
435 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const&)
mutable::osl::Mutex m_aMutex
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
void SAL_CALL fire(sal_Int32 *pnHandles, const css::uno::Any *pNewValues, const css::uno::Any *pOldValues, sal_Int32 nCount, sal_Bool bVetoable)
const css::uno::Reference< css::awt::XWindow > & impl_getPeerWindow() const
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces @seealso XTypeProvider
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer() override
const css::uno::Reference< css::uno::XComponentContext > & impl_getComponentContext() const
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
give answer, if interface is supported @descr The interfaces are searched by type.
virtual void SAL_CALL dispose() override
virtual css::awt::Rectangle SAL_CALL getPosSize() override
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
rtl::Reference< OConnectionPointContainerHelper > m_aConnectionPointContainer
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual void SAL_CALL createPeer(const css::uno::Reference< css::awt::XToolkit > &xToolkit, const css::uno::Reference< css::awt::XWindowPeer > &xParent) override
virtual sal_Bool SAL_CALL convertFastPropertyValue(css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
get information about supported interfaces @seealso XTypeProvider
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
virtual void SAL_CALL dispose() override
virtual void SAL_CALL unadvise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener) override
virtual void SAL_CALL acquire() noexcept override
increment refcount @seealso XInterface @seealso release() @onerror A RuntimeException is thrown.
OUString SAL_CALL getImplementationName() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
FrameControl(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual sal_Bool SAL_CALL setGraphics(const css::uno::Reference< css::awt::XGraphics > &xDevice) override
virtual ~FrameControl() override
virtual css::uno::Reference< css::lang::XConnectionPoint > SAL_CALL queryConnectionPoint(const css::uno::Type &aType) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getConnectionPointTypes() override
virtual css::awt::WindowDescriptor impl_getWindowDescriptor(const css::uno::Reference< css::awt::XWindowPeer > &xParentPeer) override
virtual void SAL_CALL advise(const css::uno::Type &aType, const css::uno::Reference< css::uno::XInterface > &xListener) override
virtual css::uno::Reference< css::awt::XGraphics > SAL_CALL getGraphics() override
virtual void SAL_CALL release() noexcept override
decrement refcount @seealso XInterface @seealso acquire() @onerror A RuntimeException is thrown.
void impl_createFrame(const css::uno::Reference< css::awt::XWindowPeer > &xPeer, const OUString &sURL, const css::uno::Sequence< css::beans::PropertyValue > &seqArguments)
css::uno::Reference< css::frame::XFrame2 > m_xFrame
css::uno::Sequence< css::beans::PropertyValue > m_seqLoaderArguments
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel > &xModel) override
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel() override
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * stardiv_UnoControls_FrameControl_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
OBroadcastHelperVar< OMultiTypeInterfaceContainerHelper, OMultiTypeInterfaceContainerHelper::keyType > OBroadcastHelper