sc/source/core/data/table2.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit 68dd91f9e9d9201287acb5825748954a5446f323
Author: Laurent Godard <lgodard.li...@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.yosh...@suse.de>
    Tested-by: Kohei Yoshida <kohei.yosh...@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 ));
+        }
+    }
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to