LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - swscanner.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 6 7 85.7 %
Date: 2013-07-09 Functions: 6 7 85.7 %
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             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef _SWSCANNER_HXX
      21             : #define _SWSCANNER_HXX
      22             : 
      23             : #include <i18nlangtag/lang.h>
      24             : #include <modeltoviewhelper.hxx>
      25             : 
      26             : class SwTxtNode;
      27             : 
      28             : /*************************************************************************
      29             :  *                class SwScanner
      30             :  * Helper class that provides consecutively the words of a selected area
      31             :  * during spell check
      32             :  *************************************************************************/
      33             : 
      34        1681 : class SwScanner
      35             : {
      36             :     OUString aWord;
      37             :     const SwTxtNode& rNode;
      38             :     const OUString aPreDashReplacementText;
      39             :     OUString aText;
      40             :     const LanguageType* pLanguage;
      41             :     const ModelToViewHelper rConversionMap;
      42             :     sal_Int32 nStartPos;
      43             :     sal_Int32 nEndPos;
      44             :     sal_Int32 nBegin;
      45             :     sal_Int32 nLen;
      46             :     sal_Int32 nOverriddenDashCount;
      47             :     LanguageType aCurrLang;
      48             :     sal_uInt16 nWordType;
      49             :     sal_Bool bClip;
      50             : 
      51             : public:
      52             :     SwScanner( const SwTxtNode& rNd, const OUString& rTxt,
      53             :                const LanguageType* pLang,
      54             :                const ModelToViewHelper& rConvMap,
      55             :                sal_uInt16 nWordType,
      56             :                sal_Int32 nStart, sal_Int32 nEnde, sal_Bool bClip = sal_False );
      57             : 
      58             : 
      59             :     // This next word function tries to find the language for the next word
      60             :     // It should currently _not_ be used for spell checking, and works only for
      61             :     // ! bReverse
      62             :     sal_Bool NextWord();
      63             : 
      64       18880 :     const OUString& GetWord() const    { return aWord; }
      65             : 
      66       18859 :     sal_Int32 GetBegin() const         { return nBegin; }
      67           0 :     sal_Int32 GetEnd() const           { return nBegin + nLen; }
      68        9300 :     sal_Int32 GetLen() const           { return nLen; }
      69             : 
      70        9300 :     LanguageType GetCurrentLanguage() const {return aCurrLang;}
      71             : 
      72         538 :     sal_Int32 getOverriddenDashCount() const {return nOverriddenDashCount; }
      73             : };
      74             : 
      75             : #endif
      76             : 
      77             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10