1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef RPTUI_REPORTCONTROLLER_HXX
28 #define RPTUI_REPORTCONTROLLER_HXX
29 
30 #include "DesignView.hxx"
31 #include "ModuleHelper.hxx"
32 #include "ReportControllerObserver.hxx"
33 #include "RptDef.hxx"
34 
35 /** === begin UNO includes === **/
36 #include <com/sun/star/beans/PropertyValue.hpp>
37 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/embed/XVisualObject.hpp>
40 #include <com/sun/star/frame/XComponentLoader.hpp>
41 #include <com/sun/star/frame/XFrame.hpp>
42 #include <com/sun/star/io/XObjectInputStream.hpp>
43 #include <com/sun/star/io/XObjectOutputStream.hpp>
44 #include <com/sun/star/report/XReportControlModel.hpp>
45 #include <com/sun/star/report/XReportDefinition.hpp>
46 #include <com/sun/star/report/XReportEngine.hpp>
47 #include <com/sun/star/report/XSection.hpp>
48 #include <com/sun/star/sdbc/XConnection.hpp>
49 #include <com/sun/star/sdbc/XRowSet.hpp>
50 #include <com/sun/star/uno/Sequence.hxx>
51 #include <com/sun/star/uno/XComponentContext.hpp>
52 #include <com/sun/star/util/XModeSelector.hpp>
53 #include <com/sun/star/util/XNumberFormatter.hpp>
54 #include <com/sun/star/view/XSelectionSupplier.hpp>
55 /** === end UNO includes === **/
56 
57 #include <comphelper/implementationreference.hxx>
58 #include <comphelper/proparrhlp.hxx>
59 #include <comphelper/propertystatecontainer.hxx>
60 #include <comphelper/uno3.hxx>
61 #include <cppuhelper/implbase5.hxx>
62 #include <dbaccess/dbsubcomponentcontroller.hxx>
63 #include <svl/lstner.hxx>
64 #include <svtools/transfer.hxx>
65 #include <svx/svdedtv.hxx>
66 #include <svx/zoomitem.hxx>
67 
68 #include <boost/noncopyable.hpp>
69 #include <boost/shared_ptr.hpp>
70 #include <functional>
71 
72 class TransferableHelper;
73 class TransferableClipboardListener;
74 class VclWindowEvent;
75 class SfxUndoManager;
76 namespace rptui
77 {
78 	class OGroupsSortingDialog;
79     class OPropertyMediator;
80     class OReportModel;
81     class OSectionView;
82     class OAddFieldWindow;
83     class OSectionWindow;
84 
85 	typedef ::dbaui::DBSubComponentController	OReportController_BASE;
86 	typedef ::cppu::ImplHelper5	<	::com::sun::star::container::XContainerListener
87 								,   ::com::sun::star::beans::XPropertyChangeListener
88                                 ,   ::com::sun::star::view::XSelectionSupplier
89 								,	::com::sun::star::util::XModeSelector
90                                 ,	::com::sun::star::embed::XVisualObject
91 								>	OReportController_Listener;
92 
93 	class OReportController :	 public OReportController_BASE
94 								,public OReportController_Listener
95 								,public SfxListener
96                                 ,public ::comphelper::OPropertyStateContainer
97 						        ,public ::comphelper::OPropertyArrayUsageHelper < OReportController_BASE >
98                                 ,public ::boost::noncopyable
99 	{
100 	private:
101 		OModuleClient	        m_aModuleClient;
102         ::cppu::OInterfaceContainerHelper
103                                 m_aSelectionListeners;
104         ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
105                                 m_aCollapsedSections;
106 		TransferableDataHelper	m_aSystemClipboard;		// content of the clipboard
107 		TransferableClipboardListener*
108 								m_pClipbordNotifier;	/// notifier for changes in the clipboard
109 		OGroupsSortingDialog*	m_pGroupsFloater;
110 
111         OXReportControllerObserver* m_pReportControllerObserver;
112 
113         ODesignView*  getDesignView() const   { return static_cast< ODesignView* >( getView() ); }
114 
115 		::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >         m_xReportDefinition;
116         ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportEngine >             m_xReportEngine;
117         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XComponentLoader >           m_xFrameLoader;
118         ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >            m_xContext;
119         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >                     m_xRowSet;
120         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >    m_xRowSetMediator;
121         ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > 			m_xFormatter;	// a number formatter working with the report's NumberFormatsSupplier
122         mutable ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >			m_xHoldAlive;
123         mutable ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >    m_xColumns;
124         ::com::sun::star::awt::Size												                m_aVisualAreaSize;
125 
126         ::boost::shared_ptr<rptui::OReportModel>
127                                 m_aReportModel;
128 		::rtl::OUString			m_sName;			    /// name for the report definition
129         ::rtl::OUString         m_sLastActivePage;      /// last active property browser page
130         ::rtl::OUString         m_sMode;      			/// the current mode of the controller
131 		sal_Int32				m_nSplitPos;		    /// the position of the splitter
132         sal_Int32               m_nPageNum;             /// the page number from the restoreView call
133         sal_Int32               m_nSelectionCount;
134         ::sal_Int64				m_nAspect;
135         sal_Int16               m_nZoomValue;
136         SvxZoomType             m_eZoomType;
137         sal_Bool                m_bShowRuler;
138         sal_Bool                m_bGridVisible;
139         sal_Bool                m_bGridUse;
140         sal_Bool                m_bShowProperties;
141         sal_Bool                m_bGroupFloaterWasVisible;
142         sal_Bool                m_bHelplinesMove;
143         bool                    m_bChartEnabled;
144         bool                    m_bChartEnabledAsked;
145         bool                    m_bInGeneratePreview;
146 
147         /** creates a formatted field in the given section with the given formula as data field
148         *
149         * \param _aArgs
150         * \param _xSection the section where to create the formatted field
151         * \param _sFunction the function which will be set at the data field.
152         */
153         void createControl(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,const ::rtl::OUString& _sFunction ,sal_uInt16 _nObjectId = OBJ_DLG_FORMATTEDFIELD);
154         /** switch the report header/footer sectionon off with undo or without depending on the given id.
155         *
156         * \param _nId   Can either be SID_REPORTHEADER_WITHOUT_UNDO or SID_REPORTFOOTER_WITHOUT_UNDO or SID_REPORTHEADERFOOTER.
157         */
158         void switchReportSection(const sal_Int16 _nId);
159 
160         /** switch the report header/footer sectionon off with undo or without depending on the given id.
161         *
162         * \param _nId   Can either be SID_PAGEHEADER_WITHOUT_UNDO or SID_PAGEFOOTER_WITHOUT_UNDO or SID_PAGEHEADERFOOTER.
163         */
164         void switchPageSection(const sal_Int16 _nId);
165 
166         /** append a new group or remove it with undo.
167         *
168         * \param _bAppend
169         * \param _aArgs The args which contains a element named PROPERTY_GROUP of type report::XGroup.
170         */
171         void modifyGroup(const bool _bAppend, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
172 
173         /** creates a group section.
174         *
175         * \param _bUndo true when undo action should be created
176         * \param _bHeader true when it is a header otherwise it is a footer
177         * \param _aArgs The args which contains a element named PROPERTY_GROUP of type report::XGroup.
178         */
179         void createGroupSection(const bool _bUndo,const bool _bHeader,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >&_aArgs);
180 
181         /** add or remove me as listener at the report definition
182         *
183         * \param _bAdd
184         */
185         void listen(const bool _bAdd);
186 
187 		/** opens the common page dialog
188 		*/
189 		void openPageDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection);
190 
191 		/** opens or hides the sorting and grouping dialog
192 		*/
193 		void openSortingAndGroupingDialog();
194 
195         /** opens the zoom dialog
196         */
197         void openZoomDialog();
198 
199 		/** returns the position of the group inside the groups collection
200 		*/
201 		sal_Int32 getGroupPosition(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup >& _xGroup);
202 
203 		/** calls propertyChanged when the header or footer is really turned on.
204 			@param	_rEvent	the group
205 			@param	_bShow	when <TRUE/> the header and footer will be shown otherwise not
206 		*/
207 		void notifyGroupSections(const ::com::sun::star::container::ContainerEvent& _rEvent
208 								,bool _bShow);
209 
210 		/** change the sections for a group
211 			@param	_sPropName	the header or footer
212 			@param	_xGroup	the group
213 			@param	_nGroupPos	the position of the group inside the groups collection or the previous index when it was removed
214 			@param	_bShow	when <TRUE/> the header and footer will be shown otherwise not
215 		*/
216 		void groupChange( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup>& _xGroup
217 						 ,const ::rtl::OUString& _sPropName
218 						 ,sal_Int32 _nGroupPos
219 						 ,bool _bShow);
220 
221         void executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
222         void alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
223 
224 		// open the help agent of report designer at start time
225 		void doOpenHelpAgent();
226 
227         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > getXFrame();
228 
229         /** shrink a section
230         @param _nUndoStrId the string id of the string which is shown in undo menu
231         @param _nShrinkId  ID of what you would like to shrink.
232         */
233         void shrinkSectionBottom(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
234         void shrinkSectionTop(::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection);
235 
236     public:
237         void shrinkSection(sal_uInt16 _nUndoStrId, ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > _xSection, sal_Int32 _nShrinkId);
238 
239         /** opens the file open dialog to allow the user to select a image which will be
240         * bound to a newly created image button.
241         */
242         void insertGraphic();
243 
244         /** resets the floater
245         */
246         void updateFloater();
247 
248         /** creates a new function in the given value context
249         *
250         * \param _aValue contains a XNameContainer
251         */
252         void createNewFunction(const ::com::sun::star::uno::Any& _aValue);
253 
254         /** inserts a label - field pair into the current selected section
255         *
256         * \param aArgs
257         */
258         void addPairControls(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs);
259 
260         /** inserts a label - field combination to show the page number and/or page count
261         *
262         * \param _aArgs
263         */
264         void createPageNumber(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
265 
266         /** creates a formatted filed with TODAY() function and if set also an NOW() function
267         *
268         * \param _aArgs
269         */
270         void createDateTime(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
271 
272         /** gets the current section (SdrView)
273         *
274         * \return the currently selected section or <NULL/> if noone is selected
275         */
276         OSectionView* getCurrentSectionView() const;
277 
278         /**change the ZOrder of a current select object.
279         *
280         * \param _nId The command ID about what to do.
281         */
282         void changeZOrder(sal_Int32 _nId);
283 
284         /** marks the next or previous section, when the first/last section was already selected then the report will be selected.
285         *
286         * \param _bNext
287         */
288         void markSection(const bool _bNext);
289 
290         /** collapse or expand the currently selected section.
291         *
292         * \param _bCollapse collapse if sal_True otherwise expand
293         */
294         void collapseSection(const bool _bCollapse);
295 
296         /** fills the member that chart is enabled or not
297         *
298         */
299         void checkChartEnabled();
300 
301         /** set the zoom factor at the design view
302         */
303         void impl_zoom_nothrow();
304 
305 		virtual void impl_onModifyChanged();
306 
307 		virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
308 		virtual void impl_initialize( );
309 		bool isUiVisible() const;
310 
311         /** creates a new default control for the currently set type when the modifier KEY_MOD1 was pressed
312         * \param _aArgs must contain a properyvalue with name "KeyModifier" and value KEY_MOD1 when control should be created.
313         */
314         void createDefaultControl(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aArgs);
315 
316         /** fills the state for the feture request.
317             @param  _sProperty  the property which should be filled in the value
318             @param  _rState     the state to fill
319         */
320         void impl_fillState_nothrow(const ::rtl::OUString& _sProperty,dbaui::FeatureState& _rState) const;
321         void impl_fillCustomShapeState_nothrow(const char* _pCustomShapeType,dbaui::FeatureState& _rState) const;
322 
323         /** set the property at all selected controls.
324             @return <TRUE/> when the selection is not empty
325         */
326         bool impl_setPropertyAtControls_throw(const sal_uInt16 _nUndoResId
327             ,const ::rtl::OUString& _sProperty
328             ,const ::com::sun::star::uno::Any& _aValue
329             ,const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _aArgs);
330 
331 		DECL_LINK( OnInvalidateClipboard, void* );
332 		DECL_LINK( OnClipboardChanged, void* );
333         DECL_LINK( OnExecuteReport, void* );
334         DECL_LINK( OnOpenHelpAgent, void* );
335 		short saveModified();
336 		// all the features which should be handled by this class
337 		virtual void			describeSupportedFeatures();
338 		// state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
339 		virtual dbaui::FeatureState	GetState(sal_uInt16 nId) const;
340 		// execute a feature
341 		virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
342 
343         virtual void getPropertyDefaultByHandle( sal_Int32 _nHandle, ::com::sun::star::uno::Any& _rDefault ) const;
344         virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
345 
346     private:
347 		virtual ~OReportController();
348 
349 	public:
350 		OReportController(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context);
351 
352 		DECL_LINK( EventLstHdl, VclWindowEvent* );
353         DECL_LINK( OnCreateHdl, OAddFieldWindow*);
354 
355 		DECLARE_XINTERFACE( )
356 		DECLARE_XTYPEPROVIDER( )
357 
358 		// SfxListener
359 		virtual void Notify(SfxBroadcaster & rBc, SfxHint const & rHint);
360 
361 		/** returns <TRUE/> when the command is enbaled
362 			@param	_nCommand	the command id
363 			@param	_xControlFormat the report control format
364 		*/
365 		sal_Bool							isFormatCommandEnabled(sal_uInt16 _nCommand
366 												,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportControlFormat>& _xControlFormat) const;
367 
368 		virtual sal_Bool					Construct(Window* pParent);
369 		// XEventListener
370 		virtual void SAL_CALL				disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
371 
372 		// ::com::sun::star::frame::XController
373 		virtual sal_Bool SAL_CALL			suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
374 
375 		// ::com::sun::star::lang::XComponent
376 		virtual void		SAL_CALL disposing();
377 
378 		// XServiceInfo
379 		virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
380 		virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
381 		// need by registration
382 		static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
383 		static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
384 		static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
385 			create(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext);
386 
387 		// ::com::sun::star::container::XContainerListener
388 		virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
389 		virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
390 		virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
391 
392 		// XPropertyChangeListener
393 		virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
394 
395         // XSelectionSupplier
396         virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
397         virtual ::com::sun::star::uno::Any SAL_CALL getSelection(  ) throw (::com::sun::star::uno::RuntimeException);
398         virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
399         virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
400 
401 		// ::com::sun::star::frame::XController
402 		virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
403         virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
404         virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
405 
406 		/** gives access to the report definition
407 		* \return the report definition object, may be <NULL/>
408 		*/
409 		inline ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition> getReportDefinition() const { return m_xReportDefinition; }
410 
411         // ::com::sun::star::frame::XController
412         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >  SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
413 
414         // XTitle
415         virtual ::rtl::OUString SAL_CALL getTitle(  ) throw (::com::sun::star::uno::RuntimeException);
416 
417 		// XModeSelector
418         virtual void SAL_CALL setMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException) ;
419         virtual ::rtl::OUString SAL_CALL getMode(  ) throw (::com::sun::star::uno::RuntimeException) ;
420         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes(  ) throw (::com::sun::star::uno::RuntimeException) ;
421         virtual ::sal_Bool SAL_CALL supportsMode( const ::rtl::OUString& aMode ) throw (::com::sun::star::uno::RuntimeException) ;
422 
423         // XVisualObject
424 		virtual void SAL_CALL setVisualAreaSize( ::sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
425 		virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( ::sal_Int64 nAspect ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
426 		virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::embed::WrongStateException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
427 		virtual ::sal_Int32 SAL_CALL getMapUnit( ::sal_Int64 nAspect ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
428 
429 
430 		/** returns the current position of the splitter
431 		*
432 		* \return
433 		*/
434 		inline sal_Int32	getSplitPos() const { return m_nSplitPos;}
435 		inline void			setSplitPos(sal_Int32 _nSplitPos)		{ m_nSplitPos = _nSplitPos;}
436 
437         /** creates a new report from the report definition.
438          *
439          * \return The model or <NULL/> if the model could not be created.
440          */
441         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> executeReport();
442 
443         /** returns the RowSet which reflects the current settings of the report definition
444 
445             The caller is allowed to hold a reference to the RowSet - it is kept alive as long
446             as the controller lives, and it's settings will follow the report definition's settings.
447         */
448         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > getRowSet();
449 
450         /** returns the number formatter
451 		*/
452 		::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > 	getReportNumberFormatter() const;
453 
454         /** return the SdrModel of the real model
455         *
456         * \return
457         */
458         ::boost::shared_ptr<rptui::OReportModel> getSdrModel() const;
459 
460         inline ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >  getContext() const { return m_xContext; }
461         inline sal_Int16   getZoomValue() const     { return m_nZoomValue; }
462         inline void         resetZoomType()         { m_eZoomType = SVX_ZOOM_PERCENT; }
463 
464         // com::sun::star::beans::XPropertySet
465 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException)
466 		{
467 			return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
468 		}
469         // comphelper::OPropertyArrayUsageHelper
470 		virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
471 
472 	// cppu::OPropertySetHelper
473 		virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
474 
475         ::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
476 
477         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getColumns() const;
478         ::rtl::OUString getColumnLabel_throw(const ::rtl::OUString& i_sColumnName) const;
479 
480         SfxUndoManager& getUndoManager() const;
481         void            clearUndoManager() const;
482 		void            addUndoAction( SfxUndoAction* i_pAction );
483 	};
484 }
485 #endif // RPTUI_REPORTCONTROLLER_HXX
486 
487