bump product version to 4.2.0.1
[LibreOffice.git] / include / svx / e3dundo.hxx
blob27e50dd49d3f2c78491a127d08b329e9f3769c5d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_E3DUNDO_HXX
21 #define INCLUDED_SVX_E3DUNDO_HXX
23 #include <svx/svdundo.hxx>
24 #include <svx/scene3d.hxx>
25 #include <svx/svxdllapi.h>
27 /************************************************************************\
29 |* Base class for all 3D undo actions.
31 \************************************************************************/
32 class E3dUndoAction : public SdrUndoAction
35 protected :
36 E3dObject *pMy3DObj;
38 public:
39 TYPEINFO();
40 E3dUndoAction (SdrModel *pModel,
41 E3dObject *p3DObj) :
42 SdrUndoAction (*pModel),
43 pMy3DObj (p3DObj)
47 virtual ~E3dUndoAction ();
49 virtual bool CanRepeat(SfxRepeatTarget&) const;
52 /************************************************************************\
54 |* Undo for 3D rotation through the rotation matrices
56 \************************************************************************/
57 class E3dRotateUndoAction : public E3dUndoAction
59 basegfx::B3DHomMatrix aMyOldRotation;
60 basegfx::B3DHomMatrix aMyNewRotation;
62 public:
63 TYPEINFO();
64 E3dRotateUndoAction (SdrModel *pModel,
65 E3dObject *p3DObj,
66 const basegfx::B3DHomMatrix &aOldRotation,
67 const basegfx::B3DHomMatrix &aNewRotation) :
68 E3dUndoAction (pModel, p3DObj),
69 aMyOldRotation (aOldRotation),
70 aMyNewRotation (aNewRotation)
74 virtual ~E3dRotateUndoAction ();
76 virtual void Undo();
77 virtual void Redo();
81 /************************************************************************\
83 |* Undo for 3D attributes (implemented using Set3DAttributes())
85 \************************************************************************/
86 class SVX_DLLPUBLIC E3dAttributesUndoAction : public SdrUndoAction
88 using SdrUndoAction::Repeat;
90 SdrObject* pObject;
92 const SfxItemSet aNewSet;
93 const SfxItemSet aOldSet;
95 public:
96 TYPEINFO();
97 E3dAttributesUndoAction( SdrModel &rModel,
98 E3dObject* pInObject,
99 const SfxItemSet& rNewSet,
100 const SfxItemSet& rOldSet);
102 virtual ~E3dAttributesUndoAction();
104 virtual bool CanRepeat(SfxRepeatTarget& rView) const;
105 virtual void Undo();
106 virtual void Redo();
107 virtual void Repeat();
110 #endif // INCLUDED_SVX_E3DUNDO_HXX
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */