diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2013-08-21 17:09:52 +0200 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.de> | 2013-08-21 16:14:39 +0000 |
commit | 9c253eb2aa0d9860916d626738b746594775f321 (patch) | |
tree | ecd5aab91485c4372bf05dd278fe775652092b84 | |
parent | c10b18e3405a0c501114ce435886b22ec59e53ab (diff) |
fdo#68381 take care of cell notes on Transpose
Change-Id: I4272b45a1c8ad34b540ee39d9ef9dd717d4f6325
Reviewed-on: https://gerrit.libreoffice.org/5572
Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de>
Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
(cherry picked from commit 68dd91f9e9d9201287acb5825748954a5446f323)
Reviewed-on: https://gerrit.libreoffice.org/5575
-rw-r--r-- | sc/source/core/data/table2.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 4786d3063a7f..d9a5bafa66fb 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -984,6 +984,20 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, } } } + + // fdo#68381 paste cell notes on Transpose + bool bCloneCaption = true; + for (ScNotes::const_iterator itr = maNotes.begin(); itr != maNotes.end(); ++itr) + { + SCCOL nCol = itr->first.first; + SCROW nRow = itr->first.second; + if (nCol >= nCol1 && nCol <= nCol2 && nRow >= nRow1 && nRow <= nRow2) + { + ScAddress aDestPos( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), pTransClip->nTab ); + pTransClip->maNotes.erase(aDestPos); + pTransClip->maNotes.insert(aDestPos, itr->second->Clone( ScAddress(nCol, nRow, nTab), *pTransClip->pDocument, aDestPos, bCloneCaption )); + } + } } |