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/.
10 #ifndef _RTFTOKENIZER_HXX_
11 #define _RTFTOKENIZER_HXX_
13 #include <rtfdocumentimpl.hxx>
17 namespace writerfilter
{
19 /// RTF tokenizer that separates control words from text.
23 RTFTokenizer(RTFDocumentImpl
& rImport
, SvStream
* pInStream
, uno::Reference
<task::XStatusIndicator
> const& xStatusIndicator
);
24 virtual ~RTFTokenizer();
28 /// Number of states on the stack.
30 /// To be invoked by the pushState() callback to signal when the importer enters a group.
32 /// To be invoked by the popState() callback to single when the importer leaves a group.
34 OUString
getPosition();
38 int dispatchKeyword(OString
& rKeyword
, bool bParam
, int nParam
);
40 RTFDocumentImpl
& m_rImport
;
41 SvStream
* m_pInStream
;
42 uno::Reference
<task::XStatusIndicator
> const& m_xStatusIndicator
;
43 // This is the same as aRTFControlWords, but sorted
44 static std::vector
<RTFSymbol
> m_aRTFControlWords
;
45 static bool m_bControlWordsSorted
;
46 /// Same as the size of the importer's states, except that this can be negative for invalid input.
48 sal_Int32 m_nLineNumber
;
49 sal_Int32 m_nLineStartPos
;
52 } // namespace writerfilter
54 #endif // _RTFTOKENIZER_HXX_
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */