1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _EDITUND2_HXX 25 #define _EDITUND2_HXX 26 27 #include "editeng/editengdllapi.h" 28 #include <svl/undo.hxx> 29 30 class ImpEditEngine; 31 32 class EDITENG_DLLPRIVATE EditUndoManager : public SfxUndoManager 33 { 34 using SfxUndoManager::Undo; 35 using SfxUndoManager::Redo; 36 37 private: 38 ImpEditEngine* pImpEE; 39 public: 40 EditUndoManager( ImpEditEngine* pImpEE ); 41 42 virtual sal_Bool Undo(); 43 virtual sal_Bool Redo(); 44 }; 45 46 // ----------------------------------------------------------------------- 47 // EditUndo 48 // ------------------------------------------------------------------------ 49 class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction 50 { 51 private: 52 sal_uInt16 nId; 53 ImpEditEngine* pImpEE; 54 55 public: 56 TYPEINFO(); 57 EditUndo( sal_uInt16 nI, ImpEditEngine* pImpEE ); 58 virtual ~EditUndo(); 59 60 ImpEditEngine* GetImpEditEngine() const { return pImpEE; } 61 62 virtual void Undo() = 0; 63 virtual void Redo() = 0; 64 65 virtual sal_Bool CanRepeat(SfxRepeatTarget&) const; 66 virtual String GetComment() const; 67 virtual sal_uInt16 GetId() const; 68 }; 69 70 #endif // _EDITUND2_HXX 71 72 73