1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _REPORT_RPTUIPAGE_HXX
29 #define _REPORT_RPTUIPAGE_HXX
32 #include "svx/svdpage.hxx"
33 #include <com/sun/star/report/XReportComponent.hpp>
34 #include <com/sun/star/report/XSection.hpp>
38 //============================================================================
40 //============================================================================
44 class REPORTDESIGN_DLLPUBLIC OReportPage
: public SdrPage
47 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> m_xSection
;
48 bool m_bSpecialInsertMode
;
49 std::vector
<SdrObject
*> m_aTemporaryObjectList
;
51 OReportPage(const OReportPage
&);
53 // methode to remove temporary objects, created by 'special mode'
55 void removeTempObject(SdrObject
*_pToRemoveObj
);
57 virtual ~OReportPage();
60 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> createUnoPage();
64 OReportPage( OReportModel
& rModel
65 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
>& _xSection
66 ,bool bMasterPage
= false );
69 virtual SdrPage
* Clone() const;
72 virtual void NbcInsertObject(SdrObject
* pObj
, sal_uLong nPos
, const SdrInsertReason
* pReason
);
73 virtual SdrObject
* RemoveObject(sal_uLong nObjNum
);
75 /** returns the index inside the object list which belongs to the report component.
76 @param _xObject the report component
78 sal_uLong
getIndexOf(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
80 /** removes the SdrObject which belongs to the report component.
81 @param _xObject the report component
83 void removeSdrObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
85 void setSpecialMode() {m_bSpecialInsertMode
= true;}
86 bool getSpecialMode() {return m_bSpecialInsertMode
;}
87 // all temporary objects will remove and destroy
88 void resetSpecialMode();
90 /** insert a new SdrObject which belongs to the report component.
91 @param _xObject the report component
93 void insertObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
95 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> getSection() const;
98 #endif //_REPORT_RPTUIPAGE_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */