LCOV - code coverage report
Current view: top level - editeng/source/outliner - outlundo.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 4 6 66.7 %
Date: 2014-11-03 Functions: 7 11 63.6 %
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             : 
      20             : #ifndef INCLUDED_EDITENG_SOURCE_OUTLINER_OUTLUNDO_HXX
      21             : #define INCLUDED_EDITENG_SOURCE_OUTLINER_OUTLUNDO_HXX
      22             : 
      23             : #include <editeng/outliner.hxx>
      24             : #include <editeng/editdata.hxx>
      25             : #include <editeng/editund2.hxx>
      26             : 
      27         466 : class OutlinerUndoBase : public EditUndo
      28             : {
      29             : private:
      30             :     Outliner*   mpOutliner;
      31             : 
      32             : public:
      33             :                 OutlinerUndoBase( sal_uInt16 nId, Outliner* pOutliner );
      34             : 
      35           0 :     Outliner*   GetOutliner() const { return mpOutliner; }
      36             : };
      37             : 
      38           0 : class OutlinerUndoChangeParaFlags : public OutlinerUndoBase
      39             : {
      40             : private:
      41             :     sal_Int32       mnPara;
      42             :     sal_uInt16      mnOldFlags;
      43             :     sal_uInt16      mnNewFlags;
      44             : 
      45             :     void ImplChangeFlags( sal_uInt16 nFlags );
      46             : 
      47             : public:
      48             :     OutlinerUndoChangeParaFlags( Outliner* pOutliner, sal_Int32 nPara, sal_uInt16 nOldDepth, sal_uInt16 nNewDepth );
      49             : 
      50             :     virtual void    Undo() SAL_OVERRIDE;
      51             :     virtual void    Redo() SAL_OVERRIDE;
      52             : };
      53             : 
      54          16 : class OutlinerUndoChangeParaNumberingRestart : public OutlinerUndoBase
      55             : {
      56             : private:
      57             :     sal_Int32       mnPara;
      58             : 
      59             :     struct ParaRestartData
      60             :     {
      61             :         sal_Int16       mnNumberingStartValue;
      62             :         bool        mbParaIsNumberingRestart;
      63             :     };
      64             : 
      65             :     ParaRestartData maUndoData;
      66             :     ParaRestartData maRedoData;
      67             : 
      68             :     void ImplApplyData( const ParaRestartData& rData );
      69             : public:
      70             :     OutlinerUndoChangeParaNumberingRestart( Outliner* pOutliner, sal_Int32 nPara,
      71             :         sal_Int16 nOldNumberingStartValue, sal_Int16 mnNewNumberingStartValue,
      72             :         bool  nOldbParaIsNumberingRestart, bool nbNewParaIsNumberingRestart );
      73             : 
      74             :     virtual void    Undo() SAL_OVERRIDE;
      75             :     virtual void    Redo() SAL_OVERRIDE;
      76             : };
      77             : 
      78         396 : class OutlinerUndoChangeDepth : public OutlinerUndoBase
      79             : {
      80             :     using SfxUndoAction::Repeat;
      81             : private:
      82             :     sal_Int32       mnPara;
      83             :     sal_Int16       mnOldDepth;
      84             :     sal_Int16       mnNewDepth;
      85             : 
      86             : public:
      87             :                     OutlinerUndoChangeDepth( Outliner* pOutliner, sal_Int32 nPara, sal_Int16 nOldDepth, sal_Int16 nNewDepth );
      88             : 
      89             :     virtual void    Undo() SAL_OVERRIDE;
      90             :     virtual void    Redo() SAL_OVERRIDE;
      91             :     virtual void    Repeat();
      92             : };
      93             : 
      94             : // Help-Undo: If it does not exist an OutlinerUndoAction for a certain action
      95             : // because this is handled by the EditEngine, but for example the bullet has
      96             : // to be recalculated.
      97         520 : class OutlinerUndoCheckPara : public OutlinerUndoBase
      98             : {
      99             :     using SfxUndoAction::Repeat;
     100             : private:
     101             :     sal_Int32       mnPara;
     102             : 
     103             : public:
     104             :                     OutlinerUndoCheckPara( Outliner* pOutliner, sal_Int32 nPara );
     105             : 
     106             :     virtual void    Undo() SAL_OVERRIDE;
     107             :     virtual void    Redo() SAL_OVERRIDE;
     108             :     virtual void    Repeat();
     109             : };
     110             : 
     111             : 
     112             : 
     113             : 
     114             : 
     115             : 
     116             : class OLUndoExpand : public EditUndo
     117             : {
     118             :     using SfxUndoAction::Repeat;
     119             :     void Restore( bool bUndo );
     120             : public:
     121             :     OLUndoExpand( Outliner* pOut, sal_uInt16 nId );
     122             :     virtual ~OLUndoExpand();
     123             :     virtual void Undo() SAL_OVERRIDE;
     124             :     virtual void Redo() SAL_OVERRIDE;
     125             :     virtual void Repeat();
     126             : 
     127             :     sal_uInt16* pParas;  // 0 == nCount contains paragraph number
     128             :     Outliner* pOutliner;
     129             :     sal_Int32 nCount;
     130             : };
     131             : 
     132             : #endif
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10