LCOV - code coverage report
Current view: top level - libreoffice/rsc/inc - rscstr.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 10 100.0 %
Date: 2012-12-27 Functions: 5 6 83.3 %
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 _RSCSTR_HXX
      20             : #define _RSCSTR_HXX
      21             : 
      22             : #include <rscall.h>
      23             : #include <rscerror.h>
      24             : #include <rschash.hxx>
      25             : #include <rsctop.hxx>
      26             : 
      27             : /******************* R s c S t r i n g ***********************************/
      28        1382 : class RscString : public RscTop
      29             : {
      30             :     RscTop * pRefClass;
      31             :     struct RscStringInst {
      32             :         char *  pStr;   // Zeiger auf String
      33             :         sal_Bool    bDflt;  // Ist Default
      34             :         RscId   aRefId; // ReferenzName
      35             :     };
      36             :     sal_uInt32  nSize;
      37             : public:
      38             :                     RscString( Atom nId, sal_uInt32 nTypId );
      39             :     virtual RSCCLASS_TYPE   GetClassType() const;
      40             : 
      41         691 :     void            SetRefClass( RscTop * pClass )
      42             :     {
      43         691 :                         pRefClass = pClass;
      44         691 :                     };
      45             :     RSCINST         Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
      46             :                     // Der zulaessige Bereich wird gesetzt
      47             :     void            Destroy( const RSCINST & rInst );
      48        8983 :     sal_uInt32          Size(){ return nSize; }
      49       41537 :     void            SetToDefault( const RSCINST & rInst )
      50             :                     {
      51       41537 :                         ((RscStringInst*)rInst.pData)->bDflt = sal_True;
      52       41537 :                     }
      53       23389 :     sal_Bool            IsDefault( const RSCINST & rInst)
      54             :                     {
      55       23389 :                         return( ((RscStringInst*)rInst.pData)->bDflt );
      56             :                     };
      57             :                     // Als Default setzen
      58             :     sal_Bool            IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
      59             :     ERRTYPE         SetString( const RSCINST &, const char * pStr );
      60             :     ERRTYPE         GetString( const RSCINST &, char ** ppStr );
      61             :     ERRTYPE         GetRef( const RSCINST & rInst, RscId * );
      62             :     ERRTYPE         SetRef( const RSCINST & rInst, const RscId & rRefId );
      63             :     void            WriteSrc( const RSCINST &, FILE * fOutput,
      64             :                               RscTypCont * pTC, sal_uInt32 nTab, const char * );
      65             :     ERRTYPE         WriteRc( const RSCINST &, RscWriteRc & aMem,
      66             :                              RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
      67             :     virtual void    WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
      68             :                                     const char * );
      69             : };
      70             : 
      71             : #endif // _RSCSTR_HXX
      72             : 
      73             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10