loplugin:constantparam in sc

Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
This commit is contained in:
Noel Grandin 2016-03-24 11:38:51 +02:00
parent c09d0aa46c
commit 682b9b33c7
62 changed files with 156 additions and 197 deletions

View File

@ -256,7 +256,7 @@ public:
SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr ); bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag, bool bBroadcast ); void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag );
void CopyToClip( void CopyToClip(
sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const; sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const;
@ -450,7 +450,7 @@ public:
ScEditDataArray* pDataArray = nullptr ); ScEditDataArray* pDataArray = nullptr );
void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false ); void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false );
void SetPatternArea( SCROW nStartRow, SCROW nEndRow, void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr& rPatAttr, bool bPutToPool = false ); const ScPatternAttr& rPatAttr );
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, short nNewType ); const ScPatternAttr& rPattern, short nNewType );

View File

@ -684,7 +684,7 @@ public:
SCTAB nPos, const OUString& rName, bool bExternalDocument = false, bool bUndoDeleteTab = false ); SCTAB nPos, const OUString& rName, bool bExternalDocument = false, bool bUndoDeleteTab = false );
SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames, SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
bool bExternalDocument = false, bool bNamesValid = false ); bool bNamesValid = false );
SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets ); SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
SC_DLLPUBLIC bool DeleteTab( SCTAB nTab ); SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName, SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
@ -1272,8 +1272,8 @@ public:
void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag); void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc, void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc,
const ScMarkData* pMarks = nullptr, bool bAllTabs = false, bool bKeepScenarioFlags = false, const ScMarkData* pMarks, bool bKeepScenarioFlags,
bool bIncludeObjects = false, bool bCloneNoteCaptions = true, bool bUseRangeForVBA = false ); bool bIncludeObjects );
/** /**
* Copy only raw cell values to another document. Formula cells are * Copy only raw cell values to another document. Formula cells are
@ -1756,7 +1756,7 @@ public:
std::vector<ScTypedStrData>& rStrings, bool& rHasDates); std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
void GetDataEntries( void GetDataEntries(
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, SCCOL nCol, SCROW nRow, SCTAB nTab,
std::vector<ScTypedStrData>& rStrings, bool bLimit = false ); std::vector<ScTypedStrData>& rStrings, bool bLimit = false );
void GetFormulaEntries( ScTypedCaseStrSet& rStrings ); void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
@ -1778,7 +1778,7 @@ public:
void ReplaceStyle(const SvxSearchItem& rSearchItem, void ReplaceStyle(const SvxSearchItem& rSearchItem,
SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nCol, SCROW nRow, SCTAB nTab,
ScMarkData& rMark, bool bIsUndo); ScMarkData& rMark);
void InvalidateTextWidth( const OUString& rStyleName ); void InvalidateTextWidth( const OUString& rStyleName );
void InvalidateTextWidth( SCTAB nTab ); void InvalidateTextWidth( SCTAB nTab );
@ -1937,7 +1937,7 @@ public:
void PutInFormulaTree( ScFormulaCell* pCell ); void PutInFormulaTree( ScFormulaCell* pCell );
void RemoveFromFormulaTree( ScFormulaCell* pCell ); void RemoveFromFormulaTree( ScFormulaCell* pCell );
/** /**
* Calculate formula cells that are on the formula tree either partially, * Calculate formula cells that are on the formula tree either partially,
* or in full. * or in full.
* *

View File

@ -125,7 +125,7 @@ public:
that the data grid doesn't include the header row. Don't delete the that the data grid doesn't include the header row. Don't delete the
returned object! */ returned object! */
const ScDPItemData* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const; const ScDPItemData* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const;
void getValue( ScDPValue& rVal, SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const; void getValue( ScDPValue& rVal, SCCOL nCol, SCROW nRow) const;
OUString getFieldName(SCCOL nIndex) const; OUString getFieldName(SCCOL nIndex) const;
/** Get the unique entries for a field specified by index. The caller must /** Get the unique entries for a field specified by index. The caller must

View File

@ -121,7 +121,7 @@ public:
void ScRemovePage( SCTAB nTab ); void ScRemovePage( SCTAB nTab );
void ScRenamePage( SCTAB nTab, const OUString& rNewName ); void ScRenamePage( SCTAB nTab, const OUString& rNewName );
void ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ); void ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos );
void ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, bool bSkipNotes = false ); void ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos );
void ResetTab( SCTAB nStart, SCTAB nEnd ); void ResetTab( SCTAB nStart, SCTAB nEnd );
ScDocument* GetDocument() const { return pDoc; } ScDocument* GetDocument() const { return pDoc; }

View File

@ -71,7 +71,7 @@ public:
ScProgress( SfxObjectShell* pObjSh, ScProgress( SfxObjectShell* pObjSh,
const OUString& rText, const OUString& rText,
sal_uLong nRange, bool bAllDocs = false, sal_uLong nRange,
bool bWait = true ); bool bWait = true );
~ScProgress(); ~ScProgress();

View File

@ -616,12 +616,12 @@ public:
void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr ); const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr );
void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr, bool bPutToPool = false ) void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr )
{ {
if (ValidColRow(rPos.Col(),rPos.Row())) if (ValidColRow(rPos.Col(),rPos.Row()))
aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, bPutToPool ); aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, true/*bPutToPool*/ );
} }
void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, bool bPutToPool = false ); void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
const ScPatternAttr& rPattern, short nNewType ); const ScPatternAttr& rPattern, short nNewType );
void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex ); void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
@ -643,7 +643,7 @@ public:
double nPPTX, double nPPTY, double nPPTX, double nPPTY,
const Fraction& rZoomX, const Fraction& rZoomY ); const Fraction& rZoomX, const Fraction& rZoomY );
bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags ); bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags ); bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );

View File

