diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-03-02 17:44:08 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-03-29 04:48:23 +0200 |
commit | 4e37bb2e7b7c84457e2f44e3a9a0d47b96a603af (patch) | |
tree | a3a135d5d0671f78fd458e84da9b9354a6e2c2eb /sc/inc/column.hxx | |
parent | 76a7e73ad72b1319e3c350f5245eea741926e042 (diff) |
sc: refactor sparkline struture to store a list of sparklines
We need to access a list of sparklines and sparkline groups for
a sheet. To preven going through all the columns of a sheet, we
need to store all the created sparklines in a list. For this it
is necessary to change the model structrue a bit. A cell now has
a container that stores a shared_ptr to the sparkline instead of
storing the sparkline directly. With this we can store a list
of weak_ptr to the sparklines in a list (vector), which can be
accessed at any time and is quite fast.
This is needed by the OOXML export.
Change-Id: Iaca0a41e20912775f072ea6e8cab9c44367d6f30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131919
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sc/inc/column.hxx')
-rw-r--r-- | sc/inc/column.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index f04d54aca739..db72de87bbf1 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -661,8 +661,8 @@ public: void BroadcastRows( SCROW nStartRow, SCROW nEndRow, SfxHintId nHint ); // Spaklines - sc::Sparkline* GetSparkline(SCROW nRow); - void SetSparkline(SCROW nRow, std::unique_ptr<sc::Sparkline> pSparkline); + sc::SparklineCell* GetSparklineCell(SCROW nRow); + void CreateSparklineCell(SCROW nRow, std::shared_ptr<sc::Sparkline> const& pSparkline); // cell notes ScPostIt* GetCellNote( SCROW nRow ); |