xref: /AOO41X/main/reportdesign/source/ui/inc/ViewsWindow.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef RPTUI_VIEWSWINDOW_HXX
28*cdf0e10cSrcweir #define RPTUI_VIEWSWINDOW_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <com/sun/star/report/XSection.hpp>
31*cdf0e10cSrcweir #include <vcl/window.hxx>
32*cdf0e10cSrcweir #include <svtools/colorcfg.hxx>
33*cdf0e10cSrcweir #include "ReportDefines.hxx"
34*cdf0e10cSrcweir #include "ReportSection.hxx"
35*cdf0e10cSrcweir #include <comphelper/propmultiplex.hxx>
36*cdf0e10cSrcweir #include "cppuhelper/basemutex.hxx"
37*cdf0e10cSrcweir #include <svtools/colorcfg.hxx>
38*cdf0e10cSrcweir #include <com/sun/star/beans/NamedValue.hpp>
39*cdf0e10cSrcweir #include <svx/svdedtv.hxx>
40*cdf0e10cSrcweir #include <SectionView.hxx>
41*cdf0e10cSrcweir #include <unotools/options.hxx>
42*cdf0e10cSrcweir #include <list>
43*cdf0e10cSrcweir #include <vector>
44*cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir #include <MarkedSection.hxx>
47*cdf0e10cSrcweir #include <SectionWindow.hxx>
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir class SdrHdl;
50*cdf0e10cSrcweir namespace rptui
51*cdf0e10cSrcweir {
52*cdf0e10cSrcweir 	class OReportWindow;
53*cdf0e10cSrcweir 	class ODesignView;
54*cdf0e10cSrcweir 	class OEndMarker;
55*cdf0e10cSrcweir 	class OReportSection;
56*cdf0e10cSrcweir 	class OSectionView;
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir     // -----------------------------------------------------------------------------
60*cdf0e10cSrcweir     struct RectangleLess : public ::std::binary_function< Rectangle, Rectangle, bool>
61*cdf0e10cSrcweir     {
62*cdf0e10cSrcweir         enum CompareMode { POS_LEFT,POS_RIGHT,POS_UPPER,POS_DOWN,POS_CENTER_HORIZONTAL,POS_CENTER_VERTICAL };
63*cdf0e10cSrcweir         CompareMode m_eCompareMode;
64*cdf0e10cSrcweir         Point       m_aRefPoint;
65*cdf0e10cSrcweir         RectangleLess(CompareMode _eCompareMode,const Point& _rRefPoint ) : m_eCompareMode(_eCompareMode),m_aRefPoint(_rRefPoint){}
66*cdf0e10cSrcweir         bool operator() (const Rectangle& lhs, const Rectangle& rhs) const
67*cdf0e10cSrcweir         {
68*cdf0e10cSrcweir             switch(m_eCompareMode)
69*cdf0e10cSrcweir             {
70*cdf0e10cSrcweir             case POS_LEFT:
71*cdf0e10cSrcweir                 return lhs.Left() < rhs.Left();
72*cdf0e10cSrcweir             case POS_RIGHT:
73*cdf0e10cSrcweir                 return lhs.Right() >= rhs.Right();
74*cdf0e10cSrcweir             case POS_UPPER:
75*cdf0e10cSrcweir                 return lhs.Top() < rhs.Top();
76*cdf0e10cSrcweir             case POS_DOWN:
77*cdf0e10cSrcweir                 return lhs.Bottom() >= rhs.Bottom();
78*cdf0e10cSrcweir             case POS_CENTER_HORIZONTAL:
79*cdf0e10cSrcweir                 return abs(m_aRefPoint.X() - lhs.Center().X()) < abs(m_aRefPoint.X() - rhs.Center().X());
80*cdf0e10cSrcweir             case POS_CENTER_VERTICAL:
81*cdf0e10cSrcweir                 return abs(lhs.Center().Y() - m_aRefPoint.Y()) < abs(rhs.Center().Y() - m_aRefPoint.Y());
82*cdf0e10cSrcweir             }
83*cdf0e10cSrcweir             return false;
84*cdf0e10cSrcweir         }
85*cdf0e10cSrcweir     };
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir     class OWindowPositionCorrector
88*cdf0e10cSrcweir 	{
89*cdf0e10cSrcweir 		::std::vector< ::std::pair<Window*,Point> > m_aChildren;
90*cdf0e10cSrcweir 		long m_nDeltaX;
91*cdf0e10cSrcweir 		long m_nDeltaY;
92*cdf0e10cSrcweir 	public:
93*cdf0e10cSrcweir 		OWindowPositionCorrector(Window* _pWindow,long _nDeltaX, long _nDeltaY) :m_nDeltaX(_nDeltaX), m_nDeltaY(_nDeltaY)
94*cdf0e10cSrcweir 		{
95*cdf0e10cSrcweir 			sal_uInt16 nCount = _pWindow->GetChildCount();
96*cdf0e10cSrcweir 			m_aChildren.reserve(nCount);
97*cdf0e10cSrcweir 			while( nCount )
98*cdf0e10cSrcweir 			{
99*cdf0e10cSrcweir 				Window* pChild = _pWindow->GetChild(--nCount);
100*cdf0e10cSrcweir 				m_aChildren.push_back(::std::pair<Window*,Point>(pChild,pChild->GetPosPixel()));
101*cdf0e10cSrcweir 			}
102*cdf0e10cSrcweir 		}
103*cdf0e10cSrcweir 		~OWindowPositionCorrector()
104*cdf0e10cSrcweir 		{
105*cdf0e10cSrcweir 			::std::vector< ::std::pair<Window*,Point> >::iterator aIter = m_aChildren.begin();
106*cdf0e10cSrcweir 			::std::vector< ::std::pair<Window*,Point> >::iterator aEnd = m_aChildren.end();
107*cdf0e10cSrcweir 			for (; aIter != aEnd; ++aIter)
108*cdf0e10cSrcweir 			{
109*cdf0e10cSrcweir 				const Point aPos = aIter->first->GetPosPixel();
110*cdf0e10cSrcweir 				if ( aPos == aIter->second )
111*cdf0e10cSrcweir 					aIter->first->SetPosPixel(Point(m_nDeltaX,m_nDeltaY) + aPos);
112*cdf0e10cSrcweir 			}
113*cdf0e10cSrcweir 		}
114*cdf0e10cSrcweir 	};
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     class OViewsWindow :	public Window
117*cdf0e10cSrcweir 						,	public utl::ConfigurationListener
118*cdf0e10cSrcweir                         ,   public IMarkedSection
119*cdf0e10cSrcweir 	{
120*cdf0e10cSrcweir         typedef ::std::multimap<Rectangle,::std::pair<SdrObject*,OSectionView*>,RectangleLess>      TRectangleMap;
121*cdf0e10cSrcweir 	public:
122*cdf0e10cSrcweir 		typedef ::std::vector< ::boost::shared_ptr<OSectionWindow> >								TSectionsMap;
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 		struct TReportPairHelper : public ::std::unary_function< TSectionsMap::value_type, OReportSection >
125*cdf0e10cSrcweir 		{
126*cdf0e10cSrcweir 			OReportSection& operator() (const TSectionsMap::value_type& lhs) const
127*cdf0e10cSrcweir 			{
128*cdf0e10cSrcweir 				return lhs->getReportSection();
129*cdf0e10cSrcweir 			}
130*cdf0e10cSrcweir 		};
131*cdf0e10cSrcweir         struct TStartMarkerHelper : public ::std::unary_function< TSectionsMap::value_type, OStartMarker >
132*cdf0e10cSrcweir 		{
133*cdf0e10cSrcweir 			OStartMarker& operator() (const TSectionsMap::value_type& lhs) const
134*cdf0e10cSrcweir 			{
135*cdf0e10cSrcweir 				return lhs->getStartMarker();
136*cdf0e10cSrcweir 			}
137*cdf0e10cSrcweir 		};
138*cdf0e10cSrcweir 	private:
139*cdf0e10cSrcweir 		TSectionsMap							m_aSections;
140*cdf0e10cSrcweir 		svtools::ColorConfig					m_aColorConfig;
141*cdf0e10cSrcweir 		OReportWindow*							m_pParent;
142*cdf0e10cSrcweir         ::rtl::OUString                         m_sShapeType;
143*cdf0e10cSrcweir 		sal_Bool								m_bInSplitHandler;
144*cdf0e10cSrcweir 		sal_Bool								m_bInUnmark;
145*cdf0e10cSrcweir 
146*cdf0e10cSrcweir 		void ImplInitSettings();
147*cdf0e10cSrcweir 		/** returns the iterator at pos _nPos or the end()
148*cdf0e10cSrcweir 		*/
149*cdf0e10cSrcweir 		TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos);
150*cdf0e10cSrcweir         void collectRectangles(TRectangleMap& _rMap,bool _bBoundRects);
151*cdf0e10cSrcweir         void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,bool _bBoundRects,Rectangle& _rBound,Rectangle& _rResize);
152*cdf0e10cSrcweir         void impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet);
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir         OViewsWindow(OViewsWindow&);
155*cdf0e10cSrcweir         void operator =(OViewsWindow&);
156*cdf0e10cSrcweir 	protected:
157*cdf0e10cSrcweir 		virtual void DataChanged( const DataChangedEvent& rDCEvt );
158*cdf0e10cSrcweir         // windows overload
159*cdf0e10cSrcweir 		virtual void MouseButtonDown( const MouseEvent& rMEvt );
160*cdf0e10cSrcweir 		virtual void MouseButtonUp( const MouseEvent& rMEvt );
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir         virtual void Paint( const Rectangle& rRect );
163*cdf0e10cSrcweir 		virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
164*cdf0e10cSrcweir 	public:
165*cdf0e10cSrcweir 		OViewsWindow(
166*cdf0e10cSrcweir             OReportWindow* _pReportWindow);
167*cdf0e10cSrcweir 		virtual ~OViewsWindow();
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir         // windows overload
170*cdf0e10cSrcweir 		virtual void Resize();
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir         void resize(const OSectionWindow& _rSectionWindow);
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir 		/** late ctor
175*cdf0e10cSrcweir 		*/
176*cdf0e10cSrcweir 		void initialize();
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir 		inline OReportWindow*		getView()			const { return m_pParent; }
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir 		/** removes the section at the given position.
181*cdf0e10cSrcweir 		*
182*cdf0e10cSrcweir 		* \param _nPosition Zero based.
183*cdf0e10cSrcweir 		*/
184*cdf0e10cSrcweir 		void			removeSection(sal_uInt16 _nPosition);
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 		/** adds a new section at position _nPosition.
187*cdf0e10cSrcweir 			If the section is <NULL/> nothing happens.
188*cdf0e10cSrcweir 			If the position is grater than the current elements, the section will be appended.
189*cdf0e10cSrcweir 		*/
190*cdf0e10cSrcweir 		void			addSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
191*cdf0e10cSrcweir 									,const ::rtl::OUString& _sColorEntry
192*cdf0e10cSrcweir 									,sal_uInt16 _nPosition = USHRT_MAX);
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir 		sal_uInt16			getSectionCount() const;
195*cdf0e10cSrcweir         /** return the section at the given position
196*cdf0e10cSrcweir         *
197*cdf0e10cSrcweir         * \param _nPos
198*cdf0e10cSrcweir         * \return the section at this pos or an empty section
199*cdf0e10cSrcweir         */
200*cdf0e10cSrcweir         ::boost::shared_ptr<OSectionWindow> getSectionWindow(const sal_uInt16 _nPos) const;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 		/** turns the grid on or off
203*cdf0e10cSrcweir 		*
204*cdf0e10cSrcweir 		* \param _bVisible
205*cdf0e10cSrcweir 		*/
206*cdf0e10cSrcweir 		void			toggleGrid(sal_Bool _bVisible);
207*cdf0e10cSrcweir         void            setGridSnap(sal_Bool bOn);
208*cdf0e10cSrcweir         void            setDragStripes(sal_Bool bOn);
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 		/** returns the total accumulated height of all sections until _pSection is reached
211*cdf0e10cSrcweir 		*/
212*cdf0e10cSrcweir 		sal_Int32		getTotalHeight() const;
213*cdf0e10cSrcweir 
214*cdf0e10cSrcweir 		inline bool		empty() const { return m_aSections.empty(); }
215*cdf0e10cSrcweir 		void 			SetMode( DlgEdMode m_eMode );
216*cdf0e10cSrcweir 		void			SetInsertObj( sal_uInt16 eObj,const ::rtl::OUString& _sShapeType = ::rtl::OUString());
217*cdf0e10cSrcweir 		rtl::OUString   GetInsertObjString() const;
218*cdf0e10cSrcweir 		/** copies the current selection in this section
219*cdf0e10cSrcweir 		*/
220*cdf0e10cSrcweir 		void Copy();
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 		/**	returns if paste is allowed
223*cdf0e10cSrcweir 		*
224*cdf0e10cSrcweir 		* \return <TRUE/> if paste is allowed
225*cdf0e10cSrcweir 		*/
226*cdf0e10cSrcweir 		sal_Bool IsPasteAllowed() const;
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir 		/** paste a new control in this section
229*cdf0e10cSrcweir 		*/
230*cdf0e10cSrcweir 		void Paste();
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir 		/** Deletes the current selection in this section
233*cdf0e10cSrcweir 		*
234*cdf0e10cSrcweir 		*/
235*cdf0e10cSrcweir 		void Delete();
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir 		/** All objects will be marked.
238*cdf0e10cSrcweir 		*/
239*cdf0e10cSrcweir 		void SelectAll(const sal_uInt16 _nObjectType);
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir         /** returns <TRUE/> when a object is marked
242*cdf0e10cSrcweir         */
243*cdf0e10cSrcweir         sal_Bool HasSelection() const;
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir 		/** unmark all objects on the views without the given one.
246*cdf0e10cSrcweir 		*
247*cdf0e10cSrcweir 		* @param _pSectionView The view where the objects should not be unmarked.
248*cdf0e10cSrcweir 		*/
249*cdf0e10cSrcweir 		void			unmarkAllObjects(OSectionView* _pSectionView);
250*cdf0e10cSrcweir 
251*cdf0e10cSrcweir 		/** returns the report section window for the given xsection
252*cdf0e10cSrcweir 			@param	_xSection	the section
253*cdf0e10cSrcweir 		*/
254*cdf0e10cSrcweir 		// ::boost::shared_ptr<OSectionWindow>	getReportSection(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
255*cdf0e10cSrcweir 		::boost::shared_ptr<OSectionWindow> getSectionWindow(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection) const;
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir 		/** checks if the keycode is known by the child windows
258*cdf0e10cSrcweir 			@param	_rCode	the keycode
259*cdf0e10cSrcweir 			@return <TRUE/> if the keycode is handled otherwise <FALSE/>
260*cdf0e10cSrcweir 		*/
261*cdf0e10cSrcweir 		sal_Bool		handleKeyEvent(const KeyEvent& _rEvent);
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir 		/** the the section as marked or not marked
264*cdf0e10cSrcweir 			@param	_pSectionView	the section where to set the marked flag
265*cdf0e10cSrcweir 			@param	_bMark	the marked flag
266*cdf0e10cSrcweir 		*/
267*cdf0e10cSrcweir 		void			setMarked(OSectionView* _pSectionView,sal_Bool _bMark);
268*cdf0e10cSrcweir         void			setMarked(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection>& _xSection,sal_Bool _bMark);
269*cdf0e10cSrcweir         void			setMarked(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent> >& _xShape,sal_Bool _bMark);
270*cdf0e10cSrcweir 
271*cdf0e10cSrcweir 		// IMarkedSection
272*cdf0e10cSrcweir 		::boost::shared_ptr<OSectionWindow> getMarkedSection(NearSectionAccess nsa = CURRENT) const;
273*cdf0e10cSrcweir         virtual void markSection(const sal_uInt16 _nPos);
274*cdf0e10cSrcweir 
275*cdf0e10cSrcweir         /** align all marked objects in all sections
276*cdf0e10cSrcweir         */
277*cdf0e10cSrcweir         void alignMarkedObjects(sal_Int32 _nControlModification,bool _bAlignAtSection, bool bBoundRects = false);
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir         /** creates a default object
280*cdf0e10cSrcweir         *
281*cdf0e10cSrcweir         */
282*cdf0e10cSrcweir         void createDefault();
283*cdf0e10cSrcweir 
284*cdf0e10cSrcweir         /** shows or hides the ruler.
285*cdf0e10cSrcweir 		*/
286*cdf0e10cSrcweir 		void showRuler(sal_Bool _bShow);
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir         /** returns the currently set shape type.
289*cdf0e10cSrcweir         *
290*cdf0e10cSrcweir         * \return \member m_sShapeType
291*cdf0e10cSrcweir         */
292*cdf0e10cSrcweir         inline ::rtl::OUString getShapeType() const { return m_sShapeType; }
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir 		/** returns the current position in the list
295*cdf0e10cSrcweir 		*/
296*cdf0e10cSrcweir 		sal_uInt16 getPosition(const OSectionWindow* _pSectionWindow = NULL) const;
297*cdf0e10cSrcweir 
298*cdf0e10cSrcweir         /** calls on every section BrkAction
299*cdf0e10cSrcweir         *
300*cdf0e10cSrcweir         */
301*cdf0e10cSrcweir         void BrkAction();
302*cdf0e10cSrcweir         void BegMarkObj(const Point& _aPnt,const OSectionView* _pSection);
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir     private:
305*cdf0e10cSrcweir         void BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _aRect, const OSectionView& _rSection);
306*cdf0e10cSrcweir 		void EndDragObj_removeInvisibleObjects();
307*cdf0e10cSrcweir         Point m_aDragDelta;
308*cdf0e10cSrcweir         ::std::vector<SdrObject*> m_aBegDragTempList;
309*cdf0e10cSrcweir         bool isObjectInMyTempList(SdrObject *);
310*cdf0e10cSrcweir     public:
311*cdf0e10cSrcweir         void BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionView* _pSection);
312*cdf0e10cSrcweir         void EndDragObj(sal_Bool _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt);
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir 		void EndAction();
315*cdf0e10cSrcweir         void ForceMarkedToAnotherPage();
316*cdf0e10cSrcweir         sal_Bool IsAction() const;
317*cdf0e10cSrcweir         sal_Bool IsDragObj() const;
318*cdf0e10cSrcweir         void handleKey(const KeyCode& _rCode);
319*cdf0e10cSrcweir         void stopScrollTimer();
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir         /** return the section at the given point which is relative to the given section
322*cdf0e10cSrcweir         *
323*cdf0e10cSrcweir         * \param _pSection the section which is used as reference point
324*cdf0e10cSrcweir         * \param _rPnt the point, it will be changed that it is inside the section which will be returned
325*cdf0e10cSrcweir         * \return the section
326*cdf0e10cSrcweir         */
327*cdf0e10cSrcweir         OSectionView* getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt);
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir         void MovAction(const Point& rPnt,const OSectionView* _pSection,bool _bMove /*= true */, bool _bControlKeySet);
330*cdf0e10cSrcweir         // void MovAction2(const Point& rPnt,const OSectionView* _pSection);
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir         sal_uInt32 getMarkedObjectCount() const;
333*cdf0e10cSrcweir 
334*cdf0e10cSrcweir         /** fills the positions of all collapsed sections.
335*cdf0e10cSrcweir         *
336*cdf0e10cSrcweir         * \param _rCollapsedPositions Out parameter which holds afterwards all positions of the collapsed sections.
337*cdf0e10cSrcweir         */
338*cdf0e10cSrcweir         void fillCollapsedSections(::std::vector<sal_uInt16>& _rCollapsedPositions) const;
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir         /** collpase all sections given by their position
341*cdf0e10cSrcweir         *
342*cdf0e10cSrcweir         * \param _aCollpasedSections The position of the sections which should be collapsed.
343*cdf0e10cSrcweir         */
344*cdf0e10cSrcweir         void collapseSections(const com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& _aCollpasedSections);
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir         /** zoom the ruler and view windows
347*cdf0e10cSrcweir         */
348*cdf0e10cSrcweir         void zoom(const Fraction& _aZoom);
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir         void scrollChildren(const Point& _aThumbPos);
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir         /** fills the vector with all selected control models
353*cdf0e10cSrcweir             /param  _rSelection The vector will be filled and will not be cleared before.
354*cdf0e10cSrcweir         */
355*cdf0e10cSrcweir         void fillControlModelSelection(::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >& _rSelection) const;
356*cdf0e10cSrcweir 	};
357*cdf0e10cSrcweir //==============================================================================
358*cdf0e10cSrcweir } // rptui
359*cdf0e10cSrcweir //==============================================================================
360*cdf0e10cSrcweir #endif // RPTUI_VIEWSWINDOW_HXX
361*cdf0e10cSrcweir 
362