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 .
20 #ifndef INCLUDED_RSC_INC_RSCLEX_HXX
21 #define INCLUDED_RSC_INC_RSCLEX_HXX
23 #include <rtl/strbuf.hxx>
24 #include <rtl/string.hxx>
25 #include <unordered_set>
27 // a buffer for unique strings
30 std::unordered_set
< OString
, OStringHash
> m_aStrings
;
35 const char* putString( const char* pString
);
39 enum MODE_ENUM
{ MODE_MODELESS
, MODE_APPLICATIONMODAL
, MODE_SYSTEMMODAL
};
41 enum JUSTIFY_ENUM
{ JUST_CENTER
, JUST_RIGHT
, JUST_LEFT
};
43 enum SHOW_ENUM
{ SHOW_NORMAL
, SHOW_MINIMIZED
, SHOW_MAXIMIZED
};
45 enum ENUMHEADER
{ HEADER_NAME
, HEADER_NUMBER
};
47 enum REF_ENUM
{ TYPE_NOTHING
, TYPE_REF
, TYPE_COPY
};
57 /************** O b j e c t s t a c k ************************************/
62 sal_uInt32 nTupelRec
; // Rekursionstiefe fuer Tupel
63 Node() { pPrev
= NULL
; nTupelRec
= 0; }
72 ObjectStack () { pRoot
= NULL
; }
74 const RSCINST
& Top () { return pRoot
->aInst
; }
75 bool IsEmpty() { return( pRoot
== NULL
); }
76 void IncTupelRec() { pRoot
->nTupelRec
++; }
77 void DecTupelRec() { pRoot
->nTupelRec
--; }
78 sal_uInt32
TupelRecCount() const { return pRoot
->nTupelRec
; }
79 void Push( RSCINST aInst
)
98 /****************** F o r w a r d s **************************************/
99 #if defined ( SOLARIS )
100 extern "C" int yyparse(); // forward Deklaration fuer erzeugte Funktion
101 extern "C" void yyerror( const char * );
102 extern "C" int yylex();
104 int yyparse(); // forward Deklaration fuer erzeugte Funktion
105 void yyerror( char * );
112 extern RscTypCont
* pTC
;
113 extern RscFileInst
* pFI
;
114 extern RscExpression
* pExp
;
115 extern ObjectStack S
;
116 extern StringContainer
* pStringContainer
;
118 #endif // INCLUDED_RSC_INC_RSCLEX_HXX
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */