1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
20 #define INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
23 #include <svx/svdpage.hxx>
24 #include <com/sun/star/report/XReportComponent.hpp>
25 #include <com/sun/star/report/XSection.hpp>
35 class REPORTDESIGN_DLLPUBLIC OReportPage
: public SdrPage
37 OReportPage
& operator=(const OReportPage
&) SAL_DELETED_FUNCTION
;
40 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> m_xSection
;
41 bool m_bSpecialInsertMode
;
42 std::vector
<SdrObject
*> m_aTemporaryObjectList
;
44 OReportPage(const OReportPage
&);
46 // methode to remove temporary objects, created by 'special mode'
48 void removeTempObject(SdrObject
*_pToRemoveObj
);
50 virtual ~OReportPage();
53 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> createUnoPage() SAL_OVERRIDE
;
57 OReportPage( OReportModel
& rModel
58 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
>& _xSection
59 ,bool bMasterPage
= false );
62 virtual SdrPage
* Clone() const SAL_OVERRIDE
;
63 virtual SdrPage
* Clone( SdrModel
* pNewModel
) const SAL_OVERRIDE
;
65 virtual void NbcInsertObject(SdrObject
* pObj
, size_t nPos
, const SdrInsertReason
* pReason
) SAL_OVERRIDE
;
66 virtual SdrObject
* RemoveObject(size_t nObjNum
) SAL_OVERRIDE
;
68 /** returns the index inside the object list which belongs to the report component.
69 @param _xObject the report component
71 sal_uLong
getIndexOf(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
73 /** removes the SdrObject which belongs to the report component.
74 @param _xObject the report component
76 void removeSdrObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
78 void setSpecialMode() {m_bSpecialInsertMode
= true;}
79 bool getSpecialMode() {return m_bSpecialInsertMode
;}
80 // all temporary objects will remove and destroy
81 void resetSpecialMode();
83 /** insert a new SdrObject which belongs to the report component.
84 @param _xObject the report component
86 void insertObject(const ::com::sun::star::uno::Reference
< ::com::sun::star::report::XReportComponent
>& _xObject
);
88 ::com::sun::star::uno::Reference
< ::com::sun::star::report::XSection
> getSection() const { return m_xSection
;}
91 #endif // INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */