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
3474351e
Kaydet (Commit)
3474351e
authored
Eki 22, 2012
tarafından
Damjan Jovanovic
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#i117400# CSV: importing 64Kb+ english field entry in utf-8 causes alertless crash
Patch by: Eike Rathke Review by: Damjan Jovanovic
üst
e3ec94e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
impedit2.cxx
editeng/source/editeng/impedit2.cxx
+12
-7
No files found.
editeng/source/editeng/impedit2.cxx
Dosyayı görüntüle @
3474351e
...
@@ -2765,21 +2765,24 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
...
@@ -2765,21 +2765,24 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
// Token mit LINE_SEP abfragen,
// Token mit LINE_SEP abfragen,
// da der MAC-Compiler aus \n etwas anderes macht!
// da der MAC-Compiler aus \n etwas anderes macht!
sal_uInt16
nStart
=
0
;
// #117400
// The loop run variable must be capable to hold STRLEN_MAX+1,
// that with STRING32 would be SAL_MAX_INT32+1 but with 16-bit is 0xFFFF+1
sal_uInt32
nStart
=
0
;
while
(
nStart
<
aText
.
Len
()
)
while
(
nStart
<
aText
.
Len
()
)
{
{
sal_uInt
16
nEnd
=
aText
.
Search
(
LINE_SEP
,
nStart
);
sal_uInt
32
nEnd
=
aText
.
Search
(
LINE_SEP
,
static_cast
<
xub_StrLen
>
(
nStart
)
);
if
(
nEnd
==
STRING_NOTFOUND
)
if
(
nEnd
==
STRING_NOTFOUND
)
nEnd
=
aText
.
Len
();
// nicht dereferenzieren!
nEnd
=
aText
.
Len
();
// nicht dereferenzieren!
// Start == End => Leerzeile
// Start == End => Leerzeile
if
(
nEnd
>
nStart
)
if
(
nEnd
>
nStart
)
{
{
XubString
aLine
(
aText
,
nStart
,
nEnd
-
nStart
);
XubString
aLine
(
aText
,
nStart
,
static_cast
<
xub_StrLen
>
(
nEnd
-
nStart
)
);
xub_StrLen
nChars
=
aPaM
.
GetNode
()
->
Len
()
+
aLine
.
Len
();
xub_StrLen
nChars
=
aPaM
.
GetNode
()
->
Len
()
+
aLine
.
Len
();
if
(
nChars
>
MAXCHARSINPARA
)
if
(
nChars
>
MAXCHARSINPARA
)
{
{
sal_uInt16
nMaxNewChars
=
MAXCHARSINPARA
-
aPaM
.
GetNode
()
->
Len
();
xub_StrLen
nMaxNewChars
=
MAXCHARSINPARA
-
aPaM
.
GetNode
()
->
Len
();
nEnd
-=
(
aLine
.
Len
()
-
nMaxNewChars
);
// Dann landen die Zeichen im naechsten Absatz.
nEnd
-=
(
aLine
.
Len
()
-
nMaxNewChars
);
// Dann landen die Zeichen im naechsten Absatz.
aLine
.
Erase
(
nMaxNewChars
);
// Del Rest...
aLine
.
Erase
(
nMaxNewChars
);
// Del Rest...
}
}
...
@@ -2792,15 +2795,17 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
...
@@ -2792,15 +2795,17 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
aPaM
=
aEditDoc
.
InsertText
(
aPaM
,
aLine
);
aPaM
=
aEditDoc
.
InsertText
(
aPaM
,
aLine
);
else
else
{
{
sal_uInt
16
nStart2
=
0
;
sal_uInt
32
nStart2
=
0
;
while
(
nStart2
<
aLine
.
Len
()
)
while
(
nStart2
<
aLine
.
Len
()
)
{
{
sal_uInt
16
nEnd2
=
aLine
.
Search
(
'\t'
,
nStart2
);
sal_uInt
32
nEnd2
=
aLine
.
Search
(
'\t'
,
static_cast
<
xub_StrLen
>
(
nStart2
)
);
if
(
nEnd2
==
STRING_NOTFOUND
)
if
(
nEnd2
==
STRING_NOTFOUND
)
nEnd2
=
aLine
.
Len
();
// nicht dereferenzieren!
nEnd2
=
aLine
.
Len
();
// nicht dereferenzieren!
if
(
nEnd2
>
nStart2
)
if
(
nEnd2
>
nStart2
)
aPaM
=
aEditDoc
.
InsertText
(
aPaM
,
XubString
(
aLine
,
nStart2
,
nEnd2
-
nStart2
)
);
aPaM
=
aEditDoc
.
InsertText
(
aPaM
,
XubString
(
aLine
,
static_cast
<
xub_StrLen
>
(
nStart2
),
static_cast
<
xub_StrLen
>
(
nEnd2
-
nStart2
)
)
);
if
(
nEnd2
<
aLine
.
Len
()
)
if
(
nEnd2
<
aLine
.
Len
()
)
{
{
// aPaM = ImpInsertFeature( EditSelection( aPaM, aPaM ), );
// aPaM = ImpInsertFeature( EditSelection( aPaM, aPaM ), );
...
...
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