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
2ab47066
Kaydet (Commit)
2ab47066
authored
Eki 30, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmloff: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: Icb51f02ca761d683d926135fcaedc1164cd1ae8d
üst
02b7f3d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
18 deletions
+17
-18
impastpl.cxx
xmloff/source/style/impastpl.cxx
+14
-14
impastpl.hxx
xmloff/source/style/impastpl.hxx
+3
-4
No files found.
xmloff/source/style/impastpl.cxx
Dosyayı görüntüle @
2ab47066
...
...
@@ -282,9 +282,9 @@ bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, const vector<
XMLAutoStylePoolProperties
*
pProperties
=
0
;
sal_Int32
nProperties
=
rProperties
.
size
();
size_t
i
=
0
;
for
(
size_t
n
=
m
a
PropertiesList
.
size
();
i
<
n
;
++
i
)
for
(
size_t
n
=
m
_
PropertiesList
.
size
();
i
<
n
;
++
i
)
{
XMLAutoStylePoolProperties
*
pIS
=
&
maPropertiesList
[
i
]
;
XMLAutoStylePoolProperties
*
const
pIS
=
m_PropertiesList
[
i
].
get
()
;
if
(
nProperties
>
(
sal_Int32
)
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
@@ -303,9 +303,9 @@ bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, const vector<
if
(
!
pProperties
)
{
pProperties
=
new
XMLAutoStylePoolProperties
(
rFamilyData
,
rProperties
,
msParent
);
PropertiesListType
::
iterator
it
=
m
a
PropertiesList
.
begin
();
PropertiesListType
::
iterator
it
=
m
_
PropertiesList
.
begin
();
::
std
::
advance
(
it
,
i
);
m
aPropertiesList
.
insert
(
it
,
pProperties
);
m
_PropertiesList
.
insert
(
it
,
std
::
unique_ptr
<
XMLAutoStylePoolProperties
>
(
pProperties
)
);
bAdded
=
true
;
}
...
...
@@ -325,9 +325,9 @@ bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, const ve
bool
bAdded
=
false
;
sal_Int32
nProperties
=
rProperties
.
size
();
size_t
i
=
0
;
for
(
size_t
n
=
m
a
PropertiesList
.
size
();
i
<
n
;
++
i
)
for
(
size_t
n
=
m
_
PropertiesList
.
size
();
i
<
n
;
++
i
)
{
XMLAutoStylePoolProperties
*
pIS
=
&
maPropertiesList
[
i
]
;
XMLAutoStylePoolProperties
*
const
pIS
=
m_PropertiesList
[
i
].
get
()
;
if
(
nProperties
>
(
sal_Int32
)
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
@@ -340,13 +340,13 @@ bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, const ve
if
(
rFamilyData
.
maNameSet
.
find
(
rName
)
==
rFamilyData
.
maNameSet
.
end
())
{
XMLAutoStylePoolProperties
*
pProperties
=
new
XMLAutoStylePoolProperties
(
rFamilyData
,
rProperties
,
msParent
);
std
::
unique_ptr
<
XMLAutoStylePoolProperties
>
pProperties
(
new
XMLAutoStylePoolProperties
(
rFamilyData
,
rProperties
,
msParent
)
);
// ignore the generated name
pProperties
->
SetName
(
rName
);
PropertiesListType
::
iterator
it
=
m
a
PropertiesList
.
begin
();
PropertiesListType
::
iterator
it
=
m
_
PropertiesList
.
begin
();
::
std
::
advance
(
it
,
i
);
m
aPropertiesList
.
insert
(
it
,
pProperties
);
m
_PropertiesList
.
insert
(
it
,
std
::
move
(
pProperties
)
);
bAdded
=
true
;
}
...
...
@@ -361,9 +361,9 @@ OUString XMLAutoStylePoolParent::Find( const XMLAutoStyleFamily& rFamilyData, co
{
OUString
sName
;
vector
<
XMLPropertyState
>::
size_type
nItems
=
rProperties
.
size
();
for
(
size_t
i
=
0
,
n
=
m
a
PropertiesList
.
size
();
i
<
n
;
++
i
)
for
(
size_t
i
=
0
,
n
=
m
_
PropertiesList
.
size
();
i
<
n
;
++
i
)
{
const
XMLAutoStylePoolProperties
*
pIS
=
&
maPropertiesList
[
i
]
;
const
XMLAutoStylePoolProperties
*
const
pIS
=
m_PropertiesList
[
i
].
get
()
;
if
(
nItems
>
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
@@ -636,8 +636,8 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
size_t
nProperties
=
rParent
.
GetPropertiesList
().
size
();
for
(
size_t
j
=
0
;
j
<
nProperties
;
j
++
)
{
XMLAutoStylePoolProperties
*
pProperties
=
&
rParent
.
GetPropertiesList
()[
j
]
;
XMLAutoStylePoolProperties
*
const
pProperties
=
rParent
.
GetPropertiesList
()[
j
].
get
()
;
sal_uLong
nPos
=
pProperties
->
GetPos
();
assert
(
nPos
<
nCount
);
assert
(
!
aExpStyles
[
nPos
].
mpProperties
);
...
...
xmloff/source/style/impastpl.hxx
Dosyayı görüntüle @
2ab47066
...
...
@@ -35,7 +35,6 @@
#include <xmloff/xmlexppr.hxx>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
class
SvXMLAutoStylePoolP
;
class
XMLAutoStylePoolParent
;
...
...
@@ -70,11 +69,11 @@ public:
class
XMLAutoStylePoolParent
{
public
:
typedef
boost
::
ptr_vector
<
XMLAutoStylePoolProperties
>
PropertiesListType
;
typedef
std
::
vector
<
std
::
unique_ptr
<
XMLAutoStylePoolProperties
>
>
PropertiesListType
;
private
:
OUString
msParent
;
PropertiesListType
m
a
PropertiesList
;
PropertiesListType
m
_
PropertiesList
;
public
:
...
...
@@ -95,7 +94,7 @@ public:
PropertiesListType
&
GetPropertiesList
()
{
return
m
a
PropertiesList
;
return
m
_
PropertiesList
;
}
bool
operator
<
(
const
XMLAutoStylePoolParent
&
rOther
)
const
;
...
...
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