1*9ee13d13SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*9ee13d13SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*9ee13d13SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*9ee13d13SAndrew Rist  * distributed with this work for additional information
6*9ee13d13SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*9ee13d13SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*9ee13d13SAndrew Rist  * "License"); you may not use this file except in compliance
9*9ee13d13SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*9ee13d13SAndrew Rist  *
11*9ee13d13SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*9ee13d13SAndrew Rist  *
13*9ee13d13SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*9ee13d13SAndrew Rist  * software distributed under the License is distributed on an
15*9ee13d13SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9ee13d13SAndrew Rist  * KIND, either express or implied.  See the License for the
17*9ee13d13SAndrew Rist  * specific language governing permissions and limitations
18*9ee13d13SAndrew Rist  * under the License.
19*9ee13d13SAndrew Rist  *
20*9ee13d13SAndrew Rist  *************************************************************/
21*9ee13d13SAndrew Rist 
22*9ee13d13SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _REPORT_PROPBRW_HXX
25cdf0e10cSrcweir #define _REPORT_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 <com/sun/star/inspection/XObjectInspector.hpp>
32cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
33cdf0e10cSrcweir #include <svl/brdcst.hxx>
34cdf0e10cSrcweir #include <svl/lstner.hxx>
35cdf0e10cSrcweir #include <vcl/dockwin.hxx>
36cdf0e10cSrcweir #include <svx/svdmark.hxx>
37cdf0e10cSrcweir #include "ModuleHelper.hxx"
38cdf0e10cSrcweir 
39cdf0e10cSrcweir namespace rptui
40cdf0e10cSrcweir {
41cdf0e10cSrcweir 
42cdf0e10cSrcweir class OSectionView;
43cdf0e10cSrcweir class ODesignView;
44cdf0e10cSrcweir class OObjectBase;
45cdf0e10cSrcweir //============================================================================
46cdf0e10cSrcweir // PropBrw
47cdf0e10cSrcweir //============================================================================
48cdf0e10cSrcweir 
49cdf0e10cSrcweir class PropBrw : public DockingWindow , public SfxListener, public SfxBroadcaster
50cdf0e10cSrcweir {
51cdf0e10cSrcweir private:
52cdf0e10cSrcweir     OModuleClient	    m_aModuleClient;
53cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
54cdf0e10cSrcweir                         m_xInspectorContext;
55cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
56cdf0e10cSrcweir 					    m_xORB;
57cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
58cdf0e10cSrcweir 					    m_xMeAsFrame;
59cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspector >
60cdf0e10cSrcweir 					    m_xBrowserController;
61cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
62cdf0e10cSrcweir 					    m_xBrowserComponentWindow;
63cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
64cdf0e10cSrcweir                         m_xLastSection; /// is the previously displayed section
65cdf0e10cSrcweir     ::rtl::OUString     m_sLastActivePage;
66cdf0e10cSrcweir     ODesignView*        m_pDesignView;
67cdf0e10cSrcweir     OSectionView*	    m_pView;
68cdf0e10cSrcweir     sal_Bool		    m_bInitialStateChange;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir     PropBrw(PropBrw&);
71cdf0e10cSrcweir     void operator =(PropBrw&);
72cdf0e10cSrcweir protected:
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	virtual void Resize();
75cdf0e10cSrcweir 	virtual sal_Bool Close();
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >
78cdf0e10cSrcweir         CreateCompPropSet(const SdrMarkList& rMarkList);
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 	void implSetNewObject(
81cdf0e10cSrcweir 		const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >& _aObjects = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >());
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	::rtl::OUString GetHeadlineName(
84cdf0e10cSrcweir 		const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >& _aObjects);
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 	void implDetachController();
87cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(OObjectBase* _pObj);
88cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(
89cdf0e10cSrcweir              const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xFormComponent
90cdf0e10cSrcweir             ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
91cdf0e10cSrcweir     DECL_LINK( OnAsyncGetFocus, void* );
92cdf0e10cSrcweir 
93cdf0e10cSrcweir public:
94cdf0e10cSrcweir 	PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&	_xORB
95cdf0e10cSrcweir 			,Window* pParent
96cdf0e10cSrcweir             ,ODesignView*  _pDesignView);
97cdf0e10cSrcweir 	virtual ~PropBrw();
98cdf0e10cSrcweir 
99cdf0e10cSrcweir     virtual void LoseFocus();
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	void	Update( OSectionView* m_pView );
102cdf0e10cSrcweir 	void	Update( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
GetCurView() const103cdf0e10cSrcweir 	inline OSectionView*	GetCurView() const { return m_pView; }
104cdf0e10cSrcweir     ::rtl::OUString         getCurrentPage() const;
105cdf0e10cSrcweir     void                    setCurrentPage(const ::rtl::OUString& _sLastActivePage);
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     ::Size getMinimumSize() const;
108cdf0e10cSrcweir private:
109cdf0e10cSrcweir     using Window::Update;
110cdf0e10cSrcweir };
111cdf0e10cSrcweir //==============================================================================
112cdf0e10cSrcweir } // rptui
113cdf0e10cSrcweir //==============================================================================
114cdf0e10cSrcweir #endif // _REPORT_PROPBRW_HXX
115