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
5331e767
Kaydet (Commit)
5331e767
authored
Agu 31, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sw: convert boost::ptr_vector to std::vector<std::unique_ptr>
Change-Id: I7fc96e3b7754bb3f4718f9142c75ee82aef0a22c
üst
c76a1ece
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
rubylist.hxx
sw/inc/rubylist.hxx
+4
-2
docruby.cxx
sw/source/core/doc/docruby.cxx
+4
-5
unotxvw.cxx
sw/source/uibase/uno/unotxvw.cxx
+3
-3
No files found.
sw/inc/rubylist.hxx
Dosyayı görüntüle @
5331e767
...
...
@@ -21,7 +21,9 @@
#include <swtypes.hxx>
#include <fmtruby.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
class
SwRubyListEntry
{
...
...
@@ -39,7 +41,7 @@ public:
void
SetRubyAttr
(
const
SwFormatRuby
&
rAttr
)
{
m_aRubyAttr
=
rAttr
;
}
};
class
SwRubyList
:
public
boost
::
ptr_vector
<
SwRubyListEntry
>
{};
class
SwRubyList
:
public
std
::
vector
<
std
::
unique_ptr
<
SwRubyListEntry
>
>
{};
#endif //_ INCLUDED_SW_INC_RUBYLIST_HXX
...
...
sw/source/core/doc/docruby.cxx
Dosyayı görüntüle @
5331e767
...
...
@@ -60,7 +60,7 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
{
SwPaM
aPam
(
*
pStt
);
do
{
SwRubyListEntry
*
pNew
=
new
SwRubyListEntry
;
std
::
unique_ptr
<
SwRubyListEntry
>
pNew
(
new
SwRubyListEntry
)
;
if
(
pEnd
!=
pStt
)
{
aPam
.
SetMark
();
...
...
@@ -68,12 +68,11 @@ sal_uInt16 SwDoc::FillRubyList( const SwPaM& rPam, SwRubyList& rList,
}
if
(
_SelectNextRubyChars
(
aPam
,
*
pNew
,
nMode
))
{
rList
.
push_back
(
pNew
);
rList
.
push_back
(
std
::
move
(
pNew
)
);
aPam
.
DeleteMark
();
}
else
{
delete
pNew
;
if
(
*
aPam
.
GetPoint
()
<
*
pEnd
)
{
// goto next paragraph
...
...
@@ -121,7 +120,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
}
if
(
_SelectNextRubyChars
(
aPam
,
aCheckEntry
,
nMode
))
{
const
SwRubyListEntry
*
pEntry
=
&
rList
[
nListEntry
++
]
;
const
SwRubyListEntry
*
pEntry
=
rList
[
nListEntry
++
].
get
()
;
if
(
aCheckEntry
.
GetRubyAttr
()
!=
pEntry
->
GetRubyAttr
()
)
{
// set/reset the attribute
...
...
@@ -153,7 +152,7 @@ sal_uInt16 SwDoc::SetRubyList( const SwPaM& rPam, const SwRubyList& rList,
}
else
{
const
SwRubyListEntry
*
pEntry
=
&
rList
[
nListEntry
++
]
;
const
SwRubyListEntry
*
pEntry
=
rList
[
nListEntry
++
].
get
()
;
// set/reset the attribute
if
(
!
pEntry
->
GetRubyAttr
().
GetText
().
isEmpty
()
&&
...
...
sw/source/uibase/uno/unotxvw.cxx
Dosyayı görüntüle @
5331e767
...
...
@@ -547,7 +547,7 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto
OUString
aString
;
for
(
sal_uInt16
n
=
0
;
n
<
nCount
;
n
++
)
{
const
SwRubyListEntry
*
pEntry
=
&
aList
[
n
]
;
const
SwRubyListEntry
*
pEntry
=
aList
[
n
].
get
()
;
const
OUString
&
rEntryText
=
pEntry
->
GetText
();
const
SwFormatRuby
&
rAttr
=
pEntry
->
GetRubyAttr
();
...
...
@@ -591,7 +591,7 @@ void SAL_CALL SwXTextView::setRubyList(
const
Sequence
<
PropertyValue
>*
pRubyList
=
rRubyList
.
getConstArray
();
for
(
sal_Int32
nPos
=
0
;
nPos
<
rRubyList
.
getLength
();
nPos
++
)
{
SwRubyListEntry
*
pEntry
=
new
SwRubyListEntry
;
std
::
unique_ptr
<
SwRubyListEntry
>
pEntry
(
new
SwRubyListEntry
)
;
const
PropertyValue
*
pProperties
=
pRubyList
[
nPos
].
getConstArray
();
OUString
sTmp
;
for
(
sal_Int32
nProp
=
0
;
nProp
<
pRubyList
[
nPos
].
getLength
();
nProp
++
)
...
...
@@ -633,7 +633,7 @@ void SAL_CALL SwXTextView::setRubyList(
pEntry
->
GetRubyAttr
().
SetPosition
(
bValue
?
0
:
1
);
}
}
aList
.
insert
(
aList
.
begin
()
+
nPos
,
pEntry
);
aList
.
insert
(
aList
.
begin
()
+
nPos
,
std
::
move
(
pEntry
)
);
}
SwDoc
*
pDoc
=
m_pView
->
GetDocShell
()
->
GetDoc
();
pDoc
->
SetRubyList
(
*
rSh
.
GetCrsr
(),
aList
,
0
);
...
...
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