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
d489e76a
Kaydet (Commit)
d489e76a
authored
Kas 10, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
editeng: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I212c6b990da655ad7947154ca9e62981b049489e
üst
bb4379a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
editdoc.cxx
editeng/source/editeng/editdoc.cxx
+9
-9
editdoc.hxx
editeng/source/editeng/editdoc.hxx
+1
-1
No files found.
editeng/source/editeng/editdoc.cxx
Dosyayı görüntüle @
d489e76a
...
...
@@ -440,22 +440,22 @@ sal_Int32 TextPortionList::Count() const
const
TextPortion
&
TextPortionList
::
operator
[](
sal_Int32
nPos
)
const
{
return
maPortions
[
nPos
]
;
return
*
maPortions
[
nPos
].
get
()
;
}
TextPortion
&
TextPortionList
::
operator
[](
sal_Int32
nPos
)
{
return
maPortions
[
nPos
]
;
return
*
maPortions
[
nPos
].
get
()
;
}
void
TextPortionList
::
Append
(
TextPortion
*
p
)
{
maPortions
.
push_back
(
p
);
maPortions
.
push_back
(
std
::
unique_ptr
<
TextPortion
>
(
p
)
);
}
void
TextPortionList
::
Insert
(
sal_Int32
nPos
,
TextPortion
*
p
)
{
maPortions
.
insert
(
maPortions
.
begin
()
+
nPos
,
p
);
maPortions
.
insert
(
maPortions
.
begin
()
+
nPos
,
std
::
unique_ptr
<
TextPortion
>
(
p
)
);
}
void
TextPortionList
::
Remove
(
sal_Int32
nPos
)
...
...
@@ -465,14 +465,14 @@ void TextPortionList::Remove(sal_Int32 nPos)
namespace
{
class
FindTextPortionByAddress
:
std
::
unary_function
<
TextPortion
,
bool
>
class
FindTextPortionByAddress
:
std
::
unary_function
<
std
::
unique_ptr
<
TextPortion
>
,
bool
>
{
const
TextPortion
*
mp
;
public
:
explicit
FindTextPortionByAddress
(
const
TextPortion
*
p
)
:
mp
(
p
)
{}
bool
operator
()
(
const
TextPortion
&
v
)
const
bool
operator
()
(
const
std
::
unique_ptr
<
TextPortion
>
&
v
)
const
{
return
&
v
==
mp
;
return
v
.
get
()
==
mp
;
}
};
...
...
@@ -497,7 +497,7 @@ sal_Int32 TextPortionList::FindPortion(
sal_Int32
n
=
maPortions
.
size
();
for
(
sal_Int32
i
=
0
;
i
<
n
;
++
i
)
{
const
TextPortion
&
rPortion
=
maPortions
[
i
]
;
const
TextPortion
&
rPortion
=
*
maPortions
[
i
].
get
()
;
nTmpPos
=
nTmpPos
+
rPortion
.
GetLen
();
if
(
nTmpPos
>=
nCharPos
)
{
...
...
@@ -518,7 +518,7 @@ sal_Int32 TextPortionList::GetStartPos(sal_Int32 nPortion)
sal_Int32
nPos
=
0
;
for
(
sal_Int32
i
=
0
;
i
<
nPortion
;
++
i
)
{
const
TextPortion
&
rPortion
=
maPortions
[
i
]
;
const
TextPortion
&
rPortion
=
*
maPortions
[
i
].
get
()
;
nPos
=
nPos
+
rPortion
.
GetLen
();
}
return
nPos
;
...
...
editeng/source/editeng/editdoc.hxx
Dosyayı görüntüle @
d489e76a
...
...
@@ -445,7 +445,7 @@ public:
class
TextPortionList
{
typedef
boost
::
ptr_vector
<
TextPortion
>
PortionsType
;
typedef
std
::
vector
<
std
::
unique_ptr
<
TextPortion
>
>
PortionsType
;
PortionsType
maPortions
;
public
:
...
...
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