xref: /aoo41x/main/reportdesign/inc/RptPage.hxx (revision 9ee13d13)
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 #ifndef _REPORT_RPTUIPAGE_HXX
24cdf0e10cSrcweir #define _REPORT_RPTUIPAGE_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "dllapi.h"
27cdf0e10cSrcweir #include "svx/svdpage.hxx"
28cdf0e10cSrcweir #include <com/sun/star/report/XReportComponent.hpp>
29cdf0e10cSrcweir #include <com/sun/star/report/XSection.hpp>
30cdf0e10cSrcweir 
31cdf0e10cSrcweir namespace rptui
32cdf0e10cSrcweir {
33cdf0e10cSrcweir //============================================================================
34cdf0e10cSrcweir // OReportPage
35cdf0e10cSrcweir //============================================================================
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class OReportModel;
38cdf0e10cSrcweir //class OReportSection;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
41cdf0e10cSrcweir {
42cdf0e10cSrcweir 	OReportModel&           rModel;
43cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
44cdf0e10cSrcweir     bool                    m_bSpecialInsertMode;
45cdf0e10cSrcweir 	std::vector<SdrObject*> m_aTemporaryObjectList;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir     OReportPage(const OReportPage&);
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     // methode to remove temporary objects, created by 'special mode'
50cdf0e10cSrcweir 	// (BegDragObj)
51cdf0e10cSrcweir 	void removeTempObject(SdrObject *_pToRemoveObj);
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 	virtual ~OReportPage();
54cdf0e10cSrcweir 
55cdf0e10cSrcweir protected:
56cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
57cdf0e10cSrcweir public:
58cdf0e10cSrcweir 	TYPEINFO();
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 	OReportPage( OReportModel& rModel
61cdf0e10cSrcweir                 ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
62cdf0e10cSrcweir                 ,FASTBOOL bMasterPage=sal_False );
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	virtual SdrPage* Clone() const;
66cdf0e10cSrcweir     using SdrPage::Clone;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason);
69cdf0e10cSrcweir     virtual SdrObject* RemoveObject(sal_uLong nObjNum);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 	/** returns the index inside the object list which belongs to the report component.
72cdf0e10cSrcweir 		@param	_xObject	the report component
73cdf0e10cSrcweir 	*/
74cdf0e10cSrcweir 	sal_uLong getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 	/** removes the SdrObject which belongs to the report component.
77cdf0e10cSrcweir 		@param	_xObject	the report component
78cdf0e10cSrcweir 	*/
79cdf0e10cSrcweir 	void removeSdrObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
80cdf0e10cSrcweir 
setSpecialMode()81cdf0e10cSrcweir 	void setSpecialMode() {m_bSpecialInsertMode = true;}
getSpecialMode()82cdf0e10cSrcweir     bool getSpecialMode() {return m_bSpecialInsertMode;}
83cdf0e10cSrcweir     // all temporary objects will remove and destroy
84cdf0e10cSrcweir 	void resetSpecialMode();
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 	/** insert a new SdrObject which belongs to the report component.
87cdf0e10cSrcweir 		@param	_xObject	the report component
88cdf0e10cSrcweir 	*/
89cdf0e10cSrcweir 	void insertObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const;
92cdf0e10cSrcweir };
93cdf0e10cSrcweir }
94cdf0e10cSrcweir #endif //_REPORT_RPTUIPAGE_HXX
95