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
d3bda969
Kaydet (Commit)
d3bda969
authored
Ock 13, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
just return a new string rather than pass by reference
üst
1aec5907
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
scuiasciiopt.cxx
sc/source/ui/dbgui/scuiasciiopt.cxx
+2
-2
impex.cxx
sc/source/ui/docshell/impex.cxx
+11
-9
impex.hxx
sc/source/ui/inc/impex.hxx
+1
-1
No files found.
sc/source/ui/dbgui/scuiasciiopt.cxx
Dosyayı görüntüle @
d3bda969
...
@@ -476,7 +476,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
...
@@ -476,7 +476,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
bRet
=
false
;
bRet
=
false
;
break
;
break
;
}
}
ReadCsvLine
(
*
mpDatStream
,
rText
,
!
bFixed
,
maFieldSeparators
,
rText
=
ReadCsvLine
(
*
mpDatStream
,
!
bFixed
,
maFieldSeparators
,
mcTextSep
);
mcTextSep
);
mnStreamPos
=
mpDatStream
->
Tell
();
mnStreamPos
=
mpDatStream
->
Tell
();
mpRowPosArray
[
++
mnRowPosCount
]
=
mnStreamPos
;
mpRowPosArray
[
++
mnRowPosCount
]
=
mnStreamPos
;
...
@@ -494,7 +494,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
...
@@ -494,7 +494,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, String &rText )
else
else
{
{
Seek
(
mpRowPosArray
[
nLine
]);
Seek
(
mpRowPosArray
[
nLine
]);
ReadCsvLine
(
*
mpDatStream
,
rText
,
!
bFixed
,
maFieldSeparators
,
mcTextSep
);
rText
=
ReadCsvLine
(
*
mpDatStream
,
!
bFixed
,
maFieldSeparators
,
mcTextSep
);
mnStreamPos
=
mpDatStream
->
Tell
();
mnStreamPos
=
mpDatStream
->
Tell
();
}
}
...
...
sc/source/ui/docshell/impex.cxx
Dosyayı görüntüle @
d3bda969
...
@@ -1180,7 +1180,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
...
@@ -1180,7 +1180,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
while
(
--
nSkipLines
>
0
)
while
(
--
nSkipLines
>
0
)
{
{
ReadCsvLine
(
rStrm
,
aLine
,
!
bFixed
,
rSeps
,
cStr
);
// content is ignored
aLine
=
ReadCsvLine
(
rStrm
,
!
bFixed
,
rSeps
,
cStr
);
// content is ignored
if
(
rStrm
.
IsEof
()
)
if
(
rStrm
.
IsEof
()
)
break
;
break
;
}
}
...
@@ -1203,7 +1203,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
...
@@ -1203,7 +1203,7 @@ sal_Bool ScImportExport::ExtText2Doc( SvStream& rStrm )
{
{
for
(
;;
)
for
(
;;
)
{
{
ReadCsvLine
(
rStrm
,
aLine
,
!
bFixed
,
rSeps
,
cStr
);
aLine
=
ReadCsvLine
(
rStrm
,
!
bFixed
,
rSeps
,
cStr
);
if
(
rStrm
.
IsEof
()
)
if
(
rStrm
.
IsEof
()
)
break
;
break
;
...
@@ -2123,11 +2123,12 @@ inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr,
...
@@ -2123,11 +2123,12 @@ inline const sal_Unicode* lcl_UnicodeStrChr( const sal_Unicode* pStr,
return
0
;
return
0
;
}
}
void
ReadCsvLine
(
SvStream
&
rStream
,
String
&
rStr
,
sal_Bool
bEmbeddedLineBreak
,
String
ReadCsvLine
(
SvStream
&
rStream
,
sal_Bool
bEmbeddedLineBreak
,
const
String
&
rFieldSeparators
,
sal_Unicode
cFieldQuote
,
const
String
&
rFieldSeparators
,
sal_Unicode
cFieldQuote
,
sal_Bool
bAllowBackslashEscape
)
sal_Bool
bAllowBackslashEscape
)
{
{
rStream
.
ReadUniOrByteStringLine
(
rStr
,
rStream
.
GetStreamCharSet
());
String
aStr
;
rStream
.
ReadUniOrByteStringLine
(
aStr
,
rStream
.
GetStreamCharSet
());
if
(
bEmbeddedLineBreak
)
if
(
bEmbeddedLineBreak
)
{
{
...
@@ -2138,11 +2139,11 @@ void ReadCsvLine(SvStream &rStream, String& rStr, sal_Bool bEmbeddedLineBreak,
...
@@ -2138,11 +2139,11 @@ void ReadCsvLine(SvStream &rStream, String& rStr, sal_Bool bEmbeddedLineBreak,
xub_StrLen
nLastOffset
=
0
;
xub_StrLen
nLastOffset
=
0
;
xub_StrLen
nQuotes
=
0
;
xub_StrLen
nQuotes
=
0
;
while
(
!
rStream
.
IsEof
()
&&
r
Str
.
Len
()
<
STRING_MAXLEN
)
while
(
!
rStream
.
IsEof
()
&&
a
Str
.
Len
()
<
STRING_MAXLEN
)
{
{
bool
bBackslashEscaped
=
false
;
bool
bBackslashEscaped
=
false
;
const
sal_Unicode
*
p
,
*
pStart
;
const
sal_Unicode
*
p
,
*
pStart
;
p
=
pStart
=
r
Str
.
GetBuffer
();
p
=
pStart
=
a
Str
.
GetBuffer
();
p
+=
nLastOffset
;
p
+=
nLastOffset
;
while
(
*
p
)
while
(
*
p
)
{
{
...
@@ -2180,14 +2181,15 @@ void ReadCsvLine(SvStream &rStream, String& rStr, sal_Bool bEmbeddedLineBreak,
...
@@ -2180,14 +2181,15 @@ void ReadCsvLine(SvStream &rStream, String& rStr, sal_Bool bEmbeddedLineBreak,
break
;
break
;
else
else
{
{
nLastOffset
=
r
Str
.
Len
();
nLastOffset
=
a
Str
.
Len
();
String
aNext
;
String
aNext
;
rStream
.
ReadUniOrByteStringLine
(
aNext
,
rStream
.
GetStreamCharSet
());
rStream
.
ReadUniOrByteStringLine
(
aNext
,
rStream
.
GetStreamCharSet
());
r
Str
+=
sal_Unicode
(
_LF
);
a
Str
+=
sal_Unicode
(
_LF
);
r
Str
+=
aNext
;
a
Str
+=
aNext
;
}
}
}
}
}
}
return
aStr
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/inc/impex.hxx
Dosyayı görüntüle @
d3bda969
...
@@ -239,7 +239,7 @@ public:
...
@@ -239,7 +239,7 @@ public:
characters will be spoiled, and a subsequent ReadCsvLine()
characters will be spoiled, and a subsequent ReadCsvLine()
may start under false preconditions.
may start under false preconditions.
*/
*/
SC_DLLPUBLIC
void
ReadCsvLine
(
SvStream
&
rStream
,
String
&
rStr
,
sal_Bool
bEmbeddedLineBreak
,
SC_DLLPUBLIC
String
ReadCsvLine
(
SvStream
&
rStream
,
sal_Bool
bEmbeddedLineBreak
,
const
String
&
rFieldSeparators
,
sal_Unicode
cFieldQuote
,
const
String
&
rFieldSeparators
,
sal_Unicode
cFieldQuote
,
sal_Bool
bAllowBackslashEscape
=
sal_False
);
sal_Bool
bAllowBackslashEscape
=
sal_False
);
...
...
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