merge the formfield patch from ooo-build
[ooovba.git] / writerfilter / inc / rtftok / RTFScanner.hxx
blob200a5eda4ca70b22c2c90a4948726b513e3c37a2
1 /**
2 Copyright 2005 Sun Microsystems, Inc.
3 */
5 #ifndef INCLUDED_RTFSCANNER_HXX
6 #define INCLUDED_RTFSCANNER_HXX
8 #include <WriterFilterDllApi.hxx>
9 #include <vector>
10 #include <rtftok/RTFInputSource.hxx>
11 #include <rtftok/RTFScannerHandler.hxx>
13 namespace writerfilter { namespace rtftok {
15 class WRITERFILTER_DLLPUBLIC RTFScanner {
16 public:
17 RTFScanner(RTFScannerHandler &eventHandler_) : eventHandler(eventHandler_) {};
18 virtual ~RTFScanner() { }
20 const char* YYText() { return yytext; }
21 int YYLeng() { return yyleng; }
23 virtual int yylex() = 0;
25 int lineno() const { return yylineno; }
27 protected:
28 char* yytext;
29 int yyleng;
30 int yylineno; // only maintained if you use %option yylineno
31 int yy_flex_debug; // only has effect with -d or "%option debug"
32 RTFScannerHandler &eventHandler;
35 public:
36 static writerfilter::rtftok::RTFScanner* createRTFScanner(writerfilter::rtftok::RTFInputSource& inputSource, writerfilter::rtftok::RTFScannerHandler &eventHandler);
39 } } /* end namespace writerfilter::rtftok */
42 #endif /* INCLUDED_RTFSCANNER_HXX */