diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-04-09 14:30:22 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-04-10 15:27:36 +0200 |
commit | a08f9ed2341bc60faae6b86538661fea40417ace (patch) | |
tree | d0e2ed53550d01b4e418eec55276ad358b4b54c7 /sc/source/ui/inc/docfunc.hxx | |
parent | 655b6c2f46a73d9893ba8e6b572731a5890a4f72 (diff) |
sc: add UI, undo/redo and test to change sparkline data range
This adds a "edit sparkline" action to the context menu and a
dialog to change the data range of a sparkline. To change a
sparkline using undo/redo, a new class UndoEditSparkline was
added, which allows to change the attributes of a sparkline and
revert back the old attributes when undoing. This is then used in
the Dialog when setting the changed data range of a sparkline.
To make sure that undo/redo works correctly, a simple unit tests
was added.
Change-Id: I08af1813fa288278bc0d33b0540660b325b17235
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132748
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/source/ui/inc/docfunc.hxx')
-rw-r--r-- | sc/source/ui/inc/docfunc.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index 938f96835b4d..f7ca3e422bc8 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -56,6 +56,7 @@ namespace sc struct ColRowSpan; class SparklineAttributes; class SparklineGroup; + class Sparkline; } class ScDocFunc @@ -246,6 +247,7 @@ public: sc::SparklineAttributes const& rNewAttributes); SC_DLLPUBLIC bool GroupSparklines(ScRange const& rRange, std::shared_ptr<sc::SparklineGroup> const& rpGroup); SC_DLLPUBLIC bool UngroupSparklines(ScRange const& rRange); + SC_DLLPUBLIC bool ChangeSparkline(std::shared_ptr<sc::Sparkline> const& rpSparkline, SCTAB nTab, ScRangeList const& rDataRange); private: void ProtectDocument(const ScDocProtection& rProtect); |