1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
24 #include <rschash.hxx>
27 class RscString
: public RscTop
30 struct RscStringInst
{
31 char * pStr
; // Zeiger auf String
32 sal_Bool bDflt
; // Ist Default
33 RscId aRefId
; // ReferenzName
37 RscString( Atom nId
, sal_uInt32 nTypId
);
38 virtual RSCCLASS_TYPE
GetClassType() const;
40 void SetRefClass( RscTop
* pClass
)
44 RSCINST
Create( RSCINST
* pInst
, const RSCINST
& rDfltInst
, sal_Bool
);
45 // Der zulaessige Bereich wird gesetzt
46 void Destroy( const RSCINST
& rInst
);
47 sal_uInt32
Size(){ return nSize
; }
48 void SetToDefault( const RSCINST
& rInst
)
50 ((RscStringInst
*)rInst
.pData
)->bDflt
= sal_True
;
52 sal_Bool
IsDefault( const RSCINST
& rInst
)
54 return( ((RscStringInst
*)rInst
.pData
)->bDflt
);
57 sal_Bool
IsValueDefault( const RSCINST
& rInst
, CLASS_DATA pDef
);
58 ERRTYPE
SetString( const RSCINST
&, const char * pStr
);
59 ERRTYPE
GetString( const RSCINST
&, char ** ppStr
);
60 ERRTYPE
GetRef( const RSCINST
& rInst
, RscId
* );
61 ERRTYPE
SetRef( const RSCINST
& rInst
, const RscId
& rRefId
);
62 void WriteSrc( const RSCINST
&, FILE * fOutput
,
63 RscTypCont
* pTC
, sal_uInt32 nTab
, const char * );
64 ERRTYPE
WriteRc( const RSCINST
&, RscWriteRc
& aMem
,
65 RscTypCont
* pTC
, sal_uInt32
, sal_Bool bExtra
);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */