summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewfun3.cxx')
-rw-r--r--sc/source/ui/view/viewfun3.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 0f4893cf3512..f25aa500cc72 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1104,7 +1104,20 @@ sal_Bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
if (nBlockAddX > nDestSizeX)
nMarkAddX = nBlockAddX - nDestSizeX; // fuer Merge-Test
else
+ {
nEndCol = nStartCol + nDestSizeX;
+ if (nEndCol > aMarkRange.aEnd.Col())
+ {
+ // #i113553# larger range has to be included in aFilteredMark (for undo), but extending columns can't changed the filtered status
+ aMarkRange = ScRange( nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nEndTab );
+ aFilteredMark.SetMarkArea( aMarkRange );
+ if (bMarkIsFiltered)
+ {
+ ScViewUtil::UnmarkFiltered( aFilteredMark, pDoc );
+ aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_True );
+ }
+ }
+ }
if (nBlockAddY > nDestSizeY)
nMarkAddY = nBlockAddY - nDestSizeY; // fuer Merge-Test