summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-11 09:18:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-06-11 09:59:09 +0200
commit7e2f0f6c089b898056c0269299220593be1b22f8 (patch)
tree9b77fcf70bdde82f994274fd986fde6b6c369426 /registry
parent25fc5f91ab7e6fd410ccd403ba19741a16eaab49 (diff)
Remove some more dead functionality
Change-Id: I653c85d247b2d52c75e12fc0c54701616a44abd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134148 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'registry')
-rw-r--r--registry/source/reflcnst.hxx39
-rw-r--r--registry/source/reflwrit.cxx49
2 files changed, 1 insertions, 87 deletions
diff --git a/registry/source/reflcnst.hxx b/registry/source/reflcnst.hxx
index 2254b94b511e..529d02f9d68a 100644
--- a/registry/source/reflcnst.hxx
+++ b/registry/source/reflcnst.hxx
@@ -51,11 +51,6 @@ extern const sal_uInt16 majorVersion;
#define CP_OFFSET_ENTRY_SIZE 0
#define CP_OFFSET_ENTRY_TAG static_cast<sal_uInt32>(CP_OFFSET_ENTRY_SIZE + sizeof(sal_uInt32))
#define CP_OFFSET_ENTRY_DATA static_cast<sal_uInt32>(CP_OFFSET_ENTRY_TAG + sizeof(sal_uInt16))
-#define CP_OFFSET_ENTRY_UIK1 static_cast<sal_uInt32>(CP_OFFSET_ENTRY_DATA)
-#define CP_OFFSET_ENTRY_UIK2 static_cast<sal_uInt32>(CP_OFFSET_ENTRY_UIK1 + sizeof(sal_uInt32))
-#define CP_OFFSET_ENTRY_UIK3 static_cast<sal_uInt32>(CP_OFFSET_ENTRY_UIK2 + sizeof(sal_uInt16))
-#define CP_OFFSET_ENTRY_UIK4 static_cast<sal_uInt32>(CP_OFFSET_ENTRY_UIK3 + sizeof(sal_uInt16))
-#define CP_OFFSET_ENTRY_UIK5 static_cast<sal_uInt32>(CP_OFFSET_ENTRY_UIK4 + sizeof(sal_uInt32))
#define FIELD_OFFSET_ACCESS 0
#define FIELD_OFFSET_NAME static_cast<sal_uInt32>(FIELD_OFFSET_ACCESS + sizeof(sal_uInt16))
@@ -94,25 +89,9 @@ enum CPInfoTag
CP_TAG_CONST_FLOAT = RT_TYPE_FLOAT,
CP_TAG_CONST_DOUBLE = RT_TYPE_DOUBLE,
CP_TAG_CONST_STRING = RT_TYPE_STRING,
- CP_TAG_UTF8_NAME,
- CP_TAG_UIK
+ CP_TAG_UTF8_NAME
};
-inline sal_uInt32 writeBYTE(sal_uInt8* buffer, sal_uInt8 v)
-{
- buffer[0] = v;
-
- return sizeof(sal_uInt8);
-}
-
-inline sal_uInt32 writeINT16(sal_uInt8* buffer, sal_Int16 v)
-{
- buffer[0] = static_cast<sal_uInt8>((v >> 8) & 0xFF);
- buffer[1] = static_cast<sal_uInt8>((v >> 0) & 0xFF);
-
- return sizeof(sal_Int16);
-}
-
inline sal_uInt32 writeUINT16(sal_uInt8* buffer, sal_uInt16 v)
{
buffer[0] = static_cast<sal_uInt8>((v >> 8) & 0xFF);
@@ -177,20 +156,6 @@ inline sal_uInt32 readUINT32(const sal_uInt8* buffer, sal_uInt32& v)
return sizeof(sal_uInt32);
}
-inline sal_uInt32 writeUINT64(sal_uInt8* buffer, sal_uInt64 v)
-{
- buffer[0] = static_cast<sal_uInt8>((v >> 56) & 0xFF);
- buffer[1] = static_cast<sal_uInt8>((v >> 48) & 0xFF);
- buffer[2] = static_cast<sal_uInt8>((v >> 40) & 0xFF);
- buffer[3] = static_cast<sal_uInt8>((v >> 32) & 0xFF);
- buffer[4] = static_cast<sal_uInt8>((v >> 24) & 0xFF);
- buffer[5] = static_cast<sal_uInt8>((v >> 16) & 0xFF);
- buffer[6] = static_cast<sal_uInt8>((v >> 8) & 0xFF);
- buffer[7] = static_cast<sal_uInt8>((v >> 0) & 0xFF);
-
- return sizeof(sal_uInt64);
-}
-
inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const char* v)
{
sal_uInt32 size = strlen(v) + 1;
@@ -216,8 +181,6 @@ inline sal_uInt32 readUtf8(const sal_uInt8* buffer, char* v, sal_uInt32 maxSize)
}
-sal_uInt32 writeFloat(sal_uInt8* buffer, float v);
-sal_uInt32 writeDouble(sal_uInt8* buffer, double v);
sal_uInt32 writeString(sal_uInt8* buffer, const sal_Unicode* v);
sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSize);
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 7517f2458ffa..5304d03463c8 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -19,7 +19,6 @@
#include <sal/types.h>
-#include <osl/endian.h>
#include <rtl/ustring.h>
#include <registry/refltype.hxx>
@@ -77,52 +76,4 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz
return (buff - buffer);
}
-sal_uInt32 writeFloat(sal_uInt8* buffer, float v)
-{
- union
- {
- float v;
- sal_uInt32 b;
- } x;
-
- x.v = v;
-
-#ifdef REGTYPE_IEEE_NATIVE
- writeUINT32(buffer, x.b);
-#else
-# error no IEEE
-#endif
-
- return sizeof(sal_uInt32);
-}
-
-sal_uInt32 writeDouble(sal_uInt8* buffer, double v)
-{
- union
- {
- double v;
- struct
- {
- sal_uInt32 b1;
- sal_uInt32 b2;
- } b;
- } x;
-
- x.v = v;
-
-#ifdef REGTYPE_IEEE_NATIVE
-# ifdef OSL_BIGENDIAN
- writeUINT32(buffer, x.b.b1);
- writeUINT32(buffer + sizeof(sal_uInt32), x.b.b2);
-# else
- writeUINT32(buffer, x.b.b2);
- writeUINT32(buffer + sizeof(sal_uInt32), x.b.b1);
-# endif
-#else
-# error no IEEE
-#endif
-
- return (sizeof(sal_uInt32) + sizeof(sal_uInt32));
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */