summaryrefslogtreecommitdiff
path: root/package/inc/ByteChucker.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-12 09:42:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-12 11:49:03 +0000
commit2c2e80da68efcee5bffdb61d9c078f9360a639a4 (patch)
treeecd55cd5c97f1dbe2580d033c0fcda6568ff849f /package/inc/ByteChucker.hxx
parentc928840ef2a41ca373ad9070d8e9160c216260da (diff)
callcatcher: remove newly unused code
and rework reads to just return the read value Change-Id: I5d2f01064465c65859ec4ba031ec9dfa16403487
Diffstat (limited to 'package/inc/ByteChucker.hxx')
-rw-r--r--package/inc/ByteChucker.hxx37
1 files changed, 31 insertions, 6 deletions
diff --git a/package/inc/ByteChucker.hxx b/package/inc/ByteChucker.hxx
index 7e3e60c0ce65..e317e8acd6c4 100644
--- a/package/inc/ByteChucker.hxx
+++ b/package/inc/ByteChucker.hxx
@@ -48,12 +48,37 @@ public:
sal_Int64 GetPosition()
throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
- ByteChucker& WriteInt8(sal_Int8 nInt8);
- ByteChucker& WriteInt16(sal_Int16 nInt16);
- ByteChucker& WriteInt32(sal_Int32 nInt32);
- ByteChucker& WriteUInt8(sal_uInt8 nuInt8);
- ByteChucker& WriteUInt16(sal_uInt16 nuInt16);
- ByteChucker& WriteUInt32(sal_uInt32 nuInt32);
+ void WriteInt16(sal_Int16 nInt16)
+ {
+ p2Sequence[0] = static_cast< sal_Int8 >((nInt16 >> 0 ) & 0xFF);
+ p2Sequence[1] = static_cast< sal_Int8 >((nInt16 >> 8 ) & 0xFF);
+ WriteBytes( a2Sequence );
+ }
+
+ void WriteInt32(sal_Int32 nInt32)
+ {
+ p4Sequence[0] = static_cast< sal_Int8 >((nInt32 >> 0 ) & 0xFF);
+ p4Sequence[1] = static_cast< sal_Int8 >((nInt32 >> 8 ) & 0xFF);
+ p4Sequence[2] = static_cast< sal_Int8 >((nInt32 >> 16 ) & 0xFF);
+ p4Sequence[3] = static_cast< sal_Int8 >((nInt32 >> 24 ) & 0xFF);
+ WriteBytes( a4Sequence );
+ }
+
+ void WriteUInt16(sal_uInt16 nuInt16)
+ {
+ p2Sequence[0] = static_cast< sal_Int8 >((nuInt16 >> 0 ) & 0xFF);
+ p2Sequence[1] = static_cast< sal_Int8 >((nuInt16 >> 8 ) & 0xFF);
+ WriteBytes( a2Sequence );
+ }
+
+ void WriteUInt32(sal_uInt32 nuInt32)
+ {
+ p4Sequence[0] = static_cast < sal_Int8 > ((nuInt32 >> 0 ) & 0xFF);
+ p4Sequence[1] = static_cast < sal_Int8 > ((nuInt32 >> 8 ) & 0xFF);
+ p4Sequence[2] = static_cast < sal_Int8 > ((nuInt32 >> 16 ) & 0xFF);
+ p4Sequence[3] = static_cast < sal_Int8 > ((nuInt32 >> 24 ) & 0xFF);
+ WriteBytes( a4Sequence );
+ }
};
#endif