Bump version to 5.0-43
[LibreOffice.git] / basic / source / classes / global.cxx
blobf0fa7426eeb3e10e953dedba51d08a37905a5d1d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #include <comphelper/processfactory.hxx>
11 #include <i18nlangtag/lang.h>
12 #include <rtl/instance.hxx>
13 #include <unotools/transliterationwrapper.hxx>
14 #include <vcl/svapp.hxx>
15 #include <vcl/settings.hxx>
17 #include "global.hxx"
19 namespace
21 class lclTransliterationWrapper
23 private:
24 utl::TransliterationWrapper m_aTransliteration;
25 public:
26 lclTransliterationWrapper()
27 : m_aTransliteration(
28 comphelper::getProcessComponentContext(),
29 com::sun::star::i18n::TransliterationModules_IGNORE_CASE )
31 const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
32 m_aTransliteration.loadModuleIfNeeded( eOfficeLanguage );
34 utl::TransliterationWrapper& getTransliteration() { return m_aTransliteration; }
37 class theTransliterationWrapper : public rtl::Static<lclTransliterationWrapper, theTransliterationWrapper> {};
40 utl::TransliterationWrapper& SbGlobal::GetTransliteration()
42 return theTransliterationWrapper::get().getTransliteration();
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */