LCOV - code coverage report
Current view: top level - sd/inc/undo - undoobjects.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 8 0.0 %
Date: 2014-04-14 Functions: 0 16 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             : 
      20             : #ifndef INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
      21             : #define INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
      22             : 
      23             : #include <svx/svdundo.hxx>
      24             : #include <svx/svdpage.hxx>
      25             : #include <svx/svdobj.hxx>
      26             : #include "pres.hxx"
      27             : 
      28             : class SdrObjUserCall;
      29             : class SdPage;
      30             : 
      31             : namespace sd
      32             : {
      33             : 
      34             : class UndoRemovePresObjectImpl
      35             : {
      36             : protected:
      37             :     UndoRemovePresObjectImpl( SdrObject& rObject );
      38             :     virtual ~UndoRemovePresObjectImpl();
      39             : 
      40             :     virtual void Undo();
      41             :     virtual void Redo();
      42             : 
      43             : private:
      44             :     SfxUndoAction*  mpUndoUsercall;
      45             :     SfxUndoAction*  mpUndoAnimation;
      46             :     SfxUndoAction*  mpUndoPresObj;
      47             : };
      48             : 
      49           0 : class UndoRemoveObject : public SdrUndoRemoveObj, public UndoRemovePresObjectImpl
      50             : {
      51             : public:
      52             :     UndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect );
      53             : 
      54             :     virtual void Undo() SAL_OVERRIDE;
      55             :     virtual void Redo() SAL_OVERRIDE;
      56             : 
      57             : private:
      58             :     SdrObjectWeakRef mxSdrObject;
      59             : };
      60             : 
      61           0 : class UndoDeleteObject : public SdrUndoDelObj, public UndoRemovePresObjectImpl
      62             : {
      63             : public:
      64             :     UndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect );
      65             : 
      66             :     virtual void Undo() SAL_OVERRIDE;
      67             :     virtual void Redo() SAL_OVERRIDE;
      68             : 
      69             : private:
      70             :     SdrObjectWeakRef mxSdrObject;
      71             : };
      72             : 
      73             : 
      74           0 : class UndoReplaceObject : public SdrUndoReplaceObj, public UndoRemovePresObjectImpl
      75             : {
      76             : public:
      77             :     UndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect );
      78             : 
      79             :     virtual void Undo() SAL_OVERRIDE;
      80             :     virtual void Redo() SAL_OVERRIDE;
      81             : 
      82             : private:
      83             :     SdrObjectWeakRef mxSdrObject;
      84             : };
      85             : 
      86             : 
      87             : class UndoObjectSetText : public SdrUndoObjSetText
      88             : {
      89             : public:
      90             :     UndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
      91             :     virtual ~UndoObjectSetText();
      92             : 
      93             :     virtual void Undo() SAL_OVERRIDE;
      94             :     virtual void Redo() SAL_OVERRIDE;
      95             : 
      96             : private:
      97             :     SfxUndoAction* mpUndoAnimation;
      98             :     bool            mbNewEmptyPresObj;
      99             :     SdrObjectWeakRef mxSdrObject;
     100             : };
     101             : 
     102             : 
     103             : // Undo for SdrObject::SetUserCall()
     104             : 
     105           0 : class UndoObjectUserCall : public SdrUndoObj
     106             : {
     107             : public:
     108             :     UndoObjectUserCall(SdrObject& rNewObj);
     109             : 
     110             :     virtual void Undo() SAL_OVERRIDE;
     111             :     virtual void Redo() SAL_OVERRIDE;
     112             : 
     113             : protected:
     114             :     SdrObjUserCall* mpOldUserCall;
     115             :     SdrObjUserCall* mpNewUserCall;
     116             :     SdrObjectWeakRef mxSdrObject;
     117             : };
     118             : 
     119             : 
     120             : // Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj()
     121             : 
     122           0 : class UndoObjectPresentationKind : public SdrUndoObj
     123             : {
     124             : public:
     125             :     UndoObjectPresentationKind(SdrObject& rObject);
     126             : 
     127             :     virtual void Undo() SAL_OVERRIDE;
     128             :     virtual void Redo() SAL_OVERRIDE;
     129             : 
     130             : protected:
     131             :     PresObjKind meOldKind;
     132             :     PresObjKind meNewKind;
     133             :     SdrPageWeakRef mxPage;
     134             :     SdrObjectWeakRef mxSdrObject;
     135             : };
     136             : 
     137             : 
     138             : // Restores correct position and size for presentation shapes with user call
     139             : // on undo
     140             : 
     141           0 : class UndoAutoLayoutPosAndSize : public SfxUndoAction
     142             : {
     143             : public:
     144             :     UndoAutoLayoutPosAndSize( SdPage& rPage );
     145             : 
     146             :     virtual void Undo() SAL_OVERRIDE;
     147             :     virtual void Redo() SAL_OVERRIDE;
     148             : 
     149             : protected:
     150             :     SdrPageWeakRef mxPage;
     151             : };
     152             : 
     153             : 
     154           0 : class UndoGeoObject : public SdrUndoGeoObj
     155             : {
     156             : public:
     157             :     UndoGeoObject( SdrObject& rNewObj );
     158             : 
     159             :     virtual void Undo() SAL_OVERRIDE;
     160             :     virtual void Redo() SAL_OVERRIDE;
     161             : 
     162             : protected:
     163             :     SdrPageWeakRef mxPage;
     164             :     SdrObjectWeakRef mxSdrObject;
     165             : };
     166             : 
     167             : 
     168           0 : class UndoAttrObject : public SdrUndoAttrObj
     169             : {
     170             : public:
     171             :     UndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText );
     172             : 
     173             :     virtual void Undo() SAL_OVERRIDE;
     174             :     virtual void Redo() SAL_OVERRIDE;
     175             : 
     176             : protected:
     177             :     SdrPageWeakRef mxPage;
     178             :     SdrObjectWeakRef mxSdrObject;
     179             : };
     180             : 
     181             : } // namespace sd
     182             : 
     183             : #endif // INCLUDED_SD_INC_UNDO_UNDOOBJECTS_HXX
     184             : 
     185             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10