@ -134,7 +134,7 @@ public:
* Make all absolute references pointing to the copied range if the range is copied too * Make all absolute references pointing to the copied range if the range is copied too
* @param bCheckCopyArea should references pointing into the copy area be adjusted independently from being absolute, should be true only for copy&paste between documents * @param bCheckCopyArea should references pointing into the copy area be adjusted independently from being absolute, should be true only for copy&paste between documents
*/ */
void AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos, bool bRangeName = false, bool bCheckCopyArea = false ); void AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos, bool bCheckCopyArea = false );
/** When copying a sheet-local named expression, move sheet references that /** When copying a sheet-local named expression, move sheet references that
point to the originating sheet to point to the new sheet instead. point to the originating sheet to point to the new sheet instead.

View File

@ -262,7 +262,7 @@ void Test::testPerf()
// Copy cell A1 to clipboard. // Copy cell A1 to clipboard.
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
ScClipParam aParam(aPos, false); ScClipParam aParam(aPos, false);
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark, false, false);
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos)); CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos));
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO); ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
@ -333,7 +333,7 @@ void Test::testPerf()
// Copy to clipboard. // Copy to clipboard.
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
ScClipParam aParam(aSrcRange, false); ScClipParam aParam(aSrcRange, false);
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark, false, false);
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos)); CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos));
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO); ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
@ -410,7 +410,7 @@ void Test::testPerf()
// Copy to clipboard. // Copy to clipboard.
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
ScClipParam aParam(aSrcRange, false); ScClipParam aParam(aSrcRange, false);
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark, false, false);
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos)); CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos));
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO); ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
@ -798,7 +798,7 @@ void Test::testDataEntries()
m_pDoc->SetString(ScAddress(0,10,0), "Andy"); m_pDoc->SetString(ScAddress(0,10,0), "Andy");
std::vector<ScTypedStrData> aEntries; std::vector<ScTypedStrData> aEntries;
m_pDoc->GetDataEntries(0, 0, 0, true, aEntries); // Try at the very top. m_pDoc->GetDataEntries(0, 0, 0, aEntries); // Try at the very top.
// Entries are supposed to be sorted in ascending order, and are all unique. // Entries are supposed to be sorted in ascending order, and are all unique.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size()); CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size());
@ -812,7 +812,7 @@ void Test::testDataEntries()
CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", it == aEntries.end()); CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", it == aEntries.end());
aEntries.clear(); aEntries.clear();
m_pDoc->GetDataEntries(0, MAXROW, 0, true, aEntries); // Try at the very bottom. m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the very bottom.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size()); CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size());
// Make sure we get the same set of suggestions. // Make sure we get the same set of suggestions.
@ -3589,7 +3589,7 @@ void Test::testCopyPasteMultiRange()
aClipParam.maRanges.Append(ScRange(0,3,0,1,3,0)); // A4:B4 aClipParam.maRanges.Append(ScRange(0,3,0,1,3,0)); // A4:B4
aClipParam.maRanges.Append(ScRange(0,5,0,1,5,0)); // A6:B6 aClipParam.maRanges.Append(ScRange(0,5,0,1,5,0)); // A6:B6
aClipParam.meDirection = ScClipParam::Row; aClipParam.meDirection = ScClipParam::Row;
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Paste to D9:E11, and make sure it won't crash (rhbz#1080196). // Paste to D9:E11, and make sure it won't crash (rhbz#1080196).
m_pDoc->CopyMultiRangeFromClip(ScAddress(3,8,0), aMark, InsertDeleteFlags::CONTENTS, &aClipDoc); m_pDoc->CopyMultiRangeFromClip(ScAddress(3,8,0), aMark, InsertDeleteFlags::CONTENTS, &aClipDoc);
@ -4044,7 +4044,7 @@ void Test::testCopyPasteRelativeFormula()
ScMarkData aMark; ScMarkData aMark;
aMark.SetMarkArea(aRange); aMark.SetMarkArea(aRange);
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Paste it to B1:B2. // Paste it to B1:B2.
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL; InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
@ -4067,7 +4067,7 @@ void Test::testCopyPasteRelativeFormula()
// Copy A1 to clipboard. // Copy A1 to clipboard.
aClipParam = ScClipParam(ScAddress(0,0,0), false); aClipParam = ScClipParam(ScAddress(0,0,0), false);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
pFC = aClipDoc.GetFormulaCell(ScAddress(0,0,0)); pFC = aClipDoc.GetFormulaCell(ScAddress(0,0,0));
CPPUNIT_ASSERT(pFC); CPPUNIT_ASSERT(pFC);
@ -4127,7 +4127,7 @@ void Test::testCopyPasteRepeatOneFormula()
// Copy C1 to clipboard. // Copy C1 to clipboard.
ScClipParam aClipParam(aPos, false); ScClipParam aClipParam(aPos, false);
aMark.SetMarkArea(aPos); aMark.SetMarkArea(aPos);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Paste it to C2:C10. // Paste it to C2:C10.
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS; InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
@ -4396,7 +4396,7 @@ void Test::testUpdateReference()
std::vector<OUString> aSheets; std::vector<OUString> aSheets;
aSheets.push_back("Sheet1"); aSheets.push_back("Sheet1");
aSheets.push_back("Sheet2"); aSheets.push_back("Sheet2");
m_pDoc->InsertTabs(0, aSheets, false, true); m_pDoc->InsertTabs(0, aSheets, true);
m_pDoc->GetValue(2, 0, 2, aValue); m_pDoc->GetValue(2, 0, 2, aValue);
OUString aFormula; OUString aFormula;
m_pDoc->GetFormula(2,0,2, aFormula); m_pDoc->GetFormula(2,0,2, aFormula);
@ -4780,7 +4780,7 @@ void Test::testCopyPasteFormulasExternalDoc()
ScMarkData aMark; ScMarkData aMark;
aMark.SetMarkArea(aRange); aMark.SetMarkArea(aRange);
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL; InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
aRange = ScRange(1,1,1,1,6,1); aRange = ScRange(1,1,1,1,6,1);
@ -5193,7 +5193,7 @@ void Test::testNoteLifeCycle()
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
ScMarkData aMarkData; ScMarkData aMarkData;
aMarkData.SelectOneTable(0); aMarkData.SelectOneTable(0);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMarkData, false, false, true); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMarkData, false, true);
ScPostIt* pClipNote = aClipDoc.GetNote(aPos); ScPostIt* pClipNote = aClipDoc.GetNote(aPos);
CPPUNIT_ASSERT_MESSAGE("Failed to copy note to the clipboard.", pClipNote); CPPUNIT_ASSERT_MESSAGE("Failed to copy note to the clipboard.", pClipNote);
@ -5273,7 +5273,7 @@ void Test::testNoteCopyPaste()
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
aClipDoc.ResetClip(m_pDoc, &aMark); aClipDoc.ResetClip(m_pDoc, &aMark);
ScClipParam aClipParam(aCopyRange, false); ScClipParam aClipParam(aCopyRange, false);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Make sure the notes are in the clipboard. // Make sure the notes are in the clipboard.
pNote = aClipDoc.GetNote(ScAddress(1,1,0)); pNote = aClipDoc.GetNote(ScAddress(1,1,0));
@ -6148,7 +6148,7 @@ void Test::testCopyPasteMatrixFormula()
ScAddress aPos(0,0,0); // A1 ScAddress aPos(0,0,0); // A1
ScDocument aClipDoc(SCDOCMODE_CLIP); ScDocument aClipDoc(SCDOCMODE_CLIP);
ScClipParam aParam(aPos, false); ScClipParam aParam(aPos, false);
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark, false, false);
// Formula string should be equal. // Formula string should be equal.
CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos)); CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), aClipDoc.GetString(aPos));
@ -6362,7 +6362,7 @@ void Test::copyToClip(ScDocument* pSrcDoc, const ScRange& rRange, ScDocument* pC
ScClipParam aClipParam(rRange, false); ScClipParam aClipParam(rRange, false);
ScMarkData aMark; ScMarkData aMark;
aMark.SetMarkArea(rRange); aMark.SetMarkArea(rRange);
pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark); pSrcDoc->CopyToClip(aClipParam, pClipDoc, &aMark, false, false);
} }
void Test::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocument* pClipDoc) void Test::pasteFromClip(ScDocument* pDestDoc, const ScRange& rDestRange, ScDocument* pClipDoc)

View File

@ -7011,7 +7011,7 @@ public:
// Copy formula cell to clipboard. // Copy formula cell to clipboard.
ScClipParam aClipParam(aPos, false); ScClipParam aClipParam(aPos, false);
aMark.SetMarkArea(aPos); aMark.SetMarkArea(aPos);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Paste it to first range. // Paste it to first range.
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS; InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
@ -7131,7 +7131,7 @@ void Test::testTdf97587()
// Copy formula cell to clipboard. // Copy formula cell to clipboard.
ScClipParam aClipParam(aPos, false); ScClipParam aClipParam(aPos, false);
aMark.SetMarkArea(aPos); aMark.SetMarkArea(aPos);
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark); m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
// Paste it to first range. // Paste it to first range.
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS; InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;

View File

@ -689,9 +689,9 @@ void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutT
} }
void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow, void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
const ScPatternAttr& rPatAttr, bool bPutToPool ) const ScPatternAttr& rPatAttr )
{ {
pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, bPutToPool ); pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ );
} }
void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr ) void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr )

View File

@ -469,11 +469,11 @@ void ScColumn::SwapNonEmpty(
CellStorageModified(); CellStorageModified();
} }
void ScColumn::DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag, bool bBroadcast ) void ScColumn::DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag )
{ {
std::vector<sc::RowSpan>::const_iterator itSpan = rRanges.begin(), itSpanEnd = rRanges.end(); std::vector<sc::RowSpan>::const_iterator itSpan = rRanges.begin(), itSpanEnd = rRanges.end();
for (; itSpan != itSpanEnd; ++itSpan) for (; itSpan != itSpanEnd; ++itSpan)
DeleteArea(itSpan->mnRow1, itSpan->mnRow2, nDelFlag, bBroadcast); DeleteArea(itSpan->mnRow1, itSpan->mnRow2, nDelFlag, false/*bBroadcast*/);
} }
void ScColumn::CloneFormulaCell( void ScColumn::CloneFormulaCell(

View File

@ -2605,7 +2605,7 @@ void ScDocRowHeightUpdater::update()
} }
} }
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount); ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true);
Fraction aZoom(1, 1); Fraction aZoom(1, 1);
itr = mpTabRangesArray->begin(); itr = mpTabRangesArray->begin();
@ -2643,7 +2643,7 @@ void ScDocRowHeightUpdater::updateAll()
nCellCount += mrDoc.maTabs[nTab]->GetWeightedCount(); nCellCount += mrDoc.maTabs[nTab]->GetWeightedCount();
} }
ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount); ScProgress aProgress(mrDoc.GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true);
Fraction aZoom(1, 1); Fraction aZoom(1, 1);
sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev); sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);

View File

@ -1554,7 +1554,7 @@ void ScDocument::GetFilterEntriesArea(
* Entries for selection list listbox (no numbers/formulas) * Entries for selection list listbox (no numbers/formulas)
*/ */
void ScDocument::GetDataEntries( void ScDocument::GetDataEntries(
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, SCCOL nCol, SCROW nRow, SCTAB nTab,
std::vector<ScTypedStrData>& rStrings, bool bLimit ) std::vector<ScTypedStrData>& rStrings, bool bLimit )
{ {
if( !bLimit ) if( !bLimit )
@ -1569,7 +1569,7 @@ void ScDocument::GetDataEntries(
if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) ) if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) )
{ {
if (pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING) if (pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING)
sortAndRemoveDuplicates(rStrings, bCaseSens); sortAndRemoveDuplicates(rStrings, true/*bCaseSens*/);
return; return;
} }
@ -1585,7 +1585,7 @@ void ScDocument::GetDataEntries(
std::set<ScTypedStrData> aStrings; std::set<ScTypedStrData> aStrings;
maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit); maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit);
rStrings.insert(rStrings.end(), aStrings.begin(), aStrings.end()); rStrings.insert(rStrings.end(), aStrings.begin(), aStrings.end());
sortAndRemoveDuplicates(rStrings, bCaseSens); sortAndRemoveDuplicates(rStrings, true/*bCaseSens*/);
} }
/** /**

View File

@ -531,11 +531,10 @@ bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
void ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, void ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nCol, SCROW nRow, SCTAB nTab,
ScMarkData& rMark, ScMarkData& rMark)
bool bIsUndoP)
{ {
if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP); maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, true/*bIsUndoP*/);
} }
void ScDocument::CompileDBFormula() void ScDocument::CompileDBFormula()
@ -1165,7 +1164,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
nIndex = 0; nIndex = 0;
aProText.append(aTemplate.getToken( 1, '#', nIndex )); aProText.append(aTemplate.getToken( 1, '#', nIndex ));
ScProgress aProgress( GetDocumentShell(), ScProgress aProgress( GetDocumentShell(),
aProText.makeStringAndClear(), 3*nThisEndRow ); // 2x FindOrder, 1x here aProText.makeStringAndClear(), 3*nThisEndRow, true ); // 2x FindOrder, 1x here
long nProgressStart = 2*nThisEndRow; // start for here long nProgressStart = 2*nThisEndRow; // start for here
std::unique_ptr<SCCOLROW[]> pTempRows(new SCCOLROW[nThisEndRow+1]); std::unique_ptr<SCCOLROW[]> pTempRows(new SCCOLROW[nThisEndRow+1]);

View File

@ -816,7 +816,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
sc::WaitPointerSwitch aWaitSwitch(pWin); sc::WaitPointerSwitch aWaitSwitch(pWin);
pExternalRefMgr->enableDocTimer(false); pExternalRefMgr->enableDocTimer(false);
ScProgress aProgress(GetDocumentShell(), ScResId(SCSTR_UPDATE_EXTDOCS).toString(), aRefLinks.size()); ScProgress aProgress(GetDocumentShell(), ScResId(SCSTR_UPDATE_EXTDOCS).toString(), aRefLinks.size(), true);
for (size_t i = 0, n = aRefLinks.size(); i < n; ++i) for (size_t i = 0, n = aRefLinks.size(); i < n; ++i)
{ {
aProgress.SetState(i+1); aProgress.SetState(i+1);

View File

@ -264,7 +264,7 @@ void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos ) void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{ {
// page is already created in ScTable ctor // page is already created in ScTable ctor
pDrawLayer->ScCopyPage( nOldPos, nNewPos, true/*bSkipNotes*/ ); pDrawLayer->ScCopyPage( nOldPos, nNewPos );
} }
void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,

View File

@ -578,7 +578,7 @@ bool ScDocument::InsertTab(
} }
bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames, bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
bool bExternalDocument, bool bNamesValid ) bool bNamesValid )
{ {
SCTAB nNewSheets = static_cast<SCTAB>(rNames.size()); SCTAB nNewSheets = static_cast<SCTAB>(rNames.size());
SCTAB nTabCount = static_cast<SCTAB>(maTabs.size()); SCTAB nTabCount = static_cast<SCTAB>(maTabs.size());
@ -591,8 +591,6 @@ bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
for ( SCTAB i = 0; i < nNewSheets; ++i ) for ( SCTAB i = 0; i < nNewSheets; ++i )
{ {
maTabs.push_back( new ScTable(this, nTabCount + i, rNames.at(i)) ); maTabs.push_back( new ScTable(this, nTabCount + i, rNames.at(i)) );
if ( bExternalDocument )
maTabs[nTabCount+i]->SetVisible( false );
} }
} }
else else
@ -2087,14 +2085,11 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), InsertDeleteFlags::FORMULA, false, pDestDoc ); CopyToDocument( 0,0,nTab2+1, MAXCOL,MAXROW,maTabs.size(), InsertDeleteFlags::FORMULA, false, pDestDoc );
} }
// bUseRangeForVBA added for VBA api support to allow content of a specified
// range to be copied ( e.g. don't use marked data but the just the range
// specified by rClipParam
void ScDocument::CopyToClip(const ScClipParam& rClipParam, void ScDocument::CopyToClip(const ScClipParam& rClipParam,
ScDocument* pClipDoc, const ScMarkData* pMarks, ScDocument* pClipDoc, const ScMarkData* pMarks,
bool bAllTabs, bool bKeepScenarioFlags, bool bIncludeObjects, bool bCloneNoteCaptions, bool bUseRangeForVBA ) bool bKeepScenarioFlags, bool bIncludeObjects )
{ {
OSL_ENSURE( !bUseRangeForVBA && ( bAllTabs || pMarks ), "CopyToClip: ScMarkData fails" ); OSL_ENSURE( pMarks, "CopyToClip: ScMarkData fails" );
if (bIsClip) if (bIsClip)
return; return;
@ -2133,28 +2128,19 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
pClipDoc->aDocName = aDocName; pClipDoc->aDocName = aDocName;
pClipDoc->SetClipParam(rClipParam); pClipDoc->SetClipParam(rClipParam);
ScRange aClipRange = rClipParam.getWholeRange(); ScRange aClipRange = rClipParam.getWholeRange();
SCTAB nTab = aClipRange.aStart.Tab();
SCTAB i = 0;
SCTAB nEndTab = static_cast<SCTAB>(maTabs.size()); SCTAB nEndTab = static_cast<SCTAB>(maTabs.size());
if ( bUseRangeForVBA ) pClipDoc->ResetClip(this, pMarks);
{
pClipDoc->ResetClip( this, nTab );
i = nTab;
nEndTab = nTab + 1;
}
else
pClipDoc->ResetClip(this, pMarks);
sc::CopyToClipContext aCxt(*pClipDoc, bKeepScenarioFlags, bCloneNoteCaptions); sc::CopyToClipContext aCxt(*pClipDoc, bKeepScenarioFlags, true/*bCloneNoteCaptions*/);
CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs); CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, false/*bAllTabs*/);
for ( ; i < nEndTab; ++i) for (SCTAB i = 0; i < nEndTab; ++i)
{ {
if (!maTabs[i] || i >= static_cast<SCTAB>(pClipDoc->maTabs.size()) || !pClipDoc->maTabs[i]) if (!maTabs[i] || i >= static_cast<SCTAB>(pClipDoc->maTabs.size()) || !pClipDoc->maTabs[i])
continue; continue;
if ( !bUseRangeForVBA && ( pMarks && !pMarks->GetTableSelect(i) ) ) if ( pMarks && !pMarks->GetTableSelect(i) )
continue; continue;
maTabs[i]->CopyToClip(aCxt, rClipParam.maRanges, pClipDoc->maTabs[i]); maTabs[i]->CopyToClip(aCxt, rClipParam.maRanges, pClipDoc->maTabs[i]);
@ -3860,7 +3846,7 @@ void ScDocument::CompileXML()
bool bOldAutoCalc = GetAutoCalc(); bool bOldAutoCalc = GetAutoCalc();
SetAutoCalc( false ); SetAutoCalc( false );
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString( ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount() ); STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount(), true );
sc::CompileFormulaContext aCxt(this); sc::CompileFormulaContext aCxt(this);
@ -4159,7 +4145,7 @@ void ScDocument::UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkDa
if ( maTabs[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) ) if ( maTabs[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
nCellCount += maTabs[nTab]->GetWeightedCount(); nCellCount += maTabs[nTab]->GetWeightedCount();
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount ); ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nCellCount, true );
sal_uLong nProgressStart = 0; sal_uLong nProgressStart = 0;
for ( SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++ ) for ( SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++ )
@ -4849,7 +4835,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
for (; it != maTabs.end(); ++it) for (; it != maTabs.end(); ++it)
if (*it) if (*it)
{ {
if ( (*it)->IsStyleSheetUsed( rStyle, true/*bGatherAllStyles*/ ) ) if ( (*it)->IsStyleSheetUsed( rStyle ) )
{ {
bIsUsed = true; bIsUsed = true;
} }
@ -4889,14 +4875,14 @@ void ScDocument::SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPattern
{ {
if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size())) if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
if (maTabs[nTab]) if (maTabs[nTab])
maTabs[nTab]->SetPattern( nCol, nRow, rAttr, true/*bPutToPool*/ ); maTabs[nTab]->SetPattern( nCol, nRow, rAttr );
} }
void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr ) void ScDocument::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr )
{ {
SCTAB nTab = rPos.Tab(); SCTAB nTab = rPos.Tab();
if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) if ( nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
maTabs[nTab]->SetPattern( rPos, rAttr, true/*bPutToPool*/ ); maTabs[nTab]->SetPattern( rPos, rAttr );
} }
ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, bool bDeep ) ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, bool bDeep )

View File

@ -156,8 +156,8 @@ struct Bucket
SCROW mnOrderIndex; SCROW mnOrderIndex;
SCROW mnDataIndex; SCROW mnDataIndex;
SCROW mnValueSortIndex; SCROW mnValueSortIndex;
Bucket(const ScDPItemData& rValue, SCROW nOrder, SCROW nData) : Bucket(const ScDPItemData& rValue, SCROW nData) :
maValue(rValue), mnOrderIndex(nOrder), mnDataIndex(nData), mnValueSortIndex(0) {} maValue(rValue), mnOrderIndex(0), mnDataIndex(nData), mnValueSortIndex(0) {}
}; };
#if DEBUG_PIVOT_TABLE #if DEBUG_PIVOT_TABLE
@ -353,7 +353,7 @@ void ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
SCROW nRow = i + nOffset; SCROW nRow = i + nOffset;
sal_uLong nNumFormat = 0; sal_uLong nNumFormat = 0;
initFromCell(*this, pDoc, nCol, nRow, nDocTab, aData, nNumFormat); initFromCell(*this, pDoc, nCol, nRow, nDocTab, aData, nNumFormat);
aBuckets.push_back(Bucket(aData, 0, i)); aBuckets.push_back(Bucket(aData, i));
if (!aData.IsEmpty()) if (!aData.IsEmpty())
{ {
@ -418,7 +418,7 @@ bool ScDPCache::InitFromDataBase(DBConnector& rDB)
short nFormatType = css::util::NumberFormat::UNDEFINED; short nFormatType = css::util::NumberFormat::UNDEFINED;
aData.SetEmpty(); aData.SetEmpty();
rDB.getValue(nCol, aData, nFormatType); rDB.getValue(nCol, aData, nFormatType);
aBuckets.push_back(Bucket(aData, 0, nRow)); aBuckets.push_back(Bucket(aData, nRow));
if (!aData.IsEmpty()) if (!aData.IsEmpty())
{ {
maEmptyRows.insert_back(nRow, nRow+1, false); maEmptyRows.insert_back(nRow, nRow+1, false);

View File

@ -291,9 +291,9 @@ const ScDPItemData* ScDPFilteredCache::getCell(SCCOL nCol, SCROW nRow, bool bRep
return mrCache.GetItemDataById( nCol, nId ); return mrCache.GetItemDataById( nCol, nId );
} }
void ScDPFilteredCache::getValue( ScDPValue& rVal, SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const void ScDPFilteredCache::getValue( ScDPValue& rVal, SCCOL nCol, SCROW nRow) const
{ {
const ScDPItemData* pData = getCell( nCol, nRow, bRepeatIfEmpty ); const ScDPItemData* pData = getCell( nCol, nRow, false/*bRepeatIfEmpty*/ );
if (pData) if (pData)
{ {

View File

@ -169,7 +169,7 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPFiltered
if ( nDim < nCacheColumnCount ) if ( nDim < nCacheColumnCount )
{ {
ScDPValue& rVal = rData.aValues.back(); ScDPValue& rVal = rData.aValues.back();
rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false); rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow));
} }
} }
} }

View File

@ -435,7 +435,7 @@ void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
ResetTab(nMinPos, pDoc->GetTableCount()-1); ResetTab(nMinPos, pDoc->GetTableCount()-1);
} }
void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, bool bSkipNotes ) void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{ {
if (bDrawIsInUndo) if (bDrawIsInUndo)
return; return;
@ -454,7 +454,7 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, bool bSkip
SdrObject* pOldObject = aIter.Next(); SdrObject* pOldObject = aIter.Next();
while (pOldObject) while (pOldObject)
{ {
if ( bSkipNotes && IsNoteCaption( pOldObject ) ) if ( IsNoteCaption( pOldObject ) )
{ {
pOldObject = aIter.Next(); pOldObject = aIter.Next();
continue; continue;

View File

@ -495,7 +495,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
if (!bSameDoc) if (!bSameDoc)
{ {
pRangeNameToken->ReadjustAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos(), true); pRangeNameToken->ReadjustAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos(), true);
pRangeNameToken->AdjustAbsoluteRefs(pOldDoc, aOldPos, aNewPos, false, true); pRangeNameToken->AdjustAbsoluteRefs(pOldDoc, aOldPos, aNewPos, true);
} }
bool bInserted; bool bInserted;
@ -935,7 +935,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
pCode->ReadjustAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos); pCode->ReadjustAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos);
} }
pCode->AdjustAbsoluteRefs( rCell.pDocument, rCell.aPos, aPos, false, bCopyBetweenDocs ); pCode->AdjustAbsoluteRefs( rCell.pDocument, rCell.aPos, aPos, bCopyBetweenDocs );
} }
if (!pDocument->IsClipOrUndo()) if (!pDocument->IsClipOrUndo())

View File

@ -75,7 +75,7 @@ ScProgress* GetProgressBar(
if (nCount > 1) if (nCount > 1)
return new ScProgress( return new ScProgress(
pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount); pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount, true);
return nullptr; return nullptr;
} }

View File

@ -875,7 +875,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
{ {
// no borders or merge items involved - use pattern as-is // no borders or merge items involved - use pattern as-is
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++) for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern, true ); pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), static_cast<SCROW>(nCol-nCol1), *pPattern );
} }
else else
{ {
@ -918,7 +918,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++) for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1), pTransClip->SetPattern( static_cast<SCCOL>(nRow-nRow1),
static_cast<SCROW>(nCol-nCol1), aNewPattern, true); static_cast<SCROW>(nCol-nCol1), aNewPattern);
} }
} }
} }
@ -2557,16 +2557,14 @@ const ScStyleSheet* ScTable::GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow
return bEqual ? pStyle : nullptr; return bEqual ? pStyle : nullptr;
} }
bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
{ {
bool bIsUsed = false; bool bIsUsed = false;
for ( SCCOL i=0; i<=MAXCOL; i++ ) for ( SCCOL i=0; i<=MAXCOL; i++ )
{ {
if ( aCol[i].IsStyleSheetUsed( rStyle, bGatherAllStyles ) ) if ( aCol[i].IsStyleSheetUsed( rStyle, true/*bGatherAllStyles*/ ) )
{ {
if ( !bGatherAllStyles )
return true;
bIsUsed = true; bIsUsed = true;
} }
} }
@ -2620,10 +2618,10 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
return bChanged; return bChanged;
} }
void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr, bool bPutToPool ) void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
{ {
if (ValidColRow(nCol,nRow)) if (ValidColRow(nCol,nRow))
aCol[nCol].SetPattern( nRow, rAttr, bPutToPool ); aCol[nCol].SetPattern( nRow, rAttr, true/*bPutToPool*/ );
} }
void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr ) void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )
@ -3544,7 +3542,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
if (bThisTab) if (bThisTab)
{ {
aCell.release(aCol[nDestX], nDestY); aCell.release(aCol[nDestX], nDestY);
SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), true ); SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ) );
} }
else else
{ {

View File

@ -1129,7 +1129,7 @@ void ScTable::SortReorderByRow(
for (it = aSpans.begin(); it != itEnd; ++it) for (it = aSpans.begin(); it != itEnd; ++it)
{ {
aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern, true); aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern);
pDocument->GetPool()->Remove(*it->mpPattern); pDocument->GetPool()->Remove(*it->mpPattern);
} }
} }
@ -1327,7 +1327,7 @@ void ScTable::SortReorderByRowRefUpdate(
for (it = aSpans.begin(); it != itEnd; ++it) for (it = aSpans.begin(); it != itEnd; ++it)
{ {
aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern, true); aCol[nThisCol].SetPatternArea(it->mnRow1, it->mnRow2, *it->mpPattern);
pDocument->GetPool()->Remove(*it->mpPattern); pDocument->GetPool()->Remove(*it->mpPattern);
} }
} }
@ -1895,7 +1895,7 @@ static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
SfxItemSet& rSet = aNewPattern.GetItemSet(); SfxItemSet& rSet = aNewPattern.GetItemSet();
rSet.ClearItem( ATTR_VALUE_FORMAT ); rSet.ClearItem( ATTR_VALUE_FORMAT );
rSet.ClearItem( ATTR_LANGUAGE_FORMAT ); rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
pTab->SetPattern( nCol, nRow, aNewPattern, true ); pTab->SetPattern( nCol, nRow, aNewPattern );
} }
} }

View File

@ -1174,7 +1174,7 @@ void ScTable::FillFormulaVertical(
if (aSpans.empty()) if (aSpans.empty())
return; return;
aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE, false); aCol[nCol].DeleteRanges(aSpans, InsertDeleteFlags::VALUE | InsertDeleteFlags::DATETIME | InsertDeleteFlags::STRING | InsertDeleteFlags::FORMULA | InsertDeleteFlags::OUTLINE);
aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, nullptr); aCol[nCol].CloneFormulaCell(rSrcCell, sc::CellTextAttr(), aSpans, nullptr);
std::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument)); std::shared_ptr<sc::ColumnBlockPositionSet> pSet(new sc::ColumnBlockPositionSet(*pDocument));
@ -1567,7 +1567,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if(!bIsFiltered) if(!bIsFiltered)
{ {
aCol[nCol].SetPatternArea( static_cast<SCROW>(nIMin), aCol[nCol].SetPatternArea( static_cast<SCROW>(nIMin),
static_cast<SCROW>(nIMax), *pSrcPattern, true ); static_cast<SCROW>(nIMax), *pSrcPattern );
for(std::vector<sal_uInt32>::const_iterator itr = rCondFormatIndex.begin(), itrEnd = rCondFormatIndex.end(); for(std::vector<sal_uInt32>::const_iterator itr = rCondFormatIndex.begin(), itrEnd = rCondFormatIndex.end();
itr != itrEnd; ++itr) itr != itrEnd; ++itr)
@ -1588,7 +1588,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if(!RowHidden(nAtRow)) if(!RowHidden(nAtRow))
{ {
aCol[nCol].SetPatternArea( static_cast<SCROW>(nAtRow), aCol[nCol].SetPatternArea( static_cast<SCROW>(nAtRow),
static_cast<SCROW>(nAtRow), *pSrcPattern, true); static_cast<SCROW>(nAtRow), *pSrcPattern);
for(std::vector<sal_uInt32>::const_iterator itr = rCondFormatIndex.begin(), itrEnd = rCondFormatIndex.end(); for(std::vector<sal_uInt32>::const_iterator itr = rCondFormatIndex.begin(), itrEnd = rCondFormatIndex.end();
itr != itrEnd; ++itr) itr != itrEnd; ++itr)
{ {

View File

@ -71,7 +71,7 @@ static bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
} }
ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText, ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
sal_uLong nRange, bool bAllDocs, bool bWait) sal_uLong nRange, bool bWait)
: bEnabled(true) : bEnabled(true)
{ {
@ -107,7 +107,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
} }
else else
{ {
pProgress = new SfxProgress( pObjSh, rText, nRange, bAllDocs, bWait ); pProgress = new SfxProgress( pObjSh, rText, nRange, false/*bAllDocs*/, bWait );
pGlobalProgress = pProgress; pGlobalProgress = pProgress;
nGlobalRange = nRange; nGlobalRange = nRange;
nGlobalPercent = 0; nGlobalPercent = 0;
@ -151,7 +151,7 @@ void ScProgress::CreateInterpretProgress( ScDocument* pDoc, bool bWait )
if ( !pGlobalProgress ) if ( !pGlobalProgress )
pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(), pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(),
ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ), ScGlobal::GetRscString( STR_PROGRESS_CALCULATING ),
pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, false, bWait ); pDoc->GetFormulaCodeInTree()/MIN_NO_CODES_PER_PROGRESS_UPDATE, bWait );
pInterpretDoc = pDoc; pInterpretDoc = pDoc;
} }
} }

View File

@ -2428,9 +2428,9 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
} }
void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos, void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos,
bool bRangeName, bool bCheckCopyRange) bool bCheckCopyRange)
{ {
TokenPointers aPtrs( pCode, nLen, pRPN, nRPN, !bRangeName); TokenPointers aPtrs( pCode, nLen, pRPN, nRPN, true);
for (size_t j=0; j<2; ++j) for (size_t j=0; j<2; ++j)
{ {
FormulaToken** pp = aPtrs.maPointerRange[j].mpStart; FormulaToken** pp = aPtrs.maPointerRange[j].mpStart;
@ -2452,11 +2452,8 @@ void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddres
ScSingleRefData& rRef2 = rRef.Ref2; ScSingleRefData& rRef2 = rRef.Ref2;
ScSingleRefData& rRef1 = rRef.Ref1; ScSingleRefData& rRef1 = rRef.Ref1;
// for range names only adjust if all parts are absolute AdjustSingleRefData( rRef1, rOldPos, rNewPos );
if (!bRangeName || !(rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel())) AdjustSingleRefData( rRef2, rOldPos, rNewPos );
AdjustSingleRefData( rRef1, rOldPos, rNewPos );
if (!bRangeName || !(rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel()))
AdjustSingleRefData( rRef2, rOldPos, rNewPos );
} }
break; break;
case svSingleRef : case svSingleRef :
@ -2466,9 +2463,7 @@ void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddres
ScSingleRefData& rRef = *p->GetSingleRef(); ScSingleRefData& rRef = *p->GetSingleRef();
// for range names only adjust if all parts are absolute AdjustSingleRefData( rRef, rOldPos, rNewPos );
if (!bRangeName || !(rRef.IsColRel() || rRef.IsRowRel() || rRef.IsTabRel()))
AdjustSingleRefData( rRef, rOldPos, rNewPos );
} }
break; break;
default: default:

View File

@ -99,7 +99,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
SCROW nNumRows = nEndRow - rRange.aStart.Row() + 1; SCROW nNumRows = nEndRow - rRange.aStart.Row() + 1;
SCTAB nTab = rRange.aStart.Tab(); SCTAB nTab = rRange.aStart.Tab();
ScProgress aPrgrsBar( pDoc->GetDocumentShell(), ScGlobal::GetRscString( STR_LOAD_DOC ), nNumRows ); ScProgress aPrgrsBar( pDoc->GetDocumentShell(), ScGlobal::GetRscString( STR_LOAD_DOC ), nNumRows, true );
aPrgrsBar.SetState( 0 ); aPrgrsBar.SetState( 0 );

View File

@ -93,7 +93,7 @@ void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment )
nSysTotalSize /= 2; nSysTotalSize /= 2;
mnSysProgressScale *= 2; mnSysProgressScale *= 2;
} }
mxSysProgress.reset( new ScProgress( mpDocShell, maText, nSysTotalSize ) ); mxSysProgress.reset( new ScProgress( mpDocShell, maText, nSysTotalSize, true ) );
} }
if( !mbInProgress && mpCurrSegment && (mnTotalSize > 0) ) if( !mbInProgress && mpCurrSegment && (mnTotalSize > 0) )

View File

@ -108,7 +108,7 @@ sal_uLong ScEEImport::Read( SvStream& rStream, const OUString& rBaseURL )
void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate ) void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
{ {
ScProgress* pProgress = new ScProgress( mpDoc->GetDocumentShell(), ScProgress* pProgress = new ScProgress( mpDoc->GetDocumentShell(),
ScGlobal::GetRscString( STR_LOAD_DOC ), mpParser->ListSize() ); ScGlobal::GetRscString( STR_LOAD_DOC ), mpParser->ListSize(), true );
sal_uLong nProgress = 0; sal_uLong nProgress = 0;
SCCOL nStartCol, nEndCol; SCCOL nStartCol, nEndCol;

View File

@ -1611,7 +1611,7 @@ void ScInputHandler::GetColData()
std::vector<ScTypedStrData> aEntries; std::vector<ScTypedStrData> aEntries;
rDoc.GetDataEntries( rDoc.GetDataEntries(
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), true, aEntries, true); aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aEntries, true);
if (!aEntries.empty()) if (!aEntries.empty())
pColumnData->insert(aEntries.begin(), aEntries.end()); pColumnData->insert(aEntries.begin(), aEntries.end());

View File

@ -81,7 +81,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
aInnerRect.Top() = aInnerCenter.Y() - (aInnerSize.Width()>>1); aInnerRect.Top() = aInnerCenter.Y() - (aInnerSize.Width()>>1);
aInnerRect.Bottom()= aInnerCenter.Y() + (aInnerSize.Width()>>1); aInnerRect.Bottom()= aInnerCenter.Y() + (aInnerSize.Width()>>1);
ImpDrawArrow( aInnerRect, false/*bState*/ ); ImpDrawArrow( aInnerRect );
// restore old state // restore old state
pOut->EnableMapMode( bOldEnable ); pOut->EnableMapMode( bOldEnable );
@ -95,8 +95,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
pOut->SetFillColor(); pOut->SetFillColor();
} }
void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect, void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect )
bool bState )
{ {
// no need to save old line and fill color here (is restored after the call) // no need to save old line and fill color here (is restored after the call)
@ -115,7 +114,7 @@ void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect,
Rectangle aTempRect = aPixRect; Rectangle aTempRect = aPixRect;
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings(); const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
Color aColor( bState ? COL_LIGHTBLUE : rSett.GetButtonTextColor().GetColor() ); Color aColor( rSett.GetButtonTextColor().GetColor() );
pOut->SetFillColor( aColor ); pOut->SetFillColor( aColor );
pOut->SetLineColor( aColor ); pOut->SetLineColor( aColor );

View File

@ -372,7 +372,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
aSourceMark.SetMarkArea( aTokenRange ); aSourceMark.SetMarkArea( aTokenRange );
ScClipParam aClipParam(aTokenRange, false); ScClipParam aClipParam(aTokenRange, false);
rSrcDoc.CopyToClip(aClipParam, &aClipDoc, &aSourceMark); rSrcDoc.CopyToClip(aClipParam, &aClipDoc, &aSourceMark, false, false);
if ( aClipDoc.HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab, if ( aClipDoc.HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) ) HASATTR_MERGED | HASATTR_OVERLAPPED ) )

View File

@ -559,7 +559,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
{ {
ScInputOptions aInputOption = SC_MOD()->GetInputOptions(); ScInputOptions aInputOption = SC_MOD()->GetInputOptions();
bool bUpdateRefs = aInputOption.GetSortRefUpdate(); bool bUpdateRefs = aInputOption.GetSortRefUpdate();
ScProgress aProgress(&rDocShell, ScGlobal::GetRscString(STR_PROGRESS_SORTING), 0); ScProgress aProgress(&rDocShell, ScGlobal::GetRscString(STR_PROGRESS_SORTING), 0, true);
rDoc.Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam); rDoc.Sort(nTab, aLocalParam, bRepeatQuery, bUpdateRefs, &aProgress, &aUndoParam);
} }
@ -823,7 +823,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
sal_uLong nProgCount = nFormulaCols; sal_uLong nProgCount = nFormulaCols;
nProgCount *= aLocalParam.nRow2 - nFStartY; nProgCount *= aLocalParam.nRow2 - nFStartY;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aLocalParam.nCol2+1, nFStartY, rDoc.Fill( aLocalParam.nCol2+1, nFStartY,
aLocalParam.nCol2+nFormulaCols, nFStartY, &aProgress, aMark, aLocalParam.nCol2+nFormulaCols, nFStartY, &aProgress, aMark,

View File

@ -190,7 +190,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
{ {
// progress bar // progress bar
// only text (title is still needed, for the cancel button) // only text (title is still needed, for the cancel button)
ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0 ); ScProgress aProgress( &rDocShell, ScGlobal::GetRscString(STR_UNDO_IMPORTDATA), 0, true );
uno::Reference<sdbc::XRowSet> xRowSet( xResultSet, uno::UNO_QUERY ); uno::Reference<sdbc::XRowSet> xRowSet( xResultSet, uno::UNO_QUERY );
bool bDispose = false; bool bDispose = false;
@ -554,7 +554,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
sal_uLong nProgCount = nFormulaCols; sal_uLong nProgCount = nFormulaCols;
nProgCount *= nEndRow-rParam.nRow1-1; nProgCount *= nEndRow-rParam.nRow1-1;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( nEndCol+1, rParam.nRow1+1, nEndCol+nFormulaCols, rParam.nRow1+1, rDoc.Fill( nEndCol+1, rParam.nRow1+1, nEndCol+nFormulaCols, rParam.nRow1+1,
&aProgress, aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE ); &aProgress, aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE );

View File

@ -2614,7 +2614,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef); ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
ScClipParam aClipParam(ScRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nStartTab), bCut); ScClipParam aClipParam(ScRange(nStartCol, nStartRow, nStartTab, nEndCol, nEndRow, nStartTab), bCut);
rDoc.CopyToClip(aClipParam, pClipDoc, &aSourceMark, false, bScenariosAdded, true); rDoc.CopyToClip(aClipParam, pClipDoc, &aSourceMark, bScenariosAdded, true);
ScDrawLayer::SetGlobalDrawPersist(nullptr); ScDrawLayer::SetGlobalDrawPersist(nullptr);
@ -4348,7 +4348,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
nProgCount *= nCount; nProgCount *= nCount;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
@ -4475,7 +4475,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
nProgCount *= nCount; nProgCount *= nCount;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
@ -4614,7 +4614,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1; nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
nProgCount *= nCount; nProgCount *= nCount;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(), rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress, aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,

View File

@ -1855,7 +1855,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
SCROW nEndRow; SCROW nEndRow;
aDocument.GetCellArea( nTab, nEndCol, nEndRow ); aDocument.GetCellArea( nTab, nEndCol, nEndRow );
ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), nEndRow ); ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), nEndRow, true );
OUString aString; OUString aString;

View File

@ -293,12 +293,12 @@ void ScDocShell::SetLockCount(sal_uInt16 nNew)
{ {
if ( !pPaintLockData ) if ( !pPaintLockData )
pPaintLockData = new ScPaintLockData; pPaintLockData = new ScPaintLockData;
pPaintLockData->SetLevel(nNew-1, true); pPaintLockData->SetDocLevel(nNew-1);
LockDocument_Impl(nNew); LockDocument_Impl(nNew);
} }
else if (pPaintLockData) // loeschen else if (pPaintLockData) // loeschen
{ {
pPaintLockData->SetLevel(0, true); // bei Unlock sofort ausfuehren pPaintLockData->SetDocLevel(0); // bei Unlock sofort ausfuehren
UnlockPaint_Impl(true); // jetzt UnlockPaint_Impl(true); // jetzt
UnlockDocument_Impl(0); UnlockDocument_Impl(0);
} }
@ -828,7 +828,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
// ab hier kein return mehr // ab hier kein return mehr
ScProgress aProgress( this, OUString("..."), ScProgress aProgress( this, OUString("..."),
nNewActionCount ); nNewActionCount, true );
sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber(); sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
// UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand // UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand

View File

@ -974,7 +974,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
} }
ScProgress* pProgress = new ScProgress(this, ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), ScProgress* pProgress = new ScProgress(this, ScGlobal::GetRscString(STR_UNDO_MOVE_TAB),
aDocument.GetCodeCount()); aDocument.GetCodeCount(), true);
bool bDone = aDocument.MoveTab( nSrcTab, nDestTab, pProgress ); bool bDone = aDocument.MoveTab( nSrcTab, nDestTab, pProgress );
delete pProgress; delete pProgress;
if (!bDone) if (!bDone)

View File

@ -316,7 +316,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
return nRet; return nRet;
::utl::DisposableComponent aConnectionHelper(xConnection); ::utl::DisposableComponent aConnectionHelper(xConnection);
ScProgress aProgress( this, ScGlobal::GetRscString( STR_LOAD_DOC ), 0 ); ScProgress aProgress( this, ScGlobal::GetRscString( STR_LOAD_DOC ), 0, true );
uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory();
uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET), uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET),
uno::UNO_QUERY); uno::UNO_QUERY);
@ -807,7 +807,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
if ( nFirstRow > nLastRow ) if ( nFirstRow > nLastRow )
nFirstRow = nLastRow; nFirstRow = nLastRow;
ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ), ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ),
nLastRow - nFirstRow ); nLastRow - nFirstRow, true );
SvNumberFormatter* pNumFmt = aDocument.GetFormatTable(); SvNumberFormatter* pNumFmt = aDocument.GetFormatTable();
bool bHasFieldNames = true; bool bHasFieldNames = true;

View File

@ -1267,7 +1267,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
sal_uInt64 const nOldPos = rStrm.Tell(); sal_uInt64 const nOldPos = rStrm.Tell();
sal_uInt64 const nRemaining = rStrm.remainingSize(); sal_uInt64 const nRemaining = rStrm.remainingSize();
std::unique_ptr<ScProgress> xProgress( new ScProgress( pDocSh, std::unique_ptr<ScProgress> xProgress( new ScProgress( pDocSh,
ScGlobal::GetRscString( STR_LOAD_DOC ), nRemaining )); ScGlobal::GetRscString( STR_LOAD_DOC ), nRemaining, true ));
rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() ); rStrm.StartReadingUnicodeText( rStrm.GetStreamCharSet() );
SCCOL nStartCol = aRange.aStart.Col(); SCCOL nStartCol = aRange.aStart.Col();

View File

@ -48,8 +48,7 @@ public:
Size GetSizePixel() const { return aBtnSize; } Size GetSizePixel() const { return aBtnSize; }
private: private:
void ImpDrawArrow( const Rectangle& rRect, void ImpDrawArrow( const Rectangle& rRect );
bool bState );
protected: protected:
VclPtr<OutputDevice> pOut; VclPtr<OutputDevice> pOut;

View File

@ -36,36 +36,21 @@ class ScEditEngineDefaulter;
class ScAsciiOptions; class ScAsciiOptions;
class ScAccessibleCsvControl; class ScAccessibleCsvControl;
const sal_uInt8 CSV_COLFLAG_NONE = 0x00; /// Nothing set.
const sal_uInt8 CSV_COLFLAG_SELECT = 0x01; /// Column is selected.
const sal_uInt32 CSV_COLUMN_INVALID = CSV_VEC_NOTFOUND; const sal_uInt32 CSV_COLUMN_INVALID = CSV_VEC_NOTFOUND;
/** This struct contains the state of one table column. */ /** This struct contains the state of one table column. */
struct ScCsvColState struct ScCsvColState
{ {
sal_Int32 mnType; /// Data type. sal_Int32 mnType; /// Data type.
sal_uInt8 mnFlags; /// Flags (i.e. selection state). bool mbColumnSelected;
inline explicit ScCsvColState( explicit ScCsvColState( sal_Int32 nType = CSV_TYPE_DEFAULT ) :
sal_Int32 nType = CSV_TYPE_DEFAULT, mnType( nType ), mbColumnSelected( false ) {}
sal_uInt8 nFlags = CSV_COLFLAG_NONE ) :
mnType( nType ), mnFlags( nFlags ) {}
inline bool IsSelected() const; bool IsSelected() const { return mbColumnSelected; }
inline void Select( bool bSel ); void Select( bool bSel ) { mbColumnSelected = bSel; }
}; };
inline bool ScCsvColState::IsSelected() const
{
return (mnFlags & CSV_COLFLAG_SELECT) != 0;
}
inline void ScCsvColState::Select( bool bSel )
{
if( bSel ) mnFlags |= CSV_COLFLAG_SELECT; else mnFlags &= ~CSV_COLFLAG_SELECT;
}
typedef ::std::vector< ScCsvColState > ScCsvColStateVec; typedef ::std::vector< ScCsvColState > ScCsvColStateVec;
/** A data grid control for the CSV import dialog. The design of this control /** A data grid control for the CSV import dialog. The design of this control

View File

@ -50,8 +50,8 @@ public:
bool GetModified() const { return bModified; } bool GetModified() const { return bModified; }
/** for recovery after reset */ /** for recovery after reset */
void SetLevel(sal_uInt16 nNew, bool bDoc) void SetDocLevel(sal_uInt16 nNew)
{ if (bDoc) nDocLevel = nNew; else nLevel = nNew; } { nDocLevel = nNew; }
}; };
#endif #endif

View File

@ -214,7 +214,7 @@ public:
void RemoveManualBreaks(); void RemoveManualBreaks();
void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages); void SetPrintZoom(sal_uInt16 nScale);
void AdjustPrintZoom(); void AdjustPrintZoom();
bool TestMergeCells(); bool TestMergeCells();

View File

@ -1269,7 +1269,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_u
{ {
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
ScClipParam aClipParam(rRange, false); ScClipParam aClipParam(rRange, false);
rSrcDoc.CopyToClip(aClipParam, pClipDoc, &aMark); rSrcDoc.CopyToClip(aClipParam, pClipDoc, &aMark, false, false);
// pClipDoc->ExtendMerge( rRange, sal_True ); // pClipDoc->ExtendMerge( rRange, sal_True );
TransferableObjectDescriptor aObjDesc; TransferableObjectDescriptor aObjDesc;

View File

@ -1369,7 +1369,7 @@ void ScUndoDragDrop::Redo()
// do not clone objects and note captions into clipdoc (see above) // do not clone objects and note captions into clipdoc (see above)
// but at least copy notes // but at least copy notes
ScClipParam aClipParam(aSrcRange, bCut); ScClipParam aClipParam(aSrcRange, bCut);
rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, false, bKeepScenarioFlags); rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, bKeepScenarioFlags, false);
if (bCut) if (bCut)
{ {

View File

@ -599,7 +599,7 @@ void ScUndoAutoFill::Redo()
nProgCount = aSource.aEnd.Row() - aSource.aStart.Row() + 1; nProgCount = aSource.aEnd.Row() - aSource.aStart.Row() + 1;
nProgCount *= nCount; nProgCount *= nCount;
ScProgress aProgress( rDoc.GetDocumentShell(), ScProgress aProgress( rDoc.GetDocumentShell(),
ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount ); ScGlobal::GetRscString(STR_FILL_SERIES_PROGRESS), nProgCount, true );
rDoc.Fill( aSource.aStart.Col(), aSource.aStart.Row(), rDoc.Fill( aSource.aStart.Col(), aSource.aStart.Row(),
aSource.aEnd.Col(), aSource.aEnd.Row(), &aProgress, aSource.aEnd.Col(), aSource.aEnd.Row(), &aProgress,
@ -1000,7 +1000,7 @@ void ScUndoReplace::Undo()
pSearchItem->SetReplaceString(aTempStr); pSearchItem->SetReplaceString(aTempStr);
rDoc.ReplaceStyle( *pSearchItem, rDoc.ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
aMarkData, true); aMarkData);
pSearchItem->SetReplaceString(pSearchItem->GetSearchString()); pSearchItem->SetReplaceString(pSearchItem->GetSearchString());
pSearchItem->SetSearchString(aTempStr); pSearchItem->SetSearchString(aTempStr);
if (pViewShell) if (pViewShell)
@ -1066,7 +1066,7 @@ void ScUndoReplace::Redo()
{ {
rDoc.ReplaceStyle( *pSearchItem, rDoc.ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
aMarkData, true); aMarkData);
pDocShell->PostPaintGridAll(); pDocShell->PostPaintGridAll();
} }
else else

View File

@ -500,7 +500,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
{ {
size_t i = mpNewTabs->size(); size_t i = mpNewTabs->size();
std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB),
i * rDoc.GetCodeCount())); i * rDoc.GetCodeCount(), true));
for (; i > 0; --i) for (; i > 0; --i)
{ {
SCTAB nDestTab = (*mpNewTabs)[i-1]; SCTAB nDestTab = (*mpNewTabs)[i-1];
@ -522,7 +522,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
{ {
size_t n = mpNewTabs->size(); size_t n = mpNewTabs->size();
std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB), std::unique_ptr<ScProgress> pProgress(new ScProgress(pDocShell , ScGlobal::GetRscString(STR_UNDO_MOVE_TAB),
n * rDoc.GetCodeCount())); n * rDoc.GetCodeCount(), true));
for (size_t i = 0; i < n; ++i) for (size_t i = 0; i < n; ++i)
{ {
SCTAB nDestTab = (*mpNewTabs)[i]; SCTAB nDestTab = (*mpNewTabs)[i];

View File

@ -154,7 +154,7 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
aSourceMark.SelectOneTable( nSrcTab ); // for CopyToClip aSourceMark.SelectOneTable( nSrcTab ); // for CopyToClip
aSourceMark.SetMarkArea( rSrcRange ); aSourceMark.SetMarkArea( rSrcRange );
ScClipParam aClipParam(rSrcRange, false); ScClipParam aClipParam(rSrcRange, false);
pSrcDoc->CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark); pSrcDoc->CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, false, false);
if ( pClipDoc->HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab, if ( pClipDoc->HasAttrib( 0,0,nSrcTab, MAXCOL,MAXROW,nSrcTab,
HASATTR_MERGED | HASATTR_OVERLAPPED ) ) HASATTR_MERGED | HASATTR_OVERLAPPED ) )

View File

@ -1518,7 +1518,7 @@ ScVbaRange::getValue() throw (uno::RuntimeException, std::exception)
} }
void void
ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter, bool bFireEvent ) throw (uno::RuntimeException) ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter ) throw (uno::RuntimeException)
{ {
uno::TypeClass aClass = aValue.getValueTypeClass(); uno::TypeClass aClass = aValue.getValueTypeClass();
if ( aClass == uno::TypeClass_SEQUENCE ) if ( aClass == uno::TypeClass_SEQUENCE )
@ -1553,7 +1553,7 @@ ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter, bool bFi
{ {
visitArray( valueSetter ); visitArray( valueSetter );
} }
if( bFireEvent ) fireChangeEvent(); fireChangeEvent();
} }
void SAL_CALL void SAL_CALL
@ -1568,7 +1568,7 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException, st
return; return;
} }
CellValueSetter valueSetter( aValue ); CellValueSetter valueSetter( aValue );
setValue( aValue, valueSetter, true ); setValue( aValue, valueSetter );
} }
void SAL_CALL void SAL_CALL
@ -1642,7 +1642,7 @@ ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::
return; return;
} }
CellFormulaValueSetter formulaValueSetter( rFormula, &getScDocument(), eGram ); CellFormulaValueSetter formulaValueSetter( rFormula, &getScDocument(), eGram );
setValue( rFormula, formulaValueSetter, true/*bFireEvent*/ ); setValue( rFormula, formulaValueSetter );
} }
uno::Any uno::Any

View File

@ -98,7 +98,7 @@ class ScVbaRange : public ScVbaRange_BASE
void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException); void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException);
css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException); css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException);
void setValue( const css::uno::Any& aValue, ValueSetter& setter, bool bFireEvent ) throw ( css::uno::RuntimeException); void setValue( const css::uno::Any& aValue, ValueSetter& setter ) throw ( css::uno::RuntimeException);
css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException); css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException);
void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException); void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);

View File

@ -1141,7 +1141,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
bool bEmpty = false; bool bEmpty = false;
std::vector<ScTypedStrData> aStrings; // case sensitive std::vector<ScTypedStrData> aStrings; // case sensitive
// Fill List // Fill List
pDoc->GetDataEntries(nCol, nRow, nTab, true, aStrings); pDoc->GetDataEntries(nCol, nRow, nTab, aStrings);
if (aStrings.empty()) if (aStrings.empty())
bEmpty = true; bEmpty = true;

View File

@ -461,7 +461,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP ); ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
ScClipParam aClipParam(aTabRange, false); ScClipParam aClipParam(aTabRange, false);
rDoc.CopyToClip(aClipParam, pClipDoc, &aTabMark); rDoc.CopyToClip(aClipParam, pClipDoc, &aTabMark, false, false);
TransferableObjectDescriptor aObjDesc; TransferableObjectDescriptor aObjDesc;
pDocSh->FillTransferableObjectDescriptor( aObjDesc ); pDocSh->FillTransferableObjectDescriptor( aObjDesc );

View File

@ -230,7 +230,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
break; break;
case FID_RESET_PRINTZOOM: case FID_RESET_PRINTZOOM:
SetPrintZoom( 100, 0 ); // 100%, not on pages SetPrintZoom( 100 ); // 100%, not on pages
rReq.Done(); rReq.Done();
break; break;

View File

@ -869,11 +869,11 @@ void ScViewFunc::RemoveManualBreaks()
pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
} }
void ScViewFunc::SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages) void ScViewFunc::SetPrintZoom(sal_uInt16 nScale)
{ {
ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocShell* pDocSh = GetViewData().GetDocShell();
SCTAB nTab = GetViewData().GetTabNo(); SCTAB nTab = GetViewData().GetTabNo();
pDocSh->SetPrintZoom( nTab, nScale, nPages ); pDocSh->SetPrintZoom( nTab, nScale, 0/*nPages*/ );
} }
void ScViewFunc::AdjustPrintZoom() void ScViewFunc::AdjustPrintZoom()

View File

@ -235,7 +235,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
pClipDoc->SetClipOptions(aOptions); pClipDoc->SetClipOptions(aOptions);
} }
pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects ); pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, bIncludeObjects );
if ( pDoc && pClipDoc ) if ( pDoc && pClipDoc )
{ {
ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer(); ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
@ -365,7 +365,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
} }
if (!bValidRanges) if (!bValidRanges)
break; break;
pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects ); pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, bIncludeObjects );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack ) if ( pChangeTrack )
@ -422,7 +422,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) ); ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
ScClipParam aClipParam(aRange, false); ScClipParam aClipParam(aRange, false);
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true); pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, true);
ScDrawLayer::SetGlobalDrawPersist(nullptr); ScDrawLayer::SetGlobalDrawPersist(nullptr);
pClipDoc->ExtendMerge( aRange, true ); pClipDoc->ExtendMerge( aRange, true );

View File

@ -152,7 +152,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
nFirstRow = nLastRow = 0; nFirstRow = nLastRow = 0;
} }
ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, nSrcTab, nLastCol, nLastRow, nSrcTab), false); ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, nSrcTab, nLastCol, nLastRow, nSrcTab), false);
rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark); rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark, false, false);
ScGlobal::SetClipDocName( xDocShRef->GetTitle( SFX_TITLE_FULLNAME ) ); ScGlobal::SetClipDocName( xDocShRef->GetTitle( SFX_TITLE_FULLNAME ) );
SetCursor( nPosX, nPosY ); SetCursor( nPosX, nPosY );

View File

@ -461,7 +461,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWorkday( const uno::Reference< beans::XProp
SortedIndividualInt32List aSrtLst; SortedIndividualInt32List aSrtLst;
aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate, false ); aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate );
sal_Int32 nActDate = nDate + nNullDate; sal_Int32 nActDate = nDate + nNullDate;
@ -569,7 +569,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getNetworkdays( const uno::Reference< beans::X
SortedIndividualInt32List aSrtLst; SortedIndividualInt32List aSrtLst;
aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate, false ); aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate );
sal_Int32 nActDate = nStartDate + nNullDate; sal_Int32 nActDate = nStartDate + nNullDate;
sal_Int32 nStopDate = nEndDate + nNullDate; sal_Int32 nStopDate = nEndDate + nNullDate;

View File

@ -1533,8 +1533,7 @@ void SortedIndividualInt32List::InsertHolidayList(
ScaAnyConverter& rAnyConv, ScaAnyConverter& rAnyConv,
const uno::Reference< beans::XPropertySet >& xOptions, const uno::Reference< beans::XPropertySet >& xOptions,
const uno::Any& rHolAny, const uno::Any& rHolAny,
sal_Int32 nNullDate, sal_Int32 nNullDate ) throw( uno::RuntimeException, lang::IllegalArgumentException )
bool bInsertOnWeekend ) throw( uno::RuntimeException, lang::IllegalArgumentException )
{ {
rAnyConv.init( xOptions ); rAnyConv.init( xOptions );
if( rHolAny.getValueTypeClass() == uno::TypeClass_SEQUENCE ) if( rHolAny.getValueTypeClass() == uno::TypeClass_SEQUENCE )
@ -1549,14 +1548,14 @@ void SortedIndividualInt32List::InsertHolidayList(
const uno::Any* pAnyArray = rSubSeq.getConstArray(); const uno::Any* pAnyArray = rSubSeq.getConstArray();
for( sal_Int32 nIndex2 = 0; nIndex2 < rSubSeq.getLength(); nIndex2++ ) for( sal_Int32 nIndex2 = 0; nIndex2 < rSubSeq.getLength(); nIndex2++ )
InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, bInsertOnWeekend ); InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, false/*bInsertOnWeekend*/ );
} }
} }
else else
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
} }
else else
InsertHolidayList( rAnyConv, rHolAny, nNullDate, bInsertOnWeekend ); InsertHolidayList( rAnyConv, rHolAny, nNullDate, false/*bInsertOnWeekend*/ );
} }

View File

@ -271,13 +271,12 @@ public:
bool Find( sal_Int32 nVal ) const; bool Find( sal_Int32 nVal ) const;
/** @param rAnyConv is an initialized or uninitialized ScaAnyConverter /** @param rAnyConv is an initialized or uninitialized ScaAnyConverter
@param bInsertOnWeekend insertion mode: false = holidays on weekend are omitted */ holidays on weekend are omitted */
void InsertHolidayList( void InsertHolidayList(
ScaAnyConverter& rAnyConv, ScaAnyConverter& rAnyConv,
const css::uno::Reference< css::beans::XPropertySet >& xOptions, const css::uno::Reference< css::beans::XPropertySet >& xOptions,
const css::uno::Any& rHolAny, const css::uno::Any& rHolAny,
sal_Int32 nNullDate, sal_Int32 nNullDate) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
bool bInsertOnWeekend ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
}; };