1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: undodraw.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sc.hxx"
36 //------------------------------------------------------------------
40 #define _SFXMULTISEL_HXX
49 //#define _ERRCODE_HXX
59 #define _SVMEMPOOL_HXX
64 //#define _DATETIME_HXX
70 #define _SV_MULTISEL_HXX
100 //#define _WRKWIN_HXX
102 //#define _FLOATWIN_HXX
103 //#define _DOCKWIN_HXX
105 //#define _SCRBAR_HXX
106 //#define _BUTTON_HXX
107 //#define _IMAGEBTN_HXX
111 //#define _COMBOBOX_HXX
112 //#define _LSTBOX_HXX
113 //#define _SELENG_HXX
117 //#define _MOREBTN_HXX
118 //#define _TOOLBOX_HXX
119 //#define _STATUS_HXX
120 //#define _DIALOG_HXX
121 //#define _MSGBOX_HXX
122 //#define _SYSDLG_HXX
124 //#define _PRNDLG_HXX
126 //#define _TABDLG_HXX
128 //#define _GDIMTF_HXX
137 #define _SI_NOSBXCONTROLS
138 #define _SI_NOOTHERFORMS
139 #define _SI_NOCONTROL
140 #define _SI_NOSBXCONTROLS
144 #define _SFXAPPWIN_HXX
145 #define _SFX_SAVEOPT_HXX
146 //#define _SFX_CHILDWIN_HXX
147 //#define _SFXCTRLITEM_HXX
148 #define _SFXPRNMON_HXX
150 #define _SFXMSGDESCR_HXX
151 #define _SFXMSGPOOL_HXX
152 #define _SFXFILEDLG_HXX
154 #define _SFXTBXCTRL_HXX
155 #define _SFXSTBITEM_HXX
156 #define _SFXMNUITEM_HXX
157 #define _SFXIMGMGR_HXX
158 #define _SFXTBXMGR_HXX
159 #define _SFXSTBMGR_HXX
160 #define _SFX_MINFITEM_HXX
161 #define _SFXEVENT_HXX
163 // INCLUDE ---------------------------------------------------------------
165 #include <svx/svdundo.hxx>
167 #include "undodraw.hxx"
171 // -----------------------------------------------------------------------
173 TYPEINIT1(ScUndoDraw
, SfxUndoAction
);
175 // -----------------------------------------------------------------------
177 ScUndoDraw::ScUndoDraw( SfxUndoAction
* pUndo
, ScDocShell
* pDocSh
) :
183 __EXPORT
ScUndoDraw::~ScUndoDraw()
188 void ScUndoDraw::ForgetDrawUndo()
190 pDrawUndo
= NULL
; // nicht loeschen (Draw-Undo muss dann von aussen gemerkt werden)
193 String __EXPORT
ScUndoDraw::GetComment() const
196 return pDrawUndo
->GetComment();
201 String __EXPORT
ScUndoDraw::GetRepeatComment(SfxRepeatTarget
& rTarget
) const
204 return pDrawUndo
->GetRepeatComment(rTarget
);
209 USHORT __EXPORT
ScUndoDraw::GetId() const
212 return pDrawUndo
->GetId();
217 BOOL __EXPORT
ScUndoDraw::IsLinked()
220 return pDrawUndo
->IsLinked();
225 void __EXPORT
ScUndoDraw::SetLinked( BOOL bIsLinked
)
228 pDrawUndo
->SetLinked(bIsLinked
);
231 BOOL __EXPORT
ScUndoDraw::Merge( SfxUndoAction
* pNextAction
)
234 return pDrawUndo
->Merge(pNextAction
);
239 void __EXPORT
ScUndoDraw::Undo()
244 pDocShell
->SetDrawModified();
248 void __EXPORT
ScUndoDraw::Redo()
253 pDocShell
->SetDrawModified();
257 void __EXPORT
ScUndoDraw::Repeat(SfxRepeatTarget
& rTarget
)
260 pDrawUndo
->Repeat(rTarget
);
263 BOOL __EXPORT
ScUndoDraw::CanRepeat(SfxRepeatTarget
& rTarget
) const
266 return pDrawUndo
->CanRepeat(rTarget
);