diff options
author | scito <info@scito.ch> | 2021-05-31 22:26:21 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-06-04 12:21:29 +0200 |
commit | c82d96da1c9a03e1742f2f5a7a93b9993c96a0a0 (patch) | |
tree | 101a55452e879a5ef7d61498be0e37deae2aadee /sc/inc/table.hxx | |
parent | 940dad058c199c6b6990ad313db5a17758a19c65 (diff) |
tdf#68976 fix paste transposed regression for notes/patterns
Starting position was not correctly taken into account for notes/patterns in the
initial fix. It worked only for source range starting in A1 (0/0), i.e. a
special case. The unit tests tested only this special case.
The unit tests are generalized: Starting in B2 instead of A1, i.e. the source
range was shifted. The paste destination results remain the same, except
absolute references.
Change-Id: I2f7bfa9e559d99b173ff833fed3cff21658e0e31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116501
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc/inc/table.hxx')
-rw-r--r-- | sc/inc/table.hxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 4a538428c163..1f68937f87d2 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -1253,20 +1253,26 @@ private: /** * Transpose clipboard patterns + * @param nCombinedStartRow start row of the combined range; + * used for transposed multi range selection with row direction; + * for other cases than multi range row selection this it equal to nRow1 * @param nRowDestOffset adjustment of destination row position; * used for transposed multi range row selections, otherwise 0 */ void TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, - SCROW nRow2, bool bIncludeFiltered, + SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered, const std::vector<SCROW>& rFilteredRows, SCROW nRowDestOffset); /** * Transpose clipboard notes + * @param nCombinedStartRow start row of the combined range; + * used for transposed multi range selection with row direction; + * for other cases than multi range row selection this it equal to nRow1 * @param nRowDestOffset adjustment of destination row position; * used for transposed multi range row selections, otherwise 0 */ void TransposeColNotes(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2, - bool bIncludeFiltered, SCROW nRowDestOffset); + SCROW nCombinedStartRow, bool bIncludeFiltered, SCROW nRowDestOffset); ScColumn* FetchColumn( SCCOL nCol ); const ScColumn* FetchColumn( SCCOL nCol ) const; |