calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / dbaccess / source / ui / tabledesign / TableUndo.hxx
blob1863555f7556cef0e794044ffe32b0443068f441
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 #pragma once
21 #include <GeneralUndo.hxx>
22 #include <tools/multisel.hxx>
24 #include <vector>
26 #include <com/sun/star/uno/Any.h>
27 #include <TypeInfo.hxx>
28 #include <vcl/vclptr.hxx>
30 namespace dbaui
32 class OTableRowView;
33 class OTableRow;
34 class OTableDesignUndoAct : public OCommentUndoAction
36 protected:
37 VclPtr<OTableRowView> m_pTabDgnCtrl;
39 virtual void Undo() override;
40 virtual void Redo() override;
41 public:
42 OTableDesignUndoAct(OTableRowView* pOwner, TranslateId pCommentID);
43 virtual ~OTableDesignUndoAct() override;
46 class OTableEditorCtrl;
47 class OTableEditorUndoAct : public OTableDesignUndoAct
49 protected:
50 VclPtr<OTableEditorCtrl> pTabEdCtrl;
52 public:
53 OTableEditorUndoAct(OTableEditorCtrl* pOwner, TranslateId pCommentID);
54 virtual ~OTableEditorUndoAct() override;
57 class OTableDesignCellUndoAct final : public OTableDesignUndoAct
59 sal_uInt16 m_nCol;
60 sal_Int32 m_nRow;
61 css::uno::Any m_sOldText;
62 css::uno::Any m_sNewText;
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;
71 class OTableEditorTypeSelUndoAct final : public OTableEditorUndoAct
73 sal_uInt16 m_nCol;
74 sal_Int32 m_nRow;
75 TOTypeInfoSP m_pOldType;
76 TOTypeInfoSP m_pNewType;
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;
85 class OTableEditorDelUndoAct final : public OTableEditorUndoAct
87 std::vector< std::shared_ptr<OTableRow> > m_aDeletedRows;
89 virtual void Undo() override;
90 virtual void Redo() override;
91 public:
92 explicit OTableEditorDelUndoAct( OTableEditorCtrl* pOwner );
93 virtual ~OTableEditorDelUndoAct() override;
96 class OTableEditorInsUndoAct final : public OTableEditorUndoAct
98 std::vector< std::shared_ptr<OTableRow> > m_vInsertedRows;
99 tools::Long m_nInsPos;
101 virtual void Undo() override;
102 virtual void Redo() override;
103 public:
104 OTableEditorInsUndoAct( OTableEditorCtrl* pOwner,
105 tools::Long nInsertPosition,
106 std::vector< std::shared_ptr<OTableRow> >&& _vInsertedRows);
107 virtual ~OTableEditorInsUndoAct() override;
110 class OTableEditorInsNewUndoAct final : public OTableEditorUndoAct
112 sal_Int32 m_nInsPos;
113 sal_Int32 m_nInsRows;
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;
122 class OPrimKeyUndoAct final : public OTableEditorUndoAct
124 MultiSelection m_aDelKeys,
125 m_aInsKeys;
126 VclPtr<OTableEditorCtrl> m_pEditorCtrl;
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;
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */