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
d963fd84
Kaydet (Commit)
d963fd84
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: I192bc9653d8492a850a5e259e15782bd3bb24922
üst
8375ac01
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
61 deletions
+61
-61
keyimpl.cxx
registry/source/keyimpl.cxx
+27
-27
reflread.cxx
registry/source/reflread.cxx
+0
-0
reflwrit.cxx
registry/source/reflwrit.cxx
+3
-3
regimpl.cxx
registry/source/regimpl.cxx
+15
-15
registry.cxx
registry/source/registry.cxx
+12
-12
regkey.cxx
registry/source/regkey.cxx
+4
-4
No files found.
registry/source/keyimpl.cxx
Dosyayı görüntüle @
d963fd84
...
...
@@ -99,7 +99,7 @@ RegError ORegKey::openSubKeys(const OUString& keyName, RegKeyHandle** phOpenSubK
*
pnSubKeys
=
nSubKeys
;
ORegKey
**
pSubKeys
;
pSubKeys
=
(
ORegKey
**
)
rtl_allocateZeroMemory
(
nSubKeys
*
sizeof
(
ORegKey
*
));
pSubKeys
=
static_cast
<
ORegKey
**>
(
rtl_allocateZeroMemory
(
nSubKeys
*
sizeof
(
ORegKey
*
)
));
OStoreDirectory
::
iterator
iter
;
OStoreDirectory
rStoreDir
(
pKey
->
getStoreDir
());
...
...
@@ -163,7 +163,7 @@ RegError ORegKey::getKeyNames(const OUString& keyName,
*
pnSubKeys
=
nSubKeys
;
rtl_uString
**
pSubKeys
=
0
;
pSubKeys
=
(
rtl_uString
**
)
rtl_allocateZeroMemory
(
nSubKeys
*
sizeof
(
rtl_uString
*
));
pSubKeys
=
static_cast
<
rtl_uString
**>
(
rtl_allocateZeroMemory
(
nSubKeys
*
sizeof
(
rtl_uString
*
)
));
OStoreDirectory
::
iterator
iter
;
OStoreDirectory
rStoreDir
(
pKey
->
getStoreDir
());
...
...
@@ -243,7 +243,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
...
...
@@ -270,7 +270,7 @@ RegError ORegKey::getValueInfo(const OUString& valueName, RegValueType* pValueTy
if
(
*
pValueType
>
4
)
{
rtl_freeMemory
(
pBuffer
);
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
4
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
4
)
);
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
4
,
readBytes
);
readUINT32
(
pBuffer
,
size
);
...
...
@@ -315,7 +315,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
sal_uInt32
size
=
vSize
;
sal_uInt8
type
=
(
sal_uInt8
)
vType
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
)
);
memcpy
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
...
...
@@ -326,13 +326,13 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
memcpy
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
break
;
case
RG_VALUETYPE_LONG
:
writeINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
*
((
sal_Int32
*
)
value
));
writeINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
*
static_cast
<
sal_Int32
*>
(
value
));
break
;
case
RG_VALUETYPE_STRING
:
writeUtf8
(
pBuffer
+
VALUE_HEADEROFFSET
,
(
const
sal_Char
*
)
value
);
writeUtf8
(
pBuffer
+
VALUE_HEADEROFFSET
,
static_cast
<
const
sal_Char
*>
(
value
)
);
break
;
case
RG_VALUETYPE_UNICODE
:
writeString
(
pBuffer
+
VALUE_HEADEROFFSET
,
(
const
sal_Unicode
*
)
value
);
writeString
(
pBuffer
+
VALUE_HEADEROFFSET
,
static_cast
<
const
sal_Unicode
*>
(
value
)
);
break
;
case
RG_VALUETYPE_BINARY
:
memcpy
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
...
...
@@ -387,7 +387,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32* pValueL
size
+=
len
*
4
;
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_LONGLIST
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
)
);
memcpy
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
...
...
@@ -450,7 +450,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu
}
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_STRINGLIST
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
)
);
memcpy
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
...
...
@@ -518,7 +518,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
}
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_UNICODELIST
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
)
);
memcpy
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
...
...
@@ -580,7 +580,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
...
...
@@ -605,7 +605,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
return
REG_INVALID_VALUE
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
...
...
@@ -624,13 +624,13 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
memcpy
(
value
,
pBuffer
,
valueSize
);
break
;
case
RG_VALUETYPE_LONG
:
readINT32
(
pBuffer
,
*
((
sal_Int32
*
)
value
));
readINT32
(
pBuffer
,
*
static_cast
<
sal_Int32
*>
(
value
));
break
;
case
RG_VALUETYPE_STRING
:
readUtf8
(
pBuffer
,
(
sal_Char
*
)
value
,
valueSize
);
readUtf8
(
pBuffer
,
static_cast
<
sal_Char
*>
(
value
)
,
valueSize
);
break
;
case
RG_VALUETYPE_UNICODE
:
readString
(
pBuffer
,
(
sal_Unicode
*
)
value
,
valueSize
);
readString
(
pBuffer
,
static_cast
<
sal_Unicode
*>
(
value
)
,
valueSize
);
break
;
case
RG_VALUETYPE_BINARY
:
memcpy
(
value
,
pBuffer
,
valueSize
);
...
...
@@ -676,7 +676,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
...
...
@@ -718,7 +718,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
rtl_freeMemory
(
pBuffer
);
return
REG_INVALID_VALUE
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
...
...
@@ -747,7 +747,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue
return
REG_INVALID_VALUE
;
}
*
pLen
=
len
;
sal_Int32
*
pVList
=
(
sal_Int32
*
)
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Int32
));
sal_Int32
*
pVList
=
static_cast
<
sal_Int32
*>
(
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Int32
)
));
sal_uInt32
offset
=
4
;
// initial 4 bytes for the size of the array;
...
...
@@ -790,7 +790,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
...
...
@@ -823,7 +823,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
rtl_freeMemory
(
pBuffer
);
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
...
...
@@ -844,7 +844,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
readUINT32
(
pBuffer
,
len
);
*
pLen
=
len
;
sal_Char
**
pVList
=
(
sal_Char
**
)
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Char
*
));
sal_Char
**
pVList
=
static_cast
<
sal_Char
**>
(
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Char
*
)
));
sal_uInt32
offset
=
4
;
// initial 4 bytes for the size of the array;
sal_uInt32
sLen
=
0
;
...
...
@@ -856,7 +856,7 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal
offset
+=
4
;
pValue
=
(
sal_Char
*
)
rtl_allocateMemory
(
sLen
);
pValue
=
static_cast
<
sal_Char
*>
(
rtl_allocateMemory
(
sLen
)
);
readUtf8
(
pBuffer
+
offset
,
pValue
,
sLen
);
pVList
[
i
]
=
pValue
;
...
...
@@ -896,7 +896,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
readBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
readBytes
)
)
...
...
@@ -929,7 +929,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
rtl_freeMemory
(
pBuffer
);
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
readBytes
)
)
{
...
...
@@ -950,7 +950,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
readUINT32
(
pBuffer
,
len
);
*
pLen
=
len
;
sal_Unicode
**
pVList
=
(
sal_Unicode
**
)
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Unicode
*
));
sal_Unicode
**
pVList
=
static_cast
<
sal_Unicode
**>
(
rtl_allocateZeroMemory
(
len
*
sizeof
(
sal_Unicode
*
)
));
sal_uInt32
offset
=
4
;
// initial 4 bytes for the size of the array;
sal_uInt32
sLen
=
0
;
...
...
@@ -962,7 +962,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
offset
+=
4
;
pValue
=
(
sal_Unicode
*
)
rtl_allocateMemory
((
sLen
/
2
)
*
sizeof
(
sal_Unicode
));
pValue
=
static_cast
<
sal_Unicode
*>
(
rtl_allocateMemory
((
sLen
/
2
)
*
sizeof
(
sal_Unicode
)
));
readString
(
pBuffer
+
offset
,
pValue
,
sLen
);
pVList
[
i
]
=
pValue
;
...
...
registry/source/reflread.cxx
Dosyayı görüntüle @
d963fd84
This diff is collapsed.
Click to expand it.
registry/source/reflwrit.cxx
Dosyayı görüntüle @
d963fd84
...
...
@@ -1170,7 +1170,7 @@ extern "C" {
static
void
TYPEREG_CALLTYPE
acquire
(
TypeWriterImpl
hEntry
)
{
TypeWriter
*
pEntry
=
(
TypeWriter
*
)
hEntry
;
TypeWriter
*
pEntry
=
static_cast
<
TypeWriter
*>
(
hEntry
)
;
if
(
pEntry
!=
NULL
)
pEntry
->
m_refCount
++
;
...
...
@@ -1178,7 +1178,7 @@ static void TYPEREG_CALLTYPE acquire(TypeWriterImpl hEntry)
static
void
TYPEREG_CALLTYPE
release
(
TypeWriterImpl
hEntry
)
{
TypeWriter
*
pEntry
=
(
TypeWriter
*
)
hEntry
;
TypeWriter
*
pEntry
=
static_cast
<
TypeWriter
*>
(
hEntry
)
;
if
(
pEntry
!=
NULL
)
{
...
...
@@ -1189,7 +1189,7 @@ static void TYPEREG_CALLTYPE release(TypeWriterImpl hEntry)
static
void
TYPEREG_CALLTYPE
setUik
(
TypeWriterImpl
hEntry
,
const
RTUik
*
uik
)
{
TypeWriter
*
pEntry
=
(
TypeWriter
*
)
hEntry
;
TypeWriter
*
pEntry
=
static_cast
<
TypeWriter
*>
(
hEntry
)
;
if
(
pEntry
!=
NULL
)
{
...
...
registry/source/regimpl.cxx
Dosyayı görüntüle @
d963fd84
...
...
@@ -647,7 +647,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
REG_GUARD
(
m_mutex
);
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
pKey
=
m_openKeyTable
[
ROOT
];
...
...
@@ -656,8 +656,8 @@ RegError ORegistry::createKey(RegKeyHandle hKey, const OUString& keyName,
if
(
m_openKeyTable
.
count
(
sFullKeyName
)
>
0
)
{
*
phNewKey
=
m_openKeyTable
[
sFullKeyName
];
((
ORegKey
*
)
*
phNewKey
)
->
acquire
();
((
ORegKey
*
)
*
phNewKey
)
->
setDeleted
(
false
);
static_cast
<
ORegKey
*>
(
*
phNewKey
)
->
acquire
();
static_cast
<
ORegKey
*>
(
*
phNewKey
)
->
setDeleted
(
false
);
return
REG_NO_ERROR
;
}
...
...
@@ -710,7 +710,7 @@ RegError ORegistry::openKey(RegKeyHandle hKey, const OUString& keyName,
REG_GUARD
(
m_mutex
);
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
pKey
=
m_openKeyTable
[
ROOT
];
...
...
@@ -1040,7 +1040,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
rwBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
rwBytes
))
...
...
@@ -1061,7 +1061,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
rtl_freeMemory
(
pBuffer
);
nSize
=
VALUE_HEADERSIZE
+
valueSize
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
nSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
nSize
)
);
if
(
rValue
.
readAt
(
0
,
pBuffer
,
nSize
,
rwBytes
))
{
...
...
@@ -1139,7 +1139,7 @@ RegError ORegistry::checkBlop(OStoreStream& rValue,
return
REG_INVALID_VALUE
;
}
sal_uInt8
*
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
sal_uInt8
*
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
RegValueType
valueType
;
sal_uInt32
valueSize
;
sal_uInt32
rwBytes
;
...
...
@@ -1155,7 +1155,7 @@ RegError ORegistry::checkBlop(OStoreStream& rValue,
if
(
valueType
==
RG_VALUETYPE_BINARY
)
{
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
!
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
rwBytes
)
&&
(
rwBytes
==
valueSize
))
{
...
...
@@ -1304,7 +1304,7 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue,
sal_uInt32
aBlopSize
=
writer
.
getBlopSize
();
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_BINARY
;
sal_uInt8
*
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
aBlopSize
);
sal_uInt8
*
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
aBlopSize
)
);
memcpy
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
aBlopSize
);
...
...
@@ -1413,7 +1413,7 @@ ORegKey* ORegistry::getRootKey()
RegError
ORegistry
::
dumpRegistry
(
RegKeyHandle
hKey
)
const
{
ORegKey
*
pKey
=
(
ORegKey
*
)
hKey
;
ORegKey
*
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
OUString
sName
;
RegError
_ret
=
REG_NO_ERROR
;
OStoreDirectory
::
iterator
iter
;
...
...
@@ -1476,7 +1476,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_
return
REG_VALUE_NOT_EXISTS
;
}
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
VALUE_HEADERSIZE
)
);
sal_uInt32
rwBytes
;
if
(
rValue
.
readAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
,
rwBytes
))
...
...
@@ -1494,7 +1494,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_
valueType
=
(
RegValueType
)
type
;
readUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
valueSize
);
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
valueSize
);
pBuffer
=
static_cast
<
sal_uInt8
*>
(
rtl_allocateMemory
(
valueSize
)
);
if
(
rValue
.
readAt
(
VALUE_HEADEROFFSET
,
pBuffer
,
valueSize
,
rwBytes
))
{
rtl_freeMemory
(
pBuffer
);
...
...
@@ -1527,7 +1527,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_
break
;
case
2
:
{
sal_Char
*
value
=
(
sal_Char
*
)
rtl_allocateMemory
(
valueSize
);
sal_Char
*
value
=
static_cast
<
sal_Char
*>
(
rtl_allocateMemory
(
valueSize
)
);
readUtf8
(
pBuffer
,
value
,
valueSize
);
fprintf
(
stdout
,
"%sValue: Type = RG_VALUETYPE_STRING
\n
"
,
indent
);
fprintf
(
...
...
@@ -1622,7 +1622,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_
offset
+=
4
;
// 4 Bytes (sal_uInt32) fuer die Groesse des strings in Bytes
sal_Char
*
pValue
=
(
sal_Char
*
)
rtl_allocateMemory
(
sLen
);
sal_Char
*
pValue
=
static_cast
<
sal_Char
*>
(
rtl_allocateMemory
(
sLen
)
);
readUtf8
(
pBuffer
+
offset
,
pValue
,
sLen
);
if
(
offset
>
8
)
...
...
@@ -1660,7 +1660,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_
offset
+=
4
;
// 4 Bytes (sal_uInt32) fuer die Groesse des strings in Bytes
sal_Unicode
*
pValue
=
(
sal_Unicode
*
)
rtl_allocateMemory
((
sLen
/
2
)
*
sizeof
(
sal_Unicode
));
sal_Unicode
*
pValue
=
static_cast
<
sal_Unicode
*>
(
rtl_allocateMemory
((
sLen
/
2
)
*
sizeof
(
sal_Unicode
)
));
readString
(
pBuffer
+
offset
,
pValue
,
sLen
);
if
(
offset
>
8
)
...
...
registry/source/registry.cxx
Dosyayı görüntüle @
d963fd84
...
...
@@ -44,7 +44,7 @@ extern "C" {
static
void
REGISTRY_CALLTYPE
acquire
(
RegHandle
hReg
)
{
ORegistry
*
pReg
=
(
ORegistry
*
)
hReg
;
ORegistry
*
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
pReg
!=
NULL
)
pReg
->
acquire
();
...
...
@@ -56,7 +56,7 @@ static void REGISTRY_CALLTYPE acquire(RegHandle hReg)
static
void
REGISTRY_CALLTYPE
release
(
RegHandle
hReg
)
{
ORegistry
*
pReg
=
(
ORegistry
*
)
hReg
;
ORegistry
*
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
pReg
)
{
...
...
@@ -76,7 +76,7 @@ static RegError REGISTRY_CALLTYPE getName(RegHandle hReg, rtl_uString** pName)
{
if
(
hReg
)
{
ORegistry
*
pReg
=
(
ORegistry
*
)
hReg
;
ORegistry
*
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
pReg
->
isOpen
()
)
{
rtl_uString_assign
(
pName
,
pReg
->
getName
().
pData
);
...
...
@@ -99,7 +99,7 @@ static RegError REGISTRY_CALLTYPE getName(RegHandle hReg, rtl_uString** pName)
static
sal_Bool
REGISTRY_CALLTYPE
isReadOnly
(
RegHandle
hReg
)
{
if
(
hReg
)
return
((
ORegistry
*
)
hReg
)
->
isReadOnly
();
return
static_cast
<
ORegistry
*>
(
hReg
)
->
isReadOnly
();
else
return
sal_False
;
}
...
...
@@ -136,7 +136,7 @@ static RegError REGISTRY_CALLTYPE openRootKey(RegHandle hReg,
if
(
hReg
)
{
pReg
=
(
ORegistry
*
)
hReg
;
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
!
pReg
->
isOpen
())
return
REG_REGISTRY_NOT_OPEN
;
}
else
...
...
@@ -183,7 +183,7 @@ static RegError REGISTRY_CALLTYPE closeRegistry(RegHandle hReg)
if
(
hReg
)
{
pReg
=
(
ORegistry
*
)
hReg
;
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
!
pReg
->
isOpen
())
return
REG_REGISTRY_NOT_OPEN
;
...
...
@@ -214,7 +214,7 @@ static RegError REGISTRY_CALLTYPE destroyRegistry(RegHandle hReg,
if
(
hReg
)
{
pReg
=
(
ORegistry
*
)
hReg
;
pReg
=
static_cast
<
ORegistry
*>
(
hReg
)
;
if
(
!
pReg
->
isOpen
())
return
REG_INVALID_REGISTRY
;
...
...
@@ -456,7 +456,7 @@ RegError REGISTRY_CALLTYPE reg_loadKey(RegKeyHandle hKey,
ORegKey
*
pKey
;
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
return
REG_INVALID_KEY
;
...
...
@@ -473,7 +473,7 @@ RegError REGISTRY_CALLTYPE reg_saveKey(RegKeyHandle hKey,
ORegKey
*
pKey
;
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
return
REG_INVALID_KEY
;
...
...
@@ -492,7 +492,7 @@ RegError REGISTRY_CALLTYPE reg_mergeKey(RegKeyHandle hKey,
ORegKey
*
pKey
;
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
return
REG_INVALID_KEY
;
...
...
@@ -577,7 +577,7 @@ RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry)
{
if
(
hRegistry
)
{
ORegistry
*
pReg
=
(
ORegistry
*
)
hRegistry
;
ORegistry
*
pReg
=
static_cast
<
ORegistry
*>
(
hRegistry
)
;
delete
(
pReg
);
return
REG_NO_ERROR
;
}
else
...
...
@@ -605,7 +605,7 @@ RegError REGISTRY_CALLTYPE reg_dumpRegistry(RegKeyHandle hKey)
ORegKey
*
pKey
;
if
(
hKey
)
pKey
=
(
ORegKey
*
)
hKey
;
pKey
=
static_cast
<
ORegKey
*>
(
hKey
)
;
else
return
REG_INVALID_KEY
;
...
...
registry/source/regkey.cxx
Dosyayı görüntüle @
d963fd84
...
...
@@ -154,7 +154,7 @@ RegError REGISTRY_CALLTYPE closeSubKeys(RegKeyHandle* phSubKeys,
if
(
phSubKeys
==
0
||
nSubKeys
==
0
)
return
REG_INVALID_KEY
;
ORegistry
*
pReg
=
((
ORegKey
*
)(
phSubKeys
[
0
])
)
->
getRegistry
();
ORegistry
*
pReg
=
static_cast
<
ORegKey
*>
(
phSubKeys
[
0
]
)
->
getRegistry
();
for
(
sal_uInt32
i
=
0
;
i
<
nSubKeys
;
i
++
)
{
(
void
)
pReg
->
closeKey
(
phSubKeys
[
i
]);
...
...
@@ -583,7 +583,7 @@ RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType,
break
;
case
6
:
{
sal_Char
**
pVList
=
(
sal_Char
**
)
pValueList
;
sal_Char
**
pVList
=
static_cast
<
sal_Char
**>
(
pValueList
)
;
for
(
sal_uInt32
i
=
0
;
i
<
len
;
i
++
)
{
rtl_freeMemory
(
pVList
[
i
]);
...
...
@@ -594,7 +594,7 @@ RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType,
break
;
case
7
:
{
sal_Unicode
**
pVList
=
(
sal_Unicode
**
)
pValueList
;
sal_Unicode
**
pVList
=
static_cast
<
sal_Unicode
**>
(
pValueList
)
;
for
(
sal_uInt32
i
=
0
;
i
<
len
;
i
++
)
{
rtl_freeMemory
(
pVList
[
i
]);
...
...
@@ -771,7 +771,7 @@ RegError REGISTRY_CALLTYPE reg_getKeyName(RegKeyHandle hKey, rtl_uString** pKeyN
{
if
(
hKey
)
{
rtl_uString_assign
(
pKeyName
,
((
ORegKey
*
)
hKey
)
->
getName
().
pData
);
rtl_uString_assign
(
pKeyName
,
static_cast
<
ORegKey
*>
(
hKey
)
->
getName
().
pData
);
return
REG_NO_ERROR
;
}
else
{
...
...
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