tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / include / filter / msfilter / dffpropset.hxx
blob6e7ca4a415a6acb281728d646484ace559f670f7
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 .
19 #ifndef INCLUDED_FILTER_MSFILTER_DFFPROPSET_HXX
20 #define INCLUDED_FILTER_MSFILTER_DFFPROPSET_HXX
22 #include <vector>
24 #include <filter/msfilter/msfilterdllapi.h>
25 #include <rtl/ustring.hxx>
26 #include <sal/types.h>
27 #include <tools/solar.h>
29 class SvStream;
31 struct DffPropFlags
33 bool bSet : 1;
34 bool bComplex : 1;
35 bool bBlip : 1;
36 bool bSoftAttr : 1;
39 struct DffPropSetEntry
41 DffPropFlags aFlags;
42 sal_uInt16 nComplexIndexOrFlagsHAttr;
43 sal_uInt32 nContent;
46 class MSFILTER_DLLPUBLIC DffPropSet
48 private:
49 DffPropSetEntry* mpPropSetEntries;
50 std::vector< sal_uInt32 > maOffsets;
52 void ReadPropSet( SvStream&, bool );
54 public:
55 explicit DffPropSet();
56 ~DffPropSet();
58 bool IsProperty( sal_uInt32 nRecType ) const { return ( mpPropSetEntries[ nRecType & 0x3ff ].aFlags.bSet ); };
59 bool IsHardAttribute( sal_uInt32 nId ) const;
60 sal_uInt32 GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault ) const;
61 /** Returns a boolean property by its real identifier. */
62 bool GetPropertyBool( sal_uInt32 nId ) const;
63 /** Returns a string property. */
64 OUString GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const;
65 bool SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const;
66 void InitializePropSet( sal_uInt16 nPropSetType ) const;
67 static sal_uLong SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos);
69 friend SvStream& ReadDffPropSet( SvStream& rIn, DffPropSet& rPropSet );
70 friend SvStream& operator|=( SvStream& rIn, DffPropSet& rPropSet );
73 #endif
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */