Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
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.
15 : : *
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).
21 : : *
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.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _REPORT_RPTUIPAGE_HXX
29 : : #define _REPORT_RPTUIPAGE_HXX
30 : :
31 : : #include "dllapi.h"
32 : : #include "svx/svdpage.hxx"
33 : : #include <com/sun/star/report/XReportComponent.hpp>
34 : : #include <com/sun/star/report/XSection.hpp>
35 : :
36 : : namespace rptui
37 : : {
38 : : //============================================================================
39 : : // OReportPage
40 : : //============================================================================
41 : :
42 : : class OReportModel;
43 : :
44 : : class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
45 : : {
46 : : OReportModel& rModel;
47 : : ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
48 : : bool m_bSpecialInsertMode;
49 : : std::vector<SdrObject*> m_aTemporaryObjectList;
50 : :
51 : : OReportPage(const OReportPage&);
52 : :
53 : : // methode to remove temporary objects, created by 'special mode'
54 : : // (BegDragObj)
55 : : void removeTempObject(SdrObject *_pToRemoveObj);
56 : :
57 : : virtual ~OReportPage();
58 : :
59 : : protected:
60 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage();
61 : : public:
62 : : TYPEINFO();
63 : :
64 : : OReportPage( OReportModel& rModel
65 : : ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
66 : : ,bool bMasterPage = false );
67 : :
68 : :
69 : : virtual SdrPage* Clone() const;
70 : : using SdrPage::Clone;
71 : :
72 : : virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason);
73 : : virtual SdrObject* RemoveObject(sal_uLong nObjNum);
74 : :
75 : : /** returns the index inside the object list which belongs to the report component.
76 : : @param _xObject the report component
77 : : */
78 : : sal_uLong getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
79 : :
80 : : /** removes the SdrObject which belongs to the report component.
81 : : @param _xObject the report component
82 : : */
83 : : void removeSdrObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
84 : :
85 : 0 : void setSpecialMode() {m_bSpecialInsertMode = true;}
86 : 0 : bool getSpecialMode() {return m_bSpecialInsertMode;}
87 : : // all temporary objects will remove and destroy
88 : : void resetSpecialMode();
89 : :
90 : : /** insert a new SdrObject which belongs to the report component.
91 : : @param _xObject the report component
92 : : */
93 : : void insertObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
94 : :
95 : : ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const;
96 : : };
97 : : }
98 : : #endif //_REPORT_RPTUIPAGE_HXX
99 : :
100 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|