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