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