summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-11-07 00:20:26 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-09 12:04:12 +0100
commit8e36027e2768b4d9d7c8beff864a557c450184ca (patch)
treef4828d0198b193033c5cd6935c9e3e76f8d58abc /sc/source/ui
parenta3e410a043f42e70836ca564a5cccdd12664b457 (diff)
sc: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: Id80f6d6be9f5cb15448ea00299b8e371ccd812ee
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx7
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx8
2 files changed, 8 insertions, 7 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 4c995bf905f6..b6318a2a43eb 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1523,10 +1523,11 @@ ScIconSetFrmtEntry::ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc,
sal_Int32 nType = static_cast<sal_Int32>(eType);
maLbIconSetType->SelectEntryPos(nType);
- for(size_t i = 0, n = pIconSetFormatData->maEntries.size();
+ for (size_t i = 0, n = pIconSetFormatData->m_Entries.size();
i < n; ++i)
{
- maEntries.push_back( VclPtr<ScIconSetFrmtDataEntry>::Create( this, eType, pDoc, i, &pIconSetFormatData->maEntries[i] ) );
+ maEntries.push_back( VclPtr<ScIconSetFrmtDataEntry>::Create(
+ this, eType, pDoc, i, pIconSetFormatData->m_Entries[i].get()));
Point aPos = maEntries[0]->GetPosPixel();
aPos.Y() += maEntries[0]->GetSizePixel().Height() * i * 1.2;
maEntries[i]->SetPosPixel( aPos );
@@ -1625,7 +1626,7 @@ ScFormatEntry* ScIconSetFrmtEntry::GetEntry() const
for(ScIconSetFrmtDataEntriesType::const_iterator itr = maEntries.begin(),
itrEnd = maEntries.end(); itr != itrEnd; ++itr)
{
- pData->maEntries.push_back((*itr)->CreateEntry(mpDoc, maPos));
+ pData->m_Entries.push_back(std::unique_ptr<ScColorScaleEntry>((*itr)->CreateEntry(mpDoc, maPos)));
}
pFormat->SetIconSetData(pData);
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index 2626c74c52ab..e561ddfa1158 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -1596,7 +1596,7 @@ void setIconSetEntry(ScIconSetFormat* pFormat, uno::Reference<sheet::XIconSetEnt
if (!bFound)
throw lang::IllegalArgumentException();
- pData->maEntries[nPos].SetType(eType);
+ pData->m_Entries[nPos]->SetType(eType);
switch (eType)
{
case COLORSCALE_FORMULA:
@@ -1605,7 +1605,7 @@ void setIconSetEntry(ScIconSetFormat* pFormat, uno::Reference<sheet::XIconSetEnt
default:
{
double nVal = xEntry->getFormula().toDouble();
- pData->maEntries[nPos].SetValue(nVal);
+ pData->m_Entries[nPos]->SetValue(nVal);
}
break;
}
@@ -1786,10 +1786,10 @@ ScIconSetEntryObj::~ScIconSetEntryObj()
ScColorScaleEntry* ScIconSetEntryObj::getCoreObject()
{
ScIconSetFormat* pFormat = mxParent->getCoreObject();
- if (pFormat->GetIconSetData()->maEntries.size() <= mnPos)
+ if (pFormat->GetIconSetData()->m_Entries.size() <= mnPos)
throw lang::IllegalArgumentException();
- return &pFormat->GetIconSetData()->maEntries[mnPos];
+ return pFormat->GetIconSetData()->m_Entries[mnPos].get();
}
sal_Int32 ScIconSetEntryObj::getType()