LCOV - code coverage report
Current view: top level - libreoffice/sw/source/core/inc - dview.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 2 3 66.7 %
Date: 2012-12-27 Functions: 3 4 75.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 _DVIEW_HXX
      20             : #define _DVIEW_HXX
      21             : 
      22             : #include <svx/fmview.hxx>
      23             : 
      24             : class OutputDevice;
      25             : class SwViewImp;
      26             : class SwFrm;
      27             : class SwFlyFrm;
      28             : class SwAnchoredObject;
      29             : 
      30         130 : class SwDrawView : public FmFormView
      31             : {
      32             :     Point           aAnchorPoint;       // anchor position
      33             :     SwViewImp      &rImp;               // a view is always part of a shell
      34             : 
      35             :     const SwFrm *CalcAnchor();
      36             : 
      37             :     /** determine maximal order number for a 'child' object of given 'parent' object
      38             : 
      39             :         The maximal order number will be determined on the current object
      40             :         order hierarchy. It's the order number of the 'child' object with the
      41             :         highest order number. The calculation can be influenced by parameter
      42             :         <_pExclChildObj> - this 'child' object won't be considered.
      43             : 
      44             :         @param <_rParentObj>
      45             :         input parameter - 'parent' object, for which the maximal order number
      46             :         for its 'children' will be determined.
      47             : 
      48             :         @param <_pExclChildObj>
      49             :         optional input parameter - 'child' object, which will not be considered
      50             :         on the calculation of the maximal order number
      51             :     */
      52             :     sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
      53             :                                    const SdrObject* _pExclChildObj = 0L ) const;
      54             : 
      55             :     /** method to move 'repeated' objects of the given moved object to the
      56             :         according level
      57             : 
      58             :         @param <_rMovedAnchoredObj>
      59             :         input parameter - moved object, for which the 'repeated' ones have also
      60             :         to be moved.
      61             : 
      62             :         @param <_rMovedChildrenObjs>
      63             :         input parameter - data collection of moved 'child' objects - the 'repeated'
      64             :         ones of these 'children' will also been moved.
      65             :     */
      66             :     void _MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
      67             :                             const std::vector<SdrObject*>& _rMovedChildObjs ) const;
      68             : 
      69             : protected:
      70             :     // add custom handles (used by other apps, e.g. AnchorPos)
      71             :     virtual void AddCustomHdl();
      72             : 
      73             :     // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
      74             :     using FmFormView::CheckSingleSdrObjectHit;
      75             :     virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const;
      76             : 
      77             : public:
      78             :     SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice* pOutDev=NULL );
      79             : 
      80             :     // from base class
      81             :     virtual SdrObject*   GetMaxToTopObj(SdrObject* pObj) const;
      82             :     virtual SdrObject*   GetMaxToBtmObj(SdrObject* pObj) const;
      83             :     virtual void         MarkListHasChanged();
      84             : 
      85             :     // #i7672#
      86             :     // Overload to resue edit background color in active text edit view (OutlinerView)
      87             :     virtual void ModelHasChanged();
      88             : 
      89             :     virtual void         ObjOrderChanged( SdrObject* pObj, sal_uLong nOldPos,
      90             :                                             sal_uLong nNewPos );
      91             :     virtual sal_Bool TakeDragLimit(SdrDragMode eMode, Rectangle& rRect) const;
      92             :     virtual void MakeVisible( const Rectangle&, Window &rWin );
      93             :     virtual void CheckPossibilities();
      94             : 
      95             :     const SwViewImp &Imp() const { return rImp; }
      96         238 :           SwViewImp &Imp()       { return rImp; }
      97             : 
      98             :     // anchor and Xor for dragging
      99             :     void ShowDragAnchor();
     100             : 
     101             :     virtual void DeleteMarked();
     102             : 
     103           0 :     inline void ValidateMarkList() { FlushComeBackTimer(); }
     104             : 
     105             :     // #i99665#
     106             :     sal_Bool IsAntiAliasing() const;
     107             : 
     108             :     // method to replace marked/selected <SwDrawVirtObj>
     109             :     // by its reference object for delete of selection and group selection
     110             :     static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView );
     111             : };
     112             : 
     113             : #endif
     114             : 
     115             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10