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
004304eb
Kaydet (Commit)
004304eb
authored
Şub 05, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
try to avoid overflows in some compare functions
Change-Id: I6144d7d6527dc401b7f1b577d1a227361e39e7bb
üst
b0ef5cf2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
table3.cxx
sc/source/core/data/table3.cxx
+1
-1
stgelem.cxx
sot/source/sdstor/stgelem.cxx
+5
-6
stgelem.hxx
sot/source/sdstor/stgelem.hxx
+1
-1
sortresult.cxx
ucb/source/sorter/sortresult.cxx
+1
-1
No files found.
sc/source/core/data/table3.cxx
Dosyayı görüntüle @
004304eb
...
...
@@ -197,7 +197,7 @@ short Compare( const OUString &sInput1, const OUString &sInput2,
if
(
nNum1
!=
nNum2
)
{
if
(
nNum1
<
nNum2
)
return
-
1
;
return
static_cast
<
short
>
(
nNum1
>
nNum2
)
;
return
(
nNum1
>
nNum2
)
?
1
:
0
;
}
// The prefix and the first numerical elements are equal, but the suffix
...
...
sot/source/sdstor/stgelem.cxx
Dosyayı görüntüle @
004304eb
...
...
@@ -350,13 +350,12 @@ void StgEntry::GetName( OUString& rName ) const
// Compare two entries. Do this case-insensitive.
s
hort
StgEntry
::
Compare
(
const
StgEntry
&
r
)
const
s
al_Int32
StgEntry
::
Compare
(
const
StgEntry
&
r
)
const
{
sal_Int32
nRes
=
r
.
nNameLen
-
nNameLen
;
if
(
!
nRes
)
nRes
=
r
.
aName
.
compareTo
(
aName
);
return
(
short
)
nRes
;
if
(
r
.
nNameLen
!=
nNameLen
)
return
r
.
nNameLen
>
nNameLen
?
1
:
-
1
;
else
return
r
.
aName
.
compareTo
(
aName
);
}
// These load/store operations are a bit more complicated,
...
...
sot/source/sdstor/stgelem.hxx
Dosyayı görüntüle @
004304eb
...
...
@@ -128,7 +128,7 @@ public:
bool
SetName
(
const
OUString
&
);
// store a name (ASCII, up to 32 chars)
void
GetName
(
OUString
&
rName
)
const
;
// fill in the name
s
hort
Compare
(
const
StgEntry
&
)
const
;
// compare two entries
s
al_Int32
Compare
(
const
StgEntry
&
)
const
;
// compare two entries
bool
Load
(
const
void
*
pBuffer
,
sal_uInt32
nBufSize
);
void
Store
(
void
*
);
StgEntryType
GetType
()
const
{
return
(
StgEntryType
)
cType
;
}
...
...
ucb/source/sorter/sortresult.cxx
Dosyayı görüntüle @
004304eb
...
...
@@ -1286,7 +1286,7 @@ sal_IntPtr SortedResultSet::FindPos( SortListData *pEntry,
nCompare
=
Compare
(
pEntry
,
pMid
);
if
(
!
nCompare
)
nCompare
=
reinterpret_cast
<
sal_IntPtr
>
(
pEntry
)
-
reinterpret_cast
<
sal_IntPtr
>
(
pMid
)
;
nCompare
=
(
pEntry
!=
pMid
)
?
((
pEntry
<
pMid
)
?
-
1
:
1
)
:
0
;
if
(
nCompare
<
0
)
// pEntry < pMid
nEnd
=
nMid
-
1
;
...
...
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