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/.
12 #include <sal/types.h>
13 #include <tools/ref.hxx>
14 #include "rtflistener.hxx"
18 namespace writerfilter::rtftok
22 * This acts like an importer, but used for looking ahead, e.g. to
23 * determine if the current group contains a table, etc.
25 class RTFLookahead
: public RTFListener
28 RTFLookahead(SvStream
& rStream
, sal_uInt64 nGroupStart
);
29 ~RTFLookahead() override
;
30 RTFError
dispatchDestination(RTFKeyword nKeyword
) override
;
31 RTFError
dispatchFlag(RTFKeyword nKeyword
) override
;
32 RTFError
dispatchSymbol(RTFKeyword nKeyword
) override
;
33 RTFError
dispatchToggle(RTFKeyword nKeyword
, bool bParam
, int nParam
) override
;
34 RTFError
dispatchValue(RTFKeyword nKeyword
, int nParam
) override
;
35 RTFError
resolveChars(char ch
) override
;
36 RTFError
pushState() override
;
37 RTFError
popState() override
;
38 Destination
getDestination() override
;
39 void setDestination(Destination eDestination
) override
;
40 RTFInternalState
getInternalState() override
;
41 void setInternalState(RTFInternalState nInternalState
) override
;
42 bool getSkipUnknown() override
;
43 void setSkipUnknown(bool bSkipUnknown
) override
;
44 void finishSubstream() override
;
45 bool isSubstream() const override
;
46 bool hasTable() const { return m_bHasTable
; }
47 bool hasColumns() const { return m_bHasColumns
; }
50 tools::SvRef
<RTFTokenizer
> m_pTokenizer
;
55 } // namespace writerfilter::rtftok
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */