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
2f5748af
Kaydet (Commit)
2f5748af
authored
Eki 21, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: replace boost::ptr_vector with std::vector<std::unique_ptr>
Change-Id: If476381b05b046443facc9dd220d273133bda651
üst
618fe336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
cnttab.cxx
sw/source/ui/index/cnttab.cxx
+15
-14
No files found.
sw/source/ui/index/cnttab.cxx
Dosyayı görüntüle @
2f5748af
...
...
@@ -79,7 +79,8 @@
#include <unomid.h>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
#include <numeric>
...
...
@@ -157,7 +158,7 @@ class SwEntryBrowseBox : public SwEntryBrowseBox_Base
OUString
sYes
;
OUString
sNo
;
boost
::
ptr_vector
<
AutoMarkEntry
>
aEntryArr
;
std
::
vector
<
std
::
unique_ptr
<
AutoMarkEntry
>>
m_Entries
;
::
svt
::
CellControllerRef
xController
;
::
svt
::
CellControllerRef
xCheckController
;
...
...
@@ -3964,9 +3965,9 @@ bool SwEntryBrowseBox::SeekRow( long nRow )
OUString
SwEntryBrowseBox
::
GetCellText
(
long
nRow
,
sal_uInt16
nColumn
)
const
{
const
OUString
*
pRet
=
&
aEmptyOUStr
;
if
(
aEntryArr
.
size
()
>
static_cast
<
size_t
>
(
nRow
))
if
(
static_cast
<
size_t
>
(
nRow
)
<
m_Entries
.
size
(
))
{
const
AutoMarkEntry
*
pEntry
=
&
aEntryArr
[
nRow
]
;
const
AutoMarkEntry
*
pEntry
=
m_Entries
[
nRow
].
get
()
;
switch
(
nColumn
)
{
case
ITEM_SEARCH
:
pRet
=
&
pEntry
->
sSearch
;
break
;
...
...
@@ -4012,8 +4013,8 @@ bool SwEntryBrowseBox::SaveModified()
pController
=
xCheckController
;
bVal
=
static_cast
<
::
svt
::
CheckBoxCellController
*>
(
pController
)
->
GetCheckBox
().
IsChecked
();
}
AutoMarkEntry
*
pEntry
=
nRow
>=
aEntryArr
.
size
(
)
?
new
AutoMarkEntry
:
&
aEntryArr
[
nRow
]
;
AutoMarkEntry
*
pEntry
=
(
nRow
>=
m_Entries
.
size
()
)
?
new
AutoMarkEntry
:
m_Entries
[
nRow
].
get
()
;
switch
(
nCol
)
{
case
ITEM_SEARCH
:
pEntry
->
sSearch
=
sNew
;
break
;
...
...
@@ -4024,9 +4025,9 @@ bool SwEntryBrowseBox::SaveModified()
case
ITEM_CASE
:
pEntry
->
bCase
=
bVal
;
break
;
case
ITEM_WORDONLY
:
pEntry
->
bWord
=
bVal
;
break
;
}
if
(
nRow
>=
aEntryArr
.
size
())
if
(
nRow
>=
m_Entries
.
size
())
{
aEntryArr
.
push_back
(
pEntry
);
m_Entries
.
push_back
(
std
::
unique_ptr
<
AutoMarkEntry
>
(
pEntry
)
);
RowInserted
(
nRow
,
1
,
true
,
true
);
if
(
nCol
<
ITEM_WORDONLY
)
{
...
...
@@ -4090,21 +4091,21 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
sStr
=
sLine
.
getToken
(
0
,
';'
,
nSttPos
);
pToInsert
->
bWord
=
!
sStr
.
isEmpty
()
&&
sStr
!=
"0"
;
aEntryArr
.
push_back
(
pToInsert
);
m_Entries
.
push_back
(
std
::
unique_ptr
<
AutoMarkEntry
>
(
pToInsert
)
);
pToInsert
=
0
;
}
else
{
if
(
pToInsert
)
aEntryArr
.
push_back
(
pToInsert
);
m_Entries
.
push_back
(
std
::
unique_ptr
<
AutoMarkEntry
>
(
pToInsert
)
);
pToInsert
=
new
AutoMarkEntry
;
pToInsert
->
sComment
=
sLine
.
copy
(
1
);
}
}
}
if
(
pToInsert
)
aEntryArr
.
push_back
(
pToInsert
);
RowInserted
(
0
,
aEntryArr
.
size
()
+
1
);
m_Entries
.
push_back
(
std
::
unique_ptr
<
AutoMarkEntry
>
(
pToInsert
)
);
RowInserted
(
0
,
m_Entries
.
size
()
+
1
);
}
void
SwEntryBrowseBox
::
WriteEntries
(
SvStream
&
rOutStr
)
...
...
@@ -4120,9 +4121,9 @@ void SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
GoToColumnId
(
nCol
+
(
nCol
<
ITEM_CASE
?
1
:
-
1
));
rtl_TextEncoding
eTEnc
=
osl_getThreadTextEncoding
();
for
(
size_t
i
=
0
;
i
<
aEntryArr
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
m_Entries
.
size
();
i
++
)
{
AutoMarkEntry
*
pEntry
=
&
aEntryArr
[
i
]
;
AutoMarkEntry
*
pEntry
=
m_Entries
[
i
].
get
()
;
if
(
!
pEntry
->
sComment
.
isEmpty
())
{
rOutStr
.
WriteByteStringLine
(
"#"
+
pEntry
->
sComment
,
eTEnc
);
...
...
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