diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-01-18 16:35:42 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2015-01-18 16:36:27 +0100 |
commit | dcd291330b95e6493e341ae40ef1afe1482fcd24 (patch) | |
tree | 5d8f69c618e8a93caf68ef8f924c2da7f686aa95 /sc | |
parent | 22aebd531dbd6230214b4dc7f5342694f9b448af (diff) |
rename AddRange to SetRange
Change-Id: I696fcbd2896aefda38314457b6838874262ad111
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/conditio.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 24 | ||||
-rw-r--r-- | sc/source/core/data/conditio.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/table4.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/condformatbuffer.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcondformat.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyli.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/condformat/condformatdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 2 |
11 files changed, 28 insertions, 28 deletions
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index 743c950070a6..341e032b957c 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -393,7 +393,7 @@ public: ScConditionalFormat* Clone(ScDocument* pNewDoc = NULL) const; void AddEntry( ScFormatEntry* pNew ); - void AddRange( const ScRangeList& rRanges ); + void SetRange( const ScRangeList& rRanges ); const ScRangeList& GetRange() const { return maRanges; } // don't use the same name as for the const version ScRangeList& GetRangeList() { return maRanges; } diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index fe01944f3d85..eb4454f33f34 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -3660,7 +3660,7 @@ void Test::testCopyPasteSkipEmptyConditionalFormatting() m_pDoc->SetCondFormList(pCondFormatList, 0); ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); - pFormat->AddRange(aDestRange); + pFormat->SetRange(aDestRange); sal_uLong nCondFormatKey = m_pDoc->AddCondFormat(pFormat, 0); // Prepare a clipboard content interleaved with empty cells. @@ -3675,7 +3675,7 @@ void Test::testCopyPasteSkipEmptyConditionalFormatting() aClipDoc.SetValue(4,5,0,2); ScConditionalFormat* pClipFormat = new ScConditionalFormat(2, &aClipDoc); - pClipFormat->AddRange(aSrcRange); + pClipFormat->SetRange(aSrcRange); aClipDoc.AddCondFormat(pClipFormat, 0); // Create undo document. @@ -5466,7 +5466,7 @@ void Test::testCondFormatINSDEL() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRangeList aRangeList(ScRange(0,0,0,0,3,0)); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5490,7 +5490,7 @@ void Test::testCondFormatInsertCol() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRangeList aRangeList(ScRange(0,0,0,3,3,0)); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5512,7 +5512,7 @@ void Test::testCondFormatInsertRow() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRangeList aRangeList(ScRange(0,0,0,3,3,0)); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5533,7 +5533,7 @@ void Test::testCondFormatInsertDeleteSheets() // Add a conditional format to B2:B4. ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); - pFormat->AddRange(ScRange(1,1,0,1,3,0)); + pFormat->SetRange(ScRange(1,1,0,1,3,0)); sal_uLong nKey = m_pDoc->AddCondFormat(pFormat, 0); @@ -5640,7 +5640,7 @@ void Test::testCondCopyPaste() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRange aCondFormatRange(0,0,0,3,3,0); ScRangeList aRangeList(aCondFormatRange); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5674,7 +5674,7 @@ void Test::testCondCopyPasteSingleCell() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRange aCondFormatRange(0,0,0,3,3,0); ScRangeList aRangeList(aCondFormatRange); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5708,7 +5708,7 @@ void Test::testCondCopyPasteSingleCellToRange() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRange aCondFormatRange(0,0,0,3,3,0); ScRangeList aRangeList(aCondFormatRange); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5750,7 +5750,7 @@ void Test::testCondCopyPasteSheetBetweenDoc() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRange aCondFormatRange(0,0,0,3,3,0); ScRangeList aRangeList(aCondFormatRange); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5772,7 +5772,7 @@ void Test::testCondCopyPasteSheet() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRange aCondFormatRange(0,0,0,3,3,0); ScRangeList aRangeList(aCondFormatRange); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScCondFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT,"=B2","",m_pDoc,ScAddress(0,0,0),ScGlobal::GetRscString(STR_STYLENAME_RESULT)); pFormat->AddEntry(pEntry); @@ -5805,7 +5805,7 @@ void Test::testIconSet() ScConditionalFormat* pFormat = new ScConditionalFormat(1, m_pDoc); ScRangeList aRangeList(ScRange(0,0,0,0,0,0)); - pFormat->AddRange(aRangeList); + pFormat->SetRange(aRangeList); ScIconSetFormat* pEntry = new ScIconSetFormat(m_pDoc); ScIconSetFormatData* pData = new ScIconSetFormatData; diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 0db3471a65e3..6967a33e8984 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1815,7 +1815,7 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const pNew->maEntries.push_back( pNewEntry ); pNewEntry->SetParent(pNew); } - pNew->AddRange( maRanges ); + pNew->SetRange( maRanges ); return pNew; } @@ -1836,7 +1836,7 @@ bool ScConditionalFormat::EqualEntries( const ScConditionalFormat& r ) const return true; } -void ScConditionalFormat::AddRange( const ScRangeList& rRanges ) +void ScConditionalFormat::SetRange( const ScRangeList& rRanges ) { maRanges = rRanges; SAL_WARN_IF(maRanges.empty(), "sc", "the conditional format range is empty! will result in a crash later!"); diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 160da7f0dcc4..082ea900f61c 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -584,7 +584,7 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO ScRangeList aIntersectedRange = rCondFormatRange.GetIntersectedRange(aOldRange); ScConditionalFormat* pNewFormat = itr->Clone(pDocument); - pNewFormat->AddRange(aIntersectedRange); + pNewFormat->SetRange(aIntersectedRange); sc::RefUpdateContext aRefCxt(*pDocument); aRefCxt.meMode = URM_COPY; aRefCxt.maRange = aNewRange; diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index ee52681990ef..b7840eefc3dd 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -620,7 +620,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); ScRangeList aRange = pCondFormat->GetRange(); aRange.Join(ScRange(nCol, nY1, nTab, nCol, nY2, nTab)); - pCondFormat->AddRange(aRange); + pCondFormat->SetRange(aRange); } } @@ -650,7 +650,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); ScRangeList aRange = pCondFormat->GetRange(); aRange.Join(ScRange(nCol, nRow, nTab, nCol, nRow, nTab)); - pCondFormat->AddRange(aRange); + pCondFormat->SetRange(aRange); } } @@ -1571,7 +1571,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); ScRangeList aRange = pCondFormat->GetRange(); aRange.Join(ScRange(nCol, nIMin, nTab, nCol, nIMax, nTab)); - pCondFormat->AddRange(aRange); + pCondFormat->SetRange(aRange); } } else @@ -1588,7 +1588,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); ScRangeList aRange = pCondFormat->GetRange(); aRange.Join(ScRange(nCol, nAtRow, nTab, nCol, nAtRow, nTab)); - pCondFormat->AddRange(aRange); + pCondFormat->SetRange(aRange); } } } @@ -1606,7 +1606,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScConditionalFormat* pCondFormat = mpCondFormatList->GetFormat(*itr); ScRangeList aRange = pCondFormat->GetRange(); aRange.Join(ScRange(nAtCol, static_cast<SCROW>(nRow), nTab, nAtCol, static_cast<SCROW>(nRow), nTab)); - pCondFormat->AddRange(aRange); + pCondFormat->SetRange(aRange); } } } diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 247e8974701b..c248e9d9b04c 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -657,7 +657,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) ); if(maRanges.size() > 1) maRanges.Join(*maRanges[0], true); - mxScCondFmt->AddRange(maRanges); + mxScCondFmt->SetRange(maRanges); } ScCondFormatEntry* pEntry = new ScCondFormatEntry( eMode, xTokArr1.get(), pTokArr2.get(), GetDocPtr(), rPos, aStyleName ); diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 6937ac756947..3deec936c4ba 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -993,7 +993,7 @@ void CondFormat::finalizeImport() aList.Append(aRange); } rDoc.AddCondFormatData( aList, nTab, nIndex ); - mpFormat->AddRange(aList); + mpFormat->SetRange(aList); } CondFormatRuleRef CondFormat::createRule() diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index ad49a092b031..911f5c0d5474 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -87,7 +87,7 @@ ScXMLConditionalFormatContext::ScXMLConditionalFormatContext( ScXMLImport& rImpo formula::FormulaGrammar::CONV_ODF); mxFormat.reset(new ScConditionalFormat(0, GetScImport().GetDocument())); - mxFormat->AddRange(maRange); + mxFormat->SetRange(maRange); } SvXMLImportContext* ScXMLConditionalFormatContext::CreateChildContext( sal_uInt16 nPrefix, diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 9c65adb55a20..89087e011fcc 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -534,7 +534,7 @@ void XMLTableStyleContext::ApplyCondFormat( const uno::Sequence<table::CellRange { sal_uLong nIndex = pDoc->AddCondFormat(mpCondFormat, nTab ); mpCondFormat->SetKey(nIndex); - mpCondFormat->AddRange(aRangeList); + mpCondFormat->SetRange(aRangeList); pDoc->AddCondFormatData( aRangeList, nTab, nIndex ); mbDeleteCondFormat = false; diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index b868e20b5bfb..ad260e40fe80 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -163,7 +163,7 @@ ScConditionalFormat* ScCondFormatList::GetConditionalFormat() const pFormat->AddEntry(pEntry); } - pFormat->AddRange(maRanges); + pFormat->SetRange(maRanges); return pFormat; } @@ -506,7 +506,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const ScConditionalFormat* pFormat = mpCondFormList->GetConditionalFormat(); if(nFlags & SCA_VALID && !aRange.empty() && pFormat) - pFormat->AddRange(aRange); + pFormat->SetRange(aRange); else { delete pFormat; diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index 6d1e54a06395..5f1c7ee694a4 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -2415,7 +2415,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE { ScConditionalFormat* pNew = new ScConditionalFormat( 0, &rDoc ); // Index wird beim Einfuegen gesetzt pFormat->FillFormat( *pNew, &rDoc, eGrammar ); - pNew->AddRange( aRanges ); + pNew->SetRange( aRanges ); pDocShell->GetDocFunc().ReplaceConditionalFormat( 0, pNew, nTab, aRanges ); } } |