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
bf211635
Kaydet (Commit)
bf211635
authored
Eyl 16, 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: I4abd8fcbbe8ef439097eed7c2b20584450182cd5
üst
0a601a0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
UndoCore.hxx
sw/source/core/inc/UndoCore.hxx
+11
-10
undobj.cxx
sw/source/core/undo/undobj.cxx
+6
-6
No files found.
sw/source/core/inc/UndoCore.hxx
Dosyayı görüntüle @
bf211635
...
...
@@ -25,7 +25,8 @@
#include <rtl/ustring.hxx>
#include <redline.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
class
SfxItemSet
;
class
SwFormatColl
;
...
...
@@ -65,17 +66,17 @@ public:
class
SwRedlineSaveDatas
{
private
:
boost
::
ptr_vector
<
SwRedlineSaveData
>
mv
Data
;
std
::
vector
<
std
::
unique_ptr
<
SwRedlineSaveData
>>
m_
Data
;
public
:
SwRedlineSaveDatas
()
:
m
v
Data
()
{}
void
clear
()
{
m
v
Data
.
clear
();
}
bool
empty
()
const
{
return
m
v
Data
.
empty
();
}
size_t
size
()
const
{
return
m
v
Data
.
size
();
}
void
push_back
(
SwRedlineSaveData
*
value
)
{
mvData
.
push_back
(
value
);
}
const
SwRedlineSaveData
&
operator
[](
size_t
nIdx
)
const
{
return
mv
Data
[
nIdx
];
}
SwRedlineSaveData
&
operator
[](
size_t
nIdx
)
{
return
mv
Data
[
nIdx
];
}
SwRedlineSaveDatas
()
:
m
_
Data
()
{}
void
clear
()
{
m
_
Data
.
clear
();
}
bool
empty
()
const
{
return
m
_
Data
.
empty
();
}
size_t
size
()
const
{
return
m
_
Data
.
size
();
}
void
push_back
(
std
::
unique_ptr
<
SwRedlineSaveData
>
pNew
)
{
m_Data
.
push_back
(
std
::
move
(
pNew
)
);
}
const
SwRedlineSaveData
&
operator
[](
size_t
const
nIdx
)
const
{
return
*
m_
Data
[
nIdx
];
}
SwRedlineSaveData
&
operator
[](
size_t
const
nIdx
)
{
return
*
m_
Data
[
nIdx
];
}
};
namespace
sw
{
...
...
sw/source/core/undo/undobj.cxx
Dosyayı görüntüle @
bf211635
...
...
@@ -979,7 +979,6 @@ bool SwUndo::FillSaveData(
{
rSData
.
clear
();
SwRedlineSaveData
*
pNewData
;
const
SwPosition
*
pStt
=
rRange
.
Start
();
const
SwPosition
*
pEnd
=
rRange
.
End
();
const
SwRedlineTable
&
rTable
=
rRange
.
GetDoc
()
->
getIDocumentRedlineAccess
().
GetRedlineTable
();
...
...
@@ -996,8 +995,9 @@ bool SwUndo::FillSaveData(
&&
eCmpPos
!=
POS_COLLIDE_END
&&
eCmpPos
!=
POS_COLLIDE_START
)
{
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
bCopyNext
);
rSData
.
push_back
(
pNewData
);
std
::
unique_ptr
<
SwRedlineSaveData
>
pNewData
(
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
bCopyNext
));
rSData
.
push_back
(
std
::
move
(
pNewData
));
}
}
if
(
!
rSData
.
empty
()
&&
bDelRange
)
...
...
@@ -1013,7 +1013,6 @@ bool SwUndo::FillSaveDataForFormat(
{
rSData
.
clear
();
SwRedlineSaveData
*
pNewData
;
const
SwPosition
*
pStt
=
rRange
.
Start
(),
*
pEnd
=
rRange
.
End
();
const
SwRedlineTable
&
rTable
=
rRange
.
GetDoc
()
->
getIDocumentRedlineAccess
().
GetRedlineTable
();
sal_uInt16
n
=
0
;
...
...
@@ -1029,8 +1028,9 @@ bool SwUndo::FillSaveDataForFormat(
&&
eCmpPos
!=
POS_COLLIDE_END
&&
eCmpPos
!=
POS_COLLIDE_START
)
{
pNewData
=
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
true
);
rSData
.
push_back
(
pNewData
);
std
::
unique_ptr
<
SwRedlineSaveData
>
pNewData
(
new
SwRedlineSaveData
(
eCmpPos
,
*
pStt
,
*
pEnd
,
*
pRedl
,
true
));
rSData
.
push_back
(
std
::
move
(
pNewData
));
}
}
...
...
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