xref: /aoo41x/main/sfx2/inc/sfx2/viewfrm.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SFXVIEWFRM_HXX
24cdf0e10cSrcweir #define _SFXVIEWFRM_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "sal/config.h"
27cdf0e10cSrcweir #include "sfx2/dllapi.h"
28cdf0e10cSrcweir #include "sal/types.h"
29cdf0e10cSrcweir #include <svl/lstner.hxx>
30cdf0e10cSrcweir #include <sfx2/module.hxx>
31cdf0e10cSrcweir #include <sfx2/frame.hxx>
32cdf0e10cSrcweir #include <sfx2/shell.hxx>
33cdf0e10cSrcweir #include <sfx2/sfxsids.hrc>
34cdf0e10cSrcweir #include <svl/poolitem.hxx>
35cdf0e10cSrcweir #include <com/sun/star/frame/status/Verb.hpp>
36cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
37cdf0e10cSrcweir #include <com/sun/star/frame/XController2.hpp>
38cdf0e10cSrcweir 
39cdf0e10cSrcweir #include <tools/svborder.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class SfxMacro;
42cdf0e10cSrcweir class SvBorder;
43cdf0e10cSrcweir class SfxDispatcher;
44cdf0e10cSrcweir class SfxObjectShell;
45cdf0e10cSrcweir class SfxBindings;
46cdf0e10cSrcweir class SfxProgress;
47cdf0e10cSrcweir class SvData;
48cdf0e10cSrcweir class SfxViewShell;
49cdf0e10cSrcweir class SvPseudoObject;
50cdf0e10cSrcweir class SystemWindow;
51cdf0e10cSrcweir class Fraction;
52cdf0e10cSrcweir class Point;
53cdf0e10cSrcweir class Size;
54cdf0e10cSrcweir class SfxChildWindow;
55cdf0e10cSrcweir 
56cdf0e10cSrcweir namespace sfx2
57cdf0e10cSrcweir {
58cdf0e10cSrcweir class SvLinkSource;
59cdf0e10cSrcweir }
60cdf0e10cSrcweir namespace svtools
61cdf0e10cSrcweir {
62cdf0e10cSrcweir     class AsynchronLink;
63cdf0e10cSrcweir }
64cdf0e10cSrcweir 
65cdf0e10cSrcweir #ifndef SFX_DECL_OBJECTSHELL_DEFINED
66cdf0e10cSrcweir #define SFX_DECL_OBJECTSHELL_DEFINED
67cdf0e10cSrcweir SV_DECL_REF(SfxObjectShell)
68cdf0e10cSrcweir #endif
69cdf0e10cSrcweir 
70cdf0e10cSrcweir //========================================================================
71cdf0e10cSrcweir DBG_NAMEEX(SfxViewFrame)
72cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener
73cdf0e10cSrcweir {
74cdf0e10cSrcweir 	struct SfxViewFrame_Impl*	pImp;
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	SfxObjectShellRef			xObjSh;
77cdf0e10cSrcweir 	SfxDispatcher*				pDispatcher;
78cdf0e10cSrcweir 	SfxBindings*				pBindings;
79cdf0e10cSrcweir 	sal_uInt16						nAdjustPosPixelLock;
80cdf0e10cSrcweir 
81cdf0e10cSrcweir private:
82cdf0e10cSrcweir #ifndef _SFX_HXX
83cdf0e10cSrcweir 	SAL_DLLPRIVATE void Construct_Impl( SfxObjectShell *pObjSh=NULL );
84cdf0e10cSrcweir #endif
85cdf0e10cSrcweir 
86cdf0e10cSrcweir protected:
87cdf0e10cSrcweir     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
88cdf0e10cSrcweir 
89cdf0e10cSrcweir #ifndef _SFX_HXX
90cdf0e10cSrcweir 	SAL_DLLPRIVATE void KillDispatcher_Impl();
91cdf0e10cSrcweir #endif
92cdf0e10cSrcweir 
93cdf0e10cSrcweir 	virtual                 ~SfxViewFrame();
94cdf0e10cSrcweir 
95cdf0e10cSrcweir public:
96cdf0e10cSrcweir                             SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = NULL );
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 							TYPEINFO();
99cdf0e10cSrcweir 							SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWFRM)
100cdf0e10cSrcweir 
101cdf0e10cSrcweir     static void             SetViewFrame( SfxViewFrame* );
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     static SfxViewFrame*    LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
104cdf0e10cSrcweir     static SfxViewFrame*    LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId );
105cdf0e10cSrcweir     static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId = 0 );
106cdf0e10cSrcweir     static SfxViewFrame*    LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrameItem, const sal_uInt16 i_nViewId = 0 );
107cdf0e10cSrcweir     static SfxViewFrame*    DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId = 0 );
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     static SfxViewFrame*    Current();
110cdf0e10cSrcweir 	static SfxViewFrame*	GetFirst( const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
111cdf0e10cSrcweir 	static SfxViewFrame*    GetNext( const SfxViewFrame& rPrev, const SfxObjectShell* pDoc = 0, sal_Bool bOnlyVisible = sal_True );
112cdf0e10cSrcweir 	static sal_uInt16           Count();
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     static SfxViewFrame*    Get( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = NULL );
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 			void            DoActivate(sal_Bool bMDI, SfxViewFrame *pOld=NULL);
117cdf0e10cSrcweir 			void            DoDeactivate(sal_Bool bMDI, SfxViewFrame *pOld=NULL);
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 	SfxViewFrame*			GetParentViewFrame() const;
120cdf0e10cSrcweir 
121cdf0e10cSrcweir 	using SfxShell::GetDispatcher;
GetDispatcher()122cdf0e10cSrcweir         SfxDispatcher*          GetDispatcher() { return pDispatcher; }
GetBindings()123cdf0e10cSrcweir 	SfxBindings&            GetBindings() { return *pBindings; }
GetBindings() const124cdf0e10cSrcweir 	const SfxBindings&      GetBindings() const  { return *pBindings; }
125cdf0e10cSrcweir 	Window&         		GetWindow() const;
126cdf0e10cSrcweir 	virtual void            SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY );
127cdf0e10cSrcweir 
128cdf0e10cSrcweir 	SfxProgress*            GetProgress() const;
129cdf0e10cSrcweir #ifdef ENABLE_INIMANAGER//MUSTINI
130cdf0e10cSrcweir 	SfxIniManager*          GetIniManager() const;
131cdf0e10cSrcweir #endif
132cdf0e10cSrcweir 
GetObjectShell() const133cdf0e10cSrcweir 	SfxObjectShell* 		GetObjectShell() const
134cdf0e10cSrcweir 							{ return xObjSh; }
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 	void					DoAdjustPosSize( SfxViewShell *pSh,
137cdf0e10cSrcweir 										const Point rPos, const Size &rSize );
LockAdjustPosSizePixel()138cdf0e10cSrcweir 	void                    LockAdjustPosSizePixel()
139cdf0e10cSrcweir 							{ nAdjustPosPixelLock++; }
UnlockAdjustPosSizePixel()140cdf0e10cSrcweir 	void                    UnlockAdjustPosSizePixel()
141cdf0e10cSrcweir 							{ nAdjustPosPixelLock--; }
142cdf0e10cSrcweir 	void                    DoAdjustPosSizePixel( SfxViewShell * pSh,
143cdf0e10cSrcweir 										const Point &rPos, const Size &rSize );
144cdf0e10cSrcweir 	void					Hide();
145cdf0e10cSrcweir 	void					Show();
146cdf0e10cSrcweir     sal_Bool                    IsVisible() const;
147cdf0e10cSrcweir 	void					ToTop();
148cdf0e10cSrcweir 	void					Enable( sal_Bool bEnable );
149cdf0e10cSrcweir 	virtual sal_Bool            Close();
150cdf0e10cSrcweir 	virtual void            Activate( sal_Bool bUI );
151cdf0e10cSrcweir 	virtual void            Deactivate( sal_Bool bUI );
152cdf0e10cSrcweir 
153cdf0e10cSrcweir 	// DDE-Interface
154cdf0e10cSrcweir 	virtual long			DdeExecute( const String& rCmd );
155cdf0e10cSrcweir 	virtual long			DdeGetData( const String& rItem,
156cdf0e10cSrcweir 										const String& rMimeType,
157cdf0e10cSrcweir 										::com::sun::star::uno::Any & rValue );
158cdf0e10cSrcweir 	virtual long			DdeSetData( const String& rItem,
159cdf0e10cSrcweir 										const String& rMimeType,
160cdf0e10cSrcweir 								const ::com::sun::star::uno::Any & rValue );
161cdf0e10cSrcweir 	virtual ::sfx2::SvLinkSource* 	DdeCreateLinkSource( const String& rItem );
162cdf0e10cSrcweir 
163cdf0e10cSrcweir 	void                    ShowStatusText( const String& rText );
164cdf0e10cSrcweir 	void                    HideStatusText();
165cdf0e10cSrcweir 
166cdf0e10cSrcweir 	String			        UpdateTitle();
167cdf0e10cSrcweir 
168cdf0e10cSrcweir     static void ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL );
169cdf0e10cSrcweir 
170cdf0e10cSrcweir 	// interne Handler
171cdf0e10cSrcweir 	SAL_DLLPRIVATE virtual sal_Bool SetBorderPixelImpl( const SfxViewShell *pSh, const SvBorder &rBorder );
172cdf0e10cSrcweir 	SAL_DLLPRIVATE virtual const SvBorder& GetBorderPixelImpl( const SfxViewShell *pSh ) const;
173cdf0e10cSrcweir 	SAL_DLLPRIVATE virtual void InvalidateBorderImpl( const SfxViewShell *pSh );
174cdf0e10cSrcweir 
175cdf0e10cSrcweir 	virtual SfxObjectShell*	GetObjectShell();
176cdf0e10cSrcweir 	sal_uInt16					GetCurViewId() const;
177cdf0e10cSrcweir 	SfxFrame&				GetFrame() const;
178cdf0e10cSrcweir 	SfxViewFrame*			GetTopViewFrame() const;
179cdf0e10cSrcweir 
180cdf0e10cSrcweir 	sal_Bool					DoClose();
GetFrameType() const181cdf0e10cSrcweir 	sal_uIntPtr					GetFrameType() const
182cdf0e10cSrcweir 							{ return GetFrame().GetFrameType(); }
GetTopFrame() const183cdf0e10cSrcweir 	SfxFrame&				GetTopFrame() const
184cdf0e10cSrcweir 							{ return GetFrame().GetTopFrame(); }
GetTargetList(TargetList & rList) const185cdf0e10cSrcweir 	void					GetTargetList( TargetList& rList ) const
186cdf0e10cSrcweir 							{ GetFrame().GetTargetList( rList ); }
CancelTransfers()187cdf0e10cSrcweir 	void                	CancelTransfers()
188cdf0e10cSrcweir 							{ GetFrame().CancelTransfers(); }
189cdf0e10cSrcweir 
190cdf0e10cSrcweir 	void					SetModalMode( sal_Bool );
191cdf0e10cSrcweir     sal_Bool                    IsInModalMode() const;
192cdf0e10cSrcweir     void                    Resize(sal_Bool bForce=sal_False);
193cdf0e10cSrcweir 
194cdf0e10cSrcweir     //void                        SetChildWindow(sal_uInt16 nId, sal_Bool bVisible );
195cdf0e10cSrcweir     void                        SetChildWindow(sal_uInt16 nId, sal_Bool bVisible, sal_Bool bSetFocus=sal_True);
196cdf0e10cSrcweir     void                        ToggleChildWindow(sal_uInt16);
197cdf0e10cSrcweir     sal_Bool                        HasChildWindow(sal_uInt16);
198cdf0e10cSrcweir     sal_Bool                        KnowsChildWindow(sal_uInt16);
199cdf0e10cSrcweir     void                        ShowChildWindow(sal_uInt16,sal_Bool bVisible=sal_True);
200cdf0e10cSrcweir     SfxChildWindow*             GetChildWindow(sal_uInt16);
201cdf0e10cSrcweir     void                        ChildWindowExecute(SfxRequest&);
202cdf0e10cSrcweir     void                        ChildWindowState(SfxItemSet&);
203cdf0e10cSrcweir 
204cdf0e10cSrcweir //#if 0 // _SOLAR__PRIVATE
205cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetDowning_Impl();
206cdf0e10cSrcweir 	SAL_DLLPRIVATE void GetDocNumber_Impl();
207cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool IsDowning_Impl() const;
208cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetViewShell_Impl( SfxViewShell *pVSh );
209cdf0e10cSrcweir 	SAL_DLLPRIVATE void ReleaseObjectShell_Impl();
210cdf0e10cSrcweir 
211cdf0e10cSrcweir 	SAL_DLLPRIVATE void GetState_Impl( SfxItemSet &rSet );
212cdf0e10cSrcweir 	SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq );
213cdf0e10cSrcweir 	SAL_DLLPRIVATE void ExecReload_Impl( SfxRequest &rReq, sal_Bool bAsync );
214cdf0e10cSrcweir 	SAL_DLLPRIVATE void StateReload_Impl( SfxItemSet &rSet );
215cdf0e10cSrcweir 	SAL_DLLPRIVATE void ExecView_Impl( SfxRequest &rReq );
216cdf0e10cSrcweir 	SAL_DLLPRIVATE void StateView_Impl( SfxItemSet &rSet );
217cdf0e10cSrcweir 	SAL_DLLPRIVATE void ExecHistory_Impl( SfxRequest &rReq );
218cdf0e10cSrcweir 	SAL_DLLPRIVATE void StateHistory_Impl( SfxItemSet &rSet );
219cdf0e10cSrcweir 	SAL_DLLPRIVATE SfxViewFrame* GetParentViewFrame_Impl() const;
220cdf0e10cSrcweir 	SAL_DLLPRIVATE void ForceOuterResize_Impl(sal_Bool bOn=sal_True);
221cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool IsResizeInToOut_Impl() const;
IsAdjustPosSizePixelLocked_Impl() const222cdf0e10cSrcweir 	SAL_DLLPRIVATE sal_Bool IsAdjustPosSizePixelLocked_Impl() const
223cdf0e10cSrcweir 							{ return nAdjustPosPixelLock != 0; }
224cdf0e10cSrcweir 	SAL_DLLPRIVATE void ForceInnerResize_Impl( sal_Bool bOn );
225cdf0e10cSrcweir 	SAL_DLLPRIVATE void UpdateDocument_Impl();
226cdf0e10cSrcweir 
227cdf0e10cSrcweir 	SAL_DLLPRIVATE void LockObjectShell_Impl(sal_Bool bLock=sal_True);
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     SAL_DLLPRIVATE void MakeActive_Impl( sal_Bool bActivate );
230cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetQuietMode_Impl( sal_Bool );
231cdf0e10cSrcweir 	SAL_DLLPRIVATE const Size& GetMargin_Impl() const;
232cdf0e10cSrcweir 	SAL_DLLPRIVATE void SetActiveChildFrame_Impl( SfxViewFrame* );
233cdf0e10cSrcweir 	SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
234cdf0e10cSrcweir 	SAL_DLLPRIVATE String GetActualPresentationURL_Impl() const;
235cdf0e10cSrcweir 	SAL_DLLPRIVATE static void CloseHiddenFrames_Impl();
236cdf0e10cSrcweir     SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
237cdf0e10cSrcweir     SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
238cdf0e10cSrcweir     SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl( sal_uInt16 nId );
239cdf0e10cSrcweir     SAL_DLLPRIVATE void AddDispatchMacroToBasic_Impl(const ::rtl::OUString& sMacro);
240cdf0e10cSrcweir 
241cdf0e10cSrcweir 	SAL_DLLPRIVATE void Exec_Impl(SfxRequest &);
242cdf0e10cSrcweir 	SAL_DLLPRIVATE void INetExecute_Impl(SfxRequest &);
243cdf0e10cSrcweir 	SAL_DLLPRIVATE void INetState_Impl(SfxItemSet &);
244cdf0e10cSrcweir 
245cdf0e10cSrcweir     SAL_DLLPRIVATE void SetCurViewId_Impl( const sal_uInt16 i_nID );
246cdf0e10cSrcweir     SAL_DLLPRIVATE void ActivateToolPanel_Impl( const ::rtl::OUString& i_rPanelURL );
247cdf0e10cSrcweir 
248cdf0e10cSrcweir //#endif
249cdf0e10cSrcweir private:
250cdf0e10cSrcweir     SAL_DLLPRIVATE sal_Bool SwitchToViewShell_Impl( sal_uInt16 nNo, sal_Bool bIsIndex = sal_False );
251cdf0e10cSrcweir     SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
252cdf0e10cSrcweir     SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId );
253cdf0e10cSrcweir 
254cdf0e10cSrcweir     /** loads the given existing document into the given frame
255cdf0e10cSrcweir 
256cdf0e10cSrcweir         This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
257cdf0e10cSrcweir 
258cdf0e10cSrcweir         @param i_rDoc
259cdf0e10cSrcweir             the document to load
260cdf0e10cSrcweir         @param i_rFrame
261cdf0e10cSrcweir             the frame to load the document into
262cdf0e10cSrcweir         @param i_rLoadArgs
263cdf0e10cSrcweir             the arguments to pass to the component loader. If this sequence is empty, then the current arguments of the
264cdf0e10cSrcweir             model will be obtained, and passed to the loader. This ensures that any arguments in the model will be preserved,
265cdf0e10cSrcweir             instead of being reset.
266cdf0e10cSrcweir         @param i_nViewId
267cdf0e10cSrcweir             the ID of the view to create
268cdf0e10cSrcweir         @throws Exception
269cdf0e10cSrcweir             if something goes wrong. The caller is responsible for handling this.
270cdf0e10cSrcweir     */
271cdf0e10cSrcweir     SAL_DLLPRIVATE static SfxViewShell* LoadViewIntoFrame_Impl(
272cdf0e10cSrcweir                             const SfxObjectShell& i_rDoc,
273cdf0e10cSrcweir                             const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
274cdf0e10cSrcweir                             const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rLoadArgs,
275cdf0e10cSrcweir                             const sal_uInt16 i_nViewId,
276cdf0e10cSrcweir                             const bool i_bHidden
277cdf0e10cSrcweir                         );
278cdf0e10cSrcweir 
279cdf0e10cSrcweir     /** loads the given existing document into the given frame
280cdf0e10cSrcweir 
281cdf0e10cSrcweir         This is done using the XComponentLoader interface of the frame, so the SFX document loader is invoked.
282cdf0e10cSrcweir 
283cdf0e10cSrcweir         If no frame is given, a blank top level frame is created.
284cdf0e10cSrcweir 
285cdf0e10cSrcweir         If anything fails during the process, as much as possible is cleaned up.
286cdf0e10cSrcweir 
287cdf0e10cSrcweir         @param i_rDoc
288cdf0e10cSrcweir             the document to load
289cdf0e10cSrcweir         @param i_rFrame
290cdf0e10cSrcweir             the frame to load the document into. Might be <NULL/>, in which case a new frame is created.
291cdf0e10cSrcweir         @param i_nViewId
292cdf0e10cSrcweir             the ID of the view to create
293cdf0e10cSrcweir     */
294cdf0e10cSrcweir     SAL_DLLPRIVATE static SfxViewFrame* LoadViewIntoFrame_Impl_NoThrow(
295cdf0e10cSrcweir                             const SfxObjectShell& i_rDoc,
296cdf0e10cSrcweir                             const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
297cdf0e10cSrcweir                             const sal_uInt16 i_nViewId,
298cdf0e10cSrcweir                             const bool i_bHidden
299cdf0e10cSrcweir                         );
300cdf0e10cSrcweir };
301cdf0e10cSrcweir 
302cdf0e10cSrcweir //--------------------------------------------------------------------
303cdf0e10cSrcweir 
304cdf0e10cSrcweir class SFX2_DLLPUBLIC SfxViewFrameItem: public SfxPoolItem
305cdf0e10cSrcweir {
306cdf0e10cSrcweir 	SfxViewFrame*			pFrame;
307cdf0e10cSrcweir 
308cdf0e10cSrcweir public:
309cdf0e10cSrcweir 							TYPEINFO();
SfxViewFrameItem(SfxViewFrame * pViewFrame)310cdf0e10cSrcweir 							SfxViewFrameItem( SfxViewFrame *pViewFrame ):
311cdf0e10cSrcweir 								SfxPoolItem( 0 ),
312cdf0e10cSrcweir 								pFrame( pViewFrame)
313cdf0e10cSrcweir 							{}
SfxViewFrameItem(sal_uInt16 nWhichId,SfxViewFrame * pViewFrame)314cdf0e10cSrcweir 							SfxViewFrameItem( sal_uInt16 nWhichId, SfxViewFrame *pViewFrame ):
315cdf0e10cSrcweir 								SfxPoolItem( nWhichId ),
316cdf0e10cSrcweir 								pFrame( pViewFrame)
317cdf0e10cSrcweir 							{}
318cdf0e10cSrcweir 
319cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
320cdf0e10cSrcweir 	virtual String			GetValueText() const;
321cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
322cdf0e10cSrcweir 
GetFrame() const323cdf0e10cSrcweir 	SfxViewFrame*			GetFrame() const
324cdf0e10cSrcweir 							{ return pFrame; }
325cdf0e10cSrcweir };
326cdf0e10cSrcweir 
327cdf0e10cSrcweir class SfxVerbListItem : public SfxPoolItem
328cdf0e10cSrcweir {
329cdf0e10cSrcweir     com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor > aVerbs;
330cdf0e10cSrcweir 
331cdf0e10cSrcweir public:
332cdf0e10cSrcweir                             TYPEINFO();
SfxVerbListItem(sal_uInt16 nWhichId=SID_OBJECT)333cdf0e10cSrcweir                             SfxVerbListItem( sal_uInt16 nWhichId = SID_OBJECT ) :
334cdf0e10cSrcweir                                 SfxPoolItem( nWhichId )
335cdf0e10cSrcweir                             {}
336cdf0e10cSrcweir 
337cdf0e10cSrcweir                             SfxVerbListItem( sal_uInt16 nWhichId, const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& );
338cdf0e10cSrcweir 
339cdf0e10cSrcweir 	virtual int 			operator==( const SfxPoolItem& ) const;
340cdf0e10cSrcweir 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
341cdf0e10cSrcweir 
342cdf0e10cSrcweir 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
GetVerbList() const343cdf0e10cSrcweir     const com::sun::star::uno::Sequence < com::sun::star::embed::VerbDescriptor >& GetVerbList() const { return aVerbs; }
344cdf0e10cSrcweir };
345cdf0e10cSrcweir 
346cdf0e10cSrcweir #endif
347