LCOV - code coverage report
Current view: top level - reportdesign/inc - RptModel.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 1 2 50.0 %
Date: 2014-04-11 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          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             : 
      20             : #ifndef REPORT_RPTMODEL_HXX
      21             : #define REPORT_RPTMODEL_HXX
      22             : 
      23             : #include "dllapi.h"
      24             : #include <svx/svdmodel.hxx>
      25             : #include <com/sun/star/report/XReportDefinition.hpp>
      26             : 
      27             : 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             : 
      41             : class REPORTDESIGN_DLLPUBLIC OReportModel : public SdrModel
      42             : {
      43             :     friend class OReportPage;
      44             : 
      45             : private:
      46             :     OXUndoEnvironment*                  m_pUndoEnv;
      47             :     ::dbaui::DBSubComponentController*  m_pController;
      48             :     ::reportdesign::OReportDefinition*  m_pReportDefinition;
      49             : 
      50             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > createUnoModel() SAL_OVERRIDE;
      51             : 
      52             :     OReportModel( const OReportModel& );
      53             :     void operator=(const OReportModel& rSrcModel);
      54             : 
      55             : public:
      56             :     TYPEINFO_OVERRIDE();
      57             : 
      58             :     OReportModel(::reportdesign::OReportDefinition* _pReportDefinition);
      59             :     virtual ~OReportModel();
      60             : 
      61             :     virtual void        SetChanged(bool bFlg = true) SAL_OVERRIDE;
      62             :     virtual SdrPage*    AllocPage(bool bMasterPage) SAL_OVERRIDE;
      63             :     virtual SdrPage*    RemovePage(sal_uInt16 nPgNum) SAL_OVERRIDE;
      64             :     /** @returns the numbering type that is used to format page fields in drawing shapes */
      65             :     virtual SvxNumType  GetPageNumType() const SAL_OVERRIDE;
      66             : 
      67             :     OXUndoEnvironment&  GetUndoEnv();
      68             :     void                SetModified(sal_Bool _bModified);
      69             : 
      70           1 :     inline dbaui::DBSubComponentController* getController() const { return m_pController; }
      71           0 :     inline void attachController( dbaui::DBSubComponentController& _rController ) { m_pController = &_rController; }
      72             :     void detachController();
      73             : 
      74             :     OReportPage* createNewPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
      75             : 
      76             :     /** returns the page which belongs to a section
      77             :     *
      78             :     * @param _xSection
      79             :     * @return The page or <NULL/> when no page could be found.
      80             :     */
      81             :     OReportPage* getPage(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XSection >& _xSection);
      82             : 
      83             :     /// returns the XReportDefinition which the OReportModel belongs to
      84             :     ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >
      85             :                 getReportDefinition() const;
      86             : 
      87             :     ::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);
      88             : };
      89             : }
      90             : 
      91             : #endif
      92             : 
      93             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10