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
3aaadf95
Kaydet (Commit)
3aaadf95
authored
May 08, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use bool instead of int
Change-Id: Ib5920745f9f464493b7b134f871e090726d17d0c
üst
c215ca91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
38 deletions
+38
-38
tcvtutf7.cxx
sal/textenc/tcvtutf7.cxx
+38
-38
No files found.
sal/textenc/tcvtutf7.cxx
Dosyayı görüntüle @
3aaadf95
...
...
@@ -93,9 +93,9 @@ static unsigned char const aImplMustShiftTab[128] =
struct
ImplUTF7ToUCContextData
{
int
mbShifted
;
int
mbFirst
;
int
mbWroteOne
;
bool
mbShifted
;
bool
mbFirst
;
bool
mbWroteOne
;
sal_uInt32
mnBitBuffer
;
sal_uInt32
mnBufferBits
;
};
...
...
@@ -105,9 +105,9 @@ struct ImplUTF7ToUCContextData
void
*
ImplUTF7CreateUTF7TextToUnicodeContext
()
{
ImplUTF7ToUCContextData
*
pContextData
=
new
ImplUTF7ToUCContextData
;
pContextData
->
mbShifted
=
sal_F
alse
;
pContextData
->
mbFirst
=
sal_F
alse
;
pContextData
->
mbWroteOne
=
sal_F
alse
;
pContextData
->
mbShifted
=
f
alse
;
pContextData
->
mbFirst
=
f
alse
;
pContextData
->
mbWroteOne
=
f
alse
;
pContextData
->
mnBitBuffer
=
0
;
pContextData
->
mnBufferBits
=
0
;
return
pContextData
;
...
...
@@ -125,9 +125,9 @@ void ImplUTF7DestroyTextToUnicodeContext( void* pContext )
void
ImplUTF7ResetTextToUnicodeContext
(
void
*
pContext
)
{
ImplUTF7ToUCContextData
*
pContextData
=
static_cast
<
ImplUTF7ToUCContextData
*>
(
pContext
);
pContextData
->
mbShifted
=
sal_F
alse
;
pContextData
->
mbFirst
=
sal_F
alse
;
pContextData
->
mbWroteOne
=
sal_F
alse
;
pContextData
->
mbShifted
=
f
alse
;
pContextData
->
mbFirst
=
f
alse
;
pContextData
->
mbWroteOne
=
f
alse
;
pContextData
->
mnBitBuffer
=
0
;
pContextData
->
mnBufferBits
=
0
;
}
...
...
@@ -143,11 +143,11 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
ImplUTF7ToUCContextData
*
pContextData
=
static_cast
<
ImplUTF7ToUCContextData
*>
(
pContext
);
unsigned
char
c
=
'\0'
;
unsigned
char
nBase64Value
=
0
;
int
bEnd
=
sal_F
alse
;
int
bShifted
;
int
bFirst
;
int
bWroteOne
;
int
bBase64End
;
bool
bEnd
=
f
alse
;
bool
bShifted
;
bool
bFirst
;
bool
bWroteOne
;
bool
bBase64End
;
sal_uInt32
nBitBuffer
;
sal_uInt32
nBitBufferTemp
;
sal_uInt32
nBufferBits
;
...
...
@@ -166,9 +166,9 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
else
*/
{
bShifted
=
sal_F
alse
;
bFirst
=
sal_F
alse
;
bWroteOne
=
sal_F
alse
;
bShifted
=
f
alse
;
bFirst
=
f
alse
;
bWroteOne
=
f
alse
;
nBitBuffer
=
0
;
nBufferBits
=
0
;
}
...
...
@@ -183,25 +183,25 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
c
=
(
unsigned
char
)
*
pSrcBuf
;
/* End, when not a base64 character */
bBase64End
=
sal_F
alse
;
bBase64End
=
f
alse
;
if
(
c
<=
0x7F
)
{
nBase64Value
=
aImplBase64IndexTab
[
c
];
if
(
nBase64Value
==
0xFF
)
bBase64End
=
sal_T
rue
;
bBase64End
=
t
rue
;
}
}
else
{
bEnd
=
sal_T
rue
;
bBase64End
=
sal_T
rue
;
bEnd
=
t
rue
;
bBase64End
=
t
rue
;
}
if
(
bShifted
)
{
if
(
bBase64End
)
{
bShifted
=
sal_F
alse
;
bShifted
=
f
alse
;
/* If the character causing us to drop out was SHIFT_IN */
/* or SHIFT_OUT, it may be a special escape for SHIFT_IN. */
...
...
@@ -229,7 +229,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
}
*
pDestBuf
=
IMPL_SHIFT_IN_CHAR
;
pDestBuf
++
;
bWroteOne
=
sal_T
rue
;
bWroteOne
=
t
rue
;
}
/* Skip character */
...
...
@@ -237,7 +237,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
if
(
pSrcBuf
<
pEndSrcBuf
)
c
=
(
unsigned
char
)
*
pSrcBuf
;
else
bEnd
=
sal_T
rue
;
bEnd
=
t
rue
;
}
}
...
...
@@ -267,7 +267,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
/* Add 6 Bits from character to the bit buffer */
nBufferBits
+=
6
;
nBitBuffer
|=
((
sal_uInt32
)(
nBase64Value
&
0x3F
))
<<
(
32
-
nBufferBits
);
bFirst
=
sal_F
alse
;
bFirst
=
f
alse
;
}
/* Extract as many full 16 bit characters as possible from the */
...
...
@@ -279,7 +279,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
pDestBuf
++
;
nBitBuffer
<<=
16
;
nBufferBits
-=
16
;
bWroteOne
=
sal_T
rue
;
bWroteOne
=
t
rue
;
}
if
(
nBufferBits
>=
16
)
...
...
@@ -331,9 +331,9 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
{
if
(
c
==
IMPL_SHIFT_IN_CHAR
)
{
bShifted
=
sal_T
rue
;
bFirst
=
sal_T
rue
;
bWroteOne
=
sal_F
alse
;
bShifted
=
t
rue
;
bFirst
=
t
rue
;
bWroteOne
=
f
alse
;
}
else
{
...
...
@@ -392,7 +392,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext,
struct
ImplUTF7FromUCContextData
{
int
mbShifted
;
bool
mbShifted
;
sal_uInt32
mnBitBuffer
;
sal_uInt32
mnBufferBits
;
};
...
...
@@ -402,7 +402,7 @@ struct ImplUTF7FromUCContextData
void
*
ImplUTF7CreateUnicodeToTextContext
()
{
ImplUTF7FromUCContextData
*
pContextData
=
new
ImplUTF7FromUCContextData
;
pContextData
->
mbShifted
=
sal_F
alse
;
pContextData
->
mbShifted
=
f
alse
;
pContextData
->
mnBitBuffer
=
0
;
pContextData
->
mnBufferBits
=
0
;
return
pContextData
;
...
...
@@ -420,7 +420,7 @@ void ImplUTF7DestroyUnicodeToTextContext( void* pContext )
void
ImplUTF7ResetUnicodeToTextContext
(
void
*
pContext
)
{
ImplUTF7FromUCContextData
*
pContextData
=
static_cast
<
ImplUTF7FromUCContextData
*>
(
pContext
);
pContextData
->
mbShifted
=
sal_F
alse
;
pContextData
->
mbShifted
=
f
alse
;
pContextData
->
mnBitBuffer
=
0
;
pContextData
->
mnBufferBits
=
0
;
}
...
...
@@ -435,8 +435,8 @@ sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext,
{
ImplUTF7FromUCContextData
*
pContextData
=
static_cast
<
ImplUTF7FromUCContextData
*>
(
pContext
);
sal_Unicode
c
=
'\0'
;
int
bEnd
=
sal_F
alse
;
int
bShifted
;
bool
bEnd
=
f
alse
;
bool
bShifted
;
bool
bNeedShift
;
sal_uInt32
nBitBuffer
;
sal_uInt32
nBitBufferTemp
;
...
...
@@ -454,7 +454,7 @@ sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext,
else
*/
{
bShifted
=
sal_F
alse
;
bShifted
=
f
alse
;
nBitBuffer
=
0
;
nBufferBits
=
0
;
}
...
...
@@ -490,12 +490,12 @@ sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext,
pDestBuf
++
;
}
else
bShifted
=
sal_T
rue
;
bShifted
=
t
rue
;
}
}
else
{
bEnd
=
sal_T
rue
;
bEnd
=
t
rue
;
bNeedShift
=
false
;
}
...
...
@@ -537,7 +537,7 @@ sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext,
}
*
pDestBuf
=
IMPL_SHIFT_OUT_CHAR
;
pDestBuf
++
;
bShifted
=
sal_F
alse
;
bShifted
=
f
alse
;
}
}
...
...
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