fix for bnc#707486 allow copy for suitable multi-area Ranges

also remove the extra CopyToClip ( and CopyToClip4VBA ), merged the functionality to remove the existing copy and paste.
This commit is contained in:
Noel Power
2011-07-26 20:06:30 +01:00
parent bb020b3ea8
commit 705030ab50
7 changed files with 118 additions and 169 deletions

View File

@@ -275,13 +275,22 @@ void implnPasteSpecial( const uno::Reference< frame::XModel>& xModel, sal_uInt16
}
void implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange& rRange )
bool implnCopyRanges( const uno::Reference< frame::XModel>& xModel, ScRangeList& rRangeList )
{
bool bResult = false;
ScTabViewShell* pViewShell = getBestViewShell( xModel );
if ( pViewShell )
{
pViewShell->CopyToClip( NULL, rRange, false, true, true );
bResult = pViewShell->CopyToClip( NULL, rRangeList, false, true, true );
}
return bResult;
}
bool implnCopyRange( const uno::Reference< frame::XModel>& xModel, const ScRange& rRange )
{
ScRangeList aRanges;
aRanges.Append( rRange );
return implnCopyRanges( xModel, aRanges );
}
ScDocShell*