diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-03-19 12:52:21 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-04-04 09:51:36 +0200 |
commit | b8cf500ed8ac7bd01a351e2815ce8251e506d79c (patch) | |
tree | 2c087ac7181fc32995d2139af3b0fe07c5c4e023 /sc/inc/column.hxx | |
parent | 7ca71fdb06af29429e749a2aa89dff57dd932635 (diff) |
sc: add support for copy/cut and paste of Sparklines
Currently cut,copy and paste will copy the Sparkline and create
a new SparklineGroup for each cell in the new cell range. This
probably need to be adjusted so the SparklineGroup is shared.
Change-Id: I6f86bb026753b2b4b5bfa46aca4ca9794721f311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132473
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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 36ea217a481a..3afda2acd885 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -229,6 +229,9 @@ friend class sc::CellStoreEvent; SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv, const ScSetStringParam* pParam ); + void duplicateSparkline(sc::CopyFromClipContext& rContext, sc::ColumnBlockPosition* pBlockPos, + size_t nColOffset, size_t nDestSize, ScAddress aDestPosition); + public: /** Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode). */ @@ -254,6 +257,8 @@ public: const sc::CellTextAttrStoreType& GetCellAttrStore() const { return maCellTextAttrs; } sc::CellNoteStoreType& GetCellNoteStore() { return maCellNotes; } const sc::CellNoteStoreType& GetCellNoteStore() const { return maCellNotes; } + sc::SparklineStoreType& GetSparklineStore() { return maSparklines; } + const sc::SparklineStoreType& GetSparklineStore() const { return maSparklines; } ScRefCellValue GetCellValue( SCROW nRow ) const; ScRefCellValue GetCellValue( sc::ColumnBlockPosition& rBlockPos, SCROW nRow ); @@ -668,6 +673,10 @@ public: void CreateSparklineCell(SCROW nRow, std::shared_ptr<sc::Sparkline> const& pSparkline); void DeleteSparklineCells(sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2); bool DeleteSparkline(SCROW nRow); + bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const; + void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, SCROW nRowOffsetDest) const; + void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol, + sc::ColumnBlockPosition& rDestBlockPos, SCROW nRowOffsetDest = 0) const; // cell notes ScPostIt* GetCellNote( SCROW nRow ); @@ -696,7 +705,7 @@ public: SCROW nRowOffsetDest = 0) const; void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol, - sc::ColumnBlockPosition& maDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest=0 ) const; + sc::ColumnBlockPosition& rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest = 0) const; void UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 ); |