fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svtools / parrtf.hxx
blob73e1bdd42c6a1a6966c372fc6a3fff5036d23538
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _PARRTF_HXX
21 #define _PARRTF_HXX
23 #include "svtools/svtdllapi.h"
24 #include <svtools/svparser.hxx>
25 #include <stack>
27 struct RtfParserState_Impl
29 rtl_TextEncoding eCodeSet;
30 sal_uInt8 nUCharOverread;
32 RtfParserState_Impl( sal_uInt8 nUOverread, rtl_TextEncoding eCdSt )
33 : eCodeSet( eCdSt ), nUCharOverread( nUOverread )
37 typedef std::stack< RtfParserState_Impl > RtfParserStates_Impl;
39 class SVT_DLLPUBLIC SvRTFParser : public SvParser
41 RtfParserStates_Impl aParserStates;
43 int nOpenBrakets;
44 rtl_TextEncoding eCodeSet, eUNICodeSet;
45 sal_uInt8 nUCharOverread;
47 private:
48 static short _inSkipGroup;
50 protected:
51 sal_Unicode GetHexValue();
52 void ScanText( const sal_Unicode = 0 );
53 void SkipGroup();
55 // scanne das naechste Token,
56 virtual int _GetNextToken();
58 virtual void ReadUnknownData();
59 virtual void ReadBitmapData();
60 virtual void ReadOLEData();
62 virtual ~SvRTFParser();
64 rtl_TextEncoding GetCodeSet() const { return eCodeSet; }
65 void SetEncoding( rtl_TextEncoding eEnc );
67 rtl_TextEncoding GetUNICodeSet() const { return eUNICodeSet; }
68 void SetUNICodeSet( rtl_TextEncoding eSet ) { eUNICodeSet = eSet; }
70 public:
71 SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
73 virtual SvParserState CallParser(); // Aufruf des Parsers
75 int GetOpenBrakets() const { return nOpenBrakets; }
77 // fuers asynchrone lesen aus dem SvStream
78 // virtual void SaveState( int nToken );
79 // virtual void RestoreState();
80 virtual void Continue( int nToken );
83 #endif //_PARRTF_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */