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 #ifndef REPORT_UNDOFACTORY_HXX_INCLUDED 24 #define REPORT_UNDOFACTORY_HXX_INCLUDED 25 26 #include <svx/svdundo.hxx> 27 #include <memory> 28 #include "ModuleHelper.hxx" 29 30 namespace rptui 31 { 32 class OReportUndoFactory : public SdrUndoFactory 33 { 34 OModuleClient m_aModuleClient; 35 ::std::auto_ptr<SdrUndoFactory> m_pUndoFactory; 36 37 OReportUndoFactory(const OReportUndoFactory&); 38 OReportUndoFactory& operator=(const OReportUndoFactory&); 39 public: 40 OReportUndoFactory(); 41 virtual ~OReportUndoFactory(); 42 43 // shapes 44 virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject ); 45 virtual SdrUndoAction* CreateUndoMoveObject( SdrObject& rObject, const Size& rDist ); 46 virtual SdrUndoAction* CreateUndoGeoObject( SdrObject& rObject ); 47 virtual SdrUndoAction* CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1 = false, bool bSaveText = false ); 48 virtual SdrUndoAction* CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect = false); 49 virtual SdrUndoAction* CreateUndoInsertObject( SdrObject& rObject, bool bOrdNumDirect = false); 50 virtual SdrUndoAction* CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect = false); 51 virtual SdrUndoAction* CreateUndoNewObject( SdrObject& rObject, bool bOrdNumDirect = false); 52 virtual SdrUndoAction* CreateUndoCopyObject( SdrObject& rObject, bool bOrdNumDirect = false); 53 54 virtual SdrUndoAction* CreateUndoObjectOrdNum( SdrObject& rObject, sal_uInt32 nOldOrdNum1, sal_uInt32 nNewOrdNum1); 55 56 virtual SdrUndoAction* CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect = false ); 57 virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ); 58 virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText ); 59 60 // layer 61 virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); 62 virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); 63 virtual SdrUndoAction* CreateUndoMoveLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel, sal_uInt16 nNeuPos1); 64 65 // page 66 virtual SdrUndoAction* CreateUndoDeletePage(SdrPage& rPage); 67 virtual SdrUndoAction* CreateUndoNewPage(SdrPage& rPage); 68 virtual SdrUndoAction* CreateUndoCopyPage(SdrPage& rPage); 69 virtual SdrUndoAction* CreateUndoSetPageNum(SdrPage& rNewPg, sal_uInt16 nOldPageNum1, sal_uInt16 nNewPageNum1); 70 71 // master page 72 virtual SdrUndoAction* CreateUndoPageRemoveMasterPage(SdrPage& rChangedPage); 73 virtual SdrUndoAction* CreateUndoPageChangeMasterPage(SdrPage& rChangedPage); 74 75 }; 76 //============================================================================== 77 } // rptui 78 //============================================================================== 79 80 #endif // REPORT_UNDOFACTORY_HXX_INCLUDED 81 82