INTEGRATION: CWS layoutmanager (1.11.30); FILE MERGED
2004/02/02 09:15:41 abi 1.11.30.8: with tracker 2003/12/04 13:08:19 abi 1.11.30.7: workaround layoutoutrequest in deactivate, generic menuhandling 2003/11/20 12:54:55 abi 1.11.30.6: resizing of frame 2003/11/19 16:17:50 abi 1.11.30.5: some tries 2003/11/18 15:05:28 abi 1.11.30.4: recycling Frame,Window and Document 2003/11/06 14:57:06 abi 1.11.30.3: added container window wrapper 2003/11/05 16:18:59 abi 1.11.30.2: added XDockingAreaAcceptor 2003/10/29 13:42:29 abi 1.11.30.1: inplace activation
This commit is contained in:
parent
8c4ce79976
commit
a6dd734448
1 changed files with 176 additions and 29 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: docholder.hxx,v $
|
||||
*
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* last change: $Author: rt $ $Date: 2003-04-24 13:54:51 $
|
||||
* last change: $Author: kz $ $Date: 2004-02-25 17:10:33 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -64,6 +64,9 @@
|
|||
|
||||
#include "common.h"
|
||||
|
||||
#ifndef _DRAFTS_COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_
|
||||
#include <drafts/com/sun/star/frame/XLayoutManager.hpp>
|
||||
#endif
|
||||
#ifndef _COM_SUN_STAR_UTIL_XCLOSELISTENER_HPP_
|
||||
#include <com/sun/star/util/XCloseListener.hpp>
|
||||
#endif
|
||||
|
@ -76,41 +79,116 @@
|
|||
#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
|
||||
#include <com/sun/star/frame/XFrame.hpp>
|
||||
#endif
|
||||
#ifndef _CPPUHELPER_IMPLBASE3_HXX_
|
||||
#include <cppuhelper/implbase3.hxx>
|
||||
#ifndef _CPPUHELPER_IMPLBASE4_HXX_
|
||||
#include <cppuhelper/implbase4.hxx>
|
||||
#endif
|
||||
|
||||
class EmbedDocument_Impl;
|
||||
class Interceptor;
|
||||
class CIIAObj;
|
||||
|
||||
namespace winwrap {
|
||||
class CHatchWin;
|
||||
}
|
||||
|
||||
|
||||
class DocumentHolder :
|
||||
public ::cppu::WeakImplHelper3<
|
||||
public ::cppu::WeakImplHelper4<
|
||||
::com::sun::star::util::XCloseListener,
|
||||
::com::sun::star::frame::XTerminateListener,
|
||||
::com::sun::star::util::XModifyListener >
|
||||
::com::sun::star::util::XModifyListener,
|
||||
::drafts::com::sun::star::ui::XDockingAreaAcceptor>
|
||||
{
|
||||
private:
|
||||
BOOL m_bAllowInPlace;
|
||||
LPOLEINPLACESITE m_pIOleIPSite;
|
||||
LPOLEINPLACEFRAME m_pIOleIPFrame;
|
||||
LPOLEINPLACEUIWINDOW m_pIOleIPUIWindow;
|
||||
winwrap::CHatchWin* m_pCHatchWin;
|
||||
|
||||
EmbedDocument_Impl* m_pOLEInterface;
|
||||
Interceptor* m_pInterceptor;
|
||||
EmbedDocument_Impl* m_pOLEInterface;
|
||||
Interceptor* m_pInterceptor;
|
||||
CIIAObj* m_pImpIOleIPActiveObject;
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
|
||||
|
||||
// contains top level system window data
|
||||
bool m_bOnDeactivate;
|
||||
HWND m_hWndxWinParent;
|
||||
HWND m_hWndxWinCont;
|
||||
HMENU m_nMenuHandle;
|
||||
HMENU m_nMenuShared;
|
||||
HOLEMENU m_nOLEMenu;
|
||||
com::sun::star::uno::Reference<
|
||||
com::sun::star::awt::XWindow> m_xEditWindow;
|
||||
|
||||
com::sun::star::uno::Reference<
|
||||
com::sun::star::awt::XWindow> m_xContainerWindow;
|
||||
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::frame::XModel > m_xDocument;
|
||||
|
||||
::com::sun::star::uno::Reference<
|
||||
::drafts::com::sun::star::frame::XLayoutManager> m_xLayoutManager;
|
||||
|
||||
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::frame::XFrame > m_xFrame;
|
||||
|
||||
::rtl::OUString m_aContainerName,m_aDocumentNamePart,m_aFilterName;
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > DocumentFrame();
|
||||
|
||||
CComPtr< IDispatch > m_pIDispatch;
|
||||
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::frame::XFrame > DocumentFrame();
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DocumentHolder( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory,EmbedDocument_Impl *pOLEInterface);
|
||||
|
||||
// the instance to which we belong
|
||||
static HINSTANCE m_hInstance;
|
||||
|
||||
HWND GetEditWindowParentHandle() const
|
||||
{
|
||||
return m_hWndxWinParent;
|
||||
}
|
||||
|
||||
void SetContainerWindowHandle(HWND hWndxWinCont)
|
||||
{
|
||||
m_hWndxWinCont = hWndxWinCont;
|
||||
}
|
||||
|
||||
DocumentHolder(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::lang::XMultiServiceFactory >& xFactory,
|
||||
EmbedDocument_Impl *pOLEInterface);
|
||||
|
||||
~DocumentHolder();
|
||||
|
||||
void SetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xDoc);
|
||||
// Methods for inplace activation
|
||||
|
||||
|
||||
BOOL isActive() const;
|
||||
void DisableInplaceActivation(BOOL);
|
||||
HRESULT InPlaceActivate(LPOLECLIENTSITE,BOOL);
|
||||
void InPlaceDeactivate(void);
|
||||
HRESULT UIActivate();
|
||||
void UIDeactivate();
|
||||
BOOL InPlaceMenuCreate(void);
|
||||
BOOL InPlaceMenuDestroy(void);
|
||||
|
||||
void OpenIntoWindow(void);
|
||||
BOOL Undo(void);
|
||||
|
||||
// further methods
|
||||
|
||||
void SetDocument(
|
||||
const ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::frame::XModel >& xDoc
|
||||
);
|
||||
|
||||
void CloseDocument();
|
||||
void CloseFrame();
|
||||
|
@ -124,9 +202,14 @@ public:
|
|||
|
||||
void setContainerName(const rtl::OUString& aContainerName);
|
||||
rtl::OUString getContainerName() const { return m_aContainerName; }
|
||||
|
||||
void OnPosRectChanged(LPRECT lpRect) const;
|
||||
void show();
|
||||
|
||||
|
||||
/** hides the document window, even in case of an external container
|
||||
* side managed window.
|
||||
*/
|
||||
|
||||
void hide();
|
||||
|
||||
IDispatch* GetIDispatch();
|
||||
|
@ -135,26 +218,90 @@ public:
|
|||
HRESULT GetVisArea( RECTL *pRect );
|
||||
HRESULT SetExtent( const SIZEL *pSize );
|
||||
HRESULT GetExtent( SIZEL *pSize );
|
||||
// sets extension on the hatchwindow
|
||||
HRESULT SetContRects(LPCRECT pRect);
|
||||
HRESULT SetObjectRects(LPCRECT aRect, LPCRECT aClip);
|
||||
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > GetDocument() { return m_xDocument; }
|
||||
HWND GetTopMostWinHandle() const
|
||||
{
|
||||
return m_hWndxWinParent;
|
||||
}
|
||||
|
||||
// XEventListener
|
||||
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& aSource );
|
||||
::com::sun::star::uno::Reference<
|
||||
::com::sun::star::frame::XModel >
|
||||
GetDocument() const
|
||||
{
|
||||
return m_xDocument;
|
||||
}
|
||||
|
||||
// XCloseListener
|
||||
virtual void SAL_CALL queryClosing( const com::sun::star::lang::EventObject& aSource, sal_Bool bGetsOwnership )
|
||||
throw( ::com::sun::star::util::CloseVetoException );
|
||||
// XEventListener
|
||||
virtual void SAL_CALL
|
||||
disposing( const com::sun::star::lang::EventObject& aSource );
|
||||
|
||||
virtual void SAL_CALL notifyClosing( const com::sun::star::lang::EventObject& aSource );
|
||||
// XCloseListener
|
||||
virtual void SAL_CALL
|
||||
queryClosing(
|
||||
const com::sun::star::lang::EventObject& aSource,
|
||||
sal_Bool bGetsOwnership
|
||||
)
|
||||
throw(
|
||||
::com::sun::star::util::CloseVetoException
|
||||
);
|
||||
|
||||
// XTerminateListener
|
||||
virtual void SAL_CALL queryTermination( const com::sun::star::lang::EventObject& aSource )
|
||||
throw( ::com::sun::star::frame::TerminationVetoException );
|
||||
virtual void SAL_CALL
|
||||
notifyClosing(
|
||||
const com::sun::star::lang::EventObject& aSource
|
||||
);
|
||||
|
||||
virtual void SAL_CALL notifyTermination( const com::sun::star::lang::EventObject& aSource );
|
||||
// XTerminateListener
|
||||
virtual void SAL_CALL
|
||||
queryTermination(
|
||||
const com::sun::star::lang::EventObject& aSource
|
||||
)
|
||||
throw(
|
||||
::com::sun::star::frame::TerminationVetoException
|
||||
);
|
||||
|
||||
// XModifyListener
|
||||
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL
|
||||
notifyTermination(
|
||||
const com::sun::star::lang::EventObject& aSource
|
||||
);
|
||||
|
||||
|
||||
// XModifyListener
|
||||
virtual void SAL_CALL
|
||||
modified(
|
||||
const ::com::sun::star::lang::EventObject& aEvent
|
||||
)
|
||||
throw (
|
||||
::com::sun::star::uno::RuntimeException
|
||||
);
|
||||
|
||||
// XDockingAreaAcceptor
|
||||
|
||||
virtual ::com::sun::star::uno::Reference<
|
||||
::com::sun::star::awt::XWindow> SAL_CALL
|
||||
getContainerWindow(
|
||||
)
|
||||
throw (
|
||||
::com::sun::star::uno::RuntimeException
|
||||
);
|
||||
|
||||
virtual sal_Bool SAL_CALL
|
||||
requestDockingAreaSpace(
|
||||
const ::com::sun::star::awt::Rectangle& RequestedSpace
|
||||
)
|
||||
throw(
|
||||
::com::sun::star::uno::RuntimeException
|
||||
);
|
||||
|
||||
virtual void SAL_CALL
|
||||
setDockingAreaSpace(
|
||||
const ::com::sun::star::awt::Rectangle& BorderSpace
|
||||
)
|
||||
throw (
|
||||
::com::sun::star::uno::RuntimeException
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue