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