23#include <com/sun/star/awt/FontDescriptor.hpp>
29const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
30 const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream,
31 const css::awt::FontDescriptor& _rFont)
33 _rxOutStream->writeUTF( _rFont.Name );
34 _rxOutStream->writeShort( _rFont.Height );
35 _rxOutStream->writeShort( _rFont.Width );
36 _rxOutStream->writeUTF( _rFont.StyleName );
37 _rxOutStream->writeShort( _rFont.Family );
38 _rxOutStream->writeShort( _rFont.CharSet );
39 _rxOutStream->writeShort( _rFont.Pitch );
40 _rxOutStream->writeDouble( _rFont.CharacterWidth );
41 _rxOutStream->writeDouble( _rFont.Weight );
42 _rxOutStream->writeShort(
static_cast< sal_Int16
>(_rFont.Slant) );
43 _rxOutStream->writeShort( _rFont.Underline );
44 _rxOutStream->writeShort( _rFont.Strikeout );
45 _rxOutStream->writeDouble( _rFont.Orientation );
46 _rxOutStream->writeBoolean( _rFont.Kerning );
47 _rxOutStream->writeBoolean( _rFont.WordLineMode );
48 _rxOutStream->writeShort( _rFont.Type );
54const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
55 const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream,
56 css::awt::FontDescriptor& _rFont)
59 _rFont.Name = _rxInStream->readUTF();
60 _rFont.Height = _rxInStream->readShort();
61 _rFont.Width = _rxInStream->readShort();
62 _rFont.StyleName = _rxInStream->readUTF();
63 _rFont.Family = _rxInStream->readShort();
64 _rFont.CharSet = _rxInStream->readShort();
65 _rFont.Pitch = _rxInStream->readShort();
66 _rFont.CharacterWidth =
static_cast< float >(_rxInStream->readDouble());
67 _rFont.Weight =
static_cast< float >(_rxInStream->readDouble());
68 _rFont.Slant =
static_cast<css::awt::FontSlant
>(_rxInStream->readShort());
69 _rFont.Underline = _rxInStream->readShort();
70 _rFont.Strikeout = _rxInStream->readShort();
71 _rFont.Orientation =
static_cast< float >(_rxInStream->readDouble());
72 _rFont.Kerning = _rxInStream->readBoolean() != 0;
73 _rFont.WordLineMode = _rxInStream->readBoolean() != 0;
74 _rFont.Type = _rxInStream->readShort();
79const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream,
bool& _rVal)
81 _rVal = _rxInStream->readBoolean();
86const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream,
bool _bVal)
88 _rxOutStream->writeBoolean(_bVal);
93const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, OUString& rStr)
95 rStr = _rxInStream->readUTF();
100const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream,
const OUString& rStr)
102 _rxOutStream->writeUTF(rStr);
107const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, sal_Int16& _rValue)
109 _rValue = _rxInStream->readShort();
114const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue)
116 _rxOutStream->writeShort(
_nValue);
121const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue)
123 _rValue = _rxInStream->readShort();
128const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue)
130 _rxOutStream->writeShort(
_nValue);
135const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue)
137 _rValue = _rxInStream->readLong();
142const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue)
144 _rxOutStream->writeLong(
_nValue);
149const css::uno::Reference<css::io::XObjectInputStream>&
operator >> (
const css::uno::Reference<css::io::XObjectInputStream>& _rxInStream, sal_Int32& _rValue)
151 _rValue = _rxInStream->readLong();
156const css::uno::Reference<css::io::XObjectOutputStream>&
operator << (
const css::uno::Reference<css::io::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue)
158 _rxOutStream->writeLong(
_nValue);
162ByteReader::~ByteReader() {}
164ByteWriter::~ByteWriter() {}
const css::uno::Reference< css::io::XObjectInputStream > & operator>>(const css::uno::Reference< css::io::XObjectInputStream > &_rxInStream, css::awt::FontDescriptor &_rFont)
const css::uno::Reference< css::io::XObjectOutputStream > & operator<<(const css::uno::Reference< css::io::XObjectOutputStream > &_rxOutStream, const css::awt::FontDescriptor &_rFont)