22#include <com/sun/star/awt/XDevice.hpp>
23#include <com/sun/star/awt/PosSize.hpp>
33using namespace ::
cppu;
57 css::uno::Reference< css::awt::XWindow > xContainerWindow(
xFrame->getContainerWindow() );
59 return xContainerWindow;
70 css::uno::Reference< css::awt::XWindow > xContainerWindow(
xFrame->getContainerWindow() );
71 css::uno::Reference< css::awt::XWindow > xComponentWindow(
xFrame->getComponentWindow() );
73 if ( !xContainerWindow.is() || !xComponentWindow.is() )
76 css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY );
78 css::awt::Rectangle aRectangle = xContainerWindow->getPosSize();
79 css::awt::DeviceInfo aInfo = xDevice->getInfo();
80 css::awt::Size aSize ( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset ,
81 aRectangle.Height - aInfo.TopInset - aInfo.BottomInset );
83 css::awt::Size aMinSize( 0, 0 );
86 if ((( aSize.Width - RequestedSpace.X - RequestedSpace.Width ) < aMinSize.Width ) ||
87 (( aSize.Height - RequestedSpace.Y - RequestedSpace.Height ) < aMinSize.Height ) )
102 css::uno::Reference< css::awt::XWindow > xContainerWindow(
xFrame->getContainerWindow() );
103 css::uno::Reference< css::awt::XWindow > xComponentWindow(
xFrame->getComponentWindow() );
105 if ( !(xContainerWindow.is() && xComponentWindow.is()) )
108 css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY );
110 css::awt::Rectangle aRectangle = xContainerWindow->getPosSize();
111 css::awt::DeviceInfo aInfo = xDevice->getInfo();
112 css::awt::Size aSize ( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset ,
113 aRectangle.Height - aInfo.TopInset - aInfo.BottomInset );
114 css::awt::Size aMinSize( 0, 0 );
117 sal_Int32 nWidth = aSize.Width - BorderSpace.X - BorderSpace.Width;
118 sal_Int32 nHeight = aSize.Height - BorderSpace.Y - BorderSpace.Height;
120 if (( nWidth > aMinSize.Width ) && ( nHeight > aMinSize.Height ))
123 xComponentWindow->setPosSize( BorderSpace.X, BorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE );
virtual ~DockingAreaDefaultAcceptor() override
virtual void SAL_CALL setDockingAreaSpace(const css::awt::Rectangle &BorderSpace) override
css::uno::WeakReference< css::frame::XFrame > m_xOwner
virtual sal_Bool SAL_CALL requestDockingAreaSpace(const css::awt::Rectangle &RequestedSpace) override
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getContainerWindow() override
DockingAreaDefaultAcceptor(const css::uno::Reference< css::frame::XFrame > &xOwner)
Reference< XFrame > xFrame