LibreOffice Module dbaccess (master) 1
TableUndo.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <GeneralUndo.hxx>
22#include <tools/multisel.hxx>
23
24#include <vector>
25
26#include <com/sun/star/uno/Any.h>
27#include <TypeInfo.hxx>
28#include <vcl/vclptr.hxx>
29
30namespace dbaui
31{
32 class OTableRowView;
33 class OTableRow;
35 {
36 protected:
38
39 virtual void Undo() override;
40 virtual void Redo() override;
41 public:
43 virtual ~OTableDesignUndoAct() override;
44 };
45
46 class OTableEditorCtrl;
48 {
49 protected:
51
52 public:
54 virtual ~OTableEditorUndoAct() override;
55 };
56
58 {
59 sal_uInt16 m_nCol;
60 sal_Int32 m_nRow;
61 css::uno::Any m_sOldText;
62 css::uno::Any m_sNewText;
63
64 virtual void Undo() override;
65 virtual void Redo() override;
66 public:
67 OTableDesignCellUndoAct( OTableRowView* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn );
68 virtual ~OTableDesignCellUndoAct() override;
69 };
70
72 {
73 sal_uInt16 m_nCol;
74 sal_Int32 m_nRow;
77
78 virtual void Undo() override;
79 virtual void Redo() override;
80 public:
81 OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, TOTypeInfoSP _pOldType );
82 virtual ~OTableEditorTypeSelUndoAct() override;
83 };
84
86 {
87 std::vector< std::shared_ptr<OTableRow> > m_aDeletedRows;
88
89 virtual void Undo() override;
90 virtual void Redo() override;
91 public:
92 explicit OTableEditorDelUndoAct( OTableEditorCtrl* pOwner );
93 virtual ~OTableEditorDelUndoAct() override;
94 };
95
97 {
98 std::vector< std::shared_ptr<OTableRow> > m_vInsertedRows;
100
101 virtual void Undo() override;
102 virtual void Redo() override;
103 public:
105 tools::Long nInsertPosition,
106 std::vector< std::shared_ptr<OTableRow> >&& _vInsertedRows);
107 virtual ~OTableEditorInsUndoAct() override;
108 };
109
111 {
112 sal_Int32 m_nInsPos;
113 sal_Int32 m_nInsRows;
114
115 virtual void Undo() override;
116 virtual void Redo() override;
117 public:
118 OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows );
119 virtual ~OTableEditorInsNewUndoAct() override;
120 };
121
123 {
127
128 virtual void Undo() override;
129 virtual void Redo() override;
130 public:
131 OPrimKeyUndoAct( OTableEditorCtrl* pOwner, const MultiSelection& aDeletedKeys, const MultiSelection& aInsertedKeys );
132 virtual ~OPrimKeyUndoAct() override;
133 };
134}
135
136/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Undo() override
Definition: TableUndo.cxx:310
virtual void Redo() override
Definition: TableUndo.cxx:336
MultiSelection m_aDelKeys
Definition: TableUndo.hxx:124
virtual ~OPrimKeyUndoAct() override
Definition: TableUndo.cxx:306
OPrimKeyUndoAct(OTableEditorCtrl *pOwner, const MultiSelection &aDeletedKeys, const MultiSelection &aInsertedKeys)
Definition: TableUndo.cxx:298
VclPtr< OTableEditorCtrl > m_pEditorCtrl
Definition: TableUndo.hxx:126
MultiSelection m_aInsKeys
Definition: TableUndo.hxx:125
virtual ~OTableDesignCellUndoAct() override
Definition: TableUndo.cxx:78
virtual void Redo() override
Definition: TableUndo.cxx:101
OTableDesignCellUndoAct(OTableRowView *pOwner, sal_Int32 nRowID, sal_uInt16 nColumn)
Definition: TableUndo.cxx:69
virtual void Undo() override
Definition: TableUndo.cxx:82
OTableDesignUndoAct(OTableRowView *pOwner, TranslateId pCommentID)
Definition: TableUndo.cxx:34
virtual void Redo() override
Definition: TableUndo.cxx:57
virtual void Undo() override
Definition: TableUndo.cxx:45
VclPtr< OTableRowView > m_pTabDgnCtrl
Definition: TableUndo.hxx:37
virtual ~OTableDesignUndoAct() override
Definition: TableUndo.cxx:41
virtual ~OTableEditorDelUndoAct() override
Definition: TableUndo.cxx:174
virtual void Redo() override
Definition: TableUndo.cxx:199
OTableEditorDelUndoAct(OTableEditorCtrl *pOwner)
Definition: TableUndo.cxx:155
std::vector< std::shared_ptr< OTableRow > > m_aDeletedRows
Definition: TableUndo.hxx:87
virtual void Undo() override
Definition: TableUndo.cxx:179
virtual void Undo() override
Definition: TableUndo.cxx:271
virtual ~OTableEditorInsNewUndoAct() override
Definition: TableUndo.cxx:267
virtual void Redo() override
Definition: TableUndo.cxx:284
OTableEditorInsNewUndoAct(OTableEditorCtrl *pOwner, sal_Int32 nInsertPosition, sal_Int32 nInsertedRows)
Definition: TableUndo.cxx:260
virtual void Redo() override
Definition: TableUndo.cxx:241
OTableEditorInsUndoAct(OTableEditorCtrl *pOwner, tools::Long nInsertPosition, std::vector< std::shared_ptr< OTableRow > > &&_vInsertedRows)
Definition: TableUndo.cxx:215
std::vector< std::shared_ptr< OTableRow > > m_vInsertedRows
Definition: TableUndo.hxx:98
virtual ~OTableEditorInsUndoAct() override
Definition: TableUndo.cxx:224
virtual void Undo() override
Definition: TableUndo.cxx:229
virtual ~OTableEditorTypeSelUndoAct() override
Definition: TableUndo.cxx:128
virtual void Undo() override
Definition: TableUndo.cxx:132
virtual void Redo() override
Definition: TableUndo.cxx:146
OTableEditorTypeSelUndoAct(OTableEditorCtrl *pOwner, sal_Int32 nRowID, sal_uInt16 nColumn, TOTypeInfoSP _pOldType)
Definition: TableUndo.cxx:120
virtual ~OTableEditorUndoAct() override
Definition: TableUndo.cxx:116
VclPtr< OTableEditorCtrl > pTabEdCtrl
Definition: TableUndo.hxx:50
OTableEditorUndoAct(OTableEditorCtrl *pOwner, TranslateId pCommentID)
Definition: TableUndo.cxx:110
std::shared_ptr< OTypeInfo > TOTypeInfoSP
Definition: TypeInfo.hxx:99
long Long