use LanguageTag instead of comphelper::Locale
Change-Id: Id8239b3e34c343fc114a66ab9216c179b1746d56
This commit is contained in:
parent
2ac8508a2f
commit
bcc73432ee
@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,tvhlp1,\
|
|||||||
cppuhelper \
|
cppuhelper \
|
||||||
sal \
|
sal \
|
||||||
utl \
|
utl \
|
||||||
|
i18nisolang1 \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Library_add_exception_objects,tvhlp1,\
|
$(eval $(call gb_Library_add_exception_objects,tvhlp1,\
|
||||||
|
@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,ucpchelp1,\
|
|||||||
sal \
|
sal \
|
||||||
ucbhelper \
|
ucbhelper \
|
||||||
utl \
|
utl \
|
||||||
|
i18nisolang1 \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Library_add_exception_objects,ucpchelp1,\
|
$(eval $(call gb_Library_add_exception_objects,ucpchelp1,\
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||||
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
|
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
|
||||||
#include <com/sun/star/script/XInvocation.hpp>
|
#include <com/sun/star/script/XInvocation.hpp>
|
||||||
#include <comphelper/locale.hxx>
|
#include <i18npool/languagetag.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/awt/XToolkit.hpp>
|
#include <com/sun/star/awt/XToolkit.hpp>
|
||||||
#include <com/sun/star/awt/XExtendedToolkit.hpp>
|
#include <com/sun/star/awt/XExtendedToolkit.hpp>
|
||||||
@ -648,6 +648,8 @@ Databases::getCollator( const rtl::OUString& Language,
|
|||||||
else if( langStr.compareToAscii("ko") == 0 )
|
else if( langStr.compareToAscii("ko") == 0 )
|
||||||
countryStr = rtl::OUString("KR");
|
countryStr = rtl::OUString("KR");
|
||||||
}
|
}
|
||||||
|
/* FIXME-BCP47: all this does not look right for language tag context,
|
||||||
|
* also check processLang() and country() methods */
|
||||||
it->second->loadDefaultCollator( Locale( langStr,
|
it->second->loadDefaultCollator( Locale( langStr,
|
||||||
countryStr,
|
countryStr,
|
||||||
rtl::OUString() ),
|
rtl::OUString() ),
|
||||||
@ -1491,13 +1493,7 @@ rtl::OUString ExtensionIteratorBase::implGetFileFromPackage(
|
|||||||
|
|
||||||
::std::vector< ::rtl::OUString > av;
|
::std::vector< ::rtl::OUString > av;
|
||||||
implGetLanguageVectorFromPackage( av, xPackage );
|
implGetLanguageVectorFromPackage( av, xPackage );
|
||||||
::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
|
::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
|
||||||
try
|
|
||||||
{
|
|
||||||
pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
|
|
||||||
}
|
|
||||||
catch( ::comphelper::Locale::MalFormedLocaleException& )
|
|
||||||
{}
|
|
||||||
if( pFound != av.end() )
|
if( pFound != av.end() )
|
||||||
aLanguage = *pFound;
|
aLanguage = *pFound;
|
||||||
}
|
}
|
||||||
@ -1634,13 +1630,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< depl
|
|||||||
{
|
{
|
||||||
::std::vector< ::rtl::OUString > av;
|
::std::vector< ::rtl::OUString > av;
|
||||||
implGetLanguageVectorFromPackage( av, xPackage );
|
implGetLanguageVectorFromPackage( av, xPackage );
|
||||||
::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
|
::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
|
||||||
try
|
|
||||||
{
|
|
||||||
pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
|
|
||||||
}
|
|
||||||
catch( ::comphelper::Locale::MalFormedLocaleException& )
|
|
||||||
{}
|
|
||||||
if( pFound != av.end() )
|
if( pFound != av.end() )
|
||||||
{
|
{
|
||||||
aUsedLanguage = *pFound;
|
aUsedLanguage = *pFound;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <com/sun/star/util/theMacroExpander.hpp>
|
#include <com/sun/star/util/theMacroExpander.hpp>
|
||||||
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
#include <com/sun/star/uri/UriReferenceFactory.hpp>
|
||||||
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
|
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
|
||||||
#include <comphelper/locale.hxx>
|
#include <i18npool/languagetag.hxx>
|
||||||
#include <comphelper/string.hxx>
|
#include <comphelper/string.hxx>
|
||||||
|
|
||||||
namespace treeview {
|
namespace treeview {
|
||||||
@ -1324,13 +1324,7 @@ rtl::OUString TreeFileIterator::implGetTreeFileFromPackage
|
|||||||
|
|
||||||
::std::vector< ::rtl::OUString > av;
|
::std::vector< ::rtl::OUString > av;
|
||||||
implGetLanguageVectorFromPackage( av, xPackage );
|
implGetLanguageVectorFromPackage( av, xPackage );
|
||||||
::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
|
::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
|
||||||
try
|
|
||||||
{
|
|
||||||
pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
|
|
||||||
}
|
|
||||||
catch( ::comphelper::Locale::MalFormedLocaleException& )
|
|
||||||
{}
|
|
||||||
if( pFound != av.end() )
|
if( pFound != av.end() )
|
||||||
aLanguage = *pFound;
|
aLanguage = *pFound;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user