LCOV - code coverage report
Current view: top level - chart2/source/controller/inc - DrawViewWrapper.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 2 0.0 %
Date: 2014-04-14 Functions: 0 2 0.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             : #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
      20             : #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DRAWVIEWWRAPPER_HXX
      21             : 
      22             : #include <svx/view3d.hxx>
      23             : #include <com/sun/star/drawing/XShape.hpp>
      24             : #include <com/sun/star/frame/XModel.hpp>
      25             : 
      26             : class SdrModel;
      27             : 
      28             : namespace chart
      29             : {
      30             : 
      31             : /** The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes.
      32             : Another task is to hide functionality we do not need, for example more than one page.
      33             : */
      34             : 
      35           0 : class MarkHandleProvider
      36             : {
      37             : public:
      38             :     virtual bool getMarkHandles( SdrHdlList& rHdlList ) =0;
      39             :     virtual bool getFrameDragSingles() =0;
      40             : 
      41             : protected:
      42           0 :     ~MarkHandleProvider() {}
      43             : };
      44             : 
      45             : class DrawViewWrapper : public E3dView
      46             : {
      47             : public:
      48             :     DrawViewWrapper(SdrModel* pModel, OutputDevice* pOut, bool bPaintPageForEditMode);
      49             :     virtual ~DrawViewWrapper();
      50             : 
      51             :     //triggers the use of an updated first page
      52             :     void    ReInit();
      53             : 
      54             :     /// tries to get an OutputDevice from the XParent of the model to use as reference device
      55             :     void attachParentReferenceDevice(
      56             :         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel );
      57             : 
      58             :     //fill list of selection handles 'aHdl'
      59             :     virtual void SetMarkHandles() SAL_OVERRIDE;
      60             : 
      61             :     SdrPageView*    GetPageView() const;
      62             : 
      63             :     SdrObject* getHitObject( const Point& rPnt ) const;
      64             :     //sal_Bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uLong nOptions, SdrObject** ppRootObj, sal_uLong* pnMarkNum=NULL, sal_uInt16* pnPassNum=NULL) const;
      65             :     //sal_Bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uLong nOptions=0) const;
      66             :     //sal_Bool PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uLong nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); }
      67             : 
      68             :     //void MarkObj(SdrObject* pObj, SdrPageView* pPV, sal_Bool bUnmark=sal_False, sal_Bool bImpNoSetMarkHdl=sal_False);
      69             :     void MarkObject( SdrObject* pObj );
      70             : 
      71             :     //pMarkHandleProvider can be NULL; ownership is not taken
      72             :     void setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider );
      73             :     void CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0) SAL_OVERRIDE;
      74             : 
      75             :     SdrObject*   getSelectedObject() const;
      76             :     SdrObject*   getTextEditObject() const;
      77             :     SdrOutliner* getOutliner() const;
      78             : 
      79             :     SfxItemSet   getPositionAndSizeItemSetFromMarkedObject() const;
      80             : 
      81             :     SdrObject* getNamedSdrObject( const OUString& rName ) const;
      82             :     bool IsObjectHit( SdrObject* pObj, const Point& rPnt ) const;
      83             : 
      84             :     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) SAL_OVERRIDE;
      85             : 
      86             :     static SdrObject* getSdrObject( const ::com::sun::star::uno::Reference<
      87             :                     ::com::sun::star::drawing::XShape >& xShape );
      88             : 
      89             : private:
      90             :     mutable MarkHandleProvider*     m_pMarkHandleProvider;
      91             : 
      92             :     ::std::auto_ptr< SdrOutliner >  m_apOutliner;
      93             : 
      94             :     // #i79965# scroll back view when ending text edit
      95             :     bool m_bRestoreMapMode;
      96             :     MapMode m_aMapModeToRestore;
      97             : };
      98             : 
      99             : } //namespace chart
     100             : #endif
     101             : 
     102             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10