LCOV - code coverage report
Current view: top level - sw/source/core/inc - dview.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 3 66.7 %
Date: 2012-08-25 Functions: 3 4 75.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef _DVIEW_HXX
      29                 :            : #define _DVIEW_HXX
      30                 :            : 
      31                 :            : #include <svx/fmview.hxx>
      32                 :            : 
      33                 :            : class OutputDevice;
      34                 :            : class SwViewImp;
      35                 :            : class SwFrm;
      36                 :            : class SwFlyFrm;
      37                 :            : class SwAnchoredObject;
      38                 :            : 
      39         [ -  + ]:       2500 : class SwDrawView : public FmFormView
      40                 :            : {
      41                 :            :     Point           aAnchorPoint;       // anchor position
      42                 :            :     SwViewImp      &rImp;               // a view is always part of a shell
      43                 :            : 
      44                 :            :     const SwFrm *CalcAnchor();
      45                 :            : 
      46                 :            :     /** determine maximal order number for a 'child' object of given 'parent' object
      47                 :            : 
      48                 :            :         The maximal order number will be determined on the current object
      49                 :            :         order hierarchy. It's the order number of the 'child' object with the
      50                 :            :         highest order number. The calculation can be influenced by parameter
      51                 :            :         <_pExclChildObj> - this 'child' object won't be considered.
      52                 :            : 
      53                 :            :         @param <_rParentObj>
      54                 :            :         input parameter - 'parent' object, for which the maximal order number
      55                 :            :         for its 'children' will be determined.
      56                 :            : 
      57                 :            :         @param <_pExclChildObj>
      58                 :            :         optional input parameter - 'child' object, which will not be considered
      59                 :            :         on the calculation of the maximal order number
      60                 :            :     */
      61                 :            :     sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
      62                 :            :                                    const SdrObject* _pExclChildObj = 0L ) const;
      63                 :            : 
      64                 :            :     /** method to move 'repeated' objects of the given moved object to the
      65                 :            :         according level
      66                 :            : 
      67                 :            :         @param <_rMovedAnchoredObj>
      68                 :            :         input parameter - moved object, for which the 'repeated' ones have also
      69                 :            :         to be moved.
      70                 :            : 
      71                 :            :         @param <_rMovedChildrenObjs>
      72                 :            :         input parameter - data collection of moved 'child' objects - the 'repeated'
      73                 :            :         ones of these 'children' will also been moved.
      74                 :            :     */
      75                 :            :     void _MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
      76                 :            :                             const std::vector<SdrObject*>& _rMovedChildObjs ) const;
      77                 :            : 
      78                 :            : protected:
      79                 :            :     // add custom handles (used by other apps, e.g. AnchorPos)
      80                 :            :     virtual void AddCustomHdl();
      81                 :            : 
      82                 :            :     // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
      83                 :            :     using FmFormView::CheckSingleSdrObjectHit;
      84                 :            :     virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
      85                 :            : 
      86                 :            : public:
      87                 :            :     SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
      88                 :            : 
      89                 :            :     // from base class
      90                 :            :     virtual SdrObject*   GetMaxToTopObj(SdrObject* pObj) const;
      91                 :            :     virtual SdrObject*   GetMaxToBtmObj(SdrObject* pObj) const;
      92                 :            :     virtual void         MarkListHasChanged();
      93                 :            : 
      94                 :            :     // #i7672#
      95                 :            :     // Overload to resue edit background color in active text edit view (OutlinerView)
      96                 :            :     virtual void ModelHasChanged();
      97                 :            : 
      98                 :            :     virtual void         ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
      99                 :            :                                             sal_uLong nNewPos );
     100                 :            :     virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
     101                 :            :     virtual void MakeVisible( const Rectangle&, Window &rWin );
     102                 :            :     virtual void CheckPossibilities();
     103                 :            : 
     104                 :            :     const SwViewImp &Imp() const { return rImp; }
     105                 :       1339 :           SwViewImp &Imp()       { return rImp; }
     106                 :            : 
     107                 :            :     // anchor and Xor for dragging
     108                 :            :     void ShowDragAnchor();
     109                 :            : 
     110                 :            :     virtual void DeleteMarked();
     111                 :            : 
     112                 :          0 :     inline void ValidateMarkList() { FlushComeBackTimer(); }
     113                 :            : 
     114                 :            :     // #i99665#
     115                 :            :     sal_Bool IsAntiAliasing() const;
     116                 :            : 
     117                 :            :     // method to replace marked/selected <SwDrawVirtObj>
     118                 :            :     // by its reference object for delete of selection and group selection
     119                 :            :     static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
     120                 :            : };
     121                 :            : 
     122                 :            : #endif
     123                 :            : 
     124                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10