1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
40 E3dUndoAction (SdrModel
*pModel
,
42 SdrUndoAction (*pModel
),
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
;
64 E3dRotateUndoAction (SdrModel
*pModel
,
66 const basegfx::B3DHomMatrix
&aOldRotation
,
67 const basegfx::B3DHomMatrix
&aNewRotation
) :
68 E3dUndoAction (pModel
, p3DObj
),
69 aMyOldRotation (aOldRotation
),
70 aMyNewRotation (aNewRotation
)
74 virtual ~E3dRotateUndoAction ();
81 /************************************************************************\
83 |* Undo for 3D attributes (implemented using Set3DAttributes())
85 \************************************************************************/
86 class SVX_DLLPUBLIC E3dAttributesUndoAction
: public SdrUndoAction
88 using SdrUndoAction::Repeat
;
92 const SfxItemSet aNewSet
;
93 const SfxItemSet aOldSet
;
97 E3dAttributesUndoAction( SdrModel
&rModel
,
99 const SfxItemSet
& rNewSet
,
100 const SfxItemSet
& rOldSet
);
102 virtual ~E3dAttributesUndoAction();
104 virtual bool CanRepeat(SfxRepeatTarget
& rView
) const;
107 virtual void Repeat();
110 #endif // INCLUDED_SVX_E3DUNDO_HXX
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */