LCOV - code coverage report
Current view: top level - sw/inc - unocrsr.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 12 0.0 %
Date: 2014-04-14 Functions: 0 9 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_SW_INC_UNOCRSR_HXX
      20             : #define INCLUDED_SW_INC_UNOCRSR_HXX
      21             : #include <swcrsr.hxx>
      22             : #include <calbck.hxx>
      23             : 
      24             : class SwUnoCrsr : public virtual SwCursor, public SwModify
      25             : {
      26             :     sal_Bool bRemainInSection : 1;
      27             :     sal_Bool bSkipOverHiddenSections : 1;
      28             :     sal_Bool bSkipOverProtectSections : 1;
      29             : 
      30             : public:
      31             :     SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
      32             :     virtual ~SwUnoCrsr();
      33             : 
      34             : protected:
      35             : 
      36             :     virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
      37             :         sal_Bool & io_rbLeft, sal_Bool bVisualAllowed, sal_Bool bInsertCrsr) SAL_OVERRIDE;
      38             :     virtual void DoSetBidiLevelUpDown() SAL_OVERRIDE;
      39             : 
      40             : public:
      41             : 
      42             :     // Does a selection of content exist in table?
      43             :     // Return value indicates if the cursor remains at its old position.
      44             :     virtual sal_Bool IsSelOvr( int eFlags =
      45             :                                 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
      46             :                                   nsSwCursorSelOverFlags::SELOVER_TOGGLE |
      47             :                                   nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )) SAL_OVERRIDE;
      48             : 
      49             :     virtual bool IsReadOnlyAvailable() const SAL_OVERRIDE;
      50             : 
      51           0 :     sal_Bool IsRemainInSection() const          { return bRemainInSection; }
      52           0 :     void SetRemainInSection( sal_Bool bFlag )   { bRemainInSection = bFlag; }
      53             : 
      54           0 :     virtual sal_Bool IsSkipOverProtectSections() const SAL_OVERRIDE
      55           0 :                                     { return bSkipOverProtectSections; }
      56           0 :     void SetSkipOverProtectSections( sal_Bool bFlag )
      57           0 :                                     { bSkipOverProtectSections = bFlag; }
      58             : 
      59           0 :     virtual sal_Bool IsSkipOverHiddenSections() const SAL_OVERRIDE
      60           0 :                                     { return bSkipOverHiddenSections; }
      61           0 :     void SetSkipOverHiddenSections( sal_Bool bFlag )
      62           0 :                                     { bSkipOverHiddenSections = bFlag; }
      63             : 
      64             :     // make copy of cursor
      65             :     virtual SwUnoCrsr * Clone() const;
      66             : 
      67           0 :     DECL_FIXEDMEMPOOL_NEWDEL( SwUnoCrsr )
      68             : };
      69             : 
      70             : class SwUnoTableCrsr : public virtual SwUnoCrsr, public virtual SwTableCursor
      71             : {
      72             :     // The selection has the same order as the table boxes, i.e.
      73             :     // if something is deleted from the one array at a certain position
      74             :     // it has also to be deleted from the other!
      75             :     SwCursor aTblSel;
      76             : 
      77             :     using SwTableCursor::MakeBoxSels;
      78             : 
      79             : public:
      80             :     SwUnoTableCrsr( const SwPosition& rPos );
      81             :     virtual ~SwUnoTableCrsr();
      82             : 
      83             :     // Does a selection of content exist in table?
      84             :     // Return value indicates if the cursor remains at its old position.
      85             :     virtual sal_Bool IsSelOvr( int eFlags =
      86             :                                 ( nsSwCursorSelOverFlags::SELOVER_CHECKNODESSECTION |
      87             :                                   nsSwCursorSelOverFlags::SELOVER_TOGGLE |
      88             :                                   nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )) SAL_OVERRIDE;
      89             : 
      90             :     virtual SwUnoTableCrsr * Clone() const SAL_OVERRIDE;
      91             : 
      92             :     void MakeBoxSels();
      93             : 
      94           0 :           SwCursor& GetSelRing()            { return aTblSel; }
      95             :     const SwCursor& GetSelRing() const      { return aTblSel; }
      96             : };
      97             : 
      98             : #endif
      99             : 
     100             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10