LCOV - code coverage report
Current view: top level - include/filter/msfilter - dffpropset.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef INCLUDED_FILTER_MSFILTER_DFFPROPSET_HXX
      20             : #define INCLUDED_FILTER_MSFILTER_DFFPROPSET_HXX
      21             : 
      22             : #include <filter/msfilter/msfilterdllapi.h>
      23             : #include <filter/msfilter/dffrecordheader.hxx>
      24             : #include <tools/stream.hxx>
      25             : #include <vector>
      26             : 
      27             : struct DffPropFlags
      28             : {
      29             :     bool   bSet        : 1;
      30             :     bool   bComplex    : 1;
      31             :     bool   bBlip       : 1;
      32             :     bool   bSoftAttr   : 1;
      33             : };
      34             : 
      35             : struct DffPropSetEntry
      36             : {
      37             :     DffPropFlags aFlags;
      38             :     sal_uInt16   nComplexIndexOrFlagsHAttr;
      39             :     sal_uInt32   nContent;
      40             : };
      41             : 
      42             : class MSFILTER_DLLPUBLIC DffPropSet
      43             : {
      44             :     private:
      45             :         DffPropSetEntry*          mpPropSetEntries;
      46             :         std::vector< sal_uInt32 > maOffsets;
      47             : 
      48             :         void ReadPropSet( SvStream&, bool );
      49             : 
      50             :     public:
      51             :         explicit DffPropSet();
      52             :         ~DffPropSet();
      53             : 
      54       86125 :         inline bool IsProperty( sal_uInt32 nRecType ) const { return ( mpPropSetEntries[ nRecType & 0x3ff ].aFlags.bSet ); };
      55             :         bool        IsHardAttribute( sal_uInt32 nId ) const;
      56             :         sal_uInt32  GetPropertyValue( sal_uInt32 nId, sal_uInt32 nDefault = 0 ) const;
      57             :         /** Returns a boolean property by its real identifier. */
      58             :         bool        GetPropertyBool( sal_uInt32 nId, bool bDefault = false ) const;
      59             :         /** Returns a string property. */
      60             :         OUString    GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const;
      61             :         bool        SeekToContent( sal_uInt32 nRecType, SvStream& rSt ) const;
      62             :         void        InitializePropSet( sal_uInt16 nPropSetType ) const;
      63             : 
      64             :         friend SvStream& ReadDffPropSet( SvStream& rIn, DffPropSet& rPropSet );
      65             :         friend SvStream& operator|=( SvStream& rIn, DffPropSet& rPropSet );
      66             : };
      67             : 
      68             : #endif
      69             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11