summaryrefslogtreecommitdiff
path: root/xmlhelp/source
diff options
context:
space:
mode:
authorAndreas Bille <abi@openoffice.org>2001-06-28 13:14:36 +0000
committerAndreas Bille <abi@openoffice.org>2001-06-28 13:14:36 +0000
commit6b07dcd704cd2ad561a2a58707fb6b0986707733 (patch)
tree073589522e475ec2e51073ae40c21c7463f0fd8a /xmlhelp/source
parent637768146bc55b4e42e637fb5f2a4eb4fd4ec92b (diff)
#88954#
Now looking first, whether a directory language-countrycode exists.
Diffstat (limited to 'xmlhelp/source')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx26
1 files changed, 16 insertions, 10 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index e46795d475b9..86d6419862a0 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: databases.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: abi $ $Date: 2001-06-18 12:10:12 $
+ * last change: $Author: abi $ $Date: 2001-06-28 14:14:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -304,6 +304,7 @@ StaticModuleInformation* Databases::getStaticInformationForModule( const rtl::OU
+
rtl::OUString Databases::lang( const rtl::OUString& Language )
{
osl::MutexGuard aGuard( m_aMutex );
@@ -314,15 +315,21 @@ rtl::OUString Databases::lang( const rtl::OUString& Language )
if( it == m_aLangSet.end() )
{
sal_Int32 idx;
- if( ( idx = Language.indexOf( '-' ) ) != -1 ||
- ( idx = Language.indexOf( '_' ) ) != -1 )
- ret = Language.copy( 0,idx );
- else
- ret = Language;
-
osl::DirectoryItem aDirItem;
- if( osl::FileBase::E_None == osl::DirectoryItem::get( getInstallPathAsURL() + ret,aDirItem ) )
+
+ if( osl::FileBase::E_None == osl::DirectoryItem::get( getInstallPathAsURL() + Language,aDirItem ) )
+ {
+ ret = Language;
m_aLangSet[ Language ] = ret;
+ }
+ else if( ( ( idx = Language.indexOf( '-' ) ) != -1 ||
+ ( idx = Language.indexOf( '_' ) ) != -1 ) &&
+ osl::FileBase::E_None == osl::DirectoryItem::get( getInstallPathAsURL() + Language.copy( 0,idx ),
+ aDirItem ) )
+ {
+ ret = Language.copy( 0,idx );
+ m_aLangSet[ Language ] = ret;
+ }
}
else
ret = it->second;
@@ -331,7 +338,6 @@ rtl::OUString Databases::lang( const rtl::OUString& Language )
}
-
rtl::OUString Databases::country( const rtl::OUString& Language )
{
sal_Int32 idx;