LibreOffice Module writerfilter (master) 1
rtflistener.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
10#pragma once
11
12#include "rtfcontrolwords.hxx"
13
15{
17{
18 NORMAL,
19 BIN,
20 HEX
21};
22
23enum class RTFError
24{
25 OK,
32};
33
41{
42public:
43 virtual ~RTFListener() = default;
44 // Dispatching of control words and characters.
46 virtual RTFError dispatchFlag(RTFKeyword nKeyword) = 0;
47 virtual RTFError dispatchSymbol(RTFKeyword nKeyword) = 0;
48 virtual RTFError dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) = 0;
49 virtual RTFError dispatchValue(RTFKeyword nKeyword, int nParam) = 0;
50 virtual RTFError resolveChars(char ch) = 0;
51
52 // State handling.
53 virtual RTFError pushState() = 0;
54 virtual RTFError popState() = 0;
55
57 virtual void setDestination(Destination eDestination) = 0;
59 virtual void setInternalState(RTFInternalState nInternalState) = 0;
60 virtual bool getSkipUnknown() = 0;
61 virtual void setSkipUnknown(bool bSkipUnknown) = 0;
62
63 // Substream handling.
64 virtual void finishSubstream() = 0;
65 virtual bool isSubstream() const = 0;
66};
67} // namespace writerfilter::rtftok
68
69/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
RTFTokenizer needs a class implementing this interface.
Definition: rtflistener.hxx:41
virtual RTFError resolveChars(char ch)=0
virtual void setDestination(Destination eDestination)=0
virtual RTFInternalState getInternalState()=0
virtual bool isSubstream() const =0
virtual RTFError pushState()=0
virtual RTFError dispatchSymbol(RTFKeyword nKeyword)=0
virtual Destination getDestination()=0
virtual void setSkipUnknown(bool bSkipUnknown)=0
virtual RTFError popState()=0
virtual RTFError dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam)=0
virtual RTFError dispatchValue(RTFKeyword nKeyword, int nParam)=0
virtual RTFError dispatchDestination(RTFKeyword nKeyword)=0
virtual RTFError dispatchFlag(RTFKeyword nKeyword)=0
virtual void setInternalState(RTFInternalState nInternalState)=0
NORMAL
#define OK
Destination
An RTF destination state is the last open destination control word.