xref: /AOO41X/main/sd/inc/sdiocmpt.hxx (revision 67e470dafe1997e73f56ff7ff4878983707e3e07)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SD_SDIOCMPT_HXX
25 #define _SD_SDIOCMPT_HXX
26 
27 #include <tools/stream.hxx>
28 
29 //////////////////////////////////////////////////////////////////////////////
30 class SvStream;
31 
32 class old_SdrDownCompat
33 {
34 protected:
35     SvStream&                   rStream;
36     sal_uInt32                      nSubRecSiz;
37     sal_uInt32                      nSubRecPos;
38     sal_uInt16                      nMode;
39     sal_Bool                        bOpen;
40 
41 protected:
42     void Read();
43     void Write();
44 
45 public:
46     old_SdrDownCompat(SvStream& rNewStream, sal_uInt16 nNewMode);
47     ~old_SdrDownCompat();
48     void  OpenSubRecord();
49     void  CloseSubRecord();
50 };
51 //////////////////////////////////////////////////////////////////////////////
52 #include "sddllapi.h"
53 
54 #define SDIOCOMPAT_VERSIONDONTKNOW (sal_uInt16)0xffff
55 
56 class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat
57 {
58 private:
59     sal_uInt16 nVersion;
60 
61 public:
62                 // nNewMode: STREAM_READ oder STREAM_WRITE
63                 // nVer:     nur beim Schreiben angeben
64             SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode,
65                        sal_uInt16 nVer = SDIOCOMPAT_VERSIONDONTKNOW);
66             ~SdIOCompat();
GetVersion() const67     sal_uInt16  GetVersion() const { return nVersion; }
68 };
69 
70 #endif      // _SD_SDIOCMPT_HXX
71 
72 
73