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
14c12fac
Kaydet (Commit)
14c12fac
authored
Ock 17, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some more loplugin:cstylecast: io
Change-Id: Iefd3268299b43ba08b9bc7699aa104288119ff4a
üst
e3ec0596
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
33 deletions
+22
-33
TextInputStream.cxx
io/source/TextInputStream/TextInputStream.cxx
+1
-1
TextOutputStream.cxx
io/source/TextOutputStream/TextOutputStream.cxx
+2
-2
odata.cxx
io/source/stm/odata.cxx
+19
-30
No files found.
io/source/TextInputStream/TextInputStream.cxx
Dosyayı görüntüle @
14c12fac
...
...
@@ -310,7 +310,7 @@ sal_Int32 OTextInputStream::implReadNext()
nTargetCount
+=
rtl_convertTextToUnicode
(
mConvText2Unicode
,
mContextText2Unicode
,
(
const
sal_Char
*
)
&
(
pbSource
[
nSourceCount
]
),
reinterpret_cast
<
const
char
*>
(
&
(
pbSource
[
nSourceCount
]
)
),
nTotalRead
-
nSourceCount
,
mpBuffer
+
mnCharsInBuffer
+
nTargetCount
,
nFreeBufferSize
-
nTargetCount
,
...
...
io/source/TextOutputStream/TextOutputStream.cxx
Dosyayı görüntüle @
14c12fac
...
...
@@ -128,7 +128,7 @@ Sequence<sal_Int8> OTextOutputStream::implConvert( const OUString& rSource )
sal_Int32
nSeqSize
=
nSourceSize
*
3
;
Sequence
<
sal_Int8
>
seqText
(
nSeqSize
);
sal_Char
*
pTarget
=
(
sal_Char
*
)
seqText
.
getArray
(
);
sal_Char
*
pTarget
=
reinterpret_cast
<
char
*>
(
seqText
.
getArray
()
);
while
(
true
)
{
nTargetCount
+=
rtl_convertUnicodeToText
(
...
...
@@ -148,7 +148,7 @@ Sequence<sal_Int8> OTextOutputStream::implConvert( const OUString& rSource )
{
nSeqSize
*=
2
;
seqText
.
realloc
(
nSeqSize
);
// double array size
pTarget
=
(
sal_Char
*
)
seqText
.
getArray
(
);
pTarget
=
reinterpret_cast
<
char
*>
(
seqText
.
getArray
()
);
continue
;
}
break
;
...
...
io/source/stm/odata.cxx
Dosyayı görüntüle @
14c12fac
...
...
@@ -26,6 +26,7 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <osl/endian.h>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XObjectOutputStream.hpp>
...
...
@@ -235,7 +236,7 @@ sal_Unicode ODataInputStream::readChar(void) throw (IOException, RuntimeExceptio
throw
UnexpectedEOFException
();
}
const
sal_uInt8
*
pBytes
=
(
const
sal_uInt8
*
)
aTmp
.
getConstArray
(
);
const
sal_uInt8
*
pBytes
=
reinterpret_cast
<
const
sal_uInt8
*>
(
aTmp
.
getConstArray
()
);
return
((
sal_Unicode
)
pBytes
[
0
]
<<
8
)
+
pBytes
[
1
];
}
...
...
@@ -247,7 +248,7 @@ sal_Int16 ODataInputStream::readShort(void) throw (IOException, RuntimeException
throw
UnexpectedEOFException
();
}
const
sal_uInt8
*
pBytes
=
(
const
sal_uInt8
*
)
aTmp
.
getConstArray
(
);
const
sal_uInt8
*
pBytes
=
reinterpret_cast
<
const
sal_uInt8
*>
(
aTmp
.
getConstArray
()
);
return
((
sal_Int16
)
pBytes
[
0
]
<<
8
)
+
pBytes
[
1
];
}
...
...
@@ -260,7 +261,7 @@ sal_Int32 ODataInputStream::readLong(void) throw (IOException, RuntimeException,
throw
UnexpectedEOFException
(
);
}
const
sal_uInt8
*
pBytes
=
(
const
sal_uInt8
*
)
aTmp
.
getConstArray
(
);
const
sal_uInt8
*
pBytes
=
reinterpret_cast
<
const
sal_uInt8
*>
(
aTmp
.
getConstArray
()
);
return
((
sal_Int32
)
pBytes
[
0
]
<<
24
)
+
((
sal_Int32
)
pBytes
[
1
]
<<
16
)
+
((
sal_Int32
)
pBytes
[
2
]
<<
8
)
+
pBytes
[
3
];
}
...
...
@@ -273,7 +274,7 @@ sal_Int64 ODataInputStream::readHyper(void) throw (IOException, RuntimeException
throw
UnexpectedEOFException
(
);
}
const
sal_uInt8
*
pBytes
=
(
const
sal_uInt8
*
)
aTmp
.
getConstArray
(
);
const
sal_uInt8
*
pBytes
=
reinterpret_cast
<
const
sal_uInt8
*>
(
aTmp
.
getConstArray
()
);
return
(((
sal_Int64
)
pBytes
[
0
])
<<
56
)
+
(((
sal_Int64
)
pBytes
[
1
])
<<
48
)
+
...
...
@@ -294,20 +295,14 @@ float ODataInputStream::readFloat(void) throw (IOException, RuntimeException, st
double
ODataInputStream
::
readDouble
(
void
)
throw
(
IOException
,
RuntimeException
,
std
::
exception
)
{
sal_uInt32
n
=
1
;
union
{
double
d
;
struct
{
sal_uInt32
n1
;
sal_uInt32
n2
;
}
ad
;
}
a
;
if
(
*
(
sal_uInt8
*
)
&
n
==
1
)
{
// little endian
a
.
ad
.
n2
=
readLong
();
a
.
ad
.
n1
=
readLong
();
}
else
{
// big endian
a
.
ad
.
n1
=
readLong
();
a
.
ad
.
n2
=
readLong
();
}
#if defined OSL_LITENDIAN
a
.
ad
.
n2
=
readLong
();
a
.
ad
.
n1
=
readLong
();
#else
a
.
ad
.
n1
=
readLong
();
a
.
ad
.
n2
=
readLong
();
#endif
return
a
.
d
;
}
...
...
@@ -713,21 +708,15 @@ void ODataOutputStream::writeDouble(double Value)
throw
(
IOException
,
RuntimeException
,
std
::
exception
)
{
sal_uInt32
n
=
1
;
union
{
double
d
;
struct
{
sal_uInt32
n1
;
sal_uInt32
n2
;
}
ad
;
}
a
;
a
.
d
=
Value
;
if
(
*
(
sal_Int8
*
)
&
n
==
1
)
{
// little endian
writeLong
(
a
.
ad
.
n2
);
writeLong
(
a
.
ad
.
n1
);
}
else
{
// big endian
writeLong
(
a
.
ad
.
n1
);
writeLong
(
a
.
ad
.
n2
);
}
#if defined OSL_LITENDIAN
writeLong
(
a
.
ad
.
n2
);
writeLong
(
a
.
ad
.
n1
);
#else
writeLong
(
a
.
ad
.
n1
);
writeLong
(
a
.
ad
.
n2
);
#endif
}
void
ODataOutputStream
::
writeUTF
(
const
OUString
&
Value
)
...
...
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