[Libreoffice-commits] .: 2 commits - sc/source
Noel Power
noelp at kemper.freedesktop.org
Fri Jul 29 06:31:23 PDT 2011
sc/source/core/data/document.cxx | 9 ++++++---
sc/source/ui/view/viewfun3.cxx | 4 ++--
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit ce52349e5148c5f8f94f31ce4dea0b05820a5885
Author: Noel Power <noel.power at novell.com>
Date: Fri Jul 29 14:28:36 2011 +0100
bnc#707486 fix fit of extreme carelessness with defaulted params
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 90e645e..d96ba11 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -370,7 +370,7 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange
// and lose the 'if' above
aClipParam.setSourceDocID( pDoc->GetDocumentID() );
- pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, bIncludeObjects, bUseRangeForVBA );
+ pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects, true, bUseRangeForVBA );
if ( !bUseRangeForVBA && pDoc && pClipDoc )
{
ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
@@ -501,7 +501,7 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRange
}
if (!bValidRanges)
break;
- pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects, bUseRangeForVBA );
+ pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects, true, bUseRangeForVBA );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
commit 229ca0c28a4c4e2f58dcb1ec66a1360cfb9a591a
Author: Noel Power <noel.power at novell.com>
Date: Fri Jul 29 14:11:49 2011 +0100
bnc#707486, use correct CopyRangeNamesToClip for bUseRangeForVBA
also ensure relevant checks regarding pMarks are only applied for !bUseRangeForVBA
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 0c229b9..8f2f3ed 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1867,7 +1867,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
ScDocument* pClipDoc, const ScMarkData* pMarks,
bool bAllTabs, bool bKeepScenarioFlags, bool bIncludeObjects, bool bCloneNoteCaptions, bool bUseRangeForVBA )
{
- OSL_ENSURE( bAllTabs || pMarks, "CopyToClip: ScMarkData fails" );
+ OSL_ENSURE( !bUseRangeForVBA && ( bAllTabs || pMarks ), "CopyToClip: ScMarkData fails" );
if (bIsClip)
return;
@@ -1894,14 +1894,17 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
else
pClipDoc->ResetClip(this, pMarks);
- CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs);
+ if ( bUseRangeForVBA )
+ CopyRangeNamesToClip(pClipDoc, aClipRange, nTab );
+ else
+ CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs);
for ( ; i < nEndTab; ++i)
{
if (!maTabs[i] || i >= static_cast<SCTAB>(pClipDoc->maTabs.size()) || !pClipDoc->maTabs[i])
continue;
- if (pMarks && !pMarks->GetTableSelect(i))
+ if ( !bUseRangeForVBA && ( pMarks && !pMarks->GetTableSelect(i) ) )
continue;
maTabs[i]->CopyToClip(rClipParam.maRanges, pClipDoc->maTabs[i], bKeepScenarioFlags, bCloneNoteCaptions);
More information about the Libreoffice-commits
mailing list