sc/source/ui/app/transobj.cxx | 4 ++++ sc/source/ui/view/viewfun3.cxx | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-)
New commits: commit 49a1737b7d3d61304e749c6c164165b8bf68790e Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Dec 23 08:58:17 2011 +0100 fix copy/paste with whole column/row this fix should restore the old copy/paste behavior in calc and still only paste relevant entries to external programs diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index c923fd6..a61e5d3 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -61,6 +61,7 @@ #include "scmod.hxx" #include "dragdata.hxx" #include "clipdata.hxx" +#include "clipparam.hxx" // for InitDocShell #include <editeng/paperinf.hxx> @@ -171,6 +172,9 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc } OSL_ENSURE(!bFirst, "no sheet selected"); + if (!pDoc->GetClipParam().isMultiRange() && nTab1 == nTab2) + pDoc->ShrinkToDataArea( nTab1, nCol1, nRow1, nCol2, nRow2 ); + // only limit to used cells if whole sheet was marked // (so empty cell areas can be copied) if ( nCol2>=MAXCOL && nRow2>=MAXROW ) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 68ccf21..bd13314 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -277,28 +277,9 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool b { ScRange aRange; ScMarkType eMarkType = GetViewData()->GetSimpleArea( aRange ); - ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); sal_Bool bDone = sal_False; - if( !pClipDoc ) // System Copy - adjust the ranges. - { - SCCOL nCol1 = aRange.aStart.Col(); - SCCOL nCol2 = aRange.aEnd.Col(); - SCROW nRow1 = aRange.aStart.Row(); - SCROW nRow2 = aRange.aEnd.Row(); - pDoc->ShrinkToDataArea( aRange.aStart.Tab(), nCol1, nRow1, nCol2, nRow2 ); - if( aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL ) - { - aRange.aStart.SetCol( nCol1 ); - aRange.aEnd.SetCol( nCol2 ); - } - if( aRange.aStart.Row() == 0 && aRange.aEnd.Row() == MAXROW ) - { - aRange.aStart.SetRow( nRow1 ); - aRange.aEnd.SetRow( nRow2 ); - } - } if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED ) { ScRangeList aRangeList; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits