LCOV - code coverage report
Current view: top level - sw/inc - swscanner.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 6 7 85.7 %
Date: 2014-11-03 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 INCLUDED_SW_INC_SWSCANNER_HXX
      21             : #define INCLUDED_SW_INC_SWSCANNER_HXX
      22             : 
      23             : #include <i18nlangtag/lang.h>
      24             : #include <modeltoviewhelper.hxx>
      25             : 
      26             : class SwTxtNode;
      27             : 
      28             : // Helper class that provides consecutively the words of a selected area
      29             : // during spell check
      30        2268 : class SwScanner
      31             : {
      32             :     OUString aWord;
      33             :     const SwTxtNode& rNode;
      34             :     const OUString aPreDashReplacementText;
      35             :     OUString aText;
      36             :     const LanguageType* pLanguage;
      37             :     const ModelToViewHelper m_ModelToView;
      38             :     sal_Int32 nStartPos;
      39             :     sal_Int32 nEndPos;
      40             :     sal_Int32 nBegin;
      41             :     sal_Int32 nLen;
      42             :     sal_Int32 nOverriddenDashCount;
      43             :     LanguageType aCurrLang;
      44             :     sal_uInt16 nWordType;
      45             :     bool bClip;
      46             : 
      47             : public:
      48             :     SwScanner( const SwTxtNode& rNd, const OUString& rTxt,
      49             :                const LanguageType* pLang,
      50             :                const ModelToViewHelper& rConvMap,
      51             :                sal_uInt16 nWordType,
      52             :                sal_Int32 nStart, sal_Int32 nEnde, bool bClip = false );
      53             : 
      54             :     // This next word function tries to find the language for the next word
      55             :     // It should currently _not_ be used for spell checking, and works only for
      56             :     // ! bReverse
      57             :     bool NextWord();
      58             : 
      59       22301 :     const OUString& GetWord() const    { return aWord; }
      60             : 
      61       22249 :     sal_Int32 GetBegin() const         { return nBegin; }
      62           0 :     sal_Int32 GetEnd() const           { return nBegin + nLen; }
      63        9441 :     sal_Int32 GetLen() const           { return nLen; }
      64             : 
      65        9441 :     LanguageType GetCurrentLanguage() const {return aCurrLang;}
      66             : 
      67        1066 :     sal_Int32 getOverriddenDashCount() const {return nOverriddenDashCount; }
      68             : };
      69             : 
      70             : #endif
      71             : 
      72             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10