LibreOffice Module sc (master)  1
rechead.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SC_INC_RECHEAD_HXX
21 #define INCLUDED_SC_INC_RECHEAD_HXX
22 
23 #include <tools/stream.hxx>
24 #include <memory>
25 
26 // ID's for files:
27 
28 #define SCID_SIZES 0x4200
29 
30 
31 #define SC_31_EXPORT_VER 0x0012 // version for 3.1-export
32 // since 4.0
33 #define SC_FONTCHARSET 0x0101 // Font-CharSets have to be right
34 
35 // since 5.0
36 #define SC_MATRIX_DOUBLEREF 0x0202 // DoubleRef implicit intersection
37 // since 5.2
38 #define SC_CURRENT_VERSION 0x0205
39 
40 // all above SC_31_EXPORT_VER has to be queried during saving,
41 // because 3.1-export writes this version number.
42 
43 // btw: 10 following 09 is not a counting error but an intentional gap,
44 // because it was not clear, how long the RelRefs development would take. :)
45 
46  // Header with size specification for multiple objects
47 
49 {
50 private:
52  std::unique_ptr<sal_uInt8[]>
54  std::unique_ptr<SvMemoryStream>
56  sal_uInt64 nEndPos;
57  sal_uInt64 nEntryEnd;
58  sal_uInt64 nTotalEnd;
59 
60 public:
61  ScMultipleReadHeader(SvStream& rNewStream);
63 
64  void StartEntry();
65  void EndEntry();
66  sal_uInt64 BytesLeft() const;
67 };
68 
70 {
71 private:
74  sal_uInt64 nDataPos;
75  sal_uInt32 nDataSize;
76  sal_uInt64 nEntryStart;
77 
78 public:
79  ScMultipleWriteHeader(SvStream& rNewStream);
81 
82  void StartEntry();
83  void EndEntry();
84 };
85 
86 #endif
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt64 BytesLeft() const
Definition: rechead.cxx:97
sal_uInt64 nEndPos
Definition: rechead.hxx:56
sal_uInt64 nTotalEnd
Definition: rechead.hxx:58
ScMultipleWriteHeader(SvStream &rNewStream)
Definition: rechead.cxx:107
SvStream & rStream
Definition: rechead.hxx:72
std::unique_ptr< sal_uInt8[]> pBuf
Definition: rechead.hxx:53
sal_uInt64 nEntryEnd
Definition: rechead.hxx:57
sal_uInt32 nDataSize
Definition: rechead.hxx:75
sal_uInt64 nEntryStart
Definition: rechead.hxx:76
sal_uInt64 nDataPos
Definition: rechead.hxx:74
SvMemoryStream aMemStream
Definition: rechead.hxx:73
ScMultipleReadHeader(SvStream &rNewStream)
Definition: rechead.cxx:25
SvStream & rStream
Definition: rechead.hxx:51
std::unique_ptr< SvMemoryStream > pMemStream
Definition: rechead.hxx:55