1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _REPORT_RPTUIPAGE_HXX 28 #define _REPORT_RPTUIPAGE_HXX 29 30 #include "dllapi.h" 31 #include "svx/svdpage.hxx" 32 #include <com/sun/star/report/XReportComponent.hpp> 33 #include <com/sun/star/report/XSection.hpp> 34 35 namespace rptui 36 { 37 //============================================================================ 38 // OReportPage 39 //============================================================================ 40 41 class OReportModel; 42 //class OReportSection; 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 ,FASTBOOL bMasterPage=sal_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 void setSpecialMode() {m_bSpecialInsertMode = true;} 86 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