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/.
10 #include <undoconvert.hxx>
11 #include <globstr.hrc>
12 #include <undoutil.hxx>
16 UndoFormulaToValue::UndoFormulaToValue( ScDocShell
* pDocSh
, TableValues
& rUndoValues
) :
19 maUndoValues
.swap(rUndoValues
);
22 OUString
UndoFormulaToValue::GetComment() const
24 return ScGlobal::GetRscString(STR_UNDO_FORMULA_TO_VALUE
);
27 void UndoFormulaToValue::Undo()
32 void UndoFormulaToValue::Redo()
37 void UndoFormulaToValue::Execute()
39 ScDocument
& rDoc
= pDocShell
->GetDocument();
40 rDoc
.SwapNonEmpty(maUndoValues
);
42 ScUndoUtil::MarkSimpleBlock(pDocShell
, maUndoValues
.getRange());
44 pDocShell
->PostPaint(maUndoValues
.getRange(), PAINT_GRID
);
45 pDocShell
->PostDataChanged();
46 rDoc
.BroadcastCells(maUndoValues
.getRange(), SC_HINT_DATACHANGED
);
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */