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
ea6857f8
Kaydet (Commit)
ea6857f8
authored
Kas 13, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I81b3d69c0bcd7444325ed2037ac00108f9c43474
üst
726ce582
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
xistyle.cxx
sc/source/filter/excel/xistyle.cxx
+13
-12
xistyle.hxx
sc/source/filter/inc/xistyle.hxx
+1
-2
No files found.
sc/source/filter/excel/xistyle.cxx
Dosyayı görüntüle @
ea6857f8
...
...
@@ -58,14 +58,15 @@
#include "root.hxx"
#include "colrowst.hxx"
#include <svl/poolcach.hxx>
#include <o3tl/make_unique.hxx>
#include <list>
using
::
std
::
list
;
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
using
::
std
::
list
;
using
namespace
::
com
::
sun
::
star
;
typedef
::
cppu
::
WeakImplHelper
<
container
::
XIndexAccess
>
XIndexAccess_BASE
;
...
...
@@ -1722,7 +1723,7 @@ void XclImpXFRangeColumn::SetDefaultXF( const XclImpXFIndex& rXFIndex )
OSL_ENSURE
(
maIndexList
.
empty
(),
"XclImpXFRangeColumn::SetDefaultXF - Setting Default Column XF is not empty"
);
// insert a complete row range with one insert.
maIndexList
.
push_back
(
new
XclImpXFRange
(
0
,
MAXROW
,
rXFIndex
)
);
maIndexList
.
push_back
(
o3tl
::
make_unique
<
XclImpXFRange
>
(
0
,
MAXROW
,
rXFIndex
)
);
}
void
XclImpXFRangeColumn
::
SetXF
(
SCROW
nScRow
,
const
XclImpXFIndex
&
rXFIndex
)
...
...
@@ -1746,7 +1747,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
SCROW
nLastScRow
=
pPrevRange
->
mnScRow2
;
sal_uLong
nIndex
=
nNextIndex
-
1
;
XclImpXFRange
*
pThisRange
=
pPrevRange
;
pPrevRange
=
(
nIndex
>
0
&&
nIndex
<=
maIndexList
.
size
())
?
&
(
maIndexList
[
nIndex
-
1
]
)
:
nullptr
;
pPrevRange
=
(
nIndex
>
0
&&
nIndex
<=
maIndexList
.
size
())
?
maIndexList
[
nIndex
-
1
].
get
(
)
:
nullptr
;
if
(
nFirstScRow
==
nLastScRow
)
// replace solely XF
{
...
...
@@ -1793,7 +1794,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex )
void
XclImpXFRangeColumn
::
Insert
(
XclImpXFRange
*
pXFRange
,
sal_uLong
nIndex
)
{
maIndexList
.
insert
(
maIndexList
.
begin
()
+
nIndex
,
pXFRange
);
maIndexList
.
insert
(
maIndexList
.
begin
()
+
nIndex
,
std
::
unique_ptr
<
XclImpXFRange
>
(
pXFRange
)
);
}
void
XclImpXFRangeColumn
::
Find
(
...
...
@@ -1809,8 +1810,8 @@ void XclImpXFRangeColumn::Find(
return
;
}
rpPrevRange
=
&
maIndexList
.
fron
t
();
rpNextRange
=
&
maIndexList
.
back
();
rpPrevRange
=
maIndexList
.
front
().
ge
t
();
rpNextRange
=
maIndexList
.
back
().
get
();
// test whether row is at end of list (contained in or behind last range)
// rpPrevRange will contain a possible existing row
...
...
@@ -1841,7 +1842,7 @@ void XclImpXFRangeColumn::Find(
while
(
((
rnNextIndex
-
nPrevIndex
)
>
1
)
&&
(
rpPrevRange
->
mnScRow2
<
nScRow
)
)
{
nMidIndex
=
(
nPrevIndex
+
rnNextIndex
)
/
2
;
pMidRange
=
&
maIndexList
[
nMidIndex
]
;
pMidRange
=
maIndexList
[
nMidIndex
].
get
()
;
OSL_ENSURE
(
pMidRange
,
"XclImpXFRangeColumn::Find - missing XF index range"
);
if
(
nScRow
<
pMidRange
->
mnScRow1
)
// row is really before pMidRange
{
...
...
@@ -1859,7 +1860,7 @@ void XclImpXFRangeColumn::Find(
if
(
nScRow
<=
rpPrevRange
->
mnScRow2
)
{
rnNextIndex
=
nPrevIndex
+
1
;
rpNextRange
=
&
maIndexList
[
rnNextIndex
]
;
rpNextRange
=
maIndexList
[
rnNextIndex
].
get
()
;
}
}
...
...
@@ -1868,8 +1869,8 @@ void XclImpXFRangeColumn::TryConcatPrev( sal_uLong nIndex )
if
(
!
nIndex
||
nIndex
>=
maIndexList
.
size
()
)
return
;
XclImpXFRange
&
prevRange
=
maIndexList
[
nIndex
-
1
];
XclImpXFRange
&
nextRange
=
maIndexList
[
nIndex
];
XclImpXFRange
&
prevRange
=
*
maIndexList
[
nIndex
-
1
];
XclImpXFRange
&
nextRange
=
*
maIndexList
[
nIndex
];
if
(
prevRange
.
Expand
(
nextRange
)
)
maIndexList
.
erase
(
maIndexList
.
begin
()
+
nIndex
);
...
...
@@ -2005,7 +2006,7 @@ void XclImpXFRangeBuffer::Finalize()
for
(
XclImpXFRangeColumn
::
IndexList
::
iterator
itr
=
rColumn
.
begin
(),
itrEnd
=
rColumn
.
end
();
itr
!=
itrEnd
;
++
itr
)
{
XclImpXFRange
&
rStyle
=
*
itr
;
XclImpXFRange
&
rStyle
=
*
*
itr
;
const
XclImpXFIndex
&
rXFIndex
=
rStyle
.
maXFIndex
;
XclImpXF
*
pXF
=
rXFBuffer
.
GetXF
(
rXFIndex
.
GetXFIndex
()
);
if
(
!
pXF
)
...
...
sc/source/filter/inc/xistyle.hxx
Dosyayı görüntüle @
ea6857f8
...
...
@@ -25,7 +25,6 @@
#include <vector>
#include <tools/mempool.hxx>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include "rangelst.hxx"
#include "patattr.hxx"
#include "xladdress.hxx"
...
...
@@ -562,7 +561,7 @@ inline bool XclImpXFRange::Contains( SCROW nScRow ) const
class
XclImpXFRangeColumn
:
private
boost
::
noncopyable
{
public
:
typedef
::
boost
::
ptr_vector
<
XclImpXFRange
>
IndexList
;
typedef
std
::
vector
<
std
::
unique_ptr
<
XclImpXFRange
>
>
IndexList
;
inline
explicit
XclImpXFRangeColumn
()
{}
...
...
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