LCOV - code coverage report
Current view: top level - writerfilter/source/rtftok - rtflookahead.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 2 100.0 %
Date: 2014-11-03 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
      11             : #define INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
      12             : 
      13             : #include <rtflistener.hxx>
      14             : #include <rtftokenizer.hxx>
      15             : 
      16             : class SvStream;
      17             : 
      18             : namespace writerfilter
      19             : {
      20             : namespace rtftok
      21             : {
      22             : /**
      23             :  * This acts like an importer, but used for looking ahead, e.g. to
      24             :  * determine if the current group contains a table, etc.
      25             :  */
      26             : class RTFLookahead : public RTFListener
      27             : {
      28             : public:
      29             :     RTFLookahead(SvStream& rStream, sal_Size nGroupStart);
      30             :     virtual ~RTFLookahead();
      31             :     virtual int dispatchDestination(RTFKeyword nKeyword) SAL_OVERRIDE;
      32             :     virtual int dispatchFlag(RTFKeyword nKeyword) SAL_OVERRIDE;
      33             :     virtual int dispatchSymbol(RTFKeyword nKeyword) SAL_OVERRIDE;
      34             :     virtual int dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) SAL_OVERRIDE;
      35             :     virtual int dispatchValue(RTFKeyword nKeyword, int nParam) SAL_OVERRIDE;
      36             :     virtual int resolveChars(char ch) SAL_OVERRIDE;
      37             :     virtual int pushState() SAL_OVERRIDE;
      38             :     virtual int popState() SAL_OVERRIDE;
      39             :     virtual RTFDestinationState getDestinationState() SAL_OVERRIDE;
      40             :     virtual void setDestinationState(RTFDestinationState nDestinationState) SAL_OVERRIDE;
      41             :     virtual RTFInternalState getInternalState() SAL_OVERRIDE;
      42             :     virtual void setInternalState(RTFInternalState nInternalState) SAL_OVERRIDE;
      43             :     virtual bool getSkipUnknown() SAL_OVERRIDE;
      44             :     virtual void setSkipUnknown(bool bSkipUnknown) SAL_OVERRIDE;
      45             :     virtual void finishSubstream() SAL_OVERRIDE;
      46             :     virtual bool isSubstream() const SAL_OVERRIDE;
      47          14 :     bool hasTable()
      48             :     {
      49          14 :         return m_bHasTable;
      50             :     }
      51             : private:
      52             :     boost::shared_ptr<RTFTokenizer> m_pTokenizer;
      53             :     SvStream& m_rStream;
      54             :     bool m_bHasTable;
      55             : };
      56             : } // namespace rtftok
      57             : } // namespace writerfilter
      58             : 
      59             : #endif // INCLUDED_WRITERFILTER_SOURCE_RTFTOK_RTFLOOKAHEAD_HXX
      60             : 
      61             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10