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
9c9e4b19
Kaydet (Commit)
9c9e4b19
authored
Şub 20, 2014
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add SvStream::ReadCharAsBool
Change-Id: I9dc0525e04de5ae79205872b779dcd0115a9cc14
üst
5dcb634d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
11 deletions
+36
-11
stream.hxx
include/tools/stream.hxx
+1
-0
cenumitm.cxx
svl/source/items/cenumitm.cxx
+2
-2
ctypeitm.cxx
svl/source/items/ctypeitm.cxx
+2
-2
visitem.cxx
svl/source/items/visitem.cxx
+2
-2
zformat.cxx
svl/source/numbers/zformat.cxx
+5
-5
stream.cxx
tools/source/stream/stream.cxx
+24
-0
No files found.
include/tools/stream.hxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -308,6 +308,7 @@ public:
...
@@ -308,6 +308,7 @@ public:
SvStream
&
ReadSChar
(
signed
char
&
rChar
);
SvStream
&
ReadSChar
(
signed
char
&
rChar
);
SvStream
&
ReadChar
(
char
&
rChar
);
SvStream
&
ReadChar
(
char
&
rChar
);
SvStream
&
ReadUChar
(
unsigned
char
&
rChar
);
SvStream
&
ReadUChar
(
unsigned
char
&
rChar
);
SvStream
&
ReadCharAsBool
(
bool
&
rBool
);
SvStream
&
ReadFloat
(
float
&
rFloat
);
SvStream
&
ReadFloat
(
float
&
rFloat
);
SvStream
&
ReadDouble
(
double
&
rDouble
);
SvStream
&
ReadDouble
(
double
&
rDouble
);
SvStream
&
ReadStream
(
SvStream
&
rStream
);
SvStream
&
ReadStream
(
SvStream
&
rStream
);
...
...
svl/source/items/cenumitm.cxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -169,8 +169,8 @@ TYPEINIT1_AUTOFACTORY(SfxBoolItem, SfxPoolItem);
...
@@ -169,8 +169,8 @@ TYPEINIT1_AUTOFACTORY(SfxBoolItem, SfxPoolItem);
SfxBoolItem
::
SfxBoolItem
(
sal_uInt16
const
nWhich
,
SvStream
&
rStream
)
SfxBoolItem
::
SfxBoolItem
(
sal_uInt16
const
nWhich
,
SvStream
&
rStream
)
:
SfxPoolItem
(
nWhich
)
:
SfxPoolItem
(
nWhich
)
{
{
unsigned
char
tmp
=
0
;
bool
tmp
=
false
;
rStream
.
Read
UChar
(
tmp
);
rStream
.
Read
CharAsBool
(
tmp
);
m_bValue
=
tmp
;
m_bValue
=
tmp
;
}
}
...
...
svl/source/items/ctypeitm.cxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -71,8 +71,8 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
...
@@ -71,8 +71,8 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
rStream
.
ReadUInt32
(
nMagic
);
rStream
.
ReadUInt32
(
nMagic
);
if
(
nMagic
==
CNTSTRINGITEM_STREAM_MAGIC
)
if
(
nMagic
==
CNTSTRINGITEM_STREAM_MAGIC
)
{
{
unsigned
char
bEncrypted
=
sal_F
alse
;
bool
bEncrypted
=
f
alse
;
rStream
.
Read
UChar
(
bEncrypted
);
rStream
.
Read
CharAsBool
(
bEncrypted
);
DBG_ASSERT
(
!
bEncrypted
,
DBG_ASSERT
(
!
bEncrypted
,
"CntContentTypeItem::Create() reads encrypted data"
);
"CntContentTypeItem::Create() reads encrypted data"
);
}
}
...
...
svl/source/items/visitem.cxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -33,8 +33,8 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
...
@@ -33,8 +33,8 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem
(
which
)
SfxPoolItem
(
which
)
{
{
DBG_CTOR
(
SfxVisibilityItem
,
0
);
DBG_CTOR
(
SfxVisibilityItem
,
0
);
unsigned
char
bValue
=
0
;
bool
bValue
=
false
;
rStream
.
Read
UChar
(
bValue
);
rStream
.
Read
CharAsBool
(
bValue
);
m_nValue
.
bVisible
=
bValue
;
m_nValue
.
bVisible
=
bValue
;
}
}
...
...
svl/source/numbers/zformat.cxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -184,8 +184,8 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz)
...
@@ -184,8 +184,8 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz)
sStrArray
[
i
]
=
SvNumberformat
::
LoadString
(
rStream
);
sStrArray
[
i
]
=
SvNumberformat
::
LoadString
(
rStream
);
rStream
.
ReadInt16
(
nTypeArray
[
i
]
);
rStream
.
ReadInt16
(
nTypeArray
[
i
]
);
}
}
unsigned
char
bStreamThousand
;
bool
bStreamThousand
;
rStream
.
ReadInt16
(
eScannedType
).
Read
UChar
(
bStreamThousand
).
ReadUInt16
(
nThousand
)
rStream
.
ReadInt16
(
eScannedType
).
Read
CharAsBool
(
bStreamThousand
).
ReadUInt16
(
nThousand
)
.
ReadUInt16
(
nCntPre
).
ReadUInt16
(
nCntPost
).
ReadUInt16
(
nCntExp
);
.
ReadUInt16
(
nCntPre
).
ReadUInt16
(
nCntPost
).
ReadUInt16
(
nCntExp
);
bThousand
=
bStreamThousand
;
bThousand
=
bStreamThousand
;
}
}
...
@@ -1702,9 +1702,9 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
...
@@ -1702,9 +1702,9 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
rHdr
.
StartEntry
();
rHdr
.
StartEntry
();
sal_uInt16
nOp1
,
nOp2
;
sal_uInt16
nOp1
,
nOp2
;
sFormatstring
=
SvNumberformat
::
LoadString
(
rStream
);
sFormatstring
=
SvNumberformat
::
LoadString
(
rStream
);
unsigned
char
bStreamStandard
,
bStreamUsed
;
bool
bStreamStandard
,
bStreamUsed
;
rStream
.
ReadInt16
(
eType
).
ReadDouble
(
fLimit1
).
ReadDouble
(
fLimit2
)
rStream
.
ReadInt16
(
eType
).
ReadDouble
(
fLimit1
).
ReadDouble
(
fLimit2
)
.
ReadUInt16
(
nOp1
).
ReadUInt16
(
nOp2
).
Read
UChar
(
bStreamStandard
).
ReadUChar
(
bStreamUsed
);
.
ReadUInt16
(
nOp1
).
ReadUInt16
(
nOp2
).
Read
CharAsBool
(
bStreamStandard
).
ReadCharAsBool
(
bStreamUsed
);
bStandard
=
bStreamStandard
;
bStandard
=
bStreamStandard
;
bIsUsed
=
bStreamUsed
;
bIsUsed
=
bStreamUsed
;
NfHackConversion
eHackConversion
=
NF_CONVERT_NONE
;
NfHackConversion
eHackConversion
=
NF_CONVERT_NONE
;
...
@@ -1795,7 +1795,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
...
@@ -1795,7 +1795,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
}
break
;
break
;
case
nNewStandardFlagVersionId
:
case
nNewStandardFlagVersionId
:
rStream
.
Read
UChar
(
bStreamStandard
);
// the real standard flag
rStream
.
Read
CharAsBool
(
bStreamStandard
);
// the real standard flag
bStandard
=
bStreamStandard
;
bStandard
=
bStreamStandard
;
break
;
break
;
default
:
default
:
...
...
tools/source/stream/stream.cxx
Dosyayı görüntüle @
9c9e4b19
...
@@ -1004,6 +1004,30 @@ SvStream& SvStream::ReadUChar( unsigned char& r )
...
@@ -1004,6 +1004,30 @@ SvStream& SvStream::ReadUChar( unsigned char& r )
return
*
this
;
return
*
this
;
}
}
SvStream
&
SvStream
::
ReadCharAsBool
(
bool
&
r
)
{
if
(
(
bIoRead
||
!
bIsConsistent
)
&&
sizeof
(
char
)
<=
nBufFree
)
{
SAL_WARN_IF
(
*
pBufPos
>
1
,
"tools.stream"
,
unsigned
(
*
pBufPos
)
<<
" not 0/1"
);
r
=
*
pBufPos
!=
0
;
nBufActualPos
+=
sizeof
(
char
);
pBufPos
+=
sizeof
(
char
);
nBufFree
-=
sizeof
(
char
);
}
else
{
unsigned
char
c
;
if
(
Read
(
&
c
,
1
)
==
1
)
{
SAL_WARN_IF
(
c
>
1
,
"tools.stream"
,
unsigned
(
c
)
<<
" not 0/1"
);
r
=
c
!=
0
;
}
}
return
*
this
;
}
SvStream
&
SvStream
::
ReadFloat
(
float
&
r
)
SvStream
&
SvStream
::
ReadFloat
(
float
&
r
)
{
{
float
n
=
0
;
float
n
=
0
;
...
...
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