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: TableUndo.hxx,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 ************************************************************************/
30 #ifndef DBAUI_TABLEUNDO_HXX
31 #define DBAUI_TABLEUNDO_HXX
33 #ifndef DBAUI_GENERALUNDO_HXX
34 #include "GeneralUndo.hxx"
36 #ifndef _SV_MULTISEL_HXX
37 #include <tools/multisel.hxx>
42 #ifndef _COM_SUN_STAR_UNO_ANY_H_
43 #include <com/sun/star/uno/Any.h>
45 #ifndef DBAUI_TYPEINFO_HXX
46 #include "TypeInfo.hxx"
51 //========================================================================
54 class OTableDesignUndoAct
: public OCommentUndoAction
57 OTableRowView
* m_pTabDgnCtrl
;
63 OTableDesignUndoAct( OTableRowView
* pOwner
,USHORT nCommentID
);
64 virtual ~OTableDesignUndoAct();
67 //========================================================================
68 class OTableEditorCtrl
;
69 class OTableEditorUndoAct
: public OTableDesignUndoAct
72 OTableEditorCtrl
* pTabEdCtrl
;
76 OTableEditorUndoAct( OTableEditorCtrl
* pOwner
,USHORT nCommentID
);
77 virtual ~OTableEditorUndoAct();
81 //========================================================================
82 class OTableDesignCellUndoAct
: public OTableDesignUndoAct
87 ::com::sun::star::uno::Any m_sOldText
;
88 ::com::sun::star::uno::Any m_sNewText
;
94 OTableDesignCellUndoAct( OTableRowView
* pOwner
, long nRowID
, USHORT nColumn
);
95 virtual ~OTableDesignCellUndoAct();
99 //========================================================================
100 class OTableEditorTypeSelUndoAct
: public OTableEditorUndoAct
105 TOTypeInfoSP m_pOldType
;
106 TOTypeInfoSP m_pNewType
;
112 OTableEditorTypeSelUndoAct( OTableEditorCtrl
* pOwner
, long nRowID
, USHORT nColumn
, const TOTypeInfoSP
& _pOldType
);
113 virtual ~OTableEditorTypeSelUndoAct();
116 //========================================================================
117 class OTableEditorDelUndoAct
: public OTableEditorUndoAct
120 ::std::vector
< ::boost::shared_ptr
<OTableRow
> > m_aDeletedRows
;
126 OTableEditorDelUndoAct( OTableEditorCtrl
* pOwner
);
127 virtual ~OTableEditorDelUndoAct();
130 //========================================================================
131 class OTableEditorInsUndoAct
: public OTableEditorUndoAct
134 ::std::vector
< ::boost::shared_ptr
<OTableRow
> > m_vInsertedRows
;
141 OTableEditorInsUndoAct( OTableEditorCtrl
* pOwner
,
142 long nInsertPosition
,
143 const ::std::vector
< ::boost::shared_ptr
<OTableRow
> >& _vInsertedRows
);
144 virtual ~OTableEditorInsUndoAct();
147 //========================================================================
148 class OTableEditorInsNewUndoAct
: public OTableEditorUndoAct
158 OTableEditorInsNewUndoAct( OTableEditorCtrl
* pOwner
, long nInsertPosition
, long nInsertedRows
);
159 virtual ~OTableEditorInsNewUndoAct();
162 //========================================================================
163 class OPrimKeyUndoAct
: public OTableEditorUndoAct
166 MultiSelection m_aDelKeys
,
168 BOOL m_bActPrimKeySet
;
169 OTableEditorCtrl
* m_pEditorCtrl
;
175 OPrimKeyUndoAct( OTableEditorCtrl
* pOwner
, MultiSelection aDeletedKeys
, MultiSelection aInsertedKeys
);
176 virtual ~OPrimKeyUndoAct();
179 #endif // DBAUI_TABLEUNDO_HXX