fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / tabledesign / TableUndo.hxx
blob7646684e3a09126aa5805f35e59b7df790a8a969
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 .
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>
25 #include <vector>
27 #include <com/sun/star/uno/Any.h>
28 #include "TypeInfo.hxx"
29 #include <vcl/vclptr.hxx>
31 namespace dbaui
33 class OTableRowView;
34 class OTableRow;
35 class OTableDesignUndoAct : public OCommentUndoAction
37 protected:
38 VclPtr<OTableRowView> m_pTabDgnCtrl;
40 virtual void Undo() SAL_OVERRIDE;
41 virtual void Redo() SAL_OVERRIDE;
42 public:
43 TYPEINFO_OVERRIDE();
44 OTableDesignUndoAct( OTableRowView* pOwner ,sal_uInt16 nCommentID);
45 virtual ~OTableDesignUndoAct();
48 class OTableEditorCtrl;
49 class OTableEditorUndoAct : public OTableDesignUndoAct
51 protected:
52 VclPtr<OTableEditorCtrl> pTabEdCtrl;
54 public:
55 TYPEINFO_OVERRIDE();
56 OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 nCommentID );
57 virtual ~OTableEditorUndoAct();
60 class OTableDesignCellUndoAct : public OTableDesignUndoAct
62 protected:
63 sal_uInt16 m_nCol;
64 long m_nRow;
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;
70 public:
71 TYPEINFO_OVERRIDE();
72 OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn );
73 virtual ~OTableDesignCellUndoAct();
76 class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct
78 protected:
79 sal_uInt16 m_nCol;
80 long m_nRow;
81 TOTypeInfoSP m_pOldType;
82 TOTypeInfoSP m_pNewType;
84 virtual void Undo() SAL_OVERRIDE;
85 virtual void Redo() SAL_OVERRIDE;
86 public:
87 TYPEINFO_OVERRIDE();
88 OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType );
89 virtual ~OTableEditorTypeSelUndoAct();
92 class OTableEditorDelUndoAct : public OTableEditorUndoAct
94 protected:
95 ::std::vector< ::boost::shared_ptr<OTableRow> > m_aDeletedRows;
97 virtual void Undo() SAL_OVERRIDE;
98 virtual void Redo() SAL_OVERRIDE;
99 public:
100 TYPEINFO_OVERRIDE();
101 OTableEditorDelUndoAct( OTableEditorCtrl* pOwner );
102 virtual ~OTableEditorDelUndoAct();
105 class OTableEditorInsUndoAct : public OTableEditorUndoAct
107 protected:
108 ::std::vector< ::boost::shared_ptr<OTableRow> > m_vInsertedRows;
109 long m_nInsPos;
111 virtual void Undo() SAL_OVERRIDE;
112 virtual void Redo() SAL_OVERRIDE;
113 public:
114 TYPEINFO_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
123 protected:
124 long m_nInsPos;
125 long m_nInsRows;
127 virtual void Undo() SAL_OVERRIDE;
128 virtual void Redo() SAL_OVERRIDE;
129 public:
130 TYPEINFO_OVERRIDE();
131 OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows );
132 virtual ~OTableEditorInsNewUndoAct();
135 class OPrimKeyUndoAct : public OTableEditorUndoAct
137 protected:
138 MultiSelection m_aDelKeys,
139 m_aInsKeys;
140 VclPtr<OTableEditorCtrl> m_pEditorCtrl;
142 virtual void Undo() SAL_OVERRIDE;
143 virtual void Redo() SAL_OVERRIDE;
144 public:
145 TYPEINFO_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: */