1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef _DFFPROPSET_HXX
20 #define _DFFPROPSET_HXX
22 #include <tools/solar.h>
23 #include <filter/msfilter/msfilterdllapi.h>
24 #include <filter/msfilter/dffrecordheader.hxx>
25 #include <tools/stream.hxx>
31 sal_uInt8 bComplex
: 1;
33 sal_uInt8 bSoftAttr
: 1;
36 struct DffPropSetEntry
39 sal_uInt16 nComplexIndexOrFlagsHAttr
;
43 class MSFILTER_DLLPUBLIC DffPropSet
46 DffPropSetEntry
* mpPropSetEntries
;
47 std::vector
< sal_uInt32
> maOffsets
;
49 void ReadPropSet( SvStream
&, bool );
52 explicit DffPropSet();
55 inline sal_Bool
IsProperty( sal_uInt32 nRecType
) const { return ( mpPropSetEntries
[ nRecType
& 0x3ff ].aFlags
.bSet
); };
56 sal_Bool
IsHardAttribute( sal_uInt32 nId
) const;
57 sal_uInt32
GetPropertyValue( sal_uInt32 nId
, sal_uInt32 nDefault
= 0 ) const;
58 /** Returns a boolean property by its real identifier. */
59 bool GetPropertyBool( sal_uInt32 nId
, bool bDefault
= false ) const;
60 /** Returns a string property. */
61 OUString
GetPropertyString( sal_uInt32 nId
, SvStream
& rStrm
) const;
62 sal_Bool
SeekToContent( sal_uInt32 nRecType
, SvStream
& rSt
) const;
63 void InitializePropSet( sal_uInt16 nPropSetType
) const;
65 friend SvStream
& operator>>( SvStream
& rIn
, DffPropSet
& rPropSet
);
66 friend SvStream
& operator|=( SvStream
& rIn
, DffPropSet
& rPropSet
);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */