merged tag ooo/DEV300_m102
[LibreOffice.git] / rsc / inc / rscstr.hxx
blobe485a023d933ab727dbde2859529c1702ea22dae
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _RSCSTR_HXX
28 #define _RSCSTR_HXX
30 #include <rscall.h>
31 #include <rscerror.h>
32 #include <rschash.hxx>
33 #include <rsctop.hxx>
35 /******************* R s c S t r i n g ***********************************/
36 class RscString : public RscTop
38 RscTop * pRefClass;
39 struct RscStringInst {
40 char * pStr; // Zeiger auf String
41 sal_Bool bDflt; // Ist Default
42 RscId aRefId; // ReferenzName
44 sal_uInt32 nSize;
45 public:
46 RscString( Atom nId, sal_uInt32 nTypId );
47 virtual RSCCLASS_TYPE GetClassType() const;
49 void SetRefClass( RscTop * pClass )
51 pRefClass = pClass;
53 RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, sal_Bool );
54 // Der zulaessige Bereich wird gesetzt
55 void Destroy( const RSCINST & rInst );
56 sal_uInt32 Size(){ return nSize; }
57 void SetToDefault( const RSCINST & rInst )
59 ((RscStringInst*)rInst.pData)->bDflt = sal_True;
61 sal_Bool IsDefault( const RSCINST & rInst)
63 return( ((RscStringInst*)rInst.pData)->bDflt );
65 // Als Default setzen
66 sal_Bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef );
67 ERRTYPE SetString( const RSCINST &, const char * pStr );
68 ERRTYPE GetString( const RSCINST &, char ** ppStr );
69 ERRTYPE GetRef( const RSCINST & rInst, RscId * );
70 ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
71 void WriteSrc( const RSCINST &, FILE * fOutput,
72 RscTypCont * pTC, sal_uInt32 nTab, const char * );
73 ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
74 RscTypCont * pTC, sal_uInt32, sal_Bool bExtra );
75 virtual void WriteRcAccess( FILE * fOutput, RscTypCont * pTC,
76 const char * );
79 #endif // _RSCSTR_HXX