loplugin:constantparam in sc
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
This commit is contained in:
parent
c09d0aa46c
commit
682b9b33c7
@ -256,7 +256,7 @@ public:
|
||||
SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
|
||||
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(
|
||||
sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const;
|
||||
@ -450,7 +450,7 @@ public:
|
||||
ScEditDataArray* pDataArray = nullptr );
|
||||
void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false );
|
||||
void SetPatternArea( SCROW nStartRow, SCROW nEndRow,
|
||||
const ScPatternAttr& rPatAttr, bool bPutToPool = false );
|
||||
const ScPatternAttr& rPatAttr );
|
||||
void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
|
||||
const ScPatternAttr& rPattern, short nNewType );
|
||||
|
||||
|
@ -684,7 +684,7 @@ public:
|
||||
SCTAB nPos, const OUString& rName, bool bExternalDocument = false, bool bUndoDeleteTab = false );
|
||||
|
||||
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 DeleteTab( SCTAB nTab );
|
||||
SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
|
||||
@ -1272,8 +1272,8 @@ public:
|
||||
void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
|
||||
|
||||
void CopyToClip(const ScClipParam& rClipParam, ScDocument* pClipDoc,
|
||||
const ScMarkData* pMarks = nullptr, bool bAllTabs = false, bool bKeepScenarioFlags = false,
|
||||
bool bIncludeObjects = false, bool bCloneNoteCaptions = true, bool bUseRangeForVBA = false );
|
||||
const ScMarkData* pMarks, bool bKeepScenarioFlags,
|
||||
bool bIncludeObjects );
|
||||
|
||||
/**
|
||||
* Copy only raw cell values to another document. Formula cells are
|
||||
@ -1756,7 +1756,7 @@ public:
|
||||
std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
|
||||
|
||||
void GetDataEntries(
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens,
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
std::vector<ScTypedStrData>& rStrings, bool bLimit = false );
|
||||
void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
|
||||
|
||||
@ -1778,7 +1778,7 @@ public:
|
||||
|
||||
void ReplaceStyle(const SvxSearchItem& rSearchItem,
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
ScMarkData& rMark, bool bIsUndo);
|
||||
ScMarkData& rMark);
|
||||
|
||||
void InvalidateTextWidth( const OUString& rStyleName );
|
||||
void InvalidateTextWidth( SCTAB nTab );
|
||||
@ -1937,7 +1937,7 @@ public:
|
||||
void PutInFormulaTree( ScFormulaCell* pCell );
|
||||
void RemoveFromFormulaTree( ScFormulaCell* pCell );
|
||||
|
||||
/**
|
||||
/**
|
||||
* Calculate formula cells that are on the formula tree either partially,
|
||||
* or in full.
|
||||
*
|
||||
|
@ -125,7 +125,7 @@ public:
|
||||
that the data grid doesn't include the header row. Don't delete the
|
||||
returned object! */
|
||||
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;
|
||||
|
||||
/** Get the unique entries for a field specified by index. The caller must
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
void ScRemovePage( SCTAB nTab );
|
||||
void ScRenamePage( SCTAB nTab, const OUString& rNewName );
|
||||
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 );
|
||||
|
||||
ScDocument* GetDocument() const { return pDoc; }
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
|
||||
ScProgress( SfxObjectShell* pObjSh,
|
||||
const OUString& rText,
|
||||
sal_uLong nRange, bool bAllDocs = false,
|
||||
sal_uLong nRange,
|
||||
bool bWait = true );
|
||||
~ScProgress();
|
||||
|
||||
|
@ -616,12 +616,12 @@ public:
|
||||
void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
|
||||
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()))
|
||||
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,
|
||||
const ScPatternAttr& rPattern, short nNewType );
|
||||
void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
|
||||
@ -643,7 +643,7 @@ public:
|
||||
double nPPTX, double nPPTY,
|
||||
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 RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_Int16 nFlags );
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
point to the originating sheet to point to the new sheet instead.
|
||||
|
@ -262,7 +262,7 @@ void Test::testPerf()
|
||||
// Copy cell A1 to clipboard.
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
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));
|
||||
|
||||
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
|
||||
@ -333,7 +333,7 @@ void Test::testPerf()
|
||||
// Copy to clipboard.
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
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));
|
||||
|
||||
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
|
||||
@ -410,7 +410,7 @@ void Test::testPerf()
|
||||
// Copy to clipboard.
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
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));
|
||||
|
||||
ScDocument* pUndoDoc = new ScDocument(SCDOCMODE_UNDO);
|
||||
@ -798,7 +798,7 @@ void Test::testDataEntries()
|
||||
m_pDoc->SetString(ScAddress(0,10,0), "Andy");
|
||||
|
||||
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.
|
||||
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());
|
||||
|
||||
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());
|
||||
|
||||
// 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,5,0,1,5,0)); // A6:B6
|
||||
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).
|
||||
m_pDoc->CopyMultiRangeFromClip(ScAddress(3,8,0), aMark, InsertDeleteFlags::CONTENTS, &aClipDoc);
|
||||
@ -4044,7 +4044,7 @@ void Test::testCopyPasteRelativeFormula()
|
||||
ScMarkData aMark;
|
||||
aMark.SetMarkArea(aRange);
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
|
||||
|
||||
// Paste it to B1:B2.
|
||||
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
|
||||
@ -4067,7 +4067,7 @@ void Test::testCopyPasteRelativeFormula()
|
||||
|
||||
// Copy A1 to clipboard.
|
||||
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));
|
||||
CPPUNIT_ASSERT(pFC);
|
||||
@ -4127,7 +4127,7 @@ void Test::testCopyPasteRepeatOneFormula()
|
||||
// Copy C1 to clipboard.
|
||||
ScClipParam aClipParam(aPos, false);
|
||||
aMark.SetMarkArea(aPos);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
|
||||
|
||||
// Paste it to C2:C10.
|
||||
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
|
||||
@ -4396,7 +4396,7 @@ void Test::testUpdateReference()
|
||||
std::vector<OUString> aSheets;
|
||||
aSheets.push_back("Sheet1");
|
||||
aSheets.push_back("Sheet2");
|
||||
m_pDoc->InsertTabs(0, aSheets, false, true);
|
||||
m_pDoc->InsertTabs(0, aSheets, true);
|
||||
m_pDoc->GetValue(2, 0, 2, aValue);
|
||||
OUString aFormula;
|
||||
m_pDoc->GetFormula(2,0,2, aFormula);
|
||||
@ -4780,7 +4780,7 @@ void Test::testCopyPasteFormulasExternalDoc()
|
||||
ScMarkData aMark;
|
||||
aMark.SetMarkArea(aRange);
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
|
||||
|
||||
InsertDeleteFlags nFlags = InsertDeleteFlags::ALL;
|
||||
aRange = ScRange(1,1,1,1,6,1);
|
||||
@ -5193,7 +5193,7 @@ void Test::testNoteLifeCycle()
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
ScMarkData aMarkData;
|
||||
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);
|
||||
CPPUNIT_ASSERT_MESSAGE("Failed to copy note to the clipboard.", pClipNote);
|
||||
@ -5273,7 +5273,7 @@ void Test::testNoteCopyPaste()
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
aClipDoc.ResetClip(m_pDoc, &aMark);
|
||||
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.
|
||||
pNote = aClipDoc.GetNote(ScAddress(1,1,0));
|
||||
@ -6148,7 +6148,7 @@ void Test::testCopyPasteMatrixFormula()
|
||||
ScAddress aPos(0,0,0); // A1
|
||||
ScDocument aClipDoc(SCDOCMODE_CLIP);
|
||||
ScClipParam aParam(aPos, false);
|
||||
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aParam, &aClipDoc, &aMark, false, false);
|
||||
// Formula string should be equal.
|
||||
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);
|
||||
ScMarkData aMark;
|
||||
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)
|
||||
|
@ -7011,7 +7011,7 @@ public:
|
||||
// Copy formula cell to clipboard.
|
||||
ScClipParam aClipParam(aPos, false);
|
||||
aMark.SetMarkArea(aPos);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
|
||||
|
||||
// Paste it to first range.
|
||||
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
|
||||
@ -7131,7 +7131,7 @@ void Test::testTdf97587()
|
||||
// Copy formula cell to clipboard.
|
||||
ScClipParam aClipParam(aPos, false);
|
||||
aMark.SetMarkArea(aPos);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark);
|
||||
m_pDoc->CopyToClip(aClipParam, &aClipDoc, &aMark, false, false);
|
||||
|
||||
// Paste it to first range.
|
||||
InsertDeleteFlags nFlags = InsertDeleteFlags::CONTENTS;
|
||||
|
@ -689,9 +689,9 @@ void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutT
|
||||
}
|
||||
|
||||
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 )
|
||||
|
@ -469,11 +469,11 @@ void ScColumn::SwapNonEmpty(
|
||||
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();
|
||||
for (; itSpan != itSpanEnd; ++itSpan)
|
||||
DeleteArea(itSpan->mnRow1, itSpan->mnRow2, nDelFlag, bBroadcast);
|
||||
DeleteArea(itSpan->mnRow1, itSpan->mnRow2, nDelFlag, false/*bBroadcast*/);
|
||||
}
|
||||
|
||||
void ScColumn::CloneFormulaCell(
|
||||
|
@ -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);
|
||||
itr = mpTabRangesArray->begin();
|
||||
@ -2643,7 +2643,7 @@ void ScDocRowHeightUpdater::updateAll()
|
||||
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);
|
||||
sc::RowHeightContext aCxt(mfPPTX, mfPPTY, aZoom, aZoom, mpOutDev);
|
||||
|
@ -1554,7 +1554,7 @@ void ScDocument::GetFilterEntriesArea(
|
||||
* Entries for selection list listbox (no numbers/formulas)
|
||||
*/
|
||||
void ScDocument::GetDataEntries(
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens,
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
std::vector<ScTypedStrData>& rStrings, bool bLimit )
|
||||
{
|
||||
if( !bLimit )
|
||||
@ -1569,7 +1569,7 @@ void ScDocument::GetDataEntries(
|
||||
if( pData && pData->FillSelectionList( rStrings, ScAddress( nCol, nRow, nTab ) ) )
|
||||
{
|
||||
if (pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING)
|
||||
sortAndRemoveDuplicates(rStrings, bCaseSens);
|
||||
sortAndRemoveDuplicates(rStrings, true/*bCaseSens*/);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -1585,7 +1585,7 @@ void ScDocument::GetDataEntries(
|
||||
std::set<ScTypedStrData> aStrings;
|
||||
maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit);
|
||||
rStrings.insert(rStrings.end(), aStrings.begin(), aStrings.end());
|
||||
sortAndRemoveDuplicates(rStrings, bCaseSens);
|
||||
sortAndRemoveDuplicates(rStrings, true/*bCaseSens*/);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -531,11 +531,10 @@ bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
|
||||
|
||||
void ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem,
|
||||
SCCOL nCol, SCROW nRow, SCTAB nTab,
|
||||
ScMarkData& rMark,
|
||||
bool bIsUndoP)
|
||||
ScMarkData& rMark)
|
||||
{
|
||||
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()
|
||||
@ -1165,7 +1164,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
|
||||
nIndex = 0;
|
||||
aProText.append(aTemplate.getToken( 1, '#', nIndex ));
|
||||
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
|
||||
|
||||
std::unique_ptr<SCCOLROW[]> pTempRows(new SCCOLROW[nThisEndRow+1]);
|
||||
|
@ -816,7 +816,7 @@ void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin)
|
||||
sc::WaitPointerSwitch aWaitSwitch(pWin);
|
||||
|
||||
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)
|
||||
{
|
||||
aProgress.SetState(i+1);
|
||||
|
@ -264,7 +264,7 @@ void ScDocument::DrawMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
|
||||
void ScDocument::DrawCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
|
||||
{
|
||||
// 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,
|
||||
|
@ -578,7 +578,7 @@ bool ScDocument::InsertTab(
|
||||
}
|
||||
|
||||
bool ScDocument::InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
|
||||
bool bExternalDocument, bool bNamesValid )
|
||||
bool bNamesValid )
|
||||
{
|
||||
SCTAB nNewSheets = static_cast<SCTAB>(rNames.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 )
|
||||
{
|
||||
maTabs.push_back( new ScTable(this, nTabCount + i, rNames.at(i)) );
|
||||
if ( bExternalDocument )
|
||||
maTabs[nTabCount+i]->SetVisible( false );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -2087,14 +2085,11 @@ void ScDocument::UndoToDocument(const ScRange& rRange,
|
||||
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,
|
||||
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)
|
||||
return;
|
||||
@ -2133,28 +2128,19 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam,
|
||||
pClipDoc->aDocName = aDocName;
|
||||
pClipDoc->SetClipParam(rClipParam);
|
||||
ScRange aClipRange = rClipParam.getWholeRange();
|
||||
SCTAB nTab = aClipRange.aStart.Tab();
|
||||
SCTAB i = 0;
|
||||
SCTAB nEndTab = static_cast<SCTAB>(maTabs.size());
|
||||
|
||||
if ( bUseRangeForVBA )
|
||||
{
|
||||
pClipDoc->ResetClip( this, nTab );
|
||||
i = nTab;
|
||||
nEndTab = nTab + 1;
|
||||
}
|
||||
else
|
||||
pClipDoc->ResetClip(this, pMarks);
|
||||
pClipDoc->ResetClip(this, pMarks);
|
||||
|
||||
sc::CopyToClipContext aCxt(*pClipDoc, bKeepScenarioFlags, bCloneNoteCaptions);
|
||||
CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, bAllTabs);
|
||||
sc::CopyToClipContext aCxt(*pClipDoc, bKeepScenarioFlags, true/*bCloneNoteCaptions*/);
|
||||
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])
|
||||
continue;
|
||||
|
||||
if ( !bUseRangeForVBA && ( pMarks && !pMarks->GetTableSelect(i) ) )
|
||||
if ( pMarks && !pMarks->GetTableSelect(i) )
|
||||
continue;
|
||||
|
||||
maTabs[i]->CopyToClip(aCxt, rClipParam.maRanges, pClipDoc->maTabs[i]);
|
||||
@ -3860,7 +3846,7 @@ void ScDocument::CompileXML()
|
||||
bool bOldAutoCalc = GetAutoCalc();
|
||||
SetAutoCalc( false );
|
||||
ScProgress aProgress( GetDocumentShell(), ScGlobal::GetRscString(
|
||||
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount() );
|
||||
STR_PROGRESS_CALCULATING ), GetXMLImportedFormulaCount(), true );
|
||||
|
||||
sc::CompileFormulaContext aCxt(this);
|
||||
|
||||
@ -4159,7 +4145,7 @@ void ScDocument::UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkDa
|
||||
if ( maTabs[nTab] && ( !pTabMark || pTabMark->GetTableSelect(nTab) ) )
|
||||
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;
|
||||
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)
|
||||
if (*it)
|
||||
{
|
||||
if ( (*it)->IsStyleSheetUsed( rStyle, true/*bGatherAllStyles*/ ) )
|
||||
if ( (*it)->IsStyleSheetUsed( rStyle ) )
|
||||
{
|
||||
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 (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 )
|
||||
{
|
||||
SCTAB nTab = rPos.Tab();
|
||||
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 )
|
||||
|
@ -156,8 +156,8 @@ struct Bucket
|
||||
SCROW mnOrderIndex;
|
||||
SCROW mnDataIndex;
|
||||
SCROW mnValueSortIndex;
|
||||
Bucket(const ScDPItemData& rValue, SCROW nOrder, SCROW nData) :
|
||||
maValue(rValue), mnOrderIndex(nOrder), mnDataIndex(nData), mnValueSortIndex(0) {}
|
||||
Bucket(const ScDPItemData& rValue, SCROW nData) :
|
||||
maValue(rValue), mnOrderIndex(0), mnDataIndex(nData), mnValueSortIndex(0) {}
|
||||
};
|
||||
|
||||
#if DEBUG_PIVOT_TABLE
|
||||
@ -353,7 +353,7 @@ void ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange)
|
||||
SCROW nRow = i + nOffset;
|
||||
sal_uLong nNumFormat = 0;
|
||||
initFromCell(*this, pDoc, nCol, nRow, nDocTab, aData, nNumFormat);
|
||||
aBuckets.push_back(Bucket(aData, 0, i));
|
||||
aBuckets.push_back(Bucket(aData, i));
|
||||
|
||||
if (!aData.IsEmpty())
|
||||
{
|
||||
@ -418,7 +418,7 @@ bool ScDPCache::InitFromDataBase(DBConnector& rDB)
|
||||
short nFormatType = css::util::NumberFormat::UNDEFINED;
|
||||
aData.SetEmpty();
|
||||
rDB.getValue(nCol, aData, nFormatType);
|
||||
aBuckets.push_back(Bucket(aData, 0, nRow));
|
||||
aBuckets.push_back(Bucket(aData, nRow));
|
||||
if (!aData.IsEmpty())
|
||||
{
|
||||
maEmptyRows.insert_back(nRow, nRow+1, false);
|
||||
|
@ -291,9 +291,9 @@ const ScDPItemData* ScDPFilteredCache::getCell(SCCOL nCol, SCROW nRow, bool bRep
|
||||
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)
|
||||
{
|
||||
|
@ -169,7 +169,7 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPFiltered
|
||||
if ( nDim < nCacheColumnCount )
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -435,7 +435,7 @@ void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
|
||||
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)
|
||||
return;
|
||||
@ -454,7 +454,7 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, bool bSkip
|
||||
SdrObject* pOldObject = aIter.Next();
|
||||
while (pOldObject)
|
||||
{
|
||||
if ( bSkipNotes && IsNoteCaption( pOldObject ) )
|
||||
if ( IsNoteCaption( pOldObject ) )
|
||||
{
|
||||
pOldObject = aIter.Next();
|
||||
continue;
|
||||
|
@ -495,7 +495,7 @@ void adjustRangeName(formula::FormulaToken* pToken, ScDocument& rNewDoc, const S
|
||||
if (!bSameDoc)
|
||||
{
|
||||
pRangeNameToken->ReadjustAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos(), true);
|
||||
pRangeNameToken->AdjustAbsoluteRefs(pOldDoc, aOldPos, aNewPos, false, true);
|
||||
pRangeNameToken->AdjustAbsoluteRefs(pOldDoc, aOldPos, aNewPos, true);
|
||||
}
|
||||
|
||||
bool bInserted;
|
||||
@ -935,7 +935,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
|
||||
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())
|
||||
|
@ -75,7 +75,7 @@ ScProgress* GetProgressBar(
|
||||
|
||||
if (nCount > 1)
|
||||
return new ScProgress(
|
||||
pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount);
|
||||
pDoc->GetDocumentShell(), ScGlobal::GetRscString(STR_PROGRESS_HEIGHTING), nTotalCount, true);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -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
|
||||
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
|
||||
{
|
||||
@ -918,7 +918,7 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
||||
|
||||
for (nRow = nAttrRow1; nRow<=nAttrRow2; nRow++)
|
||||
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;
|
||||
}
|
||||
|
||||
bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const
|
||||
bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
|
||||
{
|
||||
bool bIsUsed = false;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -2620,10 +2618,10 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
|
||||
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))
|
||||
aCol[nCol].SetPattern( nRow, rAttr, bPutToPool );
|
||||
aCol[nCol].SetPattern( nRow, rAttr, true/*bPutToPool*/ );
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
aCell.release(aCol[nDestX], nDestY);
|
||||
SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ), true );
|
||||
SetPattern( nDestX, nDestY, *GetPattern( nCol, nRow ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1129,7 +1129,7 @@ void ScTable::SortReorderByRow(
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1327,7 +1327,7 @@ void ScTable::SortReorderByRowRefUpdate(
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1895,7 +1895,7 @@ static void lcl_RemoveNumberFormat( ScTable* pTab, SCCOL nCol, SCROW nRow )
|
||||
SfxItemSet& rSet = aNewPattern.GetItemSet();
|
||||
rSet.ClearItem( ATTR_VALUE_FORMAT );
|
||||
rSet.ClearItem( ATTR_LANGUAGE_FORMAT );
|
||||
pTab->SetPattern( nCol, nRow, aNewPattern, true );
|
||||
pTab->SetPattern( nCol, nRow, aNewPattern );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1174,7 +1174,7 @@ void ScTable::FillFormulaVertical(
|
||||
if (aSpans.empty())
|
||||
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);
|
||||
|
||||
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)
|
||||
{
|
||||
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();
|
||||
itr != itrEnd; ++itr)
|
||||
@ -1588,7 +1588,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
||||
if(!RowHidden(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();
|
||||
itr != itrEnd; ++itr)
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ static bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
|
||||
}
|
||||
|
||||
ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
|
||||
sal_uLong nRange, bool bAllDocs, bool bWait)
|
||||
sal_uLong nRange, bool bWait)
|
||||
: bEnabled(true)
|
||||
{
|
||||
|
||||
@ -107,7 +107,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
|
||||
}
|
||||
else
|
||||
{
|
||||
pProgress = new SfxProgress( pObjSh, rText, nRange, bAllDocs, bWait );
|
||||
pProgress = new SfxProgress( pObjSh, rText, nRange, false/*bAllDocs*/, bWait );
|
||||
pGlobalProgress = pProgress;
|
||||
nGlobalRange = nRange;
|
||||
nGlobalPercent = 0;
|
||||
@ -151,7 +151,7 @@ void ScProgress::CreateInterpretProgress( ScDocument* pDoc, bool bWait )
|
||||
if ( !pGlobalProgress )
|
||||
pInterpretProgress = new ScProgress( pDoc->GetDocumentShell(),
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -2428,9 +2428,9 @@ void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, cons
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
FormulaToken** pp = aPtrs.maPointerRange[j].mpStart;
|
||||
@ -2452,11 +2452,8 @@ void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddres
|
||||
ScSingleRefData& rRef2 = rRef.Ref2;
|
||||
ScSingleRefData& rRef1 = rRef.Ref1;
|
||||
|
||||
// for range names only adjust if all parts are absolute
|
||||
if (!bRangeName || !(rRef1.IsColRel() || rRef1.IsRowRel() || rRef1.IsTabRel()))
|
||||
AdjustSingleRefData( rRef1, rOldPos, rNewPos );
|
||||
if (!bRangeName || !(rRef2.IsColRel() || rRef2.IsRowRel() || rRef2.IsTabRel()))
|
||||
AdjustSingleRefData( rRef2, rOldPos, rNewPos );
|
||||
AdjustSingleRefData( rRef1, rOldPos, rNewPos );
|
||||
AdjustSingleRefData( rRef2, rOldPos, rNewPos );
|
||||
}
|
||||
break;
|
||||
case svSingleRef :
|
||||
@ -2466,9 +2463,7 @@ void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddres
|
||||
|
||||
ScSingleRefData& rRef = *p->GetSingleRef();
|
||||
|
||||
// for range names only adjust if all parts are absolute
|
||||
if (!bRangeName || !(rRef.IsColRel() || rRef.IsRowRel() || rRef.IsTabRel()))
|
||||
AdjustSingleRefData( rRef, rOldPos, rNewPos );
|
||||
AdjustSingleRefData( rRef, rOldPos, rNewPos );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -99,7 +99,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc
|
||||
SCROW nNumRows = nEndRow - rRange.aStart.Row() + 1;
|
||||
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 );
|
||||
|
||||
|
@ -93,7 +93,7 @@ void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment )
|
||||
nSysTotalSize /= 2;
|
||||
mnSysProgressScale *= 2;
|
||||
}
|
||||
mxSysProgress.reset( new ScProgress( mpDocShell, maText, nSysTotalSize ) );
|
||||
mxSysProgress.reset( new ScProgress( mpDocShell, maText, nSysTotalSize, true ) );
|
||||
}
|
||||
|
||||
if( !mbInProgress && mpCurrSegment && (mnTotalSize > 0) )
|
||||
|
@ -108,7 +108,7 @@ sal_uLong ScEEImport::Read( SvStream& rStream, const OUString& rBaseURL )
|
||||
void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate )
|
||||
{
|
||||
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;
|
||||
|
||||
SCCOL nStartCol, nEndCol;
|
||||
|
@ -1611,7 +1611,7 @@ void ScInputHandler::GetColData()
|
||||
|
||||
std::vector<ScTypedStrData> aEntries;
|
||||
rDoc.GetDataEntries(
|
||||
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), true, aEntries, true);
|
||||
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aEntries, true);
|
||||
if (!aEntries.empty())
|
||||
pColumnData->insert(aEntries.begin(), aEntries.end());
|
||||
|
||||
|
@ -81,7 +81,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
|
||||
aInnerRect.Top() = aInnerCenter.Y() - (aInnerSize.Width()>>1);
|
||||
aInnerRect.Bottom()= aInnerCenter.Y() + (aInnerSize.Width()>>1);
|
||||
|
||||
ImpDrawArrow( aInnerRect, false/*bState*/ );
|
||||
ImpDrawArrow( aInnerRect );
|
||||
|
||||
// restore old state
|
||||
pOut->EnableMapMode( bOldEnable );
|
||||
@ -95,8 +95,7 @@ void ScDDComboBoxButton::Draw( const Point& rAt,
|
||||
pOut->SetFillColor();
|
||||
}
|
||||
|
||||
void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect,
|
||||
bool bState )
|
||||
void ScDDComboBoxButton::ImpDrawArrow( const Rectangle& rRect )
|
||||
{
|
||||
// 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;
|
||||
|
||||
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
|
||||
Color aColor( bState ? COL_LIGHTBLUE : rSett.GetButtonTextColor().GetColor() );
|
||||
Color aColor( rSett.GetButtonTextColor().GetColor() );
|
||||
pOut->SetFillColor( aColor );
|
||||
pOut->SetLineColor( aColor );
|
||||
|
||||
|
@ -372,7 +372,7 @@ bool ScAreaLink::Refresh( const OUString& rNewFile, const OUString& rNewFilter,
|
||||
aSourceMark.SetMarkArea( aTokenRange );
|
||||
|
||||
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,
|
||||
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
|
||||
|
@ -559,7 +559,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
|
||||
{
|
||||
ScInputOptions aInputOption = SC_MOD()->GetInputOptions();
|
||||
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);
|
||||
}
|
||||
|
||||
@ -823,7 +823,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam,
|
||||
sal_uLong nProgCount = nFormulaCols;
|
||||
nProgCount *= aLocalParam.nRow2 - nFStartY;
|
||||
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,
|
||||
aLocalParam.nCol2+nFormulaCols, nFStartY, &aProgress, aMark,
|
||||
|
@ -190,7 +190,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
|
||||
{
|
||||
// progress bar
|
||||
// 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 );
|
||||
bool bDispose = false;
|
||||
@ -554,7 +554,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
|
||||
sal_uLong nProgCount = nFormulaCols;
|
||||
nProgCount *= nEndRow-rParam.nRow1-1;
|
||||
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,
|
||||
&aProgress, aMark, nEndRow-rParam.nRow1-1, FILL_TO_BOTTOM, FILL_SIMPLE );
|
||||
|
@ -2614,7 +2614,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
|
||||
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
|
||||
|
||||
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);
|
||||
|
||||
@ -4348,7 +4348,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
|
||||
nProgCount = aSourceArea.aEnd.Row() - aSourceArea.aStart.Row() + 1;
|
||||
nProgCount *= nCount;
|
||||
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(),
|
||||
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 *= nCount;
|
||||
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(),
|
||||
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 *= nCount;
|
||||
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(),
|
||||
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
|
||||
|
@ -1855,7 +1855,7 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
|
||||
SCROW 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;
|
||||
|
||||
|
@ -293,12 +293,12 @@ void ScDocShell::SetLockCount(sal_uInt16 nNew)
|
||||
{
|
||||
if ( !pPaintLockData )
|
||||
pPaintLockData = new ScPaintLockData;
|
||||
pPaintLockData->SetLevel(nNew-1, true);
|
||||
pPaintLockData->SetDocLevel(nNew-1);
|
||||
LockDocument_Impl(nNew);
|
||||
}
|
||||
else if (pPaintLockData) // loeschen
|
||||
{
|
||||
pPaintLockData->SetLevel(0, true); // bei Unlock sofort ausfuehren
|
||||
pPaintLockData->SetDocLevel(0); // bei Unlock sofort ausfuehren
|
||||
UnlockPaint_Impl(true); // jetzt
|
||||
UnlockDocument_Impl(0);
|
||||
}
|
||||
@ -828,7 +828,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
|
||||
// ab hier kein return mehr
|
||||
|
||||
ScProgress aProgress( this, OUString("..."),
|
||||
nNewActionCount );
|
||||
nNewActionCount, true );
|
||||
|
||||
sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
|
||||
// UpdateReference-Undo, gueltige Referenzen fuer den letzten gemeinsamen Zustand
|
||||
|
@ -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),
|
||||
aDocument.GetCodeCount());
|
||||
aDocument.GetCodeCount(), true);
|
||||
bool bDone = aDocument.MoveTab( nSrcTab, nDestTab, pProgress );
|
||||
delete pProgress;
|
||||
if (!bDone)
|
||||
|
@ -316,7 +316,7 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
|
||||
return nRet;
|
||||
::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<sdbc::XRowSet> xRowSet( xFactory->createInstance(SC_SERVICE_ROWSET),
|
||||
uno::UNO_QUERY);
|
||||
@ -807,7 +807,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
|
||||
if ( nFirstRow > nLastRow )
|
||||
nFirstRow = nLastRow;
|
||||
ScProgress aProgress( this, ScGlobal::GetRscString( STR_SAVE_DOC ),
|
||||
nLastRow - nFirstRow );
|
||||
nLastRow - nFirstRow, true );
|
||||
SvNumberFormatter* pNumFmt = aDocument.GetFormatTable();
|
||||
|
||||
bool bHasFieldNames = true;
|
||||
|
@ -1267,7 +1267,7 @@ bool ScImportExport::ExtText2Doc( SvStream& rStrm )
|
||||
sal_uInt64 const nOldPos = rStrm.Tell();
|
||||
sal_uInt64 const nRemaining = rStrm.remainingSize();
|
||||
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() );
|
||||
|
||||
SCCOL nStartCol = aRange.aStart.Col();
|
||||
|
@ -48,8 +48,7 @@ public:
|
||||
Size GetSizePixel() const { return aBtnSize; }
|
||||
|
||||
private:
|
||||
void ImpDrawArrow( const Rectangle& rRect,
|
||||
bool bState );
|
||||
void ImpDrawArrow( const Rectangle& rRect );
|
||||
|
||||
protected:
|
||||
VclPtr<OutputDevice> pOut;
|
||||
|
@ -36,36 +36,21 @@ class ScEditEngineDefaulter;
|
||||
class ScAsciiOptions;
|
||||
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;
|
||||
|
||||
/** This struct contains the state of one table column. */
|
||||
struct ScCsvColState
|
||||
{
|
||||
sal_Int32 mnType; /// Data type.
|
||||
sal_uInt8 mnFlags; /// Flags (i.e. selection state).
|
||||
sal_Int32 mnType; /// Data type.
|
||||
bool mbColumnSelected;
|
||||
|
||||
inline explicit ScCsvColState(
|
||||
sal_Int32 nType = CSV_TYPE_DEFAULT,
|
||||
sal_uInt8 nFlags = CSV_COLFLAG_NONE ) :
|
||||
mnType( nType ), mnFlags( nFlags ) {}
|
||||
explicit ScCsvColState( sal_Int32 nType = CSV_TYPE_DEFAULT ) :
|
||||
mnType( nType ), mbColumnSelected( false ) {}
|
||||
|
||||
inline bool IsSelected() const;
|
||||
inline void Select( bool bSel );
|
||||
bool IsSelected() const { return mbColumnSelected; }
|
||||
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;
|
||||
|
||||
/** A data grid control for the CSV import dialog. The design of this control
|
||||
|
@ -50,8 +50,8 @@ public:
|
||||
bool GetModified() const { return bModified; }
|
||||
|
||||
/** for recovery after reset */
|
||||
void SetLevel(sal_uInt16 nNew, bool bDoc)
|
||||
{ if (bDoc) nDocLevel = nNew; else nLevel = nNew; }
|
||||
void SetDocLevel(sal_uInt16 nNew)
|
||||
{ nDocLevel = nNew; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
|
||||
void RemoveManualBreaks();
|
||||
|
||||
void SetPrintZoom(sal_uInt16 nScale, sal_uInt16 nPages);
|
||||
void SetPrintZoom(sal_uInt16 nScale);
|
||||
void AdjustPrintZoom();
|
||||
|
||||
bool TestMergeCells();
|
||||
|
@ -1269,7 +1269,7 @@ static void lcl_DoDragCells( ScDocShell* pSrcShell, const ScRange& rRange, sal_u
|
||||
{
|
||||
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
|
||||
ScClipParam aClipParam(rRange, false);
|
||||
rSrcDoc.CopyToClip(aClipParam, pClipDoc, &aMark);
|
||||
rSrcDoc.CopyToClip(aClipParam, pClipDoc, &aMark, false, false);
|
||||
// pClipDoc->ExtendMerge( rRange, sal_True );
|
||||
|
||||
TransferableObjectDescriptor aObjDesc;
|
||||
|
@ -1369,7 +1369,7 @@ void ScUndoDragDrop::Redo()
|
||||
// do not clone objects and note captions into clipdoc (see above)
|
||||
// but at least copy notes
|
||||
ScClipParam aClipParam(aSrcRange, bCut);
|
||||
rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, false, bKeepScenarioFlags);
|
||||
rDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSourceMark, bKeepScenarioFlags, false);
|
||||
|
||||
if (bCut)
|
||||
{
|
||||
|
@ -599,7 +599,7 @@ void ScUndoAutoFill::Redo()
|
||||
nProgCount = aSource.aEnd.Row() - aSource.aStart.Row() + 1;
|
||||
nProgCount *= nCount;
|
||||
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(),
|
||||
aSource.aEnd.Col(), aSource.aEnd.Row(), &aProgress,
|
||||
@ -1000,7 +1000,7 @@ void ScUndoReplace::Undo()
|
||||
pSearchItem->SetReplaceString(aTempStr);
|
||||
rDoc.ReplaceStyle( *pSearchItem,
|
||||
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
|
||||
aMarkData, true);
|
||||
aMarkData);
|
||||
pSearchItem->SetReplaceString(pSearchItem->GetSearchString());
|
||||
pSearchItem->SetSearchString(aTempStr);
|
||||
if (pViewShell)
|
||||
@ -1066,7 +1066,7 @@ void ScUndoReplace::Redo()
|
||||
{
|
||||
rDoc.ReplaceStyle( *pSearchItem,
|
||||
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
|
||||
aMarkData, true);
|
||||
aMarkData);
|
||||
pDocShell->PostPaintGridAll();
|
||||
}
|
||||
else
|
||||
|
@ -500,7 +500,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
|
||||
{
|
||||
size_t i = mpNewTabs->size();
|
||||
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)
|
||||
{
|
||||
SCTAB nDestTab = (*mpNewTabs)[i-1];
|
||||
@ -522,7 +522,7 @@ void ScUndoMoveTab::DoChange( bool bUndo ) const
|
||||
{
|
||||
size_t n = mpNewTabs->size();
|
||||
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)
|
||||
{
|
||||
SCTAB nDestTab = (*mpNewTabs)[i];
|
||||
|
@ -154,7 +154,7 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
|
||||
aSourceMark.SelectOneTable( nSrcTab ); // for CopyToClip
|
||||
aSourceMark.SetMarkArea( rSrcRange );
|
||||
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,
|
||||
HASATTR_MERGED | HASATTR_OVERLAPPED ) )
|
||||
|
@ -1518,7 +1518,7 @@ ScVbaRange::getValue() throw (uno::RuntimeException, std::exception)
|
||||
}
|
||||
|
||||
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();
|
||||
if ( aClass == uno::TypeClass_SEQUENCE )
|
||||
@ -1553,7 +1553,7 @@ ScVbaRange::setValue( const uno::Any& aValue, ValueSetter& valueSetter, bool bFi
|
||||
{
|
||||
visitArray( valueSetter );
|
||||
}
|
||||
if( bFireEvent ) fireChangeEvent();
|
||||
fireChangeEvent();
|
||||
}
|
||||
|
||||
void SAL_CALL
|
||||
@ -1568,7 +1568,7 @@ ScVbaRange::setValue( const uno::Any &aValue ) throw (uno::RuntimeException, st
|
||||
return;
|
||||
}
|
||||
CellValueSetter valueSetter( aValue );
|
||||
setValue( aValue, valueSetter, true );
|
||||
setValue( aValue, valueSetter );
|
||||
}
|
||||
|
||||
void SAL_CALL
|
||||
@ -1642,7 +1642,7 @@ ScVbaRange::setFormulaValue( const uno::Any& rFormula, formula::FormulaGrammar::
|
||||
return;
|
||||
}
|
||||
CellFormulaValueSetter formulaValueSetter( rFormula, &getScDocument(), eGram );
|
||||
setValue( rFormula, formulaValueSetter, true/*bFireEvent*/ );
|
||||
setValue( rFormula, formulaValueSetter );
|
||||
}
|
||||
|
||||
uno::Any
|
||||
|
@ -98,7 +98,7 @@ class ScVbaRange : public ScVbaRange_BASE
|
||||
void ClearContents( sal_Int32 nFlags, bool bFireEvent ) 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);
|
||||
void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException);
|
||||
|
@ -1141,7 +1141,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
|
||||
bool bEmpty = false;
|
||||
std::vector<ScTypedStrData> aStrings; // case sensitive
|
||||
// Fill List
|
||||
pDoc->GetDataEntries(nCol, nRow, nTab, true, aStrings);
|
||||
pDoc->GetDataEntries(nCol, nRow, nTab, aStrings);
|
||||
if (aStrings.empty())
|
||||
bEmpty = true;
|
||||
|
||||
|
@ -461,7 +461,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
|
||||
|
||||
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
|
||||
ScClipParam aClipParam(aTabRange, false);
|
||||
rDoc.CopyToClip(aClipParam, pClipDoc, &aTabMark);
|
||||
rDoc.CopyToClip(aClipParam, pClipDoc, &aTabMark, false, false);
|
||||
|
||||
TransferableObjectDescriptor aObjDesc;
|
||||
pDocSh->FillTransferableObjectDescriptor( aObjDesc );
|
||||
|
@ -230,7 +230,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
|
||||
break;
|
||||
|
||||
case FID_RESET_PRINTZOOM:
|
||||
SetPrintZoom( 100, 0 ); // 100%, not on pages
|
||||
SetPrintZoom( 100 ); // 100%, not on pages
|
||||
rReq.Done();
|
||||
break;
|
||||
|
||||
|
@ -869,11 +869,11 @@ void ScViewFunc::RemoveManualBreaks()
|
||||
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();
|
||||
SCTAB nTab = GetViewData().GetTabNo();
|
||||
pDocSh->SetPrintZoom( nTab, nScale, nPages );
|
||||
pDocSh->SetPrintZoom( nTab, nScale, 0/*nPages*/ );
|
||||
}
|
||||
|
||||
void ScViewFunc::AdjustPrintZoom()
|
||||
|
@ -235,7 +235,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
|
||||
pClipDoc->SetClipOptions(aOptions);
|
||||
}
|
||||
|
||||
pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, false, bIncludeObjects );
|
||||
pDoc->CopyToClip( aClipParam, pClipDoc, &rMark, false, bIncludeObjects );
|
||||
if ( pDoc && pClipDoc )
|
||||
{
|
||||
ScDrawLayer* pDrawLayer = pClipDoc->GetDrawLayer();
|
||||
@ -365,7 +365,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
|
||||
}
|
||||
if (!bValidRanges)
|
||||
break;
|
||||
pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, false, bIncludeObjects );
|
||||
pDoc->CopyToClip(aClipParam, pDocClip.get(), &rMark, false, bIncludeObjects );
|
||||
|
||||
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
|
||||
if ( pChangeTrack )
|
||||
@ -422,7 +422,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
|
||||
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
|
||||
|
||||
ScClipParam aClipParam(aRange, false);
|
||||
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true);
|
||||
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, true);
|
||||
|
||||
ScDrawLayer::SetGlobalDrawPersist(nullptr);
|
||||
pClipDoc->ExtendMerge( aRange, true );
|
||||
|
@ -152,7 +152,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
|
||||
nFirstRow = nLastRow = 0;
|
||||
}
|
||||
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 ) );
|
||||
|
||||
SetCursor( nPosX, nPosY );
|
||||
|
@ -461,7 +461,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getWorkday( const uno::Reference< beans::XProp
|
||||
|
||||
SortedIndividualInt32List aSrtLst;
|
||||
|
||||
aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate, false );
|
||||
aSrtLst.InsertHolidayList( aAnyConv, xOptions, aHDay, nNullDate );
|
||||
|
||||
sal_Int32 nActDate = nDate + nNullDate;
|
||||
|
||||
@ -569,7 +569,7 @@ sal_Int32 SAL_CALL AnalysisAddIn::getNetworkdays( const uno::Reference< beans::X
|
||||
|
||||
SortedIndividualInt32List aSrtLst;
|
||||
|
||||
aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate, false );
|
||||
aSrtLst.InsertHolidayList( aAnyConv, xOpt, aHDay, nNullDate );
|
||||
|
||||
sal_Int32 nActDate = nStartDate + nNullDate;
|
||||
sal_Int32 nStopDate = nEndDate + nNullDate;
|
||||
|
@ -1533,8 +1533,7 @@ void SortedIndividualInt32List::InsertHolidayList(
|
||||
ScaAnyConverter& rAnyConv,
|
||||
const uno::Reference< beans::XPropertySet >& xOptions,
|
||||
const uno::Any& rHolAny,
|
||||
sal_Int32 nNullDate,
|
||||
bool bInsertOnWeekend ) throw( uno::RuntimeException, lang::IllegalArgumentException )
|
||||
sal_Int32 nNullDate ) throw( uno::RuntimeException, lang::IllegalArgumentException )
|
||||
{
|
||||
rAnyConv.init( xOptions );
|
||||
if( rHolAny.getValueTypeClass() == uno::TypeClass_SEQUENCE )
|
||||
@ -1549,14 +1548,14 @@ void SortedIndividualInt32List::InsertHolidayList(
|
||||
const uno::Any* pAnyArray = rSubSeq.getConstArray();
|
||||
|
||||
for( sal_Int32 nIndex2 = 0; nIndex2 < rSubSeq.getLength(); nIndex2++ )
|
||||
InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, bInsertOnWeekend );
|
||||
InsertHolidayList( rAnyConv, pAnyArray[ nIndex2 ], nNullDate, false/*bInsertOnWeekend*/ );
|
||||
}
|
||||
}
|
||||
else
|
||||
throw lang::IllegalArgumentException();
|
||||
}
|
||||
else
|
||||
InsertHolidayList( rAnyConv, rHolAny, nNullDate, bInsertOnWeekend );
|
||||
InsertHolidayList( rAnyConv, rHolAny, nNullDate, false/*bInsertOnWeekend*/ );
|
||||
}
|
||||
|
||||
|
||||
|
@ -271,13 +271,12 @@ public:
|
||||
bool Find( sal_Int32 nVal ) const;
|
||||
|
||||
/** @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(
|
||||
ScaAnyConverter& rAnyConv,
|
||||
const css::uno::Reference< css::beans::XPropertySet >& xOptions,
|
||||
const css::uno::Any& rHolAny,
|
||||
sal_Int32 nNullDate,
|
||||
bool bInsertOnWeekend ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
|
||||
sal_Int32 nNullDate) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException );
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user