LCOV - code coverage report
Current view: top level - lingucomponent/source/lingutil - lingutil.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 6 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 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             :  * 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_LINGUCOMPONENT_SOURCE_LINGUTIL_LINGUTIL_HXX
      21             : #define INCLUDED_LINGUCOMPONENT_SOURCE_LINGUTIL_LINGUTIL_HXX
      22             : 
      23             : #include <com/sun/star/lang/Locale.hpp>
      24             : #include <rtl/string.hxx>
      25             : #include <rtl/ustring.hxx>
      26             : 
      27             : #include <vector>
      28             : #include <list>
      29             : 
      30             : #define OU2ENC(rtlOUString, rtlEncoding) \
      31             :     OString((rtlOUString).getStr(), (rtlOUString).getLength(), \
      32             :     rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr()
      33             : 
      34             : struct SvtLinguConfigDictionaryEntry;
      35             : 
      36             : struct lt_rtl_OUString
      37             : {
      38         946 :     bool operator() (const OUString &r1, const OUString &r2) const
      39             :     {
      40         946 :         return r1 < r2;
      41             :     }
      42             : };
      43             : 
      44  1507276445 : inline bool operator == ( const ::com::sun::star::lang::Locale &rL1, const ::com::sun::star::lang::Locale &rL2 )
      45             : {
      46  2715960735 :     return  rL1.Language ==  rL2.Language   &&
      47  1734808499 :             rL1.Country  ==  rL2.Country    &&
      48  1734808499 :             rL1.Variant  ==  rL2.Variant;
      49             : }
      50             : 
      51             : #if defined(WNT)
      52             : 
      53             : // to be use to get a path name with long path prefix
      54             : // under Windows for Hunspell, Hyphen and MyThes libraries
      55             : OString Win_AddLongPathPrefix( const OString &rPathName );
      56             : #endif
      57             : 
      58             : 
      59             : // temporary function, to be removed when new style dictionaries
      60             : // using configuration entries are fully implemented and provided
      61             : std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char * pDicType );
      62             : void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics );
      63             : 
      64             : //Find an encoding from a charset string, using
      65             : //rtl_getTextEncodingFromMimeCharset and falling back to
      66             : //rtl_getTextEncodingFromUnixCharset with the addition of
      67             : //ISCII-DEVANAGARI. On failure will return final fallback of
      68             : //RTL_TEXTENCODING_ISO_8859_1
      69             : rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset);
      70             : 
      71             : #endif
      72             : 
      73             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11