1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: RptPage.hxx,v $
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 ************************************************************************/
30 #ifndef _REPORT_RPTUIPAGE_HXX
31 #define _REPORT_RPTUIPAGE_HXX
34 #include "svx/svdpage.hxx"
35 #include <com/sun/star/report/XReportComponent.hpp>
36 #include <com/sun/star/report/XSection.hpp>
40 //============================================================================
42 //============================================================================
45 //class OReportSection;
47 class REPORTDESIGN_DLLPUBLIC OReportPage
: public SdrPage
50 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> m_xSection
;
51 bool m_bSpecialInsertMode
;
52 std::vector
<SdrObject
*> m_aTemporaryObjectList
;
54 OReportPage(const OReportPage
&);
56 // methode to remove temporary objects, created by 'special mode'
58 void removeTempObject(SdrObject
*_pToRemoveObj
);
60 virtual ~OReportPage();
63 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> createUnoPage();
67 OReportPage( OReportModel
& rModel
68 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
>& _xSection
69 ,FASTBOOL bMasterPage
=FALSE
);
72 virtual SdrPage
* Clone() const;
75 virtual void NbcInsertObject(SdrObject
* pObj
, ULONG nPos
, const SdrInsertReason
* pReason
);
76 virtual SdrObject
* RemoveObject(ULONG nObjNum
);
78 /** returns the index inside the object list which belongs to the report component.
79 @param _xObject the report component
81 ULONG
getIndexOf(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
83 /** removes the SdrObject which belongs to the report component.
84 @param _xObject the report component
86 void removeSdrObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
88 void setSpecialMode() {m_bSpecialInsertMode
= true;}
89 bool getSpecialMode() {return m_bSpecialInsertMode
;}
90 // all temporary objects will remove and destroy
91 void resetSpecialMode();
93 /** insert a new SdrObject which belongs to the report component.
94 @param _xObject the report component
96 void insertObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
98 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> getSection() const;
101 #endif //_REPORT_RPTUIPAGE_HXX