1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fltbase.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __FLTBASE_HXX__
31 #define __FLTBASE_HXX__
33 #include <tools/stream.hxx>
34 #include <tools/string.hxx>
40 sal_Char
*pReadBuff
; // Groessenangabe
41 INT32 nBytesLeft
; // noch zu lesende Bytes des aktuelle Records
43 CharSet eQuellChar
; // Quell-Zeichensatz (interner Zeichensatz)
44 // CharSet eZielChar; // Ziel-Zeichensatz
46 USHORT nTab
; // z.Zt. bearbeitete Tabelle
47 USHORT nReadBuffSize
;// temporaerer Lesepuffer mit
49 // ----------------------------------------------------------
50 inline void ReadChar( char &rC
);
51 inline void ReadByte( BYTE
&rN
);
52 inline void Read( short &rN
);
53 inline void ReadUnicode( sal_Unicode
&rU
);
54 inline void Read( BYTE
&rN0
, USHORT
&rN1
, USHORT
&rN2
);
55 inline void Read( USHORT
&rN
);
56 inline void Read( USHORT
&rN1
, USHORT
&rN2
);
57 inline void Read( USHORT
&rN1
, USHORT
&rN2
, USHORT
&rN3
, USHORT
&rN4
);
58 inline void Read( double &rF
);
59 void Read( String
&rS
); // liest 0-terminierten C-String!
60 inline void ClearBytesLeft( void );
64 inline void SwFilterBase::ReadChar( char &rC
)
70 inline void SwFilterBase::ReadByte( BYTE
&rN
)
76 inline void SwFilterBase::ReadUnicode( sal_Unicode
&rU
)
81 rU
= ByteString::ConvertToUnicode(cC
, eQuellChar
);
86 inline void SwFilterBase::Read( short &rN
)
92 inline void SwFilterBase::Read( BYTE
&rN0
, USHORT
&rN1
, USHORT
&rN2
)
94 *pIn
>> rN0
>> rN1
>> rN2
;
98 inline void SwFilterBase::Read( USHORT
&rN
)
104 inline void SwFilterBase::Read( USHORT
&rN1
, USHORT
&rN2
)
110 inline void SwFilterBase::Read( USHORT
&rN1
, USHORT
&rN2
, USHORT
&rN3
, USHORT
&rN4
)
112 *pIn
>> rN1
>> rN2
>> rN3
>> rN4
;
116 inline void SwFilterBase::Read( double &rF
)
122 inline void SwFilterBase::ClearBytesLeft( void )
124 pIn
->SeekRel( nBytesLeft
);