lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / writerfilter / source / rtftok / rtflookahead.hxx
blob0a40d554c5e8640e78b297fcee5566cc77c369da
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
11 #define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
13 #include <memory>
14 #include <sal/types.h>
15 #include <tools/ref.hxx>
16 #include "rtflistener.hxx"
18 class SvStream;
20 namespace writerfilter
22 namespace rtftok
24 class RTFTokenizer;
25 /**
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
31 public:
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; }
53 private:
54 tools::SvRef<RTFTokenizer> m_pTokenizer;
55 SvStream& m_rStream;
56 bool m_bHasTable;
57 bool m_bHasColumns;
59 } // namespace rtftok
60 } // namespace writerfilter
62 #endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
64 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */