Files
libreoffice/basic/source/classes/global.cxx

46 lines
1.5 KiB
C++
Raw Normal View History

2012-02-10 22:12:03 +01:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
2012-02-10 22:12:03 +01:00
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
2012-02-10 22:12:03 +01:00
*/
#include <comphelper/processfactory.hxx>
#include <i18nlangtag/lang.h>
2012-02-11 21:25:24 +00:00
#include <rtl/instance.hxx>
#include <unotools/transliterationwrapper.hxx>
2012-02-10 22:12:03 +01:00
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
2012-02-10 22:12:03 +01:00
#include "global.hxx"
2012-02-11 21:25:24 +00:00
namespace
2012-02-10 22:12:03 +01:00
{
2012-02-11 21:25:24 +00:00
class lclTransliterationWrapper
2012-02-10 22:12:03 +01:00
{
2012-02-11 21:25:24 +00:00
private:
utl::TransliterationWrapper m_aTransliteration;
public:
lclTransliterationWrapper()
: m_aTransliteration(
comphelper::getProcessComponentContext(),
css::i18n::TransliterationModules_IGNORE_CASE )
2012-02-11 21:25:24 +00:00
{
const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
2012-02-11 21:25:24 +00:00
m_aTransliteration.loadModuleIfNeeded( eOfficeLanguage );
}
utl::TransliterationWrapper& getTransliteration() { return m_aTransliteration; }
};
class theTransliterationWrapper : public rtl::Static<lclTransliterationWrapper, theTransliterationWrapper> {};
}
utl::TransliterationWrapper& SbGlobal::GetTransliteration()
{
return theTransliterationWrapper::get().getTransliteration();
2012-02-10 22:12:03 +01:00
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */