[Libreoffice-commits] core.git: sc/inc sc/qa sc/source
Michael Stahl
mstahl at redhat.com
Wed Aug 19 13:44:14 PDT 2015
sc/inc/conditio.hxx | 11 ++-
sc/qa/unit/helper/shared_test_impl.hxx | 16 ++---
sc/qa/unit/ucalc.cxx | 2
sc/source/core/data/conditio.cxx | 96 ++++++++++++++++++------------
sc/source/core/data/table1.cxx | 2
sc/source/core/data/table2.cxx | 8 +-
sc/source/filter/excel/xecontent.cxx | 2
sc/source/filter/excel/xestyle.cxx | 4 -
sc/source/filter/oox/condformatbuffer.cxx | 6 -
sc/source/filter/xml/xmlexprt.cxx | 6 -
sc/source/filter/xml/xmlstyli.cxx | 6 -
sc/source/ui/condformat/condformatmgr.cxx | 4 -
sc/source/ui/docshell/docfunc.cxx | 4 -
sc/source/ui/unoobj/condformatuno.cxx | 2
14 files changed, 96 insertions(+), 73 deletions(-)
New commits:
commit 082a7faeedb03c790ba5fe03b466b7a45a822c35
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Aug 19 17:45:31 2015 +0200
sc: replace boost::ptr_set with std::set<std::unique_ptr>
Change-Id: I966069726fd7dbc57e03e93514bec62d8bbb2ba0
Reviewed-on: https://gerrit.libreoffice.org/17862
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index a694f97..335bd2b 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -26,13 +26,15 @@
#include "scdllapi.h"
#include "rangelst.hxx"
+#include <comphelper/stl_types.hxx>
+
#include <rtl/math.hxx>
#include <tools/date.hxx>
#include <map>
+#include <set>
#include <boost/noncopyable.hpp>
-#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/scoped_ptr.hpp>
@@ -431,7 +433,7 @@ public:
bool MarkUsedExternalReferences() const;
- // sorted (via boost::ptr_set) by Index
+ // sorted (via std::set) by Index
// operator== only for sorting
bool operator ==( const ScConditionalFormat& r ) const { return nKey == r.nKey; }
bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; }
@@ -444,8 +446,9 @@ public:
class SC_DLLPUBLIC ScConditionalFormatList
{
private:
- typedef boost::ptr_set<ScConditionalFormat> ConditionalFormatContainer;
- ConditionalFormatContainer maConditionalFormats;
+ typedef std::set<std::unique_ptr<ScConditionalFormat>,
+ comphelper::UniquePtrValueLess<ScConditionalFormat>> ConditionalFormatContainer;
+ ConditionalFormatContainer m_ConditionalFormats;
void operator =(ScConditionalFormatList const &) SAL_DELETED_FUNCTION;
diff --git a/sc/qa/unit/helper/shared_test_impl.hxx b/sc/qa/unit/helper/shared_test_impl.hxx
index 666be99..28b348b 100644
--- a/sc/qa/unit/helper/shared_test_impl.hxx
+++ b/sc/qa/unit/helper/shared_test_impl.hxx
@@ -20,9 +20,9 @@ struct FindCondFormatByEnclosingRange
FindCondFormatByEnclosingRange(const ScRange& rRange):
mrRange(rRange) {}
- bool operator()(const ScConditionalFormat& rFormat)
+ bool operator()(const std::unique_ptr<ScConditionalFormat>& pFormat)
{
- if(rFormat.GetRange().Combine() == mrRange)
+ if (pFormat->GetRange().Combine() == mrRange)
return true;
return false;
@@ -58,9 +58,9 @@ void testDataBar_Impl(ScDocument& rDoc)
ScConditionalFormatList::const_iterator itr = std::find_if(pList->begin(),
pList->end(), FindCondFormatByEnclosingRange(aData[i].aRange));
CPPUNIT_ASSERT(itr != pList->end());
- CPPUNIT_ASSERT_EQUAL(size_t(1), itr->size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
- const ScFormatEntry* pFormatEntry = itr->GetEntry(0);
+ const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), condformat::DATABAR);
const ScDataBarFormat* pDataBar = static_cast<const ScDataBarFormat*>(pFormatEntry);
CPPUNIT_ASSERT(pDataBar);
@@ -95,9 +95,9 @@ void testColorScale2Entry_Impl(ScDocument& rDoc)
ScConditionalFormatList::const_iterator itr = std::find_if(pList->begin(),
pList->end(), FindCondFormatByEnclosingRange(aData2Entry[i].aRange));
CPPUNIT_ASSERT(itr != pList->end());
- CPPUNIT_ASSERT_EQUAL(size_t(1), itr->size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
- const ScFormatEntry* pFormatEntry = itr->GetEntry(0);
+ const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), condformat::COLORSCALE);
const ScColorScaleFormat* pColFormat = static_cast<const ScColorScaleFormat*>(pFormatEntry);
CPPUNIT_ASSERT_EQUAL(size_t(2), pColFormat->size());
@@ -134,9 +134,9 @@ void testColorScale3Entry_Impl(ScDocument& rDoc)
ScConditionalFormatList::const_iterator itr = std::find_if(pList->begin(),
pList->end(), FindCondFormatByEnclosingRange(aData3Entry[i].aRange));
CPPUNIT_ASSERT(itr != pList->end());
- CPPUNIT_ASSERT_EQUAL(size_t(1), itr->size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), (*itr)->size());
- const ScFormatEntry* pFormatEntry = itr->GetEntry(0);
+ const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(0);
CPPUNIT_ASSERT_EQUAL(pFormatEntry->GetType(), condformat::COLORSCALE);
const ScColorScaleFormat* pColFormat = static_cast<const ScColorScaleFormat*>(pFormatEntry);
CPPUNIT_ASSERT_EQUAL(size_t(3), pColFormat->size());
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 99f5bb9..b3d809c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -5878,7 +5878,7 @@ void Test::testCondCopyPasteSheet()
ScConditionalFormatList* pList = m_pDoc->GetCondFormList(1);
CPPUNIT_ASSERT_EQUAL(size_t(1), pList->size());
- ScConditionalFormat& rFormat = *pList->begin();
+ ScConditionalFormat& rFormat = **pList->begin();
const ScRangeList& rRange = rFormat.GetRange();
CPPUNIT_ASSERT_EQUAL(ScRangeList(ScRange(0,0,1,3,3,1)), rRange);
sal_uInt32 nKey = rFormat.GetKey();
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 214217e..c148e02 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -2153,18 +2153,18 @@ void ScConditionalFormat::endRendering()
ScConditionalFormatList::ScConditionalFormatList(const ScConditionalFormatList& rList)
{
for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
- InsertNew( itr->Clone() );
+ InsertNew( (*itr)->Clone() );
}
ScConditionalFormatList::ScConditionalFormatList(ScDocument* pDoc, const ScConditionalFormatList& rList)
{
for(const_iterator itr = rList.begin(); itr != rList.end(); ++itr)
- InsertNew( itr->Clone(pDoc) );
+ InsertNew( (*itr)->Clone(pDoc) );
}
void ScConditionalFormatList::InsertNew( ScConditionalFormat* pNew )
{
- maConditionalFormats.insert(pNew);
+ m_ConditionalFormats.insert(std::unique_ptr<ScConditionalFormat>(pNew));
}
bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const
@@ -2174,7 +2174,7 @@ bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) con
bool bEqual = ( nCount == r.size() );
const_iterator locIterator = begin();
for(const_iterator itr = r.begin(); itr != r.end() && bEqual; ++itr, ++locIterator)
- if ( !locIterator->EqualEntries(*itr) ) // Entries differ?
+ if (!(*locIterator)->EqualEntries(**itr)) // Entries differ?
bEqual = false;
return bEqual;
@@ -2184,8 +2184,8 @@ ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
{
//FIXME: Binary search
for( iterator itr = begin(); itr != end(); ++itr)
- if (itr->GetKey() == nKey)
- return &(*itr);
+ if ((*itr)->GetKey() == nKey)
+ return itr->get();
SAL_WARN("sc", "ScConditionalFormatList: Entry not found");
return NULL;
@@ -2195,8 +2195,8 @@ const ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
{
//FIXME: Binary search
for ( const_iterator itr = begin(); itr != end(); ++itr)
- if (itr->GetKey() == nKey)
- return &(*itr);
+ if ((*itr)->GetKey() == nKey)
+ return itr->get();
SAL_WARN("sc", "ScConditionalFormatList: Entry not found");
return NULL;
@@ -2204,20 +2204,26 @@ const ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey )
void ScConditionalFormatList::CompileAll()
{
- for( iterator itr = begin(); itr != end(); ++itr)
- itr->CompileAll();
+ for (auto const& it : m_ConditionalFormats)
+ {
+ it->CompileAll();
+ }
}
void ScConditionalFormatList::CompileXML()
{
- for( iterator itr = begin(); itr != end(); ++itr)
- itr->CompileXML();
+ for (auto const& it : m_ConditionalFormats)
+ {
+ it->CompileXML();
+ }
}
void ScConditionalFormatList::UpdateReference( sc::RefUpdateContext& rCxt )
{
- for( iterator itr = begin(); itr != end(); ++itr)
- itr->UpdateReference(rCxt);
+ for (auto const& it : m_ConditionalFormats)
+ {
+ it->UpdateReference(rCxt);
+ }
if (rCxt.meMode == URM_INSDEL)
{
@@ -2228,38 +2234,50 @@ void ScConditionalFormatList::UpdateReference( sc::RefUpdateContext& rCxt )
void ScConditionalFormatList::InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize)
{
- for(iterator it = begin(), itEnd = end(); it != itEnd; ++it)
+ for (auto const& it : m_ConditionalFormats)
+ {
it->InsertRow(nTab, nColStart, nColEnd, nRowPos, nSize);
+ }
}
void ScConditionalFormatList::InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColPos, SCSIZE nSize)
{
- for(iterator it = begin(), itEnd = end(); it != itEnd; ++it)
+ for (auto const& it : m_ConditionalFormats)
+ {
it->InsertCol(nTab, nRowStart, nRowEnd, nColPos, nSize);
+ }
}
void ScConditionalFormatList::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
{
- for (iterator it = begin(); it != end(); ++it)
+ for (auto const& it : m_ConditionalFormats)
+ {
it->UpdateInsertTab(rCxt);
+ }
}
void ScConditionalFormatList::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
{
- for (iterator it = begin(); it != end(); ++it)
+ for (auto const& it : m_ConditionalFormats)
+ {
it->UpdateDeleteTab(rCxt);
+ }
}
void ScConditionalFormatList::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt )
{
- for (iterator it = begin(); it != end(); ++it)
+ for (auto const& it : m_ConditionalFormats)
+ {
it->UpdateMoveTab(rCxt);
+ }
}
void ScConditionalFormatList::RenameCellStyle( const OUString& rOld, const OUString& rNew )
{
- for( iterator itr = begin(); itr != end(); ++itr)
- itr->RenameCellStyle(rOld,rNew);
+ for (auto const& it : m_ConditionalFormats)
+ {
+ it->RenameCellStyle(rOld, rNew);
+ }
}
bool ScConditionalFormatList::CheckAllEntries()
@@ -2270,10 +2288,10 @@ bool ScConditionalFormatList::CheckAllEntries()
iterator itr = begin();
while(itr != end())
{
- if(itr->GetRange().empty())
+ if ((*itr)->GetRange().empty())
{
bValid = false;
- maConditionalFormats.erase(itr++);
+ m_ConditionalFormats.erase(itr++);
}
else
++itr;
@@ -2285,54 +2303,56 @@ bool ScConditionalFormatList::CheckAllEntries()
void ScConditionalFormatList::DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
for( iterator itr = begin(); itr != end(); ++itr)
- itr->DeleteArea( nCol1, nRow1, nCol2, nRow2 );
+ (*itr)->DeleteArea( nCol1, nRow1, nCol2, nRow2 );
CheckAllEntries();
}
void ScConditionalFormatList::SourceChanged( const ScAddress& rAddr )
{
- for( iterator itr = begin(); itr != end(); ++itr)
- itr->SourceChanged( rAddr );
+ for (auto const& it : m_ConditionalFormats)
+ {
+ it->SourceChanged( rAddr );
+ }
}
ScConditionalFormatList::iterator ScConditionalFormatList::begin()
{
- return maConditionalFormats.begin();
+ return m_ConditionalFormats.begin();
}
ScConditionalFormatList::const_iterator ScConditionalFormatList::begin() const
{
- return maConditionalFormats.begin();
+ return m_ConditionalFormats.begin();
}
ScConditionalFormatList::iterator ScConditionalFormatList::end()
{
- return maConditionalFormats.end();
+ return m_ConditionalFormats.end();
}
ScConditionalFormatList::const_iterator ScConditionalFormatList::end() const
{
- return maConditionalFormats.end();
+ return m_ConditionalFormats.end();
}
size_t ScConditionalFormatList::size() const
{
- return maConditionalFormats.size();
+ return m_ConditionalFormats.size();
}
bool ScConditionalFormatList::empty() const
{
- return maConditionalFormats.empty();
+ return m_ConditionalFormats.empty();
}
void ScConditionalFormatList::erase( sal_uLong nIndex )
{
for( iterator itr = begin(); itr != end(); ++itr )
{
- if( itr->GetKey() == nIndex )
+ if( (*itr)->GetKey() == nIndex )
{
- maConditionalFormats.erase(itr);
+ m_ConditionalFormats.erase(itr);
break;
}
}
@@ -2340,17 +2360,17 @@ void ScConditionalFormatList::erase( sal_uLong nIndex )
void ScConditionalFormatList::startRendering()
{
- for(iterator itr = begin(); itr != end(); ++itr)
+ for (auto const& it : m_ConditionalFormats)
{
- itr->startRendering();
+ it->startRendering();
}
}
void ScConditionalFormatList::endRendering()
{
- for(iterator itr = begin(); itr != end(); ++itr)
+ for (auto const& it : m_ConditionalFormats)
{
- itr->endRendering();
+ it->endRendering();
}
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index d1de970..8c09165 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -2101,7 +2101,7 @@ sal_uLong ScTable::AddCondFormat( ScConditionalFormat* pNew )
for(ScConditionalFormatList::const_iterator itr = mpCondFormatList->begin();
itr != mpCondFormatList->end(); ++itr)
{
- sal_uLong nKey = itr->GetKey();
+ sal_uLong nKey = (*itr)->GetKey();
if(nKey > nMax)
nMax = nKey;
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 1a580f1..f28be30 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -583,12 +583,12 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
for(ScConditionalFormatList::const_iterator itr = pTable->mpCondFormatList->begin(),
itrEnd = pTable->mpCondFormatList->end(); itr != itrEnd; ++itr)
{
- const ScRangeList& rCondFormatRange = itr->GetRange();
+ const ScRangeList& rCondFormatRange = (*itr)->GetRange();
if(!rCondFormatRange.Intersects( aOldRange ))
continue;
ScRangeList aIntersectedRange = rCondFormatRange.GetIntersectedRange(aOldRange);
- ScConditionalFormat* pNewFormat = itr->Clone(pDocument);
+ ScConditionalFormat* pNewFormat = (*itr)->Clone(pDocument);
pNewFormat->SetRange(aIntersectedRange);
sc::RefUpdateContext aRefCxt(*pDocument);
@@ -603,8 +603,8 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
for(ScConditionalFormatList::const_iterator itrCond = mpCondFormatList->begin();
itrCond != mpCondFormatList->end(); ++itrCond)
{
- if(itrCond->GetKey() > nMax)
- nMax = itrCond->GetKey();
+ if ((*itrCond)->GetKey() > nMax)
+ nMax = (*itrCond)->GetKey();
}
pNewFormat->SetKey(nMax + 1);
mpCondFormatList->InsertNew(pNewFormat);
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index ca05734..fccb614 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1440,7 +1440,7 @@ XclExpCondFormatBuffer::XclExpCondFormatBuffer( const XclExpRoot& rRoot, XclExtL
for( ScConditionalFormatList::const_iterator itr = pCondFmtList->begin();
itr != pCondFmtList->end(); ++itr)
{
- XclExpCondfmtList::RecordRefType xCondfmtRec( new XclExpCondfmt( GetRoot(), *itr, xExtLst, nIndex ));
+ XclExpCondfmtList::RecordRefType xCondfmtRec( new XclExpCondfmt( GetRoot(), **itr, xExtLst, nIndex ));
if( xCondfmtRec->IsValid() )
maCondfmtList.AppendRecord( xCondfmtRec );
}
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index c4e5c86..3f3e372 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3021,10 +3021,10 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
for (ScConditionalFormatList::const_iterator itr = pList->begin();
itr != pList->end(); ++itr)
{
- size_t nEntryCount = itr->size();
+ size_t nEntryCount = (*itr)->size();
for (size_t nFormatEntry = 0; nFormatEntry < nEntryCount; ++nFormatEntry)
{
- const ScFormatEntry* pFormatEntry = itr->GetEntry(nFormatEntry);
+ const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(nFormatEntry);
if (!pFormatEntry || (pFormatEntry->GetType() != condformat::CONDITION &&
pFormatEntry->GetType() != condformat::DATE))
continue;
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 955b304..909e3ea 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1113,11 +1113,11 @@ namespace {
ScConditionalFormat* findFormatByRange(const ScRangeList& rRange, ScDocument* pDoc, SCTAB nTab)
{
ScConditionalFormatList* pList = pDoc->GetCondFormList(nTab);
- for (auto itr = pList->begin(); itr != pList->end(); ++itr)
+ for (auto const& it : *pList)
{
- if (itr->GetRange() == rRange)
+ if (it->GetRange() == rRange)
{
- return &(*itr);
+ return it.get();
}
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 93ab355..b5c730d 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4161,14 +4161,14 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
itr != pCondFormatList->end(); ++itr)
{
OUString sRanges;
- const ScRangeList& rRangeList = itr->GetRange();
+ const ScRangeList& rRangeList = (*itr)->GetRange();
ScRangeStringConverter::GetStringFromRangeList( sRanges, &rRangeList, pDoc, formula::FormulaGrammar::CONV_OOO );
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_TARGET_RANGE_ADDRESS, sRanges);
SvXMLElementExport aElementCondFormat(*this, XML_NAMESPACE_CALC_EXT, XML_CONDITIONAL_FORMAT, true, true);
- size_t nEntries = itr->size();
+ size_t nEntries = (*itr)->size();
for(size_t i = 0; i < nEntries; ++i)
{
- const ScFormatEntry* pFormatEntry = itr->GetEntry(i);
+ const ScFormatEntry* pFormatEntry = (*itr)->GetEntry(i);
if(pFormatEntry->GetType()==condformat::CONDITION)
{
const ScCondFormatEntry* pEntry = static_cast<const ScCondFormatEntry*>(pFormatEntry);
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 28f31c5..76056e1 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -514,10 +514,10 @@ void XMLTableStyleContext::ApplyCondFormat( const uno::Sequence<table::CellRange
for(ScConditionalFormatList::iterator itr = pFormatList->begin(), itrEnd = pFormatList->end();
itr != itrEnd; ++itr)
{
- if(itr->EqualEntries(*mpCondFormat))
+ if ((*itr)->EqualEntries(*mpCondFormat))
{
- ScRangeList& rRangeList = itr->GetRangeList();
- sal_uInt32 nCondId = itr->GetKey();
+ ScRangeList& rRangeList = (*itr)->GetRangeList();
+ sal_uInt32 nCondId = (*itr)->GetKey();
size_t n = aRangeList.size();
for(size_t i = 0; i < n; ++i)
{
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 05ad63a..4b36a95 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -51,8 +51,8 @@ void ScCondFormatManagerWindow::Init()
{
for(ScConditionalFormatList::iterator itr = mpFormatList->begin(); itr != mpFormatList->end(); ++itr)
{
- SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(*itr), TREELIST_APPEND, 0xffff );
- maMapLBoxEntryToCondIndex.insert(std::pair<SvTreeListEntry*,sal_Int32>(pEntry,itr->GetKey()));
+ SvTreeListEntry* pEntry = InsertEntryToColumn( createEntryString(**itr), TREELIST_APPEND, 0xffff );
+ maMapLBoxEntryToCondIndex.insert(std::pair<SvTreeListEntry*,sal_Int32>(pEntry, (*itr)->GetKey()));
}
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5c0cc2c..86671ec 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -5379,13 +5379,13 @@ void ScDocFunc::SetConditionalFormatList( ScConditionalFormatList* pList, SCTAB
ScConditionalFormatList* pOldList = rDoc.GetCondFormList(nTab);
for(ScConditionalFormatList::const_iterator itr = pOldList->begin(), itrEnd = pOldList->end(); itr != itrEnd; ++itr)
{
- rDoc.RemoveCondFormatData(itr->GetRange(), nTab, itr->GetKey());
+ rDoc.RemoveCondFormatData((*itr)->GetRange(), nTab, (*itr)->GetKey());
}
// then set new entries
for(ScConditionalFormatList::iterator itr = pList->begin(); itr != pList->end(); ++itr)
{
- rDoc.AddCondFormatData(itr->GetRange(), nTab, itr->GetKey());
+ rDoc.AddCondFormatData((*itr)->GetRange(), nTab, (*itr)->GetKey());
}
rDoc.SetCondFormList(pList, nTab);
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index 9de1449..da35ab6 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -379,7 +379,7 @@ uno::Sequence<uno::Reference<sheet::XConditionalFormat> > ScCondFormatsObj::getC
uno::Sequence<uno::Reference<sheet::XConditionalFormat> > aCondFormats(n);
sal_Int32 i = 0;
for (ScConditionalFormatList::const_iterator itr = pFormatList->begin(); itr != pFormatList->end(); ++itr, ++i) {
- uno::Reference<sheet::XConditionalFormat> xCondFormat(new ScCondFormatObj(mpDocShell, this, itr->GetKey()));
+ uno::Reference<sheet::XConditionalFormat> xCondFormat(new ScCondFormatObj(mpDocShell, this, (*itr)->GetKey()));
aCondFormats[i] = xCondFormat;
}
More information about the Libreoffice-commits
mailing list