Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
20 : #define INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
21 :
22 : #include "dllapi.h"
23 : #include <svx/svdpage.hxx>
24 : #include <com/sun/star/report/XReportComponent.hpp>
25 : #include <com/sun/star/report/XSection.hpp>
26 :
27 : namespace rptui
28 : {
29 :
30 : // OReportPage
31 :
32 :
33 : class OReportModel;
34 :
35 : class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
36 : {
37 : OReportPage& operator=(const OReportPage&) SAL_DELETED_FUNCTION;
38 :
39 : OReportModel& rModel;
40 : ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > m_xSection;
41 : bool m_bSpecialInsertMode;
42 : std::vector<SdrObject*> m_aTemporaryObjectList;
43 :
44 : OReportPage(const OReportPage&);
45 :
46 : // methode to remove temporary objects, created by 'special mode'
47 : // (BegDragObj)
48 : void removeTempObject(SdrObject *_pToRemoveObj);
49 :
50 : virtual ~OReportPage();
51 :
52 : protected:
53 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoPage() SAL_OVERRIDE;
54 : public:
55 : TYPEINFO_OVERRIDE();
56 :
57 : OReportPage( OReportModel& rModel
58 : ,const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection
59 : ,bool bMasterPage = false );
60 :
61 :
62 : virtual SdrPage* Clone() const SAL_OVERRIDE;
63 : virtual SdrPage* Clone( SdrModel* pNewModel ) const SAL_OVERRIDE;
64 :
65 : virtual void NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason) SAL_OVERRIDE;
66 : virtual SdrObject* RemoveObject(size_t nObjNum) SAL_OVERRIDE;
67 :
68 : /** returns the index inside the object list which belongs to the report component.
69 : @param _xObject the report component
70 : */
71 : sal_uLong getIndexOf(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
72 :
73 : /** removes the SdrObject which belongs to the report component.
74 : @param _xObject the report component
75 : */
76 : void removeSdrObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
77 :
78 0 : void setSpecialMode() {m_bSpecialInsertMode = true;}
79 0 : bool getSpecialMode() {return m_bSpecialInsertMode;}
80 : // all temporary objects will remove and destroy
81 : void resetSpecialMode();
82 :
83 : /** insert a new SdrObject which belongs to the report component.
84 : @param _xObject the report component
85 : */
86 : void insertObject(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportComponent >& _xObject);
87 :
88 0 : ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection > getSection() const { return m_xSection;}
89 : };
90 : }
91 : #endif // INCLUDED_REPORTDESIGN_INC_RPTPAGE_HXX
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|