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
3b5a27e9
Kaydet (Commit)
3b5a27e9
authored
Tem 18, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
filter review QuattroPro
Patch by: Eike Rathke
üst
02ed81ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
ftools.cxx
sc/source/filter/ftools/ftools.cxx
+10
-5
ftools.hxx
sc/source/filter/inc/ftools.hxx
+7
-2
qpro.cxx
sc/source/filter/qpro/qpro.cxx
+15
-5
No files found.
sc/source/filter/ftools/ftools.cxx
Dosyayı görüntüle @
3b5a27e9
...
...
@@ -274,12 +274,16 @@ ByteString ScfTools::ReadCString( SvStream& rStrm )
ByteString
aRet
;
sal_Char
cChar
;
sal_uInt32
nLen
=
0
;
rStrm
>>
cChar
;
while
(
cChar
)
while
(
cChar
&&
nLen
++
<
STRING_MAXLEN
)
{
aRet
+=
cChar
;
rStrm
>>
cChar
;
}
// Callers assume that a 0-byte was read and may advance their book keeping
// counters by String.Len()+1, don't put back cChar!=0 if STRING_MAXLEN was
// reached.
return
aRet
;
}
...
...
@@ -288,9 +292,10 @@ ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
ByteString
aRet
;
sal_Char
cChar
;
sal_uInt32
nLen
=
0
;
rStrm
>>
cChar
;
rnBytesLeft
--
;
while
(
cChar
)
while
(
cChar
&&
nLen
++
<
STRING_MAXLEN
)
{
aRet
+=
cChar
;
rStrm
>>
cChar
;
...
...
@@ -300,12 +305,12 @@ ByteString ScfTools::ReadCString( SvStream& rStrm, sal_Int32& rnBytesLeft )
return
aRet
;
}
void
ScfTools
::
AppendCString
(
SvStream
&
rStrm
,
ByteString
&
rString
)
void
ScfTools
::
AppendCString
WithLen
(
SvStream
&
rStrm
,
ByteString
&
rString
,
sal_uInt32
nLen
)
{
sal_Char
cChar
;
rStrm
>>
cChar
;
while
(
cChar
)
while
(
cChar
&&
nLen
++
<
STRING_MAXLEN
)
{
rString
+=
cChar
;
rStrm
>>
cChar
;
...
...
@@ -315,7 +320,7 @@ void ScfTools::AppendCString( SvStream& rStrm, ByteString& rString )
void
ScfTools
::
AppendCString
(
SvStream
&
rStrm
,
String
&
rString
,
rtl_TextEncoding
eTextEnc
)
{
ByteString
aByteString
;
AppendCString
(
rStrm
,
aByteString
);
AppendCString
WithLen
(
rStrm
,
aByteString
,
rString
.
Len
()
);
rString
+=
String
(
aByteString
,
eTextEnc
);
}
...
...
sc/source/filter/inc/ftools.hxx
Dosyayı görüntüle @
3b5a27e9
...
...
@@ -359,8 +359,13 @@ public:
inline
static
String
ReadCString
(
SvStream
&
rStrm
,
sal_Int32
&
rnBytesLeft
,
rtl_TextEncoding
eTextEnc
)
{
return
String
(
ReadCString
(
rStrm
,
rnBytesLeft
),
eTextEnc
);
}
/** Appends a zero terminted byte string. */
static
void
AppendCString
(
SvStream
&
rStrm
,
ByteString
&
rString
);
/** Appends a zero terminted byte string.
@param nLen
The previous length of the string, usually rString.Len(), but
necessary as this may be called from within AppendCString()
where rString is a temporary ByteString to be appended to
UniString. */
static
void
AppendCStringWithLen
(
SvStream
&
rStrm
,
ByteString
&
rString
,
sal_uInt32
nLen
);
/** Appends a zero terminted byte string. */
static
void
AppendCString
(
SvStream
&
rStrm
,
String
&
rString
,
rtl_TextEncoding
eTextEnc
);
...
...
sc/source/filter/qpro/qpro.cxx
Dosyayı görüntüle @
3b5a27e9
...
...
@@ -61,10 +61,16 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
case
0x000f
:{
// Label cell
String
aLabel
;
*
mpStream
>>
nCol
>>
nDummy
>>
nRow
>>
nStyle
>>
nDummy
;
readString
(
aLabel
,
getLength
()
-
7
);
nStyle
=
nStyle
>>
3
;
pStyle
->
SetFormat
(
pDoc
,
nCol
,
nRow
,
nTab
,
nStyle
);
pDoc
->
PutCell
(
nCol
,
nRow
,
nTab
,
ScBaseCell
::
CreateTextCell
(
aLabel
,
pDoc
),
(
sal_Bool
)
sal_True
);
sal_uInt16
nLen
=
getLength
();
if
(
nLen
>=
7
)
{
readString
(
aLabel
,
nLen
-
7
);
nStyle
=
nStyle
>>
3
;
pStyle
->
SetFormat
(
pDoc
,
nCol
,
nRow
,
nTab
,
nStyle
);
pDoc
->
PutCell
(
nCol
,
nRow
,
nTab
,
ScBaseCell
::
CreateTextCell
(
aLabel
,
pDoc
),
(
sal_Bool
)
sal_True
);
}
else
eRet
=
eERR_FORMAT
;
}
break
;
...
...
@@ -192,7 +198,11 @@ FltError ScQProReader::import( ScDocument *pDoc )
String
aLabel
;
*
mpStream
>>
nPtSize
>>
nFontAttr
;
pStyleElement
->
setFontRecord
(
j
,
nFontAttr
,
nPtSize
);
readString
(
aLabel
,
getLength
()
-
4
);
sal_uInt16
nLen
=
getLength
();
if
(
nLen
>=
4
)
readString
(
aLabel
,
nLen
-
4
);
else
eRet
=
eERR_FORMAT
;
pStyleElement
->
setFontType
(
j
,
aLabel
);
j
++
;
}
...
...
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