LCOV - code coverage report
Current view: top level - include/xmloff - languagetagodf.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 4 4 100.0 %
Date: 2014-04-11 Functions: 4 4 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             : #include <sal/config.h>
      11             : #include <rtl/ustring.hxx>
      12             : #include <i18nlangtag/languagetag.hxx>
      13             : 
      14             : /** Helper to gather the single language tag relevant attributes during reading
      15             :     ODF and form a resulting LanguageTag when done.
      16             : 
      17             :     For example fo:language, fo:script, fo:country, style:rfc-language-tag
      18             :  */
      19        7814 : struct LanguageTagODF
      20             : {
      21             :     OUString    maRfcLanguageTag;
      22             :     OUString    maLanguage;
      23             :     OUString    maScript;
      24             :     OUString    maCountry;
      25             : 
      26        7814 :     bool isEmpty() const { return maRfcLanguageTag.isEmpty() &&
      27        7261 :         maLanguage.isEmpty() && maScript.isEmpty() && maCountry.isEmpty(); }
      28             : 
      29             :     /** Best call this only once per instance, it recreates a LanguageTag
      30             :         instance on every call.
      31             :     */
      32         553 :     LanguageTag getLanguageTag() const { return LanguageTag( maRfcLanguageTag, maLanguage, maScript, maCountry); }
      33             : };
      34             : 
      35             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10