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
277bf233
Kaydet (Commit)
277bf233
authored
Eyl 30, 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: I821a853a0e4776d2b5ba2ca69d421ec0af8e865e
üst
ba785e0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
tblrwcl.cxx
sw/source/core/doc/tblrwcl.cxx
+16
-11
tblrwcl.hxx
sw/source/core/inc/tblrwcl.hxx
+3
-5
untbl.cxx
sw/source/core/undo/untbl.cxx
+3
-0
No files found.
sw/source/core/doc/tblrwcl.cxx
Dosyayı görüntüle @
277bf233
...
...
@@ -4411,16 +4411,16 @@ SwFrameFormat* SwShareBoxFormats::GetFormat( const SwFrameFormat& rFormat, long
{
sal_uInt16
nPos
;
return
Seek_Entry
(
rFormat
,
&
nPos
)
?
aShareArr
[
nPos
].
GetFormat
(
nWidth
)
:
0
;
?
m_ShareArr
[
nPos
]
->
GetFormat
(
nWidth
)
:
nullptr
;
}
SwFrameFormat
*
SwShareBoxFormats
::
GetFormat
(
const
SwFrameFormat
&
rFormat
,
const
SfxPoolItem
&
rItem
)
const
{
sal_uInt16
nPos
;
return
Seek_Entry
(
rFormat
,
&
nPos
)
?
aShareArr
[
nPos
].
GetFormat
(
rItem
)
:
0
;
?
m_ShareArr
[
nPos
]
->
GetFormat
(
rItem
)
:
nullptr
;
}
void
SwShareBoxFormats
::
AddFormat
(
const
SwFrameFormat
&
rOld
,
SwFrameFormat
&
rNew
)
...
...
@@ -4431,10 +4431,10 @@ void SwShareBoxFormats::AddFormat( const SwFrameFormat& rOld, SwFrameFormat& rNe
if
(
!
Seek_Entry
(
rOld
,
&
nPos
))
{
pEntry
=
new
SwShareBoxFormat
(
rOld
);
aShareArr
.
insert
(
aShareArr
.
begin
()
+
nPos
,
pEntry
);
m_ShareArr
.
insert
(
m_ShareArr
.
begin
()
+
nPos
,
std
::
unique_ptr
<
SwShareBoxFormat
>
(
pEntry
)
);
}
else
pEntry
=
&
aShareArr
[
nPos
]
;
pEntry
=
m_ShareArr
[
nPos
].
get
()
;
pEntry
->
AddFormat
(
rNew
);
}
...
...
@@ -4508,22 +4508,27 @@ void SwShareBoxFormats::SetAttr( SwTableLine& rLine, const SfxPoolItem& rItem )
void
SwShareBoxFormats
::
RemoveFormat
(
const
SwFrameFormat
&
rFormat
)
{
for
(
auto
i
=
aShareArr
.
size
();
i
;
)
if
(
aShareArr
[
--
i
].
RemoveFormat
(
rFormat
))
aShareArr
.
erase
(
aShareArr
.
begin
()
+
i
);
for
(
auto
i
=
m_ShareArr
.
size
();
i
;
)
{
if
(
m_ShareArr
[
--
i
]
->
RemoveFormat
(
rFormat
))
{
m_ShareArr
.
erase
(
m_ShareArr
.
begin
()
+
i
);
}
}
}
bool
SwShareBoxFormats
::
Seek_Entry
(
const
SwFrameFormat
&
rFormat
,
sal_uInt16
*
pPos
)
const
{
sal_uLong
nIdx
=
reinterpret_cast
<
sal_uLong
>
(
&
rFormat
);
_SwShareBoxFormats
::
size_type
nO
=
aShareArr
.
size
(),
nU
=
0
;
auto
nO
=
m_ShareArr
.
size
();
decltype
(
nO
)
nU
=
0
;
if
(
nO
>
0
)
{
nO
--
;
while
(
nU
<=
nO
)
{
const
auto
nM
=
nU
+
(
nO
-
nU
)
/
2
;
sal_uLong
nFormat
=
reinterpret_cast
<
sal_uLong
>
(
&
aShareArr
[
nM
].
GetOldFormat
());
sal_uLong
nFormat
=
reinterpret_cast
<
sal_uLong
>
(
&
m_ShareArr
[
nM
]
->
GetOldFormat
());
if
(
nFormat
==
nIdx
)
{
if
(
pPos
)
...
...
sw/source/core/inc/tblrwcl.hxx
Dosyayı görüntüle @
277bf233
...
...
@@ -20,10 +20,9 @@
#define INCLUDED_SW_SOURCE_CORE_INC_TBLRWCL_HXX
#include <cstddef>
#include <memory>
#include <vector>
#include <boost/ptr_container/ptr_vector.hpp>
#include <swtypes.hxx>
#include <tblsel.hxx>
#include <swtable.hxx>
...
...
@@ -174,11 +173,10 @@ public:
bool
RemoveFormat
(
const
SwFrameFormat
&
rFormat
);
};
typedef
boost
::
ptr_vector
<
SwShareBoxFormat
>
_SwShareBoxFormats
;
class
SwShareBoxFormats
{
_SwShareBoxFormats
aShareArr
;
std
::
vector
<
std
::
unique_ptr
<
SwShareBoxFormat
>>
m_ShareArr
;
bool
Seek_Entry
(
const
SwFrameFormat
&
rFormat
,
sal_uInt16
*
pPos
)
const
;
void
ChangeFrameFormat
(
SwTableBox
*
pBox
,
SwTableLine
*
pLn
,
SwFrameFormat
&
rFormat
);
...
...
sw/source/core/undo/untbl.cxx
Dosyayı görüntüle @
277bf233
...
...
@@ -63,6 +63,9 @@
#include <comcore.hrc>
#include <unochart.hxx>
#include <calbck.hxx>
#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
#include <vector>
...
...
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