bump product version to 4.1.6.2
[LibreOffice.git] / reportdesign / inc / RptModel.hxx
blob9062a7aaf0f7bdea49aa71b5c09db69cecd95bd3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 REPORT_RPTMODEL_HXX
20 #define REPORT_RPTMODEL_HXX
22 #include "dllapi.h"
23 #include <svx/svdmodel.hxx>
24 #include <com/sun/star/report/XReportDefinition.hpp>
27 class Window;
28 namespace dbaui
30 class DBSubComponentController;
32 namespace reportdesign
34 class OReportDefinition;
36 namespace rptui
38 //============================================================================
39 // OReportModel
40 //============================================================================
42 class OReportPage;
43 class OXUndoEnvironment;
45 class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel
47 friend class OReportPage;
49 private:
50 OXUndoEnvironment* m_pUndoEnv;
51 ::dbaui::DBSubComponentController* m_pController;
52 ::reportdesign::OReportDefinition* m_pReportDefinition;
54 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel();
56 OReportModel( const OReportModel& );
57 void operator=(const OReportModel& rSrcModel);
58 public:
59 TYPEINFO();
61 OReportModel(::reportdesign::OReportDefinition* _pReportDefinition);
62 virtual ~OReportModel();
64 virtual void SetChanged(sal_Bool bFlg = sal_True);
65 virtual SdrPage* AllocPage(bool bMasterPage);
66 virtual SdrPage* RemovePage(sal_uInt16 nPgNum);
67 /** returns the numbering type that is used to format page fields in drawing shapes */
68 virtual SvxNumType GetPageNumType() const;
70 OXUndoEnvironment& GetUndoEnv();
71 void SetModified(sal_Bool _bModified);
73 inline dbaui::DBSubComponentController* getController() const { return m_pController; }
74 inline void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; }
75 void detachController();
77 OReportPage* createNewPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
79 /** returns the page which belongs to a section
81 * \param _xSection
82 * \return The page or <NULL/> when t´no page could be found.
84 OReportPage* getPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
86 /// returns the XReportDefinition which the OReportModel belongs to
87 ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >
88 getReportDefinition() const;
90 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createShape(const OUString& aServiceSpecifier,::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rShape,sal_Int32 nOrientation = -1);
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */