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
01c28e33
Kaydet (Commit)
01c28e33
authored
Ock 27, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#1130421 Improper use of negative value
Change-Id: Iefdd854cb0348b187b95f4a89d52482381c73dfc
üst
391cb2a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
bastypes.cxx
basctl/source/basicide/bastypes.cxx
+15
-14
No files found.
basctl/source/basicide/bastypes.cxx
Dosyayı görüntüle @
01c28e33
...
...
@@ -664,22 +664,23 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
DBG_ASSERTWARNING
(
nStartPos
!=
-
1
,
"CutLines: Startzeile nicht gefunden!"
);
if
(
nStartPos
!=
-
1
)
{
sal_Int32
nEndPos
=
nStartPos
;
if
(
nStartPos
==
-
1
)
return
;
for
(
sal_Int32
i
=
0
;
i
<
nLines
;
i
++
)
nEndPos
=
searchEOL
(
rStr
,
nEndPos
+
1
);
sal_Int32
nEndPos
=
nStartPos
;
if
(
nEndPos
==
-
1
)
// might happen at the last line
nEndPos
=
rStr
.
getLength
();
else
nEndPos
++
;
for
(
sal_Int32
i
=
0
;
i
<
nLines
;
i
++
)
nEndPos
=
searchEOL
(
rStr
,
nEndPos
+
1
);
if
(
nEndPos
==
-
1
)
// might happen at the last line
nEndPos
=
rStr
.
getLength
();
else
nEndPos
++
;
OUString
aEndStr
=
rStr
.
copy
(
nEndPos
);
rStr
=
rStr
.
copy
(
0
,
nStartPos
);
rStr
+=
aEndStr
;
OUString
aEndStr
=
rStr
.
copy
(
nEndPos
);
rStr
=
rStr
.
copy
(
0
,
nStartPos
);
rStr
+=
aEndStr
;
}
if
(
bEraseTrailingEmptyLines
)
{
sal_Int32
n
=
nStartPos
;
...
...
@@ -692,7 +693,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
if
(
n
>
nStartPos
)
{
OUString
aEndStr
=
rStr
.
copy
(
n
);
aEndStr
=
rStr
.
copy
(
n
);
rStr
=
rStr
.
copy
(
0
,
nStartPos
);
rStr
+=
aEndStr
;
}
...
...
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