1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rsclex.hxx,v $
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 #include <tools/stack.hxx>
33 #include <rtl/strbuf.hxx>
34 #include <rtl/string.hxx>
36 // a buffer for unique strings
39 std::hash_set
< rtl::OString
, rtl::OStringHash
> m_aStrings
;
44 const char* putString( const char* pString
);
48 enum MODE_ENUM
{ MODE_MODELESS
, MODE_APPLICATIONMODAL
, MODE_SYSTEMMODAL
};
50 enum JUSTIFY_ENUM
{ JUST_CENTER
, JUST_RIGHT
, JUST_LEFT
};
52 enum SHOW_ENUM
{ SHOW_NORMAL
, SHOW_MINIMIZED
, SHOW_MAXIMIZED
};
54 enum ENUMHEADER
{ HEADER_NAME
, HEADER_NUMBER
};
56 enum REF_ENUM
{ TYPE_NOTHING
, TYPE_REF
, TYPE_COPY
};
66 /************** O b j e c t s t a c k ************************************/
70 sal_uInt32 nTupelRec
; // Rekursionstiefe fuer Tupel
71 Node() { pPrev
= NULL
; nTupelRec
= 0; };
79 ObjectStack () { pRoot
= NULL
; }
81 const RSCINST
& Top () { return pRoot
->aInst
; }
82 BOOL
IsEmpty() { return( pRoot
== NULL
); }
83 void IncTupelRec() { pRoot
->nTupelRec
++; }
84 void DecTupelRec() { pRoot
->nTupelRec
--; }
85 sal_uInt32
TupelRecCount() const { return pRoot
->nTupelRec
; }
86 void Push( RSCINST aInst
)
105 /****************** F o r w a r d s **************************************/
106 #if defined( RS6000 )
107 extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion
108 extern "C" void yyerror( char * );
109 extern "C" int yylex( void );
110 #elif defined( HP9000 ) || defined( SCO ) || defined ( IRIX ) || defined ( SOLARIS )
111 extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion
112 extern "C" void yyerror( const char * );
113 extern "C" int yylex( void );
115 #if defined ( WTC ) || defined ( GCC ) || (_MSC_VER >= 1400)
116 int yyparse(); // forward Deklaration fuer erzeugte Funktion
118 yyparse(); // forward Deklaration fuer erzeugte Funktion
120 void yyerror( char * );
127 extern RscTypCont
* pTC
;
128 extern RscFileInst
* pFI
;
129 extern RscExpression
* pExp
;
130 extern ObjectStack S
;
131 extern StringContainer
* pStringContainer
;