LibreOffice Module reportdesign (master)  1
RptModel.hxx
Go to the documentation of this file.
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 
20 #ifndef INCLUDED_REPORTDESIGN_INC_RPTMODEL_HXX
21 #define INCLUDED_REPORTDESIGN_INC_RPTMODEL_HXX
22 
23 #include "dllapi.h"
24 #include <svx/svdmodel.hxx>
25 #include <com/sun/star/report/XReportDefinition.hpp>
26 
27 namespace vcl { class Window; }
28 namespace dbaui
29 {
30  class DBSubComponentController;
31 }
32 namespace reportdesign
33 {
34  class OReportDefinition;
35 }
36 namespace rptui
37 {
38 class OReportPage;
39 class OXUndoEnvironment;
40 
42 {
43  friend class OReportPage;
44 
45 private:
49 
50  virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override;
51 
52  OReportModel( const OReportModel& ) = delete;
53  void operator=(const OReportModel& rSrcModel) = delete;
54 
55 public:
56 
57  OReportModel(::reportdesign::OReportDefinition* _pReportDefinition);
58  virtual ~OReportModel() override;
59 
60  virtual void SetChanged(bool bFlg = true) override;
61  virtual rtl::Reference<SdrPage> AllocPage(bool bMasterPage) override;
62  virtual rtl::Reference<SdrPage> RemovePage(sal_uInt16 nPgNum) override;
64  virtual SvxNumType GetPageNumType() const override;
65 
66  OXUndoEnvironment& GetUndoEnv() { return *m_xUndoEnv;}
67  void SetModified(bool _bModified);
68 
69  dbaui::DBSubComponentController* getController() const { return m_pController; }
70  void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; }
71  void detachController();
72 
73  OReportPage* createNewPage(const css::uno::Reference< css::report::XSection >& _xSection);
74 
80  OReportPage* getPage(const css::uno::Reference< css::report::XSection >& _xSection);
81 
83  css::uno::Reference< css::report::XReportDefinition >
84  getReportDefinition() const;
85 
86  css::uno::Reference< css::uno::XInterface > createShape(const OUString& aServiceSpecifier,css::uno::Reference< css::drawing::XShape >& _rShape,sal_Int32 nOrientation = -1);
87 };
88 }
89 
90 #endif
91 
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
dbaui::DBSubComponentController * getController() const
Definition: RptModel.hxx:69
#define REPORTDESIGN_DLLPUBLIC
Definition: dllapi.h:28
SvxNumType
rtl::Reference< OXUndoEnvironment > m_xUndoEnv
Definition: RptModel.hxx:46
::reportdesign::OReportDefinition * m_pReportDefinition
Definition: RptModel.hxx:48
uno::Reference< drawing::XShape > OOO_DLLPUBLIC_TEST createShape(const uno::Reference< lang::XComponent > &r_xComponent, std::u16string_view r_aKind, const sal_Int32 nX, const sal_Int32 nY, const sal_Int32 nWidth, const sal_Int32 nHeight)
::dbaui::DBSubComponentController * m_pController
Definition: RptModel.hxx:47
void attachController(dbaui::DBSubComponentController &_rController)
Definition: RptModel.hxx:70
OXUndoEnvironment & GetUndoEnv()
Definition: RptModel.hxx:66