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
59abf8c5
Kaydet (Commit)
59abf8c5
authored
Eki 04, 2011
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
we do not need the counter now
üst
d4f1b520
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
nranges.cxx
svl/source/items/nranges.cxx
+11
-11
No files found.
svl/source/items/nranges.cxx
Dosyayı görüntüle @
59abf8c5
...
@@ -75,34 +75,34 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
...
@@ -75,34 +75,34 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
{
{
NUMTYPE
nSize
=
0
,
nIns
=
0
;
NUMTYPE
nSize
=
0
,
nIns
=
0
;
sal_uInt16
nCnt
=
0
;
std
::
vector
<
NUMTYPE
>
aNumArr
;
std
::
vector
<
NUMTYPE
>
aNumArr
;
aNumArr
.
push_back
(
nWh1
);
aNumArr
.
push_back
(
nWh1
);
aNumArr
.
push_back
(
nWh2
);
aNumArr
.
push_back
(
nWh2
);
DBG_ASSERT
(
nWh1
<=
nWh2
,
"Ungueltiger Bereich"
);
DBG_ASSERT
(
nWh1
<=
nWh2
,
"Ungueltiger Bereich"
);
nSize
+=
nWh2
-
nWh1
+
1
;
nSize
+=
nWh2
-
nWh1
+
1
;
aNumArr
.
push_back
(
nNull
);
aNumArr
.
push_back
(
nNull
);
nCnt
=
aNumArr
.
size
()
;
bool
bEndOfRange
=
false
;
while
(
0
!=
while
(
0
!=
(
nIns
=
(
nIns
=
sal
::
static_int_cast
<
NUMTYPE
>
(
sal
::
static_int_cast
<
NUMTYPE
>
(
va_arg
(
pArgs
,
NUMTYPE_ARG
)
)
)
)
va_arg
(
pArgs
,
NUMTYPE_ARG
)
)
)
)
{
{
aNumArr
.
push_back
(
nIns
);
bEndOfRange
=
!
bEndOfRange
;
++
nCnt
;
if
(
bEndOfRange
)
if
(
0
==
(
nCnt
&
1
)
)
// 4,6,8, usw.
{
{
DBG_ASSERT
(
aNumArr
[
nCnt
-
2
]
<=
nIns
,
"Ungueltiger Bereich"
);
const
NUMTYPE
nPrev
(
*
aNumArr
.
rbegin
());
nSize
+=
nIns
-
aNumArr
[
nCnt
-
2
]
+
1
;
DBG_ASSERT
(
nPrev
<=
nIns
,
"Ungueltiger Bereich"
);
nSize
+=
nIns
-
nPrev
+
1
;
}
}
aNumArr
.
push_back
(
nIns
);
}
}
DBG_ASSERT
(
0
==
(
nCnt
&
1
)
,
"ungerade Anzahl von Which-Paaren!"
);
DBG_ASSERT
(
bEndOfRange
,
"ungerade Anzahl von Which-Paaren!"
);
// so, jetzt sind alle Bereiche vorhanden und
// so, jetzt sind alle Bereiche vorhanden und
rpRanges
=
new
NUMTYPE
[
nCnt
+
1
];
rpRanges
=
new
NUMTYPE
[
aNumArr
.
size
()
+
1
];
std
::
copy
(
aNumArr
.
begin
(),
aNumArr
.
begin
()
+
nCnt
,
rpRanges
);
std
::
copy
(
aNumArr
.
begin
(),
aNumArr
.
end
()
,
rpRanges
);
*
(
rpRanges
+
nCnt
)
=
0
;
*
(
rpRanges
+
aNumArr
.
size
()
)
=
0
;
return
nSize
;
return
nSize
;
}
}
...
...
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