merge the formfield patch from ooo-build
[ooovba.git] / reportdesign / source / ui / inc / propbrw.hxx
blob14e607d826c81330281f63569ed5b2b487fc317e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: propbrw.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _REPORT_PROPBRW_HXX
32 #define _REPORT_PROPBRW_HXX
34 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35 #include <com/sun/star/beans/XPropertySet.hpp>
36 #include <com/sun/star/awt/XControlContainer.hpp>
37 #include <com/sun/star/frame/XFrame.hpp>
38 #include <com/sun/star/inspection/XObjectInspector.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <svtools/brdcst.hxx>
41 #include <svtools/lstner.hxx>
42 #include <vcl/dockwin.hxx>
43 #include <svx/svdmark.hxx>
44 #include "ModuleHelper.hxx"
46 namespace rptui
49 class OSectionView;
50 class ODesignView;
51 class OObjectBase;
52 //============================================================================
53 // PropBrw
54 //============================================================================
56 class PropBrw : public DockingWindow , public SfxListener, public SfxBroadcaster
58 private:
59 OModuleClient m_aModuleClient;
60 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
61 m_xInspectorContext;
62 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
63 m_xORB;
64 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
65 m_xMeAsFrame;
66 ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspector >
67 m_xBrowserController;
68 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >
69 m_xBrowserComponentWindow;
70 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>
71 m_xLastSection; /// is the previously displayed section
72 ::rtl::OUString m_sLastActivePage;
73 ODesignView* m_pDesignView;
74 OSectionView* m_pView;
75 sal_Bool m_bInitialStateChange;
77 PropBrw(PropBrw&);
78 void operator =(PropBrw&);
79 protected:
81 virtual void Resize();
82 virtual sal_Bool Close();
84 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >
85 CreateCompPropSet(const SdrMarkList& rMarkList);
87 void implSetNewObject(
88 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> >());
90 ::rtl::OUString GetHeadlineName(
91 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> >& _aObjects);
93 void implDetachController();
94 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(OObjectBase* _pObj);
95 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> CreateComponentPair(
96 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xFormComponent
97 ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
98 DECL_LINK( OnAsyncGetFocus, void* );
100 public:
101 PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
102 ,Window* pParent
103 ,ODesignView* _pDesignView);
104 virtual ~PropBrw();
106 virtual void LoseFocus();
108 void Update( OSectionView* m_pView );
109 void Update( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xReportComponent);
110 inline OSectionView* GetCurView() const { return m_pView; }
111 ::rtl::OUString getCurrentPage() const;
112 void setCurrentPage(const ::rtl::OUString& _sLastActivePage);
114 ::Size getMinimumSize() const;
115 private:
116 using Window::Update;
118 //==============================================================================
119 } // rptui
120 //==============================================================================
121 #endif // _REPORT_PROPBRW_HXX