23#include <com/sun/star/frame/FrameSearchFlag.hpp>
34using namespace ::
cppu;
43 SAL_WARN_IF( !xOwner.is(),
"fwk",
"OComponentAccess::OComponentAccess(): Invalid parameter detected!" );
59 css::uno::Reference< XEnumeration > xReturn;
62 css::uno::Reference< XInterface > xLock =
m_xOwner.get();
69 std::vector< css::uno::Reference< XComponent > > seqComponents;
95 css::uno::Reference< XFramesSupplier > xLock(
m_xOwner.get(), UNO_QUERY );
99 bReturn = xLock->getFrames()->hasElements();
108 std::vector< css::uno::Reference< XComponent > >& seqComponents )
119 const css::uno::Reference< XFrames > xContainer = xNode->getFrames();
120 const Sequence< css::uno::Reference< XFrame > > seqFrames = xContainer->queryFrames( FrameSearchFlag::CHILDREN );
122 const sal_Int32 nFrameCount = seqFrames.getLength();
123 for( sal_Int32 nFrame=0; nFrame<nFrameCount; ++nFrame )
126 if( xComponent.is() )
128 seqComponents.push_back( xComponent );
137 css::uno::Reference< XComponent > xComponent;
143 xComponent =
xFrame->getComponentWindow();
css::uno::Type const & get()
css::uno::WeakReference< css::frame::XDesktop > m_xOwner
OComponentAccess(const css::uno::Reference< css::frame::XDesktop > &xOwner)
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
css::uno::Reference< css::lang::XComponent > impl_getFrameComponent(const css::uno::Reference< css::frame::XFrame > &xFrame) const
virtual css::uno::Type SAL_CALL getElementType() override
void impl_collectAllChildComponents(const css::uno::Reference< css::frame::XFramesSupplier > &xNode, std::vector< css::uno::Reference< css::lang::XComponent > > &seqComponents)
virtual ~OComponentAccess() override
#define SAL_WARN_IF(condition, area, stream)
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel