tdf#104816 sw: if non-section content, let all sections hide.
[LibreOffice.git] / sc / inc / rechead.hxx
blobaa5cccca14d880516c0fa8a703b96e1f95d83f5c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_INC_RECHEAD_HXX
21 #define INCLUDED_SC_INC_RECHEAD_HXX
23 #include <tools/solar.h>
24 #include <tools/stream.hxx>
25 #include <memory>
27 // ID's for files:
29 #define SCID_SIZES 0x4200
32 #define SC_31_EXPORT_VER 0x0012 // version for 3.1-export
33 // since 4.0
34 #define SC_FONTCHARSET 0x0101 // Font-CharSets have to be right
36 // since 5.0
37 #define SC_MATRIX_DOUBLEREF 0x0202 // DoubleRef implicit intersection
38 // since 5.2
39 #define SC_CURRENT_VERSION 0x0205
41 // all above SC_31_EXPORT_VER has to be queried during saving,
42 // because 3.1-export writes this version number.
44 // btw: 10 following 09 is not a counting error but an intentional gap,
45 // because it was not clear, how long the RelRefs development would take. :)
47 // Header with size specification for multiple objects
49 class ScMultipleReadHeader
51 private:
52 SvStream& rStream;
53 std::unique_ptr<sal_uInt8[]>
54 pBuf;
55 std::unique_ptr<SvMemoryStream>
56 pMemStream;
57 sal_uLong nEndPos;
58 sal_uLong nEntryEnd;
59 sal_uLong nTotalEnd;
61 public:
62 ScMultipleReadHeader(SvStream& rNewStream);
63 ~ScMultipleReadHeader();
65 void StartEntry();
66 void EndEntry();
67 sal_uLong BytesLeft() const;
70 class ScMultipleWriteHeader
72 private:
73 SvStream& rStream;
74 SvMemoryStream aMemStream;
75 sal_uLong nDataPos;
76 sal_uInt32 nDataSize;
77 sal_uLong nEntryStart;
79 public:
80 ScMultipleWriteHeader(SvStream& rNewStream);
81 ~ScMultipleWriteHeader();
83 void StartEntry();
84 void EndEntry();
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */