summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun3.cxx
diff options
context:
space:
mode:
authorJoost Wezenbeek <joost.eekhoorn@gmail.com>2010-12-20 23:02:07 +0100
committerKohei Yoshida <kyoshida@novell.com>2010-12-21 12:50:23 -0500
commit90a8740787817ba8c403f9a60a58aee4d13041cb (patch)
tree145f6e7802b3327021ea4833f147db2b495cdda5 /sc/source/ui/view/viewfun3.cxx
parent394fb4f3673c8c9f975a67bfd90c83b6dc1622a6 (diff)
Leftover data after Undo operation
qa issue #106711
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r--sc/source/ui/view/viewfun3.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index be6e77b4610e..2d51383e1456 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1063,6 +1063,27 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
}
aFilteredMark.SetMarkArea( aMarkRange);
}
+ else
+ {
+ // FIX for issue #106711 : leftover data after undo.
+ if (!bNoPaste )
+ {
+ ScRange rRange;
+ aFilteredMark.GetMarkArea( rRange );
+ if( (rRange.aEnd.Col() - rRange.aStart.Col()) < nDestSizeX )
+ {
+ nStartCol = rRange.aStart.Col();
+ nStartRow = rRange.aStart.Row();
+ nStartTab = rRange.aStart.Tab();
+ nEndCol = nStartCol + nDestSizeX;
+ nEndRow = rRange.aEnd.Row();
+ nEndTab = rRange.aEnd.Tab();
+ aMarkRange = ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab);
+ aFilteredMark.SetMarkArea( aMarkRange);
+ }
+ }
+ }
+
if (bNoPaste)
{
ErrorMessage(STR_MSSG_PASTEFROMCLIP_0);