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 __EQNOLEFILEHDR_HXX__
25 #define __EQNOLEFILEHDR_HXX__
26 
27 #include <sal/types.h>
28 #include <sot/storage.hxx>
29 
30 class SvStorageStream;
31 class SotStorage;
32 
33 #define EQNOLEFILEHDR_SIZE 28
34 
35 class EQNOLEFILEHDR
36 {
37 public:
EQNOLEFILEHDR()38     EQNOLEFILEHDR() {}
EQNOLEFILEHDR(sal_uInt32 nLenMTEF)39     EQNOLEFILEHDR(sal_uInt32 nLenMTEF) : nCBHdr(0x1c),nVersion(0x20000),
40         nCf(0xc1c6),nCBObject(nLenMTEF),nReserved1(0),nReserved2(0x0014F690),
41         nReserved3(0x0014EBB4), nReserved4(0) {}
42 
43     sal_uInt16   nCBHdr;     // length of header, sizeof(EQNOLEFILEHDR) = 28
44     sal_uInt32   nVersion;   // hiword = 2, loword = 0
45     sal_uInt16   nCf;        // clipboard format ("MathType EF")
46     sal_uInt32   nCBObject;  // length of MTEF data following this header
47     sal_uInt32   nReserved1; // not used
48     sal_uInt32   nReserved2; // not used
49     sal_uInt32   nReserved3; // not used
50     sal_uInt32   nReserved4; // not used
51 
52     void Read(SvStorageStream *pS);
53     void Write(SvStorageStream *pS);
54 };
55 
56 SAL_DLLPUBLIC_EXPORT sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion );
57 
58 #endif
59 
60