LibreOffice Module filter (master)
1
include
filter
msfilter
dffrecordheader.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_FILTER_MSFILTER_DFFRECORDHEADER_HXX
21
#define INCLUDED_FILTER_MSFILTER_DFFRECORDHEADER_HXX
22
23
#include <
filter/msfilter/msfilterdllapi.h
>
24
#include <
svx/msdffdef.hxx
>
25
#include <
sal/types.h
>
26
#include <
tools/solar.h
>
27
#include <
tools/stream.hxx
>
28
29
class
MSFILTER_DLLPUBLIC
DffRecordHeader
30
{
31
public
:
32
sal_uInt8
nRecVer
;
// may be DFF_PSFLAG_CONTAINER
33
sal_uInt16
nRecInstance
;
34
sal_uInt16
nImpVerInst
;
35
sal_uInt16
nRecType
;
36
sal_uInt32
nRecLen
;
37
sal_uLong
nFilePos
;
38
39
DffRecordHeader
() : nRecVer(0), nRecInstance(0), nImpVerInst(0),
40
nRecType(0), nRecLen(0), nFilePos(0) {}
41
bool
IsContainer
()
const
{
return
nRecVer ==
DFF_PSFLAG_CONTAINER
; }
42
sal_uLong
GetRecBegFilePos
()
const
{
return
nFilePos; }
43
sal_uLong
GetRecEndFilePos
()
const
44
{
return
nFilePos +
DFF_COMMON_RECORD_HEADER_SIZE
+ nRecLen; }
45
bool
SeekToEndOfRecord
(
SvStream
& rIn)
const
46
{
47
sal_uInt64
const
nPos
= nFilePos +
DFF_COMMON_RECORD_HEADER_SIZE
+ nRecLen;
48
return
checkSeek
(rIn,
nPos
);
49
}
50
bool
SeekToContent
(
SvStream
& rIn)
const
51
{
52
sal_uInt64
const
nPos
= nFilePos +
DFF_COMMON_RECORD_HEADER_SIZE
;
53
return
checkSeek
(rIn,
nPos
);
54
}
55
bool
SeekToBegOfRecord
(
SvStream
& rIn)
const
56
{
57
return
checkSeek
(rIn, nFilePos);
58
}
59
60
MSFILTER_DLLPUBLIC
friend
bool
ReadDffRecordHeader
(
SvStream
& rIn,
DffRecordHeader
& rRec);
61
};
62
63
#endif
64
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DffRecordHeader
Definition:
dffrecordheader.hxx:30
DffRecordHeader::GetRecEndFilePos
sal_uLong GetRecEndFilePos() const
Definition:
dffrecordheader.hxx:43
DffRecordHeader::nFilePos
sal_uLong nFilePos
Definition:
dffrecordheader.hxx:37
DffRecordHeader::SeekToEndOfRecord
bool SeekToEndOfRecord(SvStream &rIn) const
Definition:
dffrecordheader.hxx:45
DffRecordHeader::nRecVer
sal_uInt8 nRecVer
Definition:
dffrecordheader.hxx:32
DffRecordHeader::GetRecBegFilePos
sal_uLong GetRecBegFilePos() const
Definition:
dffrecordheader.hxx:42
DffRecordHeader::SeekToBegOfRecord
bool SeekToBegOfRecord(SvStream &rIn) const
Definition:
dffrecordheader.hxx:55
DffRecordHeader::nRecInstance
sal_uInt16 nRecInstance
Definition:
dffrecordheader.hxx:33
DffRecordHeader::IsContainer
bool IsContainer() const
Definition:
dffrecordheader.hxx:41
DffRecordHeader::nRecLen
sal_uInt32 nRecLen
Definition:
dffrecordheader.hxx:36
DffRecordHeader::nRecType
sal_uInt16 nRecType
Definition:
dffrecordheader.hxx:35
DffRecordHeader::nImpVerInst
sal_uInt16 nImpVerInst
Definition:
dffrecordheader.hxx:34
DffRecordHeader::DffRecordHeader
DffRecordHeader()
Definition:
dffrecordheader.hxx:39
DffRecordHeader::SeekToContent
bool SeekToContent(SvStream &rIn) const
Definition:
dffrecordheader.hxx:50
SvStream
ReadDffRecordHeader
bool ReadDffRecordHeader(SvStream &rIn, DffRecordHeader &rRec)
Definition:
dffrecordheader.cxx:22
nPos
sal_uInt16 nPos
msdffdef.hxx
DFF_COMMON_RECORD_HEADER_SIZE
#define DFF_COMMON_RECORD_HEADER_SIZE
DFF_PSFLAG_CONTAINER
#define DFF_PSFLAG_CONTAINER
msfilterdllapi.h
MSFILTER_DLLPUBLIC
#define MSFILTER_DLLPUBLIC
Definition:
msfilterdllapi.h:28
solar.h
sal_uLong
sal_uIntPtr sal_uLong
stream.hxx
checkSeek
TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
types.h
sal_uInt8
unsigned char sal_uInt8
Generated on Sun Jul 30 2023 04:26:42 for LibreOffice Module filter (master) by
1.9.3