xref: /AOO41X/main/basctl/source/inc/propbrw.hxx (revision 96821c268eab8f5c0fa3bcb36189f0c1c257db85)
1*96821c26SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*96821c26SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*96821c26SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*96821c26SAndrew Rist  * distributed with this work for additional information
6*96821c26SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*96821c26SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*96821c26SAndrew Rist  * "License"); you may not use this file except in compliance
9*96821c26SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*96821c26SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*96821c26SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*96821c26SAndrew Rist  * software distributed under the License is distributed on an
15*96821c26SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*96821c26SAndrew Rist  * KIND, either express or implied.  See the License for the
17*96821c26SAndrew Rist  * specific language governing permissions and limitations
18*96821c26SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*96821c26SAndrew Rist  *************************************************************/
21*96821c26SAndrew Rist 
22*96821c26SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _BASCTL_PROPBRW_HXX
25cdf0e10cSrcweir #define _BASCTL_PROPBRW_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
28cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
29cdf0e10cSrcweir #include <com/sun/star/awt/XControlContainer.hpp>
30cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp>
31cdf0e10cSrcweir #include <comphelper/composedprops.hxx>
32cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
33cdf0e10cSrcweir #include <svl/brdcst.hxx>
34cdf0e10cSrcweir #include <svl/lstner.hxx>
35cdf0e10cSrcweir #include <sfx2/childwin.hxx>
36cdf0e10cSrcweir #include <svx/svdmark.hxx>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir //============================================================================
39cdf0e10cSrcweir // PropBrwMgr
40cdf0e10cSrcweir //============================================================================
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class PropBrwMgr : public SfxChildWindow
43cdf0e10cSrcweir {
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir 	PropBrwMgr(Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo);
46cdf0e10cSrcweir 	SFX_DECL_CHILDWINDOW(PropBrwMgr);
47cdf0e10cSrcweir };
48cdf0e10cSrcweir 
49cdf0e10cSrcweir //============================================================================
50cdf0e10cSrcweir // PropBrw
51cdf0e10cSrcweir //============================================================================
52cdf0e10cSrcweir 
53cdf0e10cSrcweir class SfxBindings;
54cdf0e10cSrcweir class SdrView;
55cdf0e10cSrcweir 
56cdf0e10cSrcweir class PropBrw : public SfxFloatingWindow , public SfxListener, public SfxBroadcaster
57cdf0e10cSrcweir {
58cdf0e10cSrcweir private:
59cdf0e10cSrcweir 	sal_Bool		m_bInitialStateChange;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
62cdf0e10cSrcweir 					m_xORB;
63cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
64cdf0e10cSrcweir 					m_xMeAsFrame;
65cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
66cdf0e10cSrcweir 					m_xBrowserController;
67cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
68cdf0e10cSrcweir 					m_xBrowserComponentWindow;
69cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
70cdf0e10cSrcweir 					m_xContextDocument;
71cdf0e10cSrcweir 
72cdf0e10cSrcweir protected:
73cdf0e10cSrcweir 	SdrView*		pView;
74cdf0e10cSrcweir 	virtual void Resize();
75cdf0e10cSrcweir 	virtual void FillInfo( SfxChildWinInfo& rInfo ) const;
76cdf0e10cSrcweir 	virtual sal_Bool Close();
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	DECLARE_STL_VECTOR(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>, InterfaceArray);
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
81cdf0e10cSrcweir 		CreateMultiSelectionSequence( const SdrMarkList& _rMarkList );
82cdf0e10cSrcweir 	void implSetNewObjectSequence( const ::com::sun::star::uno::Sequence
83cdf0e10cSrcweir 		< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rObjectSeq );
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 	void implSetNewObject(
86cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
87cdf0e10cSrcweir 
88cdf0e10cSrcweir 	::rtl::OUString GetHeadlineName(
89cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir public:
92cdf0e10cSrcweir 	PropBrw( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB,
93cdf0e10cSrcweir 			 SfxBindings *pBindings,
94cdf0e10cSrcweir 			 PropBrwMgr* pMgr,
95cdf0e10cSrcweir 			 Window* pParent,
96cdf0e10cSrcweir 			 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument
97cdf0e10cSrcweir 	);
98cdf0e10cSrcweir 	virtual ~PropBrw();
99cdf0e10cSrcweir 	using Window::Update;
100cdf0e10cSrcweir     // note: changing the Context document to an instance other than the one given in the ctor is not supported
101cdf0e10cSrcweir     // currently
102cdf0e10cSrcweir     void    Update( const SfxViewShell* _pShell );
GetCurView() const103cdf0e10cSrcweir 	SdrView*		GetCurView() const { return pView; }
104cdf0e10cSrcweir 
105cdf0e10cSrcweir private:
106cdf0e10cSrcweir     void    ImplUpdate( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& _rxContextDocument, SdrView* pView );
107cdf0e10cSrcweir     void    ImplDestroyController();
108cdf0e10cSrcweir     void    ImplReCreateController();
109cdf0e10cSrcweir };
110cdf0e10cSrcweir 
111cdf0e10cSrcweir #endif // _BASCTL_PROPBRW_HXX
112