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 15:54:22 +0000 |
commit | 68dd91f9e9d9201287acb5825748954a5446f323 (patch) | |
tree | 13c3f97f25885fcea634d31915de88d90e1ca4a5 | |
parent | 96d2d9ad30ead4163a0f934b0397011d9e38d9ee (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>
-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 f60ed3f92d02..349f9ac2444e 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -1085,6 +1085,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 )); + } + } } |