[Libreoffice-commits] core.git: sc/source
Laurent Godard
lgodard.libre at laposte.net
Wed Aug 21 08:54:45 PDT 2013
sc/source/core/data/table2.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 68dd91f9e9d9201287acb5825748954a5446f323
Author: Laurent Godard <lgodard.libre at laposte.net>
Date: Wed Aug 21 17:09:52 2013 +0200
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 at suse.de>
Tested-by: Kohei Yoshida <kohei.yoshida at suse.de>
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index f60ed3f..349f9ac 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 ));
+ }
+ }
}
More information about the Libreoffice-commits
mailing list