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
85d1b74f
Kaydet (Commit)
85d1b74f
authored
Haz 03, 2014
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
eliminate xub_StrLen left-over
Change-Id: I4862481d69ac86bf082e35b28d6326444deafee8
üst
a8c5adab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
digitgroupingiterator.hxx
include/unotools/digitgroupingiterator.hxx
+4
-7
No files found.
include/unotools/digitgroupingiterator.hxx
Dosyayı görüntüle @
85d1b74f
...
...
@@ -31,9 +31,8 @@ namespace utl {
digits per group. If the last group was encountered the iterator will
always return the last grouping.
Grouping values are sanitized to be 0 <= value <= SAL_MAX_UINT16, even if
originally Int32, to be able to easily cast it down to String's xub_StrLen.
This shouldn't make any difference in practice.
Grouping values are sanitized to be >= 0, even if originally signed
sal_Int32.
Usage example with a string buffer containing a decimal representation of
an integer number. Note that of course this loop could be optimized to not
...
...
@@ -81,11 +80,9 @@ class DigitGroupingIterator
if
(
mnGroup
<
maGroupings
.
getLength
())
{
sal_Int32
n
=
maGroupings
[
mnGroup
];
OSL_ENSURE
(
0
<=
n
&&
n
<=
SAL_MAX_UINT16
,
"DigitGroupingIterator::getGrouping: far out
"
);
SAL_WARN_IF
(
n
<
0
,
"unotools"
,
"DigitGroupingIterator::getGrouping: negative grouping
"
);
if
(
n
<
0
)
n
=
0
;
// sanitize ...
else
if
(
n
>
SAL_MAX_UINT16
)
n
=
SAL_MAX_UINT16
;
// limit for use with xub_StrLen
n
=
0
;
// sanitize ...
return
n
;
}
return
0
;
...
...
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