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
defbcb22
Kaydet (Commit)
defbcb22
authored
Agu 17, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Using ptr_vector for this simplifes it a bit...
Change-Id: Id772a260475de7e9c8599616eff189851af6b356
üst
1b183738
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
28 deletions
+19
-28
impastp3.cxx
xmloff/source/style/impastp3.cxx
+10
-21
impastp4.cxx
xmloff/source/style/impastp4.cxx
+1
-1
impastpl.hxx
xmloff/source/style/impastpl.hxx
+8
-6
No files found.
xmloff/source/style/impastp3.cxx
Dosyayı görüntüle @
defbcb22
...
...
@@ -22,14 +22,8 @@
using
namespace
std
;
// Class SvXMLAutoStylePoolParent_Impl
// dtor class SvXMLAutoStylePoolParent_Impl
SvXMLAutoStylePoolParentP_Impl
::~
SvXMLAutoStylePoolParentP_Impl
()
{
for
(
size_t
i
=
maPropertiesList
.
size
();
i
>
0
;
)
delete
maPropertiesList
[
--
i
];
maPropertiesList
.
clear
();
}
// Adds a array of XMLPropertyState ( vector< XMLPropertyState > ) to list
...
...
@@ -39,13 +33,11 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl& rFamilyData, c
{
sal_Bool
bAdded
=
sal_False
;
SvXMLAutoStylePoolPropertiesP_Impl
*
pProperties
=
0
;
size_t
i
=
0
;
sal_Int32
nProperties
=
rProperties
.
size
();
size_t
nCount
=
maPropertiesList
.
size
();
for
(
i
=
0
;
i
<
nCount
;
i
++
)
size_t
i
=
0
;
for
(
size_t
n
=
maPropertiesList
.
size
();
i
<
n
;
++
i
)
{
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
maPropertiesList
[
i
];
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
&
maPropertiesList
[
i
];
if
(
nProperties
>
(
sal_Int32
)
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
@@ -64,7 +56,7 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl& rFamilyData, c
if
(
!
pProperties
)
{
pProperties
=
new
SvXMLAutoStylePoolPropertiesP_Impl
(
rFamilyData
,
rProperties
);
SvXMLAutoStylePoolPropertiesPList_Impl
::
iterator
it
=
maPropertiesList
.
begin
();
PropertiesListType
::
iterator
it
=
maPropertiesList
.
begin
();
::
std
::
advance
(
it
,
i
);
maPropertiesList
.
insert
(
it
,
pProperties
);
bAdded
=
sal_True
;
...
...
@@ -84,13 +76,11 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::Add( XMLFamilyData_Impl& rFamilyData, c
sal_Bool
SvXMLAutoStylePoolParentP_Impl
::
AddNamed
(
XMLFamilyData_Impl
&
rFamilyData
,
const
vector
<
XMLPropertyState
>&
rProperties
,
const
OUString
&
rName
)
{
sal_Bool
bAdded
=
sal_False
;
size_t
i
=
0
;
sal_Int32
nProperties
=
rProperties
.
size
();
size_t
nCount
=
maPropertiesList
.
size
();
for
(
i
=
0
;
i
<
nCount
;
i
++
)
size_t
i
=
0
;
for
(
size_t
n
=
maPropertiesList
.
size
();
i
<
n
;
++
i
)
{
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
maPropertiesList
[
i
];
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
&
maPropertiesList
[
i
];
if
(
nProperties
>
(
sal_Int32
)
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
@@ -107,7 +97,7 @@ sal_Bool SvXMLAutoStylePoolParentP_Impl::AddNamed( XMLFamilyData_Impl& rFamilyDa
new
SvXMLAutoStylePoolPropertiesP_Impl
(
rFamilyData
,
rProperties
);
// ignore the generated name
pProperties
->
SetName
(
rName
);
SvXMLAutoStylePoolPropertiesPList_Impl
::
iterator
it
=
maPropertiesList
.
begin
();
PropertiesListType
::
iterator
it
=
maPropertiesList
.
begin
();
::
std
::
advance
(
it
,
i
);
maPropertiesList
.
insert
(
it
,
pProperties
);
bAdded
=
sal_True
;
...
...
@@ -124,10 +114,9 @@ OUString SvXMLAutoStylePoolParentP_Impl::Find( const XMLFamilyData_Impl& rFamily
{
OUString
sName
;
vector
<
XMLPropertyState
>::
size_type
nItems
=
rProperties
.
size
();
size_t
nCount
=
maPropertiesList
.
size
();
for
(
size_t
i
=
0
;
i
<
nCount
;
i
++
)
for
(
size_t
i
=
0
,
n
=
maPropertiesList
.
size
();
i
<
n
;
++
i
)
{
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
maPropertiesList
[
i
];
const
SvXMLAutoStylePoolPropertiesP_Impl
*
pIS
=
&
maPropertiesList
[
i
];
if
(
nItems
>
pIS
->
GetProperties
().
size
()
)
{
continue
;
...
...
xmloff/source/style/impastp4.cxx
Dosyayı görüntüle @
defbcb22
...
...
@@ -292,7 +292,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
for
(
size_t
j
=
0
;
j
<
nProperties
;
j
++
)
{
const
SvXMLAutoStylePoolPropertiesP_Impl
*
pProperties
=
rParent
.
GetPropertiesList
()[
j
];
&
rParent
.
GetPropertiesList
()[
j
];
sal_uLong
nPos
=
pProperties
->
GetPos
();
DBG_ASSERT
(
nPos
<
nCount
,
"SvXMLAutoStylePool_Impl::exportXML: wrong position"
);
...
...
xmloff/source/style/impastpl.hxx
Dosyayı görüntüle @
defbcb22
...
...
@@ -33,6 +33,7 @@
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
class
SvXMLAutoStylePoolP
;
class
SvXMLAutoStylePoolParentP_Impl
;
...
...
@@ -94,14 +95,15 @@ public:
void
SetName
(
const
OUString
&
rNew
)
{
msName
=
rNew
;
}
};
typedef
SvXMLAutoStylePoolPropertiesP_Impl
*
SvXMLAutoStylePoolPropertiesPPtr
;
typedef
::
std
::
vector
<
SvXMLAutoStylePoolPropertiesPPtr
>
SvXMLAutoStylePoolPropertiesPList_Impl
;
// Parents of AutoStylePool's
class
SvXMLAutoStylePoolParentP_Impl
{
OUString
msParent
;
SvXMLAutoStylePoolPropertiesPList_Impl
maPropertiesList
;
public
:
typedef
boost
::
ptr_vector
<
SvXMLAutoStylePoolPropertiesP_Impl
>
PropertiesListType
;
private
:
OUString
msParent
;
PropertiesListType
maPropertiesList
;
public
:
...
...
@@ -120,7 +122,7 @@ public:
const
OUString
&
GetParent
()
const
{
return
msParent
;
}
const
SvXMLAutoStylePoolPropertiesPList_Impl
&
GetPropertiesList
()
const
const
PropertiesListType
&
GetPropertiesList
()
const
{
return
maPropertiesList
;
}
...
...
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