diff options
-rw-r--r-- | sc/inc/table.hxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/documen2.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 19 |
3 files changed, 17 insertions, 9 deletions
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 85699da8c890..50dd96be4a3b 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -520,8 +520,8 @@ public: void CopyToTable( sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab, - const ScMarkData* pMarkData = nullptr, bool bAsLink = false, bool bColRowFlags = true, - bool bGlobalNamesToLocal = false, bool bCopyCaptions = true ); + const ScMarkData* pMarkData, bool bAsLink, bool bColRowFlags, + bool bGlobalNamesToLocal, bool bCopyCaptions ); void CopyCaptionsToTable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pDestTab, bool bCloneCaption ); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 83adb2fecd0e..f2c317026f8e 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -962,7 +962,8 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, } pSrcDoc->maTabs[nSrcPos]->CopyToTable(aCxt, 0, 0, MAXCOL, MAXROW, ( bResultsOnly ? InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA : InsertDeleteFlags::ALL), - false, maTabs[nDestPos].get() ); + false, maTabs[nDestPos].get(), /*pMarkData*/nullptr, /*bAsLink*/false, /*bColRowFlags*/true, + /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true ); } } maTabs[nDestPos]->SetTabNo(nDestPos); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 230891d2d402..490cb93e59a4 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2075,7 +2075,7 @@ void ScDocument::CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, if (maTabs[i] && rDestDoc.maTabs[i]) maTabs[i]->CopyToTable(aCxt, nCol1, nRow1, nCol2, nRow2, nFlags, bOnlyMarked, rDestDoc.maTabs[i].get(), pMarks, - false, bColRowFlags ); + false, bColRowFlags, /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true ); } rDestDoc.SetAutoCalc(bOldAutoCalc); } @@ -2134,7 +2134,8 @@ void ScDocument::CopyToDocument(const ScRange& rRange, pTab->CopyToTable( aCxt, aNewRange.aStart.Col(), aNewRange.aStart.Row(), aNewRange.aEnd.Col(), aNewRange.aEnd.Row(), - nFlags, bOnlyMarked, pDestTab, pMarks, false, bColRowFlags); + nFlags, bOnlyMarked, pDestTab, pMarks, false, bColRowFlags, + /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true); } rDestDoc.StartAllListeners(aNewRange); @@ -3263,11 +3264,14 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, // context used for copying content to the temporary mix document. sc::CopyToDocContext aMixCxt(*pMixDoc); maTabs[i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow, - InsertDeleteFlags::CONTENTS, false, pMixDoc->maTabs[i].get() ); + InsertDeleteFlags::CONTENTS, false, pMixDoc->maTabs[i].get(), + /*pMarkData*/nullptr, /*bAsLink*/false, /*bColRowFlags*/true, + /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true ); } maTabs[i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags); maTabs[nSrcTab]->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow, - nFlags, false, maTabs[i].get(), nullptr, bAsLink ); + nFlags, false, maTabs[i].get(), nullptr, bAsLink, + /*bColRowFlags*/true, /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true ); if (bDoMix) maTabs[i]->MixData(aMixDocCxt, nStartCol,nStartRow, nEndCol,nEndRow, @@ -3325,12 +3329,15 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, sc::CopyToDocContext aMixCxt(*pMixDoc); maTabs[i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow, - InsertDeleteFlags::CONTENTS, true, pMixDoc->maTabs[i].get(), &rMark ); + InsertDeleteFlags::CONTENTS, true, pMixDoc->maTabs[i].get(), &rMark, + /*bAsLink*/false, /*bColRowFlags*/true, /*bGlobalNamesToLocal*/false, + /*bCopyCaptions*/true ); } maTabs[i]->DeleteSelection( nDelFlags, rMark ); maTabs[nSrcTab]->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow, - nFlags, true, maTabs[i].get(), &rMark, bAsLink ); + nFlags, true, maTabs[i].get(), &rMark, bAsLink, + /*bColRowFlags*/true, /*bGlobalNamesToLocal*/false, /*bCopyCaptions*/true ); if (bDoMix) maTabs[i]->MixMarked(aMixDocCxt, rMark, nFunction, bSkipEmpty, pMixDoc->maTabs[i].get()); |