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
0a2565b8
Kaydet (Commit)
0a2565b8
authored
Ara 15, 2011
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rename and refactor ScfTools::ReadCString
üst
cf880b3f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
22 deletions
+12
-22
ftools.cxx
sc/source/filter/ftools/ftools.cxx
+3
-8
ftools.hxx
sc/source/filter/inc/ftools.hxx
+5
-9
lotform.cxx
sc/source/filter/lotus/lotform.cxx
+3
-4
qproform.cxx
sc/source/filter/qpro/qproform.cxx
+1
-1
No files found.
sc/source/filter/ftools/ftools.cxx
Dosyayı görüntüle @
0a2565b8
...
...
@@ -276,14 +276,9 @@ ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const Strin
// *** byte string import operations *** --------------------------------------
ByteString
ScfTools
::
ReadCString
(
SvStream
&
rStrm
)
rtl
::
OString
ScfTools
::
read_zeroTerminated_uInt8s_AsOString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
)
{
return
read_zeroTerminated_uInt8s_AsOString
(
rStrm
);
}
ByteString
ScfTools
::
ReadCString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
)
{
rtl
::
OString
aRet
(
read_zeroTerminated_uInt8s_AsOString
(
rStrm
));
rtl
::
OString
aRet
(
::
read_zeroTerminated_uInt8s_AsOString
(
rStrm
));
rnBytesLeft
-=
aRet
.
getLength
();
//we read this number of bytes anyway
if
(
rStrm
.
good
())
//if the stream is happy we read the null terminator as well
--
rnBytesLeft
;
...
...
@@ -292,7 +287,7 @@ ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
void
ScfTools
::
AppendCString
(
SvStream
&
rStrm
,
String
&
rString
,
rtl_TextEncoding
eTextEnc
)
{
rString
+=
read_zeroTerminated_uInt8s_AsOUString
(
rStrm
,
eTextEnc
);
rString
+=
::
read_zeroTerminated_uInt8s_AsOUString
(
rStrm
,
eTextEnc
);
}
// *** HTML table names <-> named range names *** -----------------------------
...
...
sc/source/filter/inc/ftools.hxx
Dosyayı görüntüle @
0a2565b8
...
...
@@ -236,17 +236,13 @@ public:
// *** byte string import operations *** --------------------------------------
/** Reads and returns a zero terminted byte string. */
static
ByteString
ReadCString
(
SvStream
&
rStrm
);
/** Reads and returns a zero terminted byte string. */
inline
static
String
ReadCString
(
SvStream
&
rStrm
,
rtl_TextEncoding
eTextEnc
)
{
return
String
(
ReadCString
(
rStrm
),
eTextEnc
);
}
/** Reads and returns a zero terminted byte string and decreases a stream counter. */
static
ByteString
ReadCString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
);
static
rtl
::
OString
read_zeroTerminated_uInt8s_AsOString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
);
/** Reads and returns a zero terminted byte string and decreases a stream counter. */
inline
static
String
ReadCString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
,
rtl_TextEncoding
eTextEnc
)
{
return
String
(
ReadCString
(
rStrm
,
rnBytesLeft
),
eTextEnc
);
}
inline
static
rtl
::
OUString
read_zeroTerminated_uInt8s_AsOUString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
,
rtl_TextEncoding
eTextEnc
)
{
return
rtl
::
OStringToOUString
(
read_zeroTerminated_uInt8s_AsOString
(
rStrm
,
rnBytesLeft
),
eTextEnc
);
}
/** Appends a zero terminted byte string. */
static
void
AppendCString
(
SvStream
&
rStrm
,
String
&
rString
,
rtl_TextEncoding
eTextEnc
);
...
...
sc/source/filter/lotus/lotform.cxx
Dosyayı görüntüle @
0a2565b8
...
...
@@ -542,8 +542,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
break
;
case
FT_ConstString
:
{
String
aTmp
(
ScfTools
::
ReadCString
(
aIn
,
nBytesLeft
,
eSrcChar
)
);
String
aTmp
(
ScfTools
::
read_zeroTerminated_uInt8s_AsOUString
(
aIn
,
nBytesLeft
,
eSrcChar
));
aStack
<<
aPool
.
Store
(
aTmp
);
}
break
;
...
...
@@ -562,7 +561,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
break
;
case
FT_Nrref
:
{
String
aTmp
(
ScfTools
::
ReadCString
(
aIn
,
nBytesLeft
,
eSrcChar
)
);
String
aTmp
(
ScfTools
::
read_zeroTerminated_uInt8s_AsOUString
(
aIn
,
nBytesLeft
,
eSrcChar
)
);
if
(
rRangeNameBufferWK3
.
FindRel
(
aTmp
,
nRngIndex
)
)
aStack
<<
aPool
.
Store
(
nRngIndex
);
else
...
...
@@ -575,7 +574,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
break
;
case
FT_Absnref
:
{
String
aTmp
(
ScfTools
::
ReadCString
(
aIn
,
nBytesLeft
,
eSrcChar
)
);
String
aTmp
(
ScfTools
::
read_zeroTerminated_uInt8s_AsOUString
(
aIn
,
nBytesLeft
,
eSrcChar
)
);
if
(
rRangeNameBufferWK3
.
FindAbs
(
aTmp
,
nRngIndex
)
)
aStack
<<
aPool
.
Store
(
nRngIndex
);
else
...
...
sc/source/filter/qpro/qproform.cxx
Dosyayı görüntüle @
0a2565b8
...
...
@@ -249,7 +249,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con
}
if
(
nFmla
[
i
]
==
0x06
)
{
String
aTmp
(
ScfTools
::
ReadCString
(
maIn
),
maIn
.
GetStreamCharSet
()
);
String
aTmp
(
::
read_zeroTerminated_uInt8s_AsOUString
(
maIn
,
maIn
.
GetStreamCharSet
())
);
sStringArray
[
nStringCount
]
=
aTmp
;
nStringCount
++
;
SAFEDEC_OR_RET
(
nRef
,
aTmp
.
Len
()
+
1
,
ConvErrCount
);
...
...
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