fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / rsc / inc / rscpar.hxx
blob90c9eee5589a5d086d238859557d3ed082462358
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 .
19 #ifndef INCLUDED_RSC_INC_RSCPAR_HXX
20 #define INCLUDED_RSC_INC_RSCPAR_HXX
22 #include <rsctools.hxx>
23 #include <rscerror.h>
24 #include <tools/solar.h>
26 class RscTypCont;
28 #define READBUFFER_MAX 256
30 class RscFileInst
32 ERRTYPE aFirstError;// Erster Fehler
33 sal_uInt32 nErrorLine; // Zeile des ersten Fehlers
34 sal_uInt32 nErrorPos; // Position des ersten Fehlers
35 sal_uInt32 nLineNo; // Zeile in der Eingabedatei
36 sal_uLong lFileIndex; // Index auf Eingabedatei
37 sal_uLong lSrcIndex; // Index auf Basisdatei
38 FILE * fInputFile; // Eingabedatei
39 char * pInput; // Lesepuffer
40 sal_uInt32 nInputBufLen; // Laenge des Lesepuffers
41 sal_uInt32 nInputPos; // Position im Lesepuffer
42 sal_uInt32 nInputEndPos;// Ende im Lesepuffer
43 char * pLine; // Zeile
44 sal_uInt32 nLineBufLen;//Lange des Zeilenpuffres
45 sal_uInt32 nScanPos; // Position in der Zeile
46 int cLastChar;
47 bool bEof;
49 public:
50 RscTypCont * pTypCont;
51 void Init(); // ctor initialisieren
52 RscFileInst( RscTypCont * pTC, sal_uLong lIndexSrc,
53 sal_uLong lFileIndex, FILE * fFile );
54 ~RscFileInst();
55 bool IsEof() const { return bEof; }
56 void SetFileIndex( sal_uLong lFIndex ) { lFileIndex = lFIndex; }
57 sal_uLong GetFileIndex() { return lFileIndex; }
58 sal_uLong GetSrcIndex() { return lSrcIndex; }
59 void SetLineNo( sal_uInt32 nLine ) { nLineNo = nLine; }
60 sal_uInt32 GetLineNo() { return nLineNo; }
61 sal_uInt32 GetScanPos() { return nScanPos; }
62 char * GetLine() { return pLine; }
63 int GetChar();
64 int GetFastChar()
66 return pLine[ nScanPos ] ?
67 pLine[ nScanPos++ ] : GetChar();
69 void GetNewLine();
70 // Fehlerbehandlung
71 void SetError( ERRTYPE aError );
72 ERRTYPE GetError() { return aFirstError; }
73 sal_uInt32 GetErrorLine() { return nErrorLine; }
74 sal_uInt32 GetErrorPos() { return nErrorPos; }
77 void IncludeParser( RscFileInst * pFileInst );
78 ERRTYPE parser( RscFileInst * pFileInst );
80 #endif // INCLUDED_RSC_INC_RSCPAR_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */