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 .
19 #ifndef INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEUNDO_HXX
20 #define INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEUNDO_HXX
22 #include "GeneralUndo.hxx"
23 #include <tools/multisel.hxx>
27 #include <com/sun/star/uno/Any.h>
28 #include "TypeInfo.hxx"
29 #include <vcl/vclptr.hxx>
35 class OTableDesignUndoAct
: public OCommentUndoAction
38 VclPtr
<OTableRowView
> m_pTabDgnCtrl
;
40 virtual void Undo() SAL_OVERRIDE
;
41 virtual void Redo() SAL_OVERRIDE
;
44 OTableDesignUndoAct( OTableRowView
* pOwner
,sal_uInt16 nCommentID
);
45 virtual ~OTableDesignUndoAct();
48 class OTableEditorCtrl
;
49 class OTableEditorUndoAct
: public OTableDesignUndoAct
52 VclPtr
<OTableEditorCtrl
> pTabEdCtrl
;
56 OTableEditorUndoAct( OTableEditorCtrl
* pOwner
,sal_uInt16 nCommentID
);
57 virtual ~OTableEditorUndoAct();
60 class OTableDesignCellUndoAct
: public OTableDesignUndoAct
65 ::com::sun::star::uno::Any m_sOldText
;
66 ::com::sun::star::uno::Any m_sNewText
;
68 virtual void Undo() SAL_OVERRIDE
;
69 virtual void Redo() SAL_OVERRIDE
;
72 OTableDesignCellUndoAct( OTableRowView
* pOwner
, long nRowID
, sal_uInt16 nColumn
);
73 virtual ~OTableDesignCellUndoAct();
76 class OTableEditorTypeSelUndoAct
: public OTableEditorUndoAct
81 TOTypeInfoSP m_pOldType
;
82 TOTypeInfoSP m_pNewType
;
84 virtual void Undo() SAL_OVERRIDE
;
85 virtual void Redo() SAL_OVERRIDE
;
88 OTableEditorTypeSelUndoAct( OTableEditorCtrl
* pOwner
, long nRowID
, sal_uInt16 nColumn
, const TOTypeInfoSP
& _pOldType
);
89 virtual ~OTableEditorTypeSelUndoAct();
92 class OTableEditorDelUndoAct
: public OTableEditorUndoAct
95 ::std::vector
< ::boost::shared_ptr
<OTableRow
> > m_aDeletedRows
;
97 virtual void Undo() SAL_OVERRIDE
;
98 virtual void Redo() SAL_OVERRIDE
;
101 OTableEditorDelUndoAct( OTableEditorCtrl
* pOwner
);
102 virtual ~OTableEditorDelUndoAct();
105 class OTableEditorInsUndoAct
: public OTableEditorUndoAct
108 ::std::vector
< ::boost::shared_ptr
<OTableRow
> > m_vInsertedRows
;
111 virtual void Undo() SAL_OVERRIDE
;
112 virtual void Redo() SAL_OVERRIDE
;
115 OTableEditorInsUndoAct( OTableEditorCtrl
* pOwner
,
116 long nInsertPosition
,
117 const ::std::vector
< ::boost::shared_ptr
<OTableRow
> >& _vInsertedRows
);
118 virtual ~OTableEditorInsUndoAct();
121 class OTableEditorInsNewUndoAct
: public OTableEditorUndoAct
127 virtual void Undo() SAL_OVERRIDE
;
128 virtual void Redo() SAL_OVERRIDE
;
131 OTableEditorInsNewUndoAct( OTableEditorCtrl
* pOwner
, long nInsertPosition
, long nInsertedRows
);
132 virtual ~OTableEditorInsNewUndoAct();
135 class OPrimKeyUndoAct
: public OTableEditorUndoAct
138 MultiSelection m_aDelKeys
,
140 VclPtr
<OTableEditorCtrl
> m_pEditorCtrl
;
142 virtual void Undo() SAL_OVERRIDE
;
143 virtual void Redo() SAL_OVERRIDE
;
146 OPrimKeyUndoAct( OTableEditorCtrl
* pOwner
, const MultiSelection
& aDeletedKeys
, const MultiSelection
& aInsertedKeys
);
147 virtual ~OPrimKeyUndoAct();
150 #endif // INCLUDED_DBACCESS_SOURCE_UI_TABLEDESIGN_TABLEUNDO_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */