summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-03-28 01:00:10 +0100
committerEike Rathke <erack@redhat.com>2013-03-28 01:39:08 +0100
commitbcc73432eefc08421f6ee16b3c179cba3add636a (patch)
treefc8f398847e5304dca277d16b45c106c6caab30f /xmlhelp
parent2ac8508a2fd538183953dfa0a283c8c829bb066f (diff)
use LanguageTag instead of comphelper::Locale
Change-Id: Id8239b3e34c343fc114a66ab9216c179b1746d56
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/Library_tvhlp1.mk1
-rw-r--r--xmlhelp/Library_ucpchelp1.mk1
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx20
-rw-r--r--xmlhelp/source/treeview/tvread.cxx10
4 files changed, 9 insertions, 23 deletions
diff --git a/xmlhelp/Library_tvhlp1.mk b/xmlhelp/Library_tvhlp1.mk
index 5607920dfc13..95c63cbb04fe 100644
--- a/xmlhelp/Library_tvhlp1.mk
+++ b/xmlhelp/Library_tvhlp1.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,tvhlp1,\
cppuhelper \
sal \
utl \
+ i18nisolang1 \
))
$(eval $(call gb_Library_add_exception_objects,tvhlp1,\
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index 5472eaa7a2f5..3d7d057ad035 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,ucpchelp1,\
sal \
ucbhelper \
utl \
+ i18nisolang1 \
))
$(eval $(call gb_Library_add_exception_objects,ucpchelp1,\
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 8660b53464cd..c875840f5a39 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -50,7 +50,7 @@
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarExpandUrl.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/XExtendedToolkit.hpp>
@@ -648,6 +648,8 @@ Databases::getCollator( const rtl::OUString& Language,
else if( langStr.compareToAscii("ko") == 0 )
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,
countryStr,
rtl::OUString() ),
@@ -1491,13 +1493,7 @@ rtl::OUString ExtensionIteratorBase::implGetFileFromPackage(
::std::vector< ::rtl::OUString > av;
implGetLanguageVectorFromPackage( av, xPackage );
- ::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
- try
- {
- pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
- }
- catch( ::comphelper::Locale::MalFormedLocaleException& )
- {}
+ ::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
if( pFound != av.end() )
aLanguage = *pFound;
}
@@ -1634,13 +1630,7 @@ helpdatafileproxy::Hdf* DataBaseIterator::implGetHdfFromPackage( Reference< depl
{
::std::vector< ::rtl::OUString > av;
implGetLanguageVectorFromPackage( av, xPackage );
- ::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
- try
- {
- pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
- }
- catch( ::comphelper::Locale::MalFormedLocaleException& )
- {}
+ ::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
if( pFound != av.end() )
{
aUsedLanguage = *pFound;
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index b47a2abd5536..30800a0c4628 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/util/theMacroExpander.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarExpandUrl.hpp>
-#include <comphelper/locale.hxx>
+#include <i18npool/languagetag.hxx>
#include <comphelper/string.hxx>
namespace treeview {
@@ -1324,13 +1324,7 @@ rtl::OUString TreeFileIterator::implGetTreeFileFromPackage
::std::vector< ::rtl::OUString > av;
implGetLanguageVectorFromPackage( av, xPackage );
- ::std::vector< ::rtl::OUString >::const_iterator pFound = av.end();
- try
- {
- pFound = ::comphelper::Locale::getFallback( av, m_aLanguage );
- }
- catch( ::comphelper::Locale::MalFormedLocaleException& )
- {}
+ ::std::vector< ::rtl::OUString >::const_iterator pFound = LanguageTag::getFallback( av, m_aLanguage );
if( pFound != av.end() )
aLanguage = *pFound;
}