22#include <com/sun/star/util/XCloseListener.hpp>
23#include <com/sun/star/frame/XTerminateListener.hpp>
24#include <com/sun/star/util/XModifyListener.hpp>
25#include <com/sun/star/util/XCloseable.hpp>
26#include <com/sun/star/document/XEventListener.hpp>
27#include <com/sun/star/frame/XFrame.hpp>
28#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
29#include <com/sun/star/frame/XBorderResizeListener.hpp>
30#include <com/sun/star/frame/BorderWidths.hpp>
31#include <com/sun/star/awt/XWindowPeer.hpp>
32#include <com/sun/star/awt/Size.hpp>
33#include <com/sun/star/awt/Rectangle.hpp>
34#include <com/sun/star/embed/XHatchWindowController.hpp>
35#include <com/sun/star/frame/XLayoutManager.hpp>
36#include <com/sun/star/uno/XComponentContext.hpp>
44 public ::cppu::WeakImplHelper<
45 css::util::XCloseListener,
46 css::frame::XTerminateListener,
47 css::util::XModifyListener,
48 css::document::XEventListener,
49 css::frame::XBorderResizeListener,
50 css::embed::XHatchWindowController >
57 css::uno::Reference< css::frame::XDispatchProviderInterceptor > m_xOutplaceInterceptor;
59 css::uno::Reference< css::uno::XComponentContext > m_xContext;
61 css::uno::Reference< css::util::XCloseable > m_xComponent;
63 css::uno::Reference< css::frame::XFrame >
m_xFrame;
64 css::uno::Reference< css::awt::XWindow > m_xOwnWindow;
65 css::uno::Reference< css::awt::XWindow > m_xHatchWindow;
67 css::awt::Rectangle m_aObjRect;
68 css::frame::BorderWidths m_aBorderWidths;
77 bool m_bDesktopTerminated;
79 sal_Int32 m_nNoBorderResizeReact;
80 sal_Int32 m_nNoResizeReact;
82 css::uno::Sequence< css::uno::Any > m_aOutplaceFrameProps;
85 css::uno::Reference< css::frame::XFrame >
const & GetDocFrame();
86 bool LoadDocToFrame(
bool );
88 css::awt::Rectangle CalculateBorderedArea(
const css::awt::Rectangle& aRect );
89 css::awt::Rectangle AddBorderToArea(
const css::awt::Rectangle& aRect );
91 void ResizeWindows_Impl(
const css::awt::Rectangle& aHatchRect );
93 css::uno::Reference< css::container::XIndexAccess > RetrieveOwnMenu_Impl();
95 const css::uno::Reference< css::frame::XLayoutManager >& xOwnLM,
96 const css::uno::Reference< css::frame::XLayoutManager >& xContLM,
97 const css::uno::Reference< css::frame::XDispatchProvider >& xContDisp,
98 const OUString& aContModuleName );
102 static void FindConnectPoints(
103 const css::uno::Reference< css::container::XIndexAccess >& xMenu,
104 sal_Int32 nConnectPoints[2] );
107 static css::uno::Reference< css::container::XIndexAccess > MergeMenusForInplace(
108 const css::uno::Reference< css::container::XIndexAccess >& xContMenu,
109 const css::uno::Reference< css::frame::XDispatchProvider >& xContDisp,
110 const OUString& aContModuleName,
111 const css::uno::Reference< css::container::XIndexAccess >& xOwnMenu,
112 const css::uno::Reference< css::frame::XDispatchProvider >& xOwnDisp );
115 DocumentHolder( css::uno::Reference< css::uno::XComponentContext > xContext,
121 void SetComponent(
const css::uno::Reference< css::util::XCloseable >& xDoc,
bool bReadOnly );
122 void ResizeHatchWindow();
125 void CloseDocument(
bool bDeliverOwnership,
bool bWaitForClose );
128 OUString GetTitle()
const
133 OUString
const & GetContainerName()
const
138 void SetOutplaceFrameProperties(
const css::uno::Sequence< css::uno::Any >& aProps )
139 { m_aOutplaceFrameProps = aProps; }
141 void PlaceFrame(
const css::awt::Rectangle& aNewRect );
143 static bool SetFrameLMVisibility(
const css::uno::Reference< css::frame::XFrame >& xFrame,
146 bool ShowInplace(
const css::uno::Reference< css::awt::XWindowPeer >& xParent,
147 const css::awt::Rectangle& aRectangleToShow,
148 const css::uno::Reference< css::frame::XDispatchProvider >& xContainerDP );
151 const css::uno::Reference< css::frame::XLayoutManager >& xContainerLM,
152 const css::uno::Reference< css::frame::XDispatchProvider >& xContainerDP,
153 const OUString& aContModuleName );
155 const css::uno::Reference< css::frame::XLayoutManager >& xContainerLM );
159 bool SetExtent( sal_Int64 nAspect,
const css::awt::Size& aSize );
160 bool GetExtent( sal_Int64 nAspect, css::awt::Size *pSize );
162 sal_Int32 GetMapUnit( sal_Int64 nAspect );
164 void SetOutplaceDispatchInterceptor(
165 const css::uno::Reference< css::frame::XDispatchProviderInterceptor >&
166 xOutplaceInterceptor )
168 m_xOutplaceInterceptor = xOutplaceInterceptor;
171 const css::uno::Reference< css::util::XCloseable >& GetComponent()
const {
return m_xComponent; }
174 virtual void SAL_CALL
disposing(
const css::lang::EventObject& Source )
override;
177 virtual void SAL_CALL
queryClosing(
const css::lang::EventObject& Source,
sal_Bool GetsOwnership )
override;
178 virtual void SAL_CALL
notifyClosing(
const css::lang::EventObject& Source )
override;
181 virtual void SAL_CALL
queryTermination(
const css::lang::EventObject& Event )
override;
182 virtual void SAL_CALL
notifyTermination(
const css::lang::EventObject& Event )
override;
185 virtual void SAL_CALL
modified(
const css::lang::EventObject& aEvent )
override;
188 virtual void SAL_CALL notifyEvent(
const css::document::EventObject& Event )
override;
191 virtual void SAL_CALL borderWidthsChanged(
const css::uno::Reference< css::uno::XInterface >& aObject,
const css::frame::BorderWidths& aNewSize )
override;
194 virtual void SAL_CALL requestPositioning(
const css::awt::Rectangle& aRect )
override;
195 virtual css::awt::Rectangle SAL_CALL calcAdjustedRectangle(
const css::awt::Rectangle& aRect )
override;
196 virtual void SAL_CALL activated( )
override;
197 virtual void SAL_CALL deactivated( )
override;
virtual void SAL_CALL disposing(const css::lang::EventObject &aSource) override
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &aSource) override
virtual void SAL_CALL queryTermination(const css::lang::EventObject &aSource) override
~DocumentHolder() override
virtual void SAL_CALL queryClosing(const css::lang::EventObject &aSource, sal_Bool bGetsOwnership) override
HRESULT GetExtent(SIZEL *pSize)
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
OUString m_aContainerName
virtual void SAL_CALL notifyClosing(const css::lang::EventObject &aSource) override
HRESULT SetExtent(const SIZEL *pSize)
OUString m_aDocumentNamePart
css::uno::Reference< css::frame::XFrame2 > m_xFrame
DocumentHolder(const css::uno::Reference< css::lang::XMultiServiceFactory > &xFactory, const ::rtl::Reference< EmbeddedDocumentInstanceAccess_Impl > &xOleAccess)
Represents an OLE object that has native data and we loaded that data into a document model successfu...