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
83a58be1
Kaydet (Commit)
83a58be1
authored
Kas 12, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc: boost::ptr_vector->std::vector
Change-Id: If3fff7cec768be9ce4cad6064415c1739433e030
üst
16877ccb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
23 deletions
+22
-23
difimp.cxx
sc/source/filter/dif/difimp.cxx
+19
-20
dif.hxx
sc/source/filter/inc/dif.hxx
+3
-3
No files found.
sc/source/filter/dif/difimp.cxx
Dosyayı görüntüle @
83a58be1
...
@@ -807,7 +807,7 @@ bool DifParser::ScanFloatVal( const sal_Unicode* pStart )
...
@@ -807,7 +807,7 @@ bool DifParser::ScanFloatVal( const sal_Unicode* pStart )
}
}
DifColumn
::
DifColumn
()
DifColumn
::
DifColumn
()
:
pAkt
(
nullptr
)
:
m
pAkt
(
nullptr
)
{
{
}
}
...
@@ -815,23 +815,22 @@ void DifColumn::SetLogical( SCROW nRow )
...
@@ -815,23 +815,22 @@ void DifColumn::SetLogical( SCROW nRow )
{
{
OSL_ENSURE
(
ValidRow
(
nRow
),
"*DifColumn::SetLogical(): Row too big!"
);
OSL_ENSURE
(
ValidRow
(
nRow
),
"*DifColumn::SetLogical(): Row too big!"
);
if
(
pAkt
)
if
(
m
pAkt
)
{
{
OSL_ENSURE
(
nRow
>
0
,
"*DifColumn::SetLogical(): more cannot be zero!"
);
OSL_ENSURE
(
nRow
>
0
,
"*DifColumn::SetLogical(): more cannot be zero!"
);
nRow
--
;
nRow
--
;
if
(
pAkt
->
nEnd
==
nRow
)
if
(
m
pAkt
->
nEnd
==
nRow
)
pAkt
->
nEnd
++
;
m
pAkt
->
nEnd
++
;
else
else
pAkt
=
nullptr
;
m
pAkt
=
nullptr
;
}
}
else
else
{
{
pAkt
=
new
ENTRY
;
maEntries
.
push_back
(
ENTRY
());
pAkt
->
nStart
=
pAkt
->
nEnd
=
nRow
;
mpAkt
=
&
maEntries
.
back
();
mpAkt
->
nStart
=
mpAkt
->
nEnd
=
nRow
;
aEntries
.
push_back
(
pAkt
);
}
}
}
}
...
@@ -841,15 +840,15 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
...
@@ -841,15 +840,15 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
if
(
nNumFormat
>
0
)
if
(
nNumFormat
>
0
)
{
{
if
(
pAkt
)
if
(
m
pAkt
)
{
{
OSL_ENSURE
(
nRow
>
0
,
OSL_ENSURE
(
nRow
>
0
,
"*DifColumn::SetNumFormat(): more cannot be zero!"
);
"*DifColumn::SetNumFormat(): more cannot be zero!"
);
OSL_ENSURE
(
nRow
>
pAkt
->
nEnd
,
OSL_ENSURE
(
nRow
>
m
pAkt
->
nEnd
,
"*DifColumn::SetNumFormat(): start from scratch?"
);
"*DifColumn::SetNumFormat(): start from scratch?"
);
if
(
pAkt
->
nNumFormat
==
nNumFormat
&&
pAkt
->
nEnd
==
nRow
-
1
)
if
(
mpAkt
->
nNumFormat
==
nNumFormat
&&
m
pAkt
->
nEnd
==
nRow
-
1
)
pAkt
->
nEnd
=
nRow
;
m
pAkt
->
nEnd
=
nRow
;
else
else
NewEntry
(
nRow
,
nNumFormat
);
NewEntry
(
nRow
,
nNumFormat
);
}
}
...
@@ -857,21 +856,21 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
...
@@ -857,21 +856,21 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
NewEntry
(
nRow
,
nNumFormat
);
NewEntry
(
nRow
,
nNumFormat
);
}
}
else
else
pAkt
=
nullptr
;
m
pAkt
=
nullptr
;
}
}
void
DifColumn
::
NewEntry
(
const
SCROW
nPos
,
const
sal_uInt32
nNumFormat
)
void
DifColumn
::
NewEntry
(
const
SCROW
nPos
,
const
sal_uInt32
nNumFormat
)
{
{
pAkt
=
new
ENTRY
;
maEntries
.
push_back
(
ENTRY
());
pAkt
->
nStart
=
pAkt
->
nEnd
=
nPos
;
mpAkt
=
&
maEntries
.
back
();
pAkt
->
nNumFormat
=
nNumFormat
;
mpAkt
->
nStart
=
mpAkt
->
nEnd
=
nPos
;
mpAkt
->
nNumFormat
=
nNumFormat
;
aEntries
.
push_back
(
pAkt
);
}
}
void
DifColumn
::
Apply
(
ScDocument
&
rDoc
,
const
SCCOL
nCol
,
const
SCTAB
nTab
,
const
ScPatternAttr
&
rPattAttr
)
void
DifColumn
::
Apply
(
ScDocument
&
rDoc
,
const
SCCOL
nCol
,
const
SCTAB
nTab
,
const
ScPatternAttr
&
rPattAttr
)
{
{
for
(
boost
::
ptr_vector
<
ENTRY
>::
const_iterator
it
=
aEntries
.
begin
();
it
!=
aEntries
.
end
();
++
it
)
for
(
std
::
vector
<
ENTRY
>::
const_iterator
it
=
maEntries
.
begin
();
it
!=
m
aEntries
.
end
();
++
it
)
rDoc
.
ApplyPatternAreaTab
(
nCol
,
it
->
nStart
,
nCol
,
it
->
nEnd
,
nTab
,
rPattAttr
);
rDoc
.
ApplyPatternAreaTab
(
nCol
,
it
->
nStart
,
nCol
,
it
->
nEnd
,
nTab
,
rPattAttr
);
}
}
...
@@ -880,7 +879,7 @@ void DifColumn::Apply( ScDocument& rDoc, const SCCOL nCol, const SCTAB nTab )
...
@@ -880,7 +879,7 @@ void DifColumn::Apply( ScDocument& rDoc, const SCCOL nCol, const SCTAB nTab )
ScPatternAttr
aAttr
(
rDoc
.
GetPool
()
);
ScPatternAttr
aAttr
(
rDoc
.
GetPool
()
);
SfxItemSet
&
rItemSet
=
aAttr
.
GetItemSet
();
SfxItemSet
&
rItemSet
=
aAttr
.
GetItemSet
();
for
(
boost
::
ptr_vector
<
ENTRY
>::
const_iterator
it
=
aEntries
.
begin
();
it
!=
aEntries
.
end
();
++
it
)
for
(
std
::
vector
<
ENTRY
>::
const_iterator
it
=
maEntries
.
begin
();
it
!=
m
aEntries
.
end
();
++
it
)
{
{
OSL_ENSURE
(
it
->
nNumFormat
>
0
,
OSL_ENSURE
(
it
->
nNumFormat
>
0
,
"+DifColumn::Apply(): Number format must not be 0!"
);
"+DifColumn::Apply(): Number format must not be 0!"
);
...
...
sc/source/filter/inc/dif.hxx
Dosyayı görüntüle @
83a58be1
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_DIF_HXX
#ifndef INCLUDED_SC_SOURCE_FILTER_INC_DIF_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_DIF_HXX
#define INCLUDED_SC_SOURCE_FILTER_INC_DIF_HXX
#include <
boost/ptr_container/ptr_vector.hpp
>
#include <
vector
>
#include <rtl/ustring.hxx>
#include <rtl/ustring.hxx>
...
@@ -153,8 +153,8 @@ class DifColumn
...
@@ -153,8 +153,8 @@ class DifColumn
SCROW
nEnd
;
SCROW
nEnd
;
};
};
ENTRY
*
pAkt
;
ENTRY
*
m
pAkt
;
boost
::
ptr_vector
<
ENTRY
>
aEntries
;
std
::
vector
<
ENTRY
>
m
aEntries
;
DifColumn
();
DifColumn
();
...
...
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