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
7eeabbca
Kaydet (Commit)
7eeabbca
authored
Mar 28, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up C-style casts from pointers to void
Change-Id: I1d157bfc82f09f2438e59eca4fcd92931ca38723
üst
84676d50
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
17 deletions
+17
-17
test_sot.cxx
sot/qa/cppunit/test_sot.cxx
+1
-1
stgcache.cxx
sot/source/sdstor/stgcache.cxx
+1
-1
stgcache.hxx
sot/source/sdstor/stgcache.hxx
+1
-1
stgelem.cxx
sot/source/sdstor/stgelem.cxx
+2
-2
stgstrms.cxx
sot/source/sdstor/stgstrms.cxx
+9
-9
storage.cxx
sot/source/sdstor/storage.cxx
+2
-2
ucbstorage.cxx
sot/source/sdstor/ucbstorage.cxx
+1
-1
No files found.
sot/qa/cppunit/test_sot.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -48,7 +48,7 @@ namespace
const
OUString
&
rStreamName
,
sal_uLong
nSize
)
{
unsigned
char
*
pData
=
(
unsigned
char
*
)
malloc
(
nSize
);
unsigned
char
*
pData
=
static_cast
<
unsigned
char
*>
(
malloc
(
nSize
)
);
sal_uLong
nReadableSize
=
0
;
if
(
!
pData
)
return
true
;
...
...
sot/source/sdstor/stgcache.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -64,7 +64,7 @@ void StgCache::SetToPage ( const rtl::Reference< StgPage >& rPage, short nOff, s
#ifdef OSL_BIGENDIAN
nVal
=
OSL_SWAPDWORD
(
nVal
);
#endif
((
sal_Int32
*
)
rPage
->
GetData
()
)[
nOff
]
=
nVal
;
static_cast
<
sal_Int32
*>
(
rPage
->
GetData
()
)[
nOff
]
=
nVal
;
SetDirty
(
rPage
);
}
}
...
...
sot/source/sdstor/stgcache.hxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -119,7 +119,7 @@ inline sal_Int32 StgCache::GetFromPage ( const rtl::Reference< StgPage >& rPage,
{
if
(
(
nOff
>=
(
short
)
(
rPage
->
GetSize
()
/
sizeof
(
sal_Int32
)
)
)
||
nOff
<
0
)
return
-
1
;
sal_Int32
n
=
((
sal_Int32
*
)
rPage
->
GetData
()
)[
nOff
];
sal_Int32
n
=
static_cast
<
sal_Int32
*>
(
rPage
->
GetData
()
)[
nOff
];
#ifdef OSL_BIGENDIAN
return
OSL_SWAPDWORD
(
n
);
#else
...
...
sot/source/sdstor/stgelem.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -366,7 +366,7 @@ bool StgEntry::Load( const void* pFrom, sal_uInt32 nBufSize )
if
(
nBufSize
<
128
)
return
false
;
SvMemoryStream
r
(
(
sal_Char
*
)
pFrom
,
nBufSize
,
StreamMode
::
READ
);
SvMemoryStream
r
(
const_cast
<
void
*>
(
pFrom
)
,
nBufSize
,
StreamMode
::
READ
);
for
(
short
i
=
0
;
i
<
32
;
i
++
)
r
.
ReadUInt16
(
nName
[
i
]
);
// 00 name as WCHAR
r
.
ReadUInt16
(
nNameLen
)
// 40 size of name in bytes including 00H
...
...
@@ -412,7 +412,7 @@ bool StgEntry::Load( const void* pFrom, sal_uInt32 nBufSize )
void
StgEntry
::
Store
(
void
*
pTo
)
{
SvMemoryStream
r
(
(
sal_Char
*
)
pTo
,
128
,
StreamMode
::
WRITE
);
SvMemoryStream
r
(
pTo
,
128
,
StreamMode
::
WRITE
);
for
(
short
i
=
0
;
i
<
32
;
i
++
)
r
.
WriteUInt16
(
nName
[
i
]
);
// 00 name as WCHAR
r
.
WriteUInt16
(
nNameLen
)
// 40 size of name in bytes including 00H
...
...
sot/source/sdstor/stgstrms.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -885,7 +885,7 @@ void* StgDataStrm::GetPtr( sal_Int32 Pos, bool bForce, bool bDirty )
{
if
(
bDirty
)
rIo
.
SetDirty
(
pPg
);
return
((
sal_uInt8
*
)
pPg
->
GetData
())
+
nOffset
;
return
static_cast
<
sal_uInt8
*>
(
pPg
->
GetData
())
+
nOffset
;
}
}
return
NULL
;
...
...
@@ -912,7 +912,7 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
if
(
nBytes
)
{
short
nRes
;
void
*
p
=
(
sal_uInt8
*
)
pBuf
+
nDone
;
void
*
p
=
static_cast
<
sal_uInt8
*>
(
pBuf
)
+
nDone
;
if
(
nBytes
==
nPageSize
)
{
pPg
=
rIo
.
Find
(
nPage
);
...
...
@@ -932,7 +932,7 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
pPg
=
rIo
.
Get
(
nPage
,
false
);
if
(
!
pPg
.
is
()
)
break
;
memcpy
(
p
,
(
sal_uInt8
*
)
pPg
->
GetData
(
)
+
nOffset
,
nBytes
);
memcpy
(
p
,
static_cast
<
sal_uInt8
*>
(
pPg
->
GetData
()
)
+
nOffset
,
nBytes
);
nRes
=
nBytes
;
}
nDone
+=
nRes
;
...
...
@@ -971,7 +971,7 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
if
(
nBytes
)
{
short
nRes
;
const
void
*
p
=
(
const
sal_uInt8
*
)
pBuf
+
nDone
;
const
void
*
p
=
static_cast
<
const
sal_uInt8
*>
(
pBuf
)
+
nDone
;
if
(
nBytes
==
nPageSize
)
{
pPg
=
rIo
.
Find
(
nPage
);
...
...
@@ -992,7 +992,7 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
pPg
=
rIo
.
Get
(
nPage
,
false
);
if
(
!
pPg
.
is
()
)
break
;
memcpy
(
(
sal_uInt8
*
)
pPg
->
GetData
(
)
+
nOffset
,
p
,
nBytes
);
memcpy
(
static_cast
<
sal_uInt8
*>
(
pPg
->
GetData
()
)
+
nOffset
,
p
,
nBytes
);
rIo
.
SetDirty
(
pPg
);
nRes
=
nBytes
;
}
...
...
@@ -1063,7 +1063,7 @@ sal_Int32 StgSmallStrm::Read( void* pBuf, sal_Int32 n )
if
(
!
pData
||
!
pData
->
Pos2Page
(
nPage
*
nPageSize
+
nOffset
)
)
break
;
// all reading through the stream
short
nRes
=
(
short
)
pData
->
Read
(
(
sal_uInt8
*
)
pBuf
+
nDone
,
nBytes
);
short
nRes
=
(
short
)
pData
->
Read
(
static_cast
<
sal_uInt8
*>
(
pBuf
)
+
nDone
,
nBytes
);
nDone
=
nDone
+
nRes
;
nPos
+=
nRes
;
n
-=
nRes
;
...
...
@@ -1106,7 +1106,7 @@ sal_Int32 StgSmallStrm::Write( const void* pBuf, sal_Int32 n )
break
;
if
(
!
pData
->
Pos2Page
(
nDataPos
)
)
break
;
short
nRes
=
(
short
)
pData
->
Write
(
(
sal_uInt8
*
)
pBuf
+
nDone
,
nBytes
);
short
nRes
=
(
short
)
pData
->
Write
(
static_cast
<
sal_uInt8
const
*>
(
pBuf
)
+
nDone
,
nBytes
);
nDone
=
nDone
+
nRes
;
nPos
+=
nRes
;
n
-=
nRes
;
...
...
@@ -1265,7 +1265,7 @@ sal_uLong StgTmpStrm::GetData( void* pData, sal_uLong n )
return
n
;
}
else
return
SvMemoryStream
::
GetData
(
(
sal_Char
*
)
pData
,
n
);
return
SvMemoryStream
::
GetData
(
pData
,
n
);
}
sal_uLong
StgTmpStrm
::
PutData
(
const
void
*
pData
,
sal_uLong
n
)
...
...
@@ -1284,7 +1284,7 @@ sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
SetError
(
pStrm
->
GetError
()
);
}
else
nNew
=
SvMemoryStream
::
PutData
(
(
sal_Char
*
)
pData
,
n
);
nNew
=
SvMemoryStream
::
PutData
(
pData
,
n
);
return
nNew
;
}
...
...
sot/source/sdstor/storage.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -143,7 +143,7 @@ sal_uLong SotStorageStream::GetData( void* pData, sal_uLong nSize )
SetError
(
pOwnStm
->
GetError
()
);
}
else
nRet
=
SvStream
::
GetData
(
(
sal_Char
*
)
pData
,
nSize
);
nRet
=
SvStream
::
GetData
(
pData
,
nSize
);
return
nRet
;
}
...
...
@@ -158,7 +158,7 @@ sal_uLong SotStorageStream::PutData( const void* pData, sal_uLong nSize )
SetError
(
pOwnStm
->
GetError
()
);
}
else
nRet
=
SvStream
::
PutData
(
(
sal_Char
*
)
pData
,
nSize
);
nRet
=
SvStream
::
PutData
(
pData
,
nSize
);
return
nRet
;
}
...
...
sot/source/sdstor/ucbstorage.cxx
Dosyayı görüntüle @
7eeabbca
...
...
@@ -901,7 +901,7 @@ sal_uLong UCBStorageStream_Impl::GetData( void* pData, sal_uLong nSize )
// copy this tail to the temporary stream
sal_uLong
aToRead
=
nSize
-
aResult
;
pData
=
(
void
*
)(
(
char
*
)
pData
+
aResult
);
pData
=
(
void
*
)(
static_cast
<
char
*>
(
pData
)
+
aResult
);
try
{
...
...
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