1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_XMLOFF_LANGUAGETAGODF_HXX
11 #define INCLUDED_XMLOFF_LANGUAGETAGODF_HXX
13 #include <sal/config.h>
14 #include <rtl/ustring.hxx>
15 #include <i18nlangtag/languagetag.hxx>
17 /** Helper to gather the single language tag relevant attributes during reading
18 ODF and form a resulting LanguageTag when done.
20 For example fo:language, fo:script, fo:country, style:rfc-language-tag
24 OUString maRfcLanguageTag
;
29 bool isEmpty() const { return maRfcLanguageTag
.isEmpty() &&
30 maLanguage
.isEmpty() && maScript
.isEmpty() && maCountry
.isEmpty(); }
32 /** Best call this only once per instance, it recreates a LanguageTag
33 instance on every call.
35 LanguageTag
getLanguageTag() const { return LanguageTag( maRfcLanguageTag
, maLanguage
, maScript
, maCountry
); }
38 #endif // INCLUDED_XMLOFF_LANGUAGETAGODF_HXX
40 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */