fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / rsc / inc / rsclex.hxx
blobf98a7506e5526011cbd9ce2dd637aac015cb6722
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
28 class StringContainer
30 std::unordered_set< OString, OStringHash > m_aStrings;
31 public:
32 StringContainer() {}
33 ~StringContainer() {}
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 };
49 struct RSCHEADER {
50 RscTop * pClass;
51 RscExpType nName1;
52 REF_ENUM nTyp;
53 RscTop * pRefClass;
54 RscExpType nName2;
57 /************** O b j e c t s t a c k ************************************/
58 struct Node
60 Node* pPrev;
61 RSCINST aInst;
62 sal_uInt32 nTupelRec; // Rekursionstiefe fuer Tupel
63 Node() { pPrev = NULL; nTupelRec = 0; }
66 class ObjectStack
68 private :
69 Node* pRoot;
70 public :
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 )
81 Node* pTmp;
83 pTmp = pRoot;
84 pRoot = new Node;
85 pRoot->aInst = aInst;
86 pRoot->pPrev = pTmp;
88 void Pop()
90 Node* pTmp;
92 pTmp = pRoot;
93 pRoot = pTmp->pPrev;
94 delete pTmp;
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();
103 #else
104 int yyparse(); // forward Deklaration fuer erzeugte Funktion
105 void yyerror( char * );
106 int yylex();
107 #endif
109 class RscTypCont;
110 class RscFileInst;
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: */