Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a3e410a0
Kaydet (Commit)
a3e410a0
authored
Kas 06, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: Ic1a44ef591e0d23bbd6574b232370b2888335ebf
üst
3b494897
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
chartarr.hxx
sc/inc/chartarr.hxx
+5
-3
chartarr.cxx
sc/source/core/tool/chartarr.cxx
+21
-13
No files found.
sc/inc/chartarr.hxx
Dosyayı görüntüle @
a3e410a0
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
#include "rangelst.hxx"
#include "rangelst.hxx"
#include "chartpos.hxx"
#include "chartpos.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
class
ScDocument
;
class
ScDocument
;
...
@@ -90,8 +91,9 @@ public:
...
@@ -90,8 +91,9 @@ public:
class
ScChartCollection
class
ScChartCollection
{
{
typedef
::
boost
::
ptr_vector
<
ScChartArray
>
DataType
;
typedef
::
std
::
vector
<
std
::
unique_ptr
<
ScChartArray
>>
DataType
;
DataType
maData
;
DataType
m_Data
;
public
:
public
:
ScChartCollection
();
ScChartCollection
();
ScChartCollection
(
const
ScChartCollection
&
rColl
);
ScChartCollection
(
const
ScChartCollection
&
rColl
);
...
...
sc/source/core/tool/chartarr.cxx
Dosyayı görüntüle @
a3e410a0
...
@@ -29,6 +29,9 @@
...
@@ -29,6 +29,9 @@
#include "formulacell.hxx"
#include "formulacell.hxx"
#include "docoptio.hxx"
#include "docoptio.hxx"
#include <comphelper/stl_types.hxx>
#include <o3tl/make_unique.hxx>
#include <vector>
#include <vector>
using
::
std
::
vector
;
using
::
std
::
vector
;
...
@@ -419,46 +422,51 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
...
@@ -419,46 +422,51 @@ ScMemChart* ScChartArray::CreateMemChartMulti()
}
}
ScChartCollection
::
ScChartCollection
()
{}
ScChartCollection
::
ScChartCollection
()
{}
ScChartCollection
::
ScChartCollection
(
const
ScChartCollection
&
r
)
:
ScChartCollection
::
ScChartCollection
(
const
ScChartCollection
&
r
)
maData
(
r
.
maData
)
{}
{
for
(
auto
const
&
it
:
r
.
m_Data
)
{
m_Data
.
push_back
(
o3tl
::
make_unique
<
ScChartArray
>
(
*
it
));
}
}
void
ScChartCollection
::
push_back
(
ScChartArray
*
p
)
void
ScChartCollection
::
push_back
(
ScChartArray
*
p
)
{
{
m
aData
.
push_back
(
p
);
m
_Data
.
push_back
(
std
::
unique_ptr
<
ScChartArray
>
(
p
)
);
}
}
void
ScChartCollection
::
clear
()
void
ScChartCollection
::
clear
()
{
{
m
a
Data
.
clear
();
m
_
Data
.
clear
();
}
}
size_t
ScChartCollection
::
size
()
const
size_t
ScChartCollection
::
size
()
const
{
{
return
m
a
Data
.
size
();
return
m
_
Data
.
size
();
}
}
bool
ScChartCollection
::
empty
()
const
bool
ScChartCollection
::
empty
()
const
{
{
return
m
a
Data
.
empty
();
return
m
_
Data
.
empty
();
}
}
ScChartArray
*
ScChartCollection
::
operator
[](
size_t
nIndex
)
ScChartArray
*
ScChartCollection
::
operator
[](
size_t
nIndex
)
{
{
if
(
m
a
Data
.
size
()
<=
nIndex
)
if
(
m
_
Data
.
size
()
<=
nIndex
)
return
NULL
;
return
nullptr
;
return
&
maData
[
nIndex
]
;
return
m_Data
[
nIndex
].
get
()
;
}
}
const
ScChartArray
*
ScChartCollection
::
operator
[](
size_t
nIndex
)
const
const
ScChartArray
*
ScChartCollection
::
operator
[](
size_t
nIndex
)
const
{
{
if
(
m
a
Data
.
size
()
<=
nIndex
)
if
(
m
_
Data
.
size
()
<=
nIndex
)
return
NULL
;
return
nullptr
;
return
&
maData
[
nIndex
]
;
return
m_Data
[
nIndex
].
get
()
;
}
}
bool
ScChartCollection
::
operator
==
(
const
ScChartCollection
&
rCmp
)
const
bool
ScChartCollection
::
operator
==
(
const
ScChartCollection
&
rCmp
)
const
{
{
return
maData
==
rCmp
.
maData
;
return
::
comphelper
::
ContainerUniquePtrEquals
(
m_Data
,
rCmp
.
m_Data
)
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment