LCOV - code coverage report
Current view: top level - chart2/source/controller/inc - DrawViewWrapper.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 2 100.0 %
Date: 2012-08-25 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

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

Generated by: LCOV version 1.10