LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/filter/msfilter - dffpropset.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-12-27 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 _DFFPROPSET_HXX
      20             : #define _DFFPROPSET_HXX
      21             : 
      22             : #include <tools/solar.h>
      23             : #include <filter/msfilter/msfilterdllapi.h>
      24             : #include <filter/msfilter/dffrecordheader.hxx>
      25             : #include <tools/stream.hxx>
      26             : #include <vector>
      27             : 
      28             : struct DffPropFlags
      29             : {
      30             :     sal_uInt8   bSet        : 1;
      31             :     sal_uInt8   bComplex    : 1;
      32             :     sal_uInt8   bBlip       : 1;
      33             :     sal_uInt8   bSoftAttr   : 1;
      34             : };
      35             : 
      36             : struct DffPropSetEntry
      37             : {
      38             :     DffPropFlags aFlags;
      39             :     sal_uInt16   nComplexIndexOrFlagsHAttr;
      40             :     sal_uInt32   nContent;
      41             : };
      42             : 
      43             : class MSFILTER_DLLPUBLIC DffPropSet
      44             : {
      45             :     private:
      46             :         DffPropSetEntry*          mpPropSetEntries;
      47             :         std::vector< sal_uInt32 > maOffsets;
      48             : 
      49             :         void ReadPropSet( SvStream&, bool );
      50             : 
      51             :     public:
      52             :         explicit DffPropSet();
      53             :         ~DffPropSet();
      54             : 
      55       67454 :         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             :         ::rtl::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;
      64             : 
      65             :         friend SvStream& operator>>( SvStream& rIn, DffPropSet& rPropSet );
      66             :         friend SvStream& operator|=( SvStream& rIn, DffPropSet& rPropSet );
      67             : };
      68             : 
      69             : #endif
      70             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10