LibreOffice Module sc (master)
1
sc
inc
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
#pragma once
21
22
#include <
tools/stream.hxx
>
23
#include <memory>
24
25
// ID's for files:
26
27
#define SCID_SIZES 0x4200
28
29
30
#define SC_31_EXPORT_VER 0x0012
// version for 3.1-export
31
// since 4.0
32
#define SC_FONTCHARSET 0x0101
// Font-CharSets have to be right
33
34
// since 5.0
35
#define SC_MATRIX_DOUBLEREF 0x0202
// DoubleRef implicit intersection
36
// since 5.2
37
#define SC_CURRENT_VERSION 0x0205
38
39
// all above SC_31_EXPORT_VER has to be queried during saving,
40
// because 3.1-export writes this version number.
41
42
// btw: 10 following 09 is not a counting error but an intentional gap,
43
// because it was not clear, how long the RelRefs development would take. :)
44
45
// Header with size specification for multiple objects
46
47
class
ScMultipleReadHeader
48
{
49
private
:
50
SvStream
&
rStream
;
51
std::unique_ptr<sal_uInt8[]>
52
pBuf
;
53
std::unique_ptr<SvMemoryStream>
54
pMemStream
;
55
sal_uInt64
nEndPos
;
56
sal_uInt64
nEntryEnd
;
57
sal_uInt64
nTotalEnd
;
58
59
public
:
60
ScMultipleReadHeader
(
SvStream
& rNewStream);
61
~ScMultipleReadHeader
();
62
63
void
StartEntry
();
64
void
EndEntry
();
65
sal_uInt64
BytesLeft
()
const
;
66
};
67
68
class
ScMultipleWriteHeader
69
{
70
private
:
71
SvStream
&
rStream
;
72
SvMemoryStream
aMemStream
;
73
sal_uInt64
nDataPos
;
74
sal_uInt32
nDataSize
;
75
sal_uInt64
nEntryStart
;
76
77
public
:
78
ScMultipleWriteHeader
(
SvStream
& rNewStream);
79
~ScMultipleWriteHeader
();
80
81
void
StartEntry
();
82
void
EndEntry
();
83
};
84
85
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMultipleReadHeader
Definition:
rechead.hxx:48
ScMultipleReadHeader::nEntryEnd
sal_uInt64 nEntryEnd
Definition:
rechead.hxx:56
ScMultipleReadHeader::nTotalEnd
sal_uInt64 nTotalEnd
Definition:
rechead.hxx:57
ScMultipleReadHeader::StartEntry
void StartEntry()
Definition:
rechead.cxx:87
ScMultipleReadHeader::rStream
SvStream & rStream
Definition:
rechead.hxx:50
ScMultipleReadHeader::pMemStream
std::unique_ptr< SvMemoryStream > pMemStream
Definition:
rechead.hxx:54
ScMultipleReadHeader::~ScMultipleReadHeader
~ScMultipleReadHeader()
Definition:
rechead.cxx:60
ScMultipleReadHeader::pBuf
std::unique_ptr< sal_uInt8[]> pBuf
Definition:
rechead.hxx:52
ScMultipleReadHeader::EndEntry
void EndEntry()
Definition:
rechead.cxx:73
ScMultipleReadHeader::ScMultipleReadHeader
ScMultipleReadHeader(SvStream &rNewStream)
Definition:
rechead.cxx:25
ScMultipleReadHeader::BytesLeft
sal_uInt64 BytesLeft() const
Definition:
rechead.cxx:97
ScMultipleReadHeader::nEndPos
sal_uInt64 nEndPos
Definition:
rechead.hxx:55
ScMultipleWriteHeader
Definition:
rechead.hxx:69
ScMultipleWriteHeader::nDataPos
sal_uInt64 nDataPos
Definition:
rechead.hxx:73
ScMultipleWriteHeader::~ScMultipleWriteHeader
~ScMultipleWriteHeader()
Definition:
rechead.cxx:118
ScMultipleWriteHeader::nDataSize
sal_uInt32 nDataSize
Definition:
rechead.hxx:74
ScMultipleWriteHeader::StartEntry
void StartEntry()
Definition:
rechead.cxx:142
ScMultipleWriteHeader::ScMultipleWriteHeader
ScMultipleWriteHeader(SvStream &rNewStream)
Definition:
rechead.cxx:107
ScMultipleWriteHeader::EndEntry
void EndEntry()
Definition:
rechead.cxx:136
ScMultipleWriteHeader::rStream
SvStream & rStream
Definition:
rechead.hxx:71
ScMultipleWriteHeader::nEntryStart
sal_uInt64 nEntryStart
Definition:
rechead.hxx:75
ScMultipleWriteHeader::aMemStream
SvMemoryStream aMemStream
Definition:
rechead.hxx:72
SvMemoryStream
SvStream
stream.hxx
Generated on Sun Jul 30 2023 04:27:48 for LibreOffice Module sc (master) by
1.9.3