summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-16 19:50:19 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-10-02 21:32:24 -0400
commitdd617c0bbe4906e8d6e589289f42415738f00006 (patch)
tree86bb5f56e14cd30a947366ff504c2389b2a8ef47 /sc/source/ui/inc
parent8030c21def37f965a35b534038659fd0b513887c (diff)
New feature to allow converting formula cells to static values.
You used to have to convert formula cells to static values by copying them and pasting them as values onto the original place. Why not just allow converting them in place? This is something I've always wanted to implement.
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/docfunc.hxx2
-rw-r--r--sc/source/ui/inc/undoconvert.hxx37
-rw-r--r--sc/source/ui/inc/viewfunc.hxx1
3 files changed, 40 insertions, 0 deletions
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index 37bf4aac12b7..ebd7ac371aeb 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -222,6 +222,8 @@ public:
* @param nTab the tab to which the conditional format list belongs
*/
void SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB nTab );
+
+ void ConvertFormulaToValue( const ScRange& rRange, bool bRecord, bool bInteraction );
};
class ScDocFuncDirect : public ScDocFunc
diff --git a/sc/source/ui/inc/undoconvert.hxx b/sc/source/ui/inc/undoconvert.hxx
new file mode 100644
index 000000000000..99ce97f51e7c
--- /dev/null
+++ b/sc/source/ui/inc/undoconvert.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SC_UNDOCONVERT_HXX
+#define INCLUDED_SC_UNDOCONVERT_HXX
+
+#include <undobase.hxx>
+#include <cellvalues.hxx>
+
+namespace sc {
+
+class UndoFormulaToValue : public ScSimpleUndo
+{
+ TableValues maUndoValues;
+
+public:
+ UndoFormulaToValue( ScDocShell* pDocSh, TableValues& rUndoValues );
+
+ virtual OUString GetComment() const SAL_OVERRIDE;
+ virtual void Undo() SAL_OVERRIDE;
+ virtual void Redo() SAL_OVERRIDE;
+
+private:
+ void Execute();
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index cd664cd5b45d..70c7e0f8df4b 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -240,6 +240,7 @@ public:
void FillAuto( FillDir eDir, SCCOL nStartCol, SCROW nStartRow,
SCCOL nEndCol, SCROW nEndRow, sal_uLong nCount, bool bRecord = true );
void FillCrossDblClick();
+ void ConvertFormulaToValue();
void TransliterateText( sal_Int32 nType );