xref: /aoo42x/main/tools/inc/tools/vcompat.hxx (revision 8b851043)
1*8b851043SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*8b851043SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*8b851043SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*8b851043SAndrew Rist  * distributed with this work for additional information
6*8b851043SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*8b851043SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*8b851043SAndrew Rist  * "License"); you may not use this file except in compliance
9*8b851043SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*8b851043SAndrew Rist  *
11*8b851043SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*8b851043SAndrew Rist  *
13*8b851043SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*8b851043SAndrew Rist  * software distributed under the License is distributed on an
15*8b851043SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*8b851043SAndrew Rist  * KIND, either express or implied.  See the License for the
17*8b851043SAndrew Rist  * specific language governing permissions and limitations
18*8b851043SAndrew Rist  * under the License.
19*8b851043SAndrew Rist  *
20*8b851043SAndrew Rist  *************************************************************/
21*8b851043SAndrew Rist 
22*8b851043SAndrew Rist 
23cdf0e10cSrcweir #ifndef _VCOMPAT_HXX
24cdf0e10cSrcweir #define _VCOMPAT_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include "tools/toolsdllapi.h"
27cdf0e10cSrcweir #include <tools/solar.h>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir // -----------
30cdf0e10cSrcweir // - Defines -
31cdf0e10cSrcweir // -----------
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #define COMPAT_FORMAT( char1, char2, char3, char4 ) \
34cdf0e10cSrcweir 	((sal_uInt32)((((sal_uInt32)(char)(char1)))|				\
35cdf0e10cSrcweir 	(((sal_uInt32)(char)(char2))<<8UL)|					\
36cdf0e10cSrcweir 	(((sal_uInt32)(char)(char3))<<16UL)|					\
37cdf0e10cSrcweir 	((sal_uInt32)(char)(char4))<<24UL))
38cdf0e10cSrcweir 
39cdf0e10cSrcweir // --------------
40cdf0e10cSrcweir // - ImplCompat -
41cdf0e10cSrcweir // --------------
42cdf0e10cSrcweir 
43cdf0e10cSrcweir class SvStream;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class TOOLS_DLLPUBLIC VersionCompat
46cdf0e10cSrcweir {
47cdf0e10cSrcweir     SvStream*		mpRWStm;
48cdf0e10cSrcweir     sal_uInt32			mnCompatPos;
49cdf0e10cSrcweir     sal_uInt32			mnTotalSize;
50cdf0e10cSrcweir     sal_uInt16			mnStmMode;
51cdf0e10cSrcweir     sal_uInt16			mnVersion;
52cdf0e10cSrcweir 
VersionCompat()53cdf0e10cSrcweir 					VersionCompat() {}
VersionCompat(const VersionCompat &)54cdf0e10cSrcweir 					VersionCompat( const VersionCompat& ) {}
operator =(const VersionCompat &)55cdf0e10cSrcweir     VersionCompat&	operator=( const VersionCompat& ) { return *this; }
operator ==(const VersionCompat &)56cdf0e10cSrcweir     sal_Bool			operator==( const VersionCompat& ) { return sal_False; }
57cdf0e10cSrcweir 
58cdf0e10cSrcweir public:
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 					VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 );
61cdf0e10cSrcweir 					~VersionCompat();
62cdf0e10cSrcweir 
GetVersion() const63cdf0e10cSrcweir     sal_uInt16			GetVersion() const { return mnVersion; }
64cdf0e10cSrcweir };
65cdf0e10cSrcweir 
66cdf0e10cSrcweir #endif // _VCOMPAT_HXX
67