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
f6acb53b
Kaydet (Commit)
f6acb53b
authored
Agu 04, 2012
tarafından
Arnaud Versini
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace usage of rtl/memory.h in registry with equivalent from string.h
Change-Id: I3c442b7c3743684f62cc5ffc3c4b0926ff0db999
üst
7378c5cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
+15
-14
keyimpl.cxx
registry/source/keyimpl.cxx
+11
-10
reflwrit.cxx
registry/source/reflwrit.cxx
+1
-1
regimpl.cxx
registry/source/regimpl.cxx
+2
-2
regcompare.cxx
registry/tools/regcompare.cxx
+1
-1
No files found.
registry/source/keyimpl.cxx
Dosyayı görüntüle @
f6acb53b
...
...
@@ -18,11 +18,12 @@
*/
#include <string.h>
#include "keyimpl.hxx"
#include "reflcnst.hxx"
#include "rtl/alloc.h"
#include "rtl/memory.h"
#include "rtl/ustrbuf.hxx"
using
rtl
::
OUString
;
...
...
@@ -316,14 +317,14 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
sal_uInt8
type
=
(
sal_uInt8
)
vType
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
rtl_copyMemor
y
(
pBuffer
,
&
type
,
1
);
memcp
y
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
switch
(
vType
)
{
case
RG_VALUETYPE_NOT_DEFINED
:
rtl_copyMemor
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
memcp
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
break
;
case
RG_VALUETYPE_LONG
:
writeINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
*
((
sal_Int32
*
)
value
));
...
...
@@ -335,7 +336,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
writeString
(
pBuffer
+
VALUE_HEADEROFFSET
,
(
const
sal_Unicode
*
)
value
);
break
;
case
RG_VALUETYPE_BINARY
:
rtl_copyMemor
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
memcp
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
value
,
size
);
break
;
default
:
OSL_ASSERT
(
false
);
...
...
@@ -388,7 +389,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32* pValueL
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_LONGLIST
;
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
size
);
rtl_copyMemor
y
(
pBuffer
,
&
type
,
1
);
memcp
y
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
writeUINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
len
);
...
...
@@ -451,7 +452,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
);
rtl_copyMemor
y
(
pBuffer
,
&
type
,
1
);
memcp
y
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
writeUINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
len
);
...
...
@@ -519,7 +520,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
);
rtl_copyMemor
y
(
pBuffer
,
&
type
,
1
);
memcp
y
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
size
);
writeUINT32
(
pBuffer
+
VALUE_HEADEROFFSET
,
len
);
...
...
@@ -621,7 +622,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
switch
(
valueType
)
{
case
RG_VALUETYPE_NOT_DEFINED
:
rtl_copyMemor
y
(
value
,
pBuffer
,
valueSize
);
memcp
y
(
value
,
pBuffer
,
valueSize
);
break
;
case
RG_VALUETYPE_LONG
:
readINT32
(
pBuffer
,
*
((
sal_Int32
*
)
value
));
...
...
@@ -633,12 +634,12 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const
readString
(
pBuffer
,
(
sal_Unicode
*
)
value
,
valueSize
);
break
;
case
RG_VALUETYPE_BINARY
:
rtl_copyMemor
y
(
value
,
pBuffer
,
valueSize
);
memcp
y
(
value
,
pBuffer
,
valueSize
);
break
;
case
RG_VALUETYPE_LONGLIST
:
case
RG_VALUETYPE_STRINGLIST
:
case
RG_VALUETYPE_UNICODELIST
:
rtl_copyMemor
y
(
value
,
pBuffer
,
valueSize
);
memcp
y
(
value
,
pBuffer
,
valueSize
);
break
;
}
...
...
registry/source/reflwrit.cxx
Dosyayı görüntüle @
f6acb53b
...
...
@@ -403,7 +403,7 @@ void FieldEntry::setData(const OString& name,
if
(
constValueType
==
RT_TYPE_STRING
&&
constValue
.
aString
!=
0
)
{
sal_Int32
n
=
rtl_ustr_getLength
(
constValue
.
aString
)
+
1
;
newValue
=
new
sal_Unicode
[
n
];
rtl_copyMemor
y
(
newValue
,
constValue
.
aString
,
n
*
sizeof
(
sal_Unicode
));
memcp
y
(
newValue
,
constValue
.
aString
,
n
*
sizeof
(
sal_Unicode
));
}
m_name
=
name
;
...
...
registry/source/regimpl.cxx
Dosyayı görüntüle @
f6acb53b
...
...
@@ -1311,9 +1311,9 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue,
sal_uInt8
type
=
(
sal_uInt8
)
RG_VALUETYPE_BINARY
;
sal_uInt8
*
pBuffer
=
(
sal_uInt8
*
)
rtl_allocateMemory
(
VALUE_HEADERSIZE
+
aBlopSize
);
rtl_copyMemor
y
(
pBuffer
,
&
type
,
1
);
memcp
y
(
pBuffer
,
&
type
,
1
);
writeUINT32
(
pBuffer
+
VALUE_TYPEOFFSET
,
aBlopSize
);
rtl_copyMemor
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
pBlop
,
aBlopSize
);
memcp
y
(
pBuffer
+
VALUE_HEADEROFFSET
,
pBlop
,
aBlopSize
);
sal_uInt32
rwBytes
;
if
(
rTargetValue
.
writeAt
(
0
,
pBuffer
,
VALUE_HEADERSIZE
+
aBlopSize
,
rwBytes
))
...
...
registry/tools/regcompare.cxx
Dosyayı görüntüle @
f6acb53b
...
...
@@ -1407,7 +1407,7 @@ static sal_uInt32 checkValueDifference(
std
::
vector
<
sal_uInt8
>
value2
(
size2
);
key2
.
getValue
(
tmpName
,
&
value2
[
0
]);
bEqual
=
(
rtl_compareMemory
(
&
value1
[
0
],
&
value2
[
0
],
value1
.
size
())
==
0
);
bEqual
=
(
memcmp
(
&
value1
[
0
],
&
value2
[
0
],
value1
.
size
())
==
0
);
if
(
!
bEqual
&&
valueType1
==
RG_VALUETYPE_BINARY
&&
valueType2
==
RG_VALUETYPE_BINARY
)
{
typereg
::
Reader
reader1
(
&
value1
[
0
],
value1
.
size
(),
false
,
TYPEREG_VERSION_1
);
...
...
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