[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
Derrick Rocha
ejrsfnm4 at yahoo.com
Mon Aug 31 00:28:25 PDT 2015
sc/inc/colorscale.hxx | 2
sc/inc/conditio.hxx | 2
sc/qa/unit/helper/shared_test_impl.hxx | 10 +--
sc/source/core/data/colorscale.cxx | 40 +++++++-------
sc/source/core/data/conditio.cxx | 70 ++++++++++++-------------
sc/source/filter/excel/xecontent.cxx | 4 -
sc/source/filter/xml/xmlexprt.cxx | 10 +--
sc/source/ui/condformat/condformatdlgentry.cxx | 10 +--
8 files changed, 74 insertions(+), 74 deletions(-)
New commits:
commit 4aed1c6f384ab372b1c03f607445f92f0181f822
Author: Derrick Rocha <ejrsfnm4 at yahoo.com>
Date: Wed Aug 26 21:46:35 2015 -0600
replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: I3f75ad585ca288f0369e91dd5bc90151270346dc
Reviewed-on: https://gerrit.libreoffice.org/18048
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 670ccd0..25f2c67 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -248,7 +248,7 @@ private:
class SC_DLLPUBLIC ScColorScaleFormat : public ScColorFormat
{
private:
- typedef boost::ptr_vector<ScColorScaleEntry> ColorScaleEntries;
+ typedef std::vector<std::unique_ptr<ScColorScaleEntry>> ColorScaleEntries;
ColorScaleEntries maColorScales;
double GetMinValue() const;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 335bd2b..9b13c08 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -382,7 +382,7 @@ class SC_DLLPUBLIC ScConditionalFormat: private boost::noncopyable
ScDocument* pDoc;
sal_uInt32 nKey; // Index in attributes
- typedef boost::ptr_vector<ScFormatEntry> CondFormatContainer;
+ typedef std::vector<std::unique_ptr<ScFormatEntry>> CondFormatContainer;
CondFormatContainer maEntries;
ScRangeList maRanges; // Ranges for conditional format
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 28b348b..9098378 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -103,10 +103,10 @@ void testColorScale2Entry_Impl(ScDocument& rDoc)
CPPUNIT_ASSERT_EQUAL(size_t(2), pColFormat->size());
ScColorScaleFormat::const_iterator format_itr = pColFormat->begin();
- CPPUNIT_ASSERT_EQUAL(aData2Entry[i].eLowerType, format_itr->GetType());
+ CPPUNIT_ASSERT_EQUAL(aData2Entry[i].eLowerType, format_itr[0]->GetType());
++format_itr;
CPPUNIT_ASSERT(format_itr != pColFormat->end());
- CPPUNIT_ASSERT_EQUAL(aData2Entry[i].eUpperType, format_itr->GetType());
+ CPPUNIT_ASSERT_EQUAL(aData2Entry[i].eUpperType, format_itr[0]->GetType());
}
}
@@ -142,13 +142,13 @@ void testColorScale3Entry_Impl(ScDocument& rDoc)
CPPUNIT_ASSERT_EQUAL(size_t(3), pColFormat->size());
ScColorScaleFormat::const_iterator format_itr = pColFormat->begin();
- CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eLowerType, format_itr->GetType());
+ CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eLowerType, format_itr[0]->GetType());
++format_itr;
CPPUNIT_ASSERT(format_itr != pColFormat->end());
- CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eMiddleType, format_itr->GetType());
+ CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eMiddleType, format_itr[0]->GetType());
++format_itr;
CPPUNIT_ASSERT(format_itr != pColFormat->end());
- CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eUpperType, format_itr->GetType());
+ CPPUNIT_ASSERT_EQUAL(aData3Entry[i].eUpperType, format_itr[0]->GetType());
}
}
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 96f2a13..621ea2d 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -310,7 +310,7 @@ ScColorScaleFormat::ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleForma
{
for(const_iterator itr = rFormat.begin(); itr != rFormat.end(); ++itr)
{
- maColorScales.push_back(new ScColorScaleEntry(pDoc, *itr));
+ maColorScales.push_back(std::unique_ptr<ScColorScaleEntry>(new ScColorScaleEntry(pDoc, *itr[0])));
}
}
@@ -325,7 +325,7 @@ ScColorScaleFormat::~ScColorScaleFormat()
void ScColorScaleFormat::AddEntry( ScColorScaleEntry* pEntry )
{
- maColorScales.push_back( pEntry );
+ maColorScales.push_back(std::unique_ptr<ScColorScaleEntry>( pEntry ));
}
void ScColorScaleEntry::SetType( ScColorScaleEntryType eType )
@@ -342,8 +342,8 @@ double ScColorScaleFormat::GetMinValue() const
{
const_iterator itr = maColorScales.begin();
- if(itr->GetType() == COLORSCALE_VALUE || itr->GetType() == COLORSCALE_FORMULA)
- return itr->GetValue();
+ if(itr[0]->GetType() == COLORSCALE_VALUE || itr[0]->GetType() == COLORSCALE_FORMULA)
+ return itr[0]->GetValue();
else
{
return getMinValue();
@@ -354,8 +354,8 @@ double ScColorScaleFormat::GetMaxValue() const
{
ColorScaleEntries::const_reverse_iterator itr = maColorScales.rbegin();
- if(itr->GetType() == COLORSCALE_VALUE || itr->GetType() == COLORSCALE_FORMULA)
- return itr->GetValue();
+ if(itr[0]->GetType() == COLORSCALE_VALUE || itr[0]->GetType() == COLORSCALE_FORMULA)
+ return itr[0]->GetValue();
else
{
return getMaxValue();
@@ -501,10 +501,10 @@ double GetPercentile( const std::vector<double>& rArray, double fPercentile )
double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleFormat::const_iterator& itr) const
{
- switch(itr->GetType())
+ switch(itr[0]->GetType())
{
case COLORSCALE_PERCENT:
- return nMin + (nMax-nMin)*(itr->GetValue()/100);
+ return nMin + (nMax-nMin)*(itr[0]->GetValue()/100);
case COLORSCALE_MIN:
return nMin;
case COLORSCALE_MAX:
@@ -516,7 +516,7 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleForma
return rValues[0];
else
{
- double fPercentile = itr->GetValue()/100.0;
+ double fPercentile = itr[0]->GetValue()/100.0;
return GetPercentile(rValues, fPercentile);
}
}
@@ -525,7 +525,7 @@ double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleForma
break;
}
- return itr->GetValue();
+ return itr[0]->GetValue();
}
Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
@@ -557,17 +557,17 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
const_iterator itr = begin();
double nValMin = CalcValue(nMin, nMax, itr);
- Color rColMin = itr->GetColor();
+ Color rColMin = itr[0]->GetColor();
++itr;
double nValMax = CalcValue(nMin, nMax, itr);
- Color rColMax = itr->GetColor();
+ Color rColMax = itr[0]->GetColor();
++itr;
while(itr != end() && nVal > nValMax)
{
rColMin = rColMax;
nValMin = nValMax;
- rColMax = itr->GetColor();
+ rColMax = itr[0]->GetColor();
nValMax = CalcValue(nMin, nMax, itr);
++itr;
}
@@ -580,25 +580,25 @@ Color* ScColorScaleFormat::GetColor( const ScAddress& rAddr ) const
void ScColorScaleFormat::UpdateReference( sc::RefUpdateContext& rCxt )
{
for(iterator itr = begin(); itr != end(); ++itr)
- itr->UpdateReference(rCxt);
+ itr[0]->UpdateReference(rCxt);
}
void ScColorScaleFormat::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
{
for (iterator it = begin(); it != end(); ++it)
- it->UpdateInsertTab(rCxt);
+ it[0]->UpdateInsertTab(rCxt);
}
void ScColorScaleFormat::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
{
for (iterator it = begin(); it != end(); ++it)
- it->UpdateDeleteTab(rCxt);
+ it[0]->UpdateDeleteTab(rCxt);
}
void ScColorScaleFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
{
for (iterator it = begin(); it != end(); ++it)
- it->UpdateMoveTab(rCxt);
+ it[0]->UpdateMoveTab(rCxt);
}
bool ScColorScaleFormat::NeedsRepaint() const
@@ -606,7 +606,7 @@ bool ScColorScaleFormat::NeedsRepaint() const
for(const_iterator itr = begin(), itrEnd = end();
itr != itrEnd; ++itr)
{
- if(itr->NeedsRepaint())
+ if(itr[0]->NeedsRepaint())
return true;
}
return false;
@@ -644,7 +644,7 @@ ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos)
if (maColorScales.size() <= nPos)
return NULL;
- return &maColorScales[nPos];
+ return &maColorScales[nPos].get()[0];
}
const ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos) const
@@ -652,7 +652,7 @@ const ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos) const
if (maColorScales.size() <= nPos)
return NULL;
- return &maColorScales[nPos];
+ return &maColorScales[nPos].get()[0];
}
size_t ScColorScaleFormat::size() const
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index c148e02..3aeaef2 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1816,8 +1816,8 @@ ScConditionalFormat* ScConditionalFormat::Clone(ScDocument* pNewDoc) const
for (CondFormatContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- ScFormatEntry* pNewEntry = itr->Clone(pNewDoc);
- pNew->maEntries.push_back( pNewEntry );
+ ScFormatEntry* pNewEntry = itr[0]->Clone(pNewDoc);
+ pNew->maEntries.push_back( std::unique_ptr<ScFormatEntry>(pNewEntry) );
pNewEntry->SetParent(pNew);
}
pNew->SetRange( maRanges );
@@ -1849,7 +1849,7 @@ void ScConditionalFormat::SetRange( const ScRangeList& rRanges )
void ScConditionalFormat::AddEntry( ScFormatEntry* pNew )
{
- maEntries.push_back(pNew);
+ maEntries.push_back( std::unique_ptr<ScFormatEntry>(pNew));
pNew->SetParent(this);
}
@@ -1879,7 +1879,7 @@ ScConditionalFormat::~ScConditionalFormat()
const ScFormatEntry* ScConditionalFormat::GetEntry( sal_uInt16 nPos ) const
{
if ( nPos < size() )
- return &maEntries[nPos];
+ return &maEntries[nPos].get()[0];
else
return NULL;
}
@@ -1888,15 +1888,15 @@ const OUString& ScConditionalFormat::GetCellStyle( ScRefCellValue& rCell, const
{
for (CondFormatContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- if(itr->GetType() == condformat::CONDITION)
+ if(itr[0]->GetType() == condformat::CONDITION)
{
- const ScCondFormatEntry& rEntry = static_cast<const ScCondFormatEntry&>(*itr);
+ const ScCondFormatEntry& rEntry = static_cast<const ScCondFormatEntry&>(*itr[0]);
if (rEntry.IsCellValid(rCell, rPos))
return rEntry.GetStyle();
}
- else if(itr->GetType() == condformat::DATE)
+ else if(itr[0]->GetType() == condformat::DATE)
{
- const ScCondDateFormatEntry& rEntry = static_cast<const ScCondDateFormatEntry&>(*itr);
+ const ScCondDateFormatEntry& rEntry = static_cast<const ScCondDateFormatEntry&>(*itr[0]);
if (rEntry.IsValid( rPos ))
return rEntry.GetStyleName();
}
@@ -1910,30 +1910,30 @@ ScCondFormatData ScConditionalFormat::GetData( ScRefCellValue& rCell, const ScAd
ScCondFormatData aData;
for(CondFormatContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- if(itr->GetType() == condformat::CONDITION && aData.aStyleName.isEmpty())
+ if(itr[0]->GetType() == condformat::CONDITION && aData.aStyleName.isEmpty())
{
- const ScCondFormatEntry& rEntry = static_cast<const ScCondFormatEntry&>(*itr);
+ const ScCondFormatEntry& rEntry = static_cast<const ScCondFormatEntry&>(*itr[0]);
if (rEntry.IsCellValid(rCell, rPos))
aData.aStyleName = rEntry.GetStyle();
}
- else if(itr->GetType() == condformat::COLORSCALE && !aData.pColorScale)
+ else if(itr[0]->GetType() == condformat::COLORSCALE && !aData.pColorScale)
{
- const ScColorScaleFormat& rEntry = static_cast<const ScColorScaleFormat&>(*itr);
+ const ScColorScaleFormat& rEntry = static_cast<const ScColorScaleFormat&>(*itr[0]);
aData.pColorScale = rEntry.GetColor(rPos);
}
- else if(itr->GetType() == condformat::DATABAR && !aData.pDataBar)
+ else if(itr[0]->GetType() == condformat::DATABAR && !aData.pDataBar)
{
- const ScDataBarFormat& rEntry = static_cast<const ScDataBarFormat&>(*itr);
+ const ScDataBarFormat& rEntry = static_cast<const ScDataBarFormat&>(*itr[0]);
aData.pDataBar = rEntry.GetDataBarInfo(rPos);
}
- else if(itr->GetType() == condformat::ICONSET && !aData.pIconSet)
+ else if(itr[0]->GetType() == condformat::ICONSET && !aData.pIconSet)
{
- const ScIconSetFormat& rEntry = static_cast<const ScIconSetFormat&>(*itr);
+ const ScIconSetFormat& rEntry = static_cast<const ScIconSetFormat&>(*itr[0]);
aData.pIconSet = rEntry.GetIconSetInfo(rPos);
}
- else if(itr->GetType() == condformat::DATE && aData.aStyleName.isEmpty())
+ else if(itr[0]->GetType() == condformat::DATE && aData.aStyleName.isEmpty())
{
- const ScCondDateFormatEntry& rEntry = static_cast<const ScCondDateFormatEntry&>(*itr);
+ const ScCondDateFormatEntry& rEntry = static_cast<const ScCondDateFormatEntry&>(*itr[0]);
if ( rEntry.IsValid( rPos ) )
aData.aStyleName = rEntry.GetStyleName();
}
@@ -1958,21 +1958,21 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
void ScConditionalFormat::CompileAll()
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
- if(itr->GetType() == condformat::CONDITION)
- static_cast<ScCondFormatEntry&>(*itr).CompileAll();
+ if(itr[0]->GetType() == condformat::CONDITION)
+ static_cast<ScCondFormatEntry&>(*itr[0]).CompileAll();
}
void ScConditionalFormat::CompileXML()
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
- if(itr->GetType() == condformat::CONDITION)
- static_cast<ScCondFormatEntry&>(*itr).CompileXML();
+ if(itr[0]->GetType() == condformat::CONDITION)
+ static_cast<ScCondFormatEntry&>(*itr[0]).CompileXML();
}
void ScConditionalFormat::UpdateReference( sc::RefUpdateContext& rCxt, bool bCopyAsMove )
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
- itr->UpdateReference(rCxt);
+ itr[0]->UpdateReference(rCxt);
if (rCxt.meMode == URM_COPY && bCopyAsMove)
maRanges.UpdateReference(URM_MOVE, pDoc, rCxt.maRange, rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
@@ -2007,7 +2007,7 @@ void ScConditionalFormat::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
}
for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
- it->UpdateInsertTab(rCxt);
+ it[0]->UpdateInsertTab(rCxt);
}
void ScConditionalFormat::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
@@ -2036,7 +2036,7 @@ void ScConditionalFormat::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
}
for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
- it->UpdateDeleteTab(rCxt);
+ it[0]->UpdateDeleteTab(rCxt);
}
void ScConditionalFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
@@ -2073,7 +2073,7 @@ void ScConditionalFormat::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
}
for (CondFormatContainer::iterator it = maEntries.begin(); it != maEntries.end(); ++it)
- it->UpdateMoveTab(rCxt);
+ it[0]->UpdateMoveTab(rCxt);
}
void ScConditionalFormat::DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
@@ -2088,9 +2088,9 @@ void ScConditionalFormat::DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR
void ScConditionalFormat::RenameCellStyle(const OUString& rOld, const OUString& rNew)
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
- if(itr->GetType() == condformat::CONDITION)
+ if(itr[0]->GetType() == condformat::CONDITION)
{
- ScCondFormatEntry& rFormat = static_cast<ScCondFormatEntry&>(*itr);
+ ScCondFormatEntry& rFormat = static_cast<ScCondFormatEntry&>(*itr[0]);
if(rFormat.GetStyle() == rOld)
rFormat.UpdateStyleName( rNew );
}
@@ -2100,17 +2100,17 @@ void ScConditionalFormat::SourceChanged( const ScAddress& rAddr )
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- condformat::ScFormatEntryType eEntryType = itr->GetType();
+ condformat::ScFormatEntryType eEntryType = itr[0]->GetType();
if( eEntryType == condformat::CONDITION)
{
- ScCondFormatEntry& rFormat = static_cast<ScCondFormatEntry&>(*itr);
+ ScCondFormatEntry& rFormat = static_cast<ScCondFormatEntry&>(*itr[0]);
rFormat.SourceChanged( rAddr );
}
else if( eEntryType == condformat::COLORSCALE ||
eEntryType == condformat::DATABAR ||
eEntryType == condformat::ICONSET )
{
- ScColorFormat& rFormat = static_cast<ScColorFormat&>(*itr);
+ ScColorFormat& rFormat = static_cast<ScColorFormat&>(*itr[0]);
if(rFormat.NeedsRepaint())
{
// we need to repaint the whole range anyway
@@ -2125,9 +2125,9 @@ bool ScConditionalFormat::MarkUsedExternalReferences() const
{
bool bAllMarked = false;
for(CondFormatContainer::const_iterator itr = maEntries.begin(); itr != maEntries.end() && !bAllMarked; ++itr)
- if(itr->GetType() == condformat::CONDITION)
+ if(itr[0]->GetType() == condformat::CONDITION)
{
- const ScCondFormatEntry& rFormat = static_cast<const ScCondFormatEntry&>(*itr);
+ const ScCondFormatEntry& rFormat = static_cast<const ScCondFormatEntry&>(*itr[0]);
bAllMarked = rFormat.MarkUsedExternalReferences();
}
@@ -2138,7 +2138,7 @@ void ScConditionalFormat::startRendering()
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- itr->startRendering();
+ itr[0]->startRendering();
}
}
@@ -2146,7 +2146,7 @@ void ScConditionalFormat::endRendering()
{
for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr)
{
- itr->endRendering();
+ itr[0]->endRendering();
}
}
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index fccb614..0b26fc6 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1295,9 +1295,9 @@ XclExpColorScale::XclExpColorScale( const XclExpRoot& rRoot, const ScColorScaleF
{
// exact position is not important, we allow only absolute refs
- XclExpCfvoList::RecordRefType xCfvo( new XclExpCfvo( GetRoot(), *itr, aAddr ) );
+ XclExpCfvoList::RecordRefType xCfvo( new XclExpCfvo( GetRoot(), *itr[0], aAddr ) );
maCfvoList.AppendRecord( xCfvo );
- XclExpColScaleColList::RecordRefType xClo( new XclExpColScaleCol( GetRoot(), itr->GetColor() ) );
+ XclExpColScaleColList::RecordRefType xClo( new XclExpColScaleCol( GetRoot(), itr[0]->GetColor() ) );
maColList.AppendRecord( xClo );
}
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index bc29723..632602f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4304,17 +4304,17 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
for(ScColorScaleFormat::const_iterator it = mrColorScale.begin();
it != mrColorScale.end(); ++it)
{
- if(it->GetType() == COLORSCALE_FORMULA)
+ if(it[0]->GetType() == COLORSCALE_FORMULA)
{
- OUString sFormula = it->GetFormula(formula::FormulaGrammar::GRAM_ODFF);
+ OUString sFormula = it[0]->GetFormula(formula::FormulaGrammar::GRAM_ODFF);
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_VALUE, sFormula);
}
else
- AddAttribute(XML_NAMESPACE_CALC_EXT, XML_VALUE, OUString::number(it->GetValue()));
+ AddAttribute(XML_NAMESPACE_CALC_EXT, XML_VALUE, OUString::number(it[0]->GetValue()));
- AddAttribute(XML_NAMESPACE_CALC_EXT, XML_TYPE, getCondFormatEntryType(*it));
+ AddAttribute(XML_NAMESPACE_CALC_EXT, XML_TYPE, getCondFormatEntryType(*it[0]));
OUStringBuffer aBuffer;
- ::sax::Converter::convertColor(aBuffer, it->GetColor().GetColor());
+ ::sax::Converter::convertColor(aBuffer, it[0]->GetColor().GetColor());
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_COLOR, aBuffer.makeStringAndClear());
SvXMLElementExport aElementColorScaleEntry(*this, XML_NAMESPACE_CALC_EXT, XML_COLOR_SCALE_ENTRY, true, true);
}
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index cee9abc..8668a75 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -757,9 +757,9 @@ ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument
if(pFormat)
{
ScColorScaleFormat::const_iterator itr = pFormat->begin();
- SetColorScaleEntryTypes(*itr, *maLbEntryTypeMin.get(), *maEdMin.get(), *maLbColMin.get(), pDoc);
+ SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMin.get(), *maEdMin.get(), *maLbColMin.get(), pDoc);
++itr;
- SetColorScaleEntryTypes(*itr, *maLbEntryTypeMax.get(), *maEdMax.get(), *maLbColMax.get(), pDoc);
+ SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMax.get(), *maEdMax.get(), *maLbColMax.get(), pDoc);
}
else
{
@@ -929,12 +929,12 @@ ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument
if(pFormat)
{
ScColorScaleFormat::const_iterator itr = pFormat->begin();
- SetColorScaleEntryTypes(*itr, *maLbEntryTypeMin.get(), *maEdMin.get(), *maLbColMin.get(), pDoc);
+ SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMin.get(), *maEdMin.get(), *maLbColMin.get(), pDoc);
assert(pFormat->size() == 3);
++itr;
- SetColorScaleEntryTypes(*itr, *maLbEntryTypeMiddle.get(), *maEdMiddle.get(), *maLbColMiddle.get(), pDoc);
+ SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMiddle.get(), *maEdMiddle.get(), *maLbColMiddle.get(), pDoc);
++itr;
- SetColorScaleEntryTypes(*itr, *maLbEntryTypeMax.get(), *maEdMax.get(), *maLbColMax.get(), pDoc);
+ SetColorScaleEntryTypes(*itr[0], *maLbEntryTypeMax.get(), *maEdMax.get(), *maLbColMax.get(), pDoc);
}
else
{
More information about the Libreoffice-commits
mailing list