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
d119c840
Kaydet (Commit)
d119c840
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: Iabe9ccea6a5e9753348895cca4546c89fc6971cf
üst
07ecb171
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
xmltbli.cxx
sw/source/filter/xml/xmltbli.cxx
+15
-13
No files found.
sw/source/filter/xml/xmltbli.cxx
Dosyayı görüntüle @
d119c840
...
@@ -58,7 +58,8 @@
...
@@ -58,7 +58,8 @@
#include <osl/mutex.hxx>
#include <osl/mutex.hxx>
#include "ndtxt.hxx"
#include "ndtxt.hxx"
#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
#include <memory>
#include <limits.h>
#include <limits.h>
...
@@ -293,8 +294,7 @@ class SwXMLTableRow_Impl
...
@@ -293,8 +294,7 @@ class SwXMLTableRow_Impl
OUString
aStyleName
;
OUString
aStyleName
;
OUString
aDfltCellStyleName
;
OUString
aDfltCellStyleName
;
OUString
mXmlId
;
OUString
mXmlId
;
boost
::
ptr_vector
<
SwXMLTableCell_Impl
>
std
::
vector
<
std
::
unique_ptr
<
SwXMLTableCell_Impl
>>
m_Cells
;
aCells
;
bool
bSplitable
;
bool
bSplitable
;
public
:
public
:
...
@@ -338,7 +338,7 @@ SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName,
...
@@ -338,7 +338,7 @@ SwXMLTableRow_Impl::SwXMLTableRow_Impl( const OUString& rStyleName,
for
(
sal_uInt32
i
=
0U
;
i
<
nCells
;
++
i
)
for
(
sal_uInt32
i
=
0U
;
i
<
nCells
;
++
i
)
{
{
aCells
.
push_back
(
new
SwXMLTableCell_Impl
);
m_Cells
.
push_back
(
std
::
unique_ptr
<
SwXMLTableCell_Impl
>
(
new
SwXMLTableCell_Impl
)
);
}
}
}
}
...
@@ -347,9 +347,9 @@ inline SwXMLTableCell_Impl *SwXMLTableRow_Impl::GetCell( sal_uInt32 nCol )
...
@@ -347,9 +347,9 @@ inline SwXMLTableCell_Impl *SwXMLTableRow_Impl::GetCell( sal_uInt32 nCol )
OSL_ENSURE
(
nCol
<
USHRT_MAX
,
OSL_ENSURE
(
nCol
<
USHRT_MAX
,
"SwXMLTableRow_Impl::GetCell: column number is to big"
);
"SwXMLTableRow_Impl::GetCell: column number is to big"
);
// #i95726# - some fault tolerance
// #i95726# - some fault tolerance
OSL_ENSURE
(
nCol
<
a
Cells
.
size
(),
OSL_ENSURE
(
nCol
<
m_
Cells
.
size
(),
"SwXMLTableRow_Impl::GetCell: column number is out of bound"
);
"SwXMLTableRow_Impl::GetCell: column number is out of bound"
);
return
nCol
<
aCells
.
size
()
?
&
aCells
[
nCol
]
:
0
;
return
nCol
<
m_Cells
.
size
()
?
m_Cells
[
nCol
].
get
()
:
nullptr
;
}
}
void
SwXMLTableRow_Impl
::
Expand
(
sal_uInt32
nCells
,
bool
bOneCell
)
void
SwXMLTableRow_Impl
::
Expand
(
sal_uInt32
nCells
,
bool
bOneCell
)
...
@@ -359,15 +359,15 @@ void SwXMLTableRow_Impl::Expand( sal_uInt32 nCells, bool bOneCell )
...
@@ -359,15 +359,15 @@ void SwXMLTableRow_Impl::Expand( sal_uInt32 nCells, bool bOneCell )
if
(
nCells
>
USHRT_MAX
)
if
(
nCells
>
USHRT_MAX
)
nCells
=
USHRT_MAX
;
nCells
=
USHRT_MAX
;
sal_uInt32
nColSpan
=
nCells
-
a
Cells
.
size
();
sal_uInt32
nColSpan
=
nCells
-
m_
Cells
.
size
();
for
(
size_t
i
=
aCells
.
size
();
i
<
nCells
;
++
i
)
for
(
size_t
i
=
m_Cells
.
size
();
i
<
nCells
;
++
i
)
{
{
aCells
.
push_back
(
new
SwXMLTableCell_Impl
(
1UL
,
m_Cells
.
push_back
(
std
::
unique_ptr
<
SwXMLTableCell_Impl
>
(
bOneCell
?
nColSpan
:
1UL
)
);
new
SwXMLTableCell_Impl
(
1UL
,
(
bOneCell
)
?
nColSpan
:
1UL
))
);
nColSpan
--
;
nColSpan
--
;
}
}
OSL_ENSURE
(
nCells
<=
a
Cells
.
size
(),
OSL_ENSURE
(
nCells
<=
m_
Cells
.
size
(),
"SwXMLTableRow_Impl::Expand: wrong number of cells"
);
"SwXMLTableRow_Impl::Expand: wrong number of cells"
);
}
}
...
@@ -382,8 +382,10 @@ inline void SwXMLTableRow_Impl::Set( const OUString& rStyleName,
...
@@ -382,8 +382,10 @@ inline void SwXMLTableRow_Impl::Set( const OUString& rStyleName,
void
SwXMLTableRow_Impl
::
Dispose
()
void
SwXMLTableRow_Impl
::
Dispose
()
{
{
for
(
size_t
i
=
0
;
i
<
aCells
.
size
();
++
i
)
for
(
auto
&
pCell
:
m_Cells
)
aCells
[
i
].
Dispose
();
{
pCell
->
Dispose
();
}
}
}
class
SwXMLTableCellContext_Impl
:
public
SvXMLImportContext
class
SwXMLTableCellContext_Impl
:
public
SvXMLImportContext
...
...
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