diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-19 08:58:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-19 14:53:48 +0100 |
commit | 5202a6fe010fd9ce20303c573c8da0f5ab09eea8 (patch) | |
tree | e021c787f3db6086c62d656a0ec4b7d98833b35d /xmlhelp | |
parent | 559489549f9bc178822ce8cd3f49fd967ef1298b (diff) |
cid#1545244 COPY_INSTEAD_OF_MOVE
and
cid#1546433 COPY_INSTEAD_OF_MOVE
cid#1546428 COPY_INSTEAD_OF_MOVE
cid#1546175 COPY_INSTEAD_OF_MOVE
cid#1545866 COPY_INSTEAD_OF_MOVE
Change-Id: I1d1e684faa422654fd90513cf459cde58d3d8914
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162298
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index cc06309369c2..7b1b1fd0713e 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -583,7 +583,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) Reference< XHierarchicalNameAccess > xHierAccess( getHierAccess( sProvider, "org.openoffice.Office.Common" ) ); - OUString system( getKey( xHierAccess,"Help/System" ) ); + configData.system = getKey(xHierAccess,"Help/System"); bool showBasic( getBooleanKey(xHierAccess,"Help/ShowBasic") ); OUString instPath( getKey( xHierAccess,"Path/Current/Help" ) ); if( instPath.isEmpty() ) @@ -626,8 +626,11 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) { } - OUString productVersion( setupversion + " " + setupextension ); - OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) ); + configData.m_vReplacement[0] = utl::ConfigManager::getProductName(); + configData.m_vReplacement[1] = setupversion + " " + setupextension; // productVersion + // m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings + + configData.locale = getKey(xHierAccess,"L10N/ooLocale"); // Determine fileurl from url and locale OUString url; @@ -638,24 +641,24 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) OUString ret; sal_Int32 idx; osl::DirectoryItem aDirItem; - if( osl::FileBase::E_None == osl::DirectoryItem::get( url + locale,aDirItem ) ) - ret = locale; - else if( ( ( idx = locale.indexOf( '-' ) ) != -1 || - ( idx = locale.indexOf( '_' ) ) != -1 ) && - osl::FileBase::E_None == osl::DirectoryItem::get( url + locale.subView( 0,idx ), + if( osl::FileBase::E_None == osl::DirectoryItem::get( url + configData.locale, aDirItem ) ) + ret = configData.locale; + else if( ( ( idx = configData.locale.indexOf( '-' ) ) != -1 || + ( idx = configData.locale.indexOf( '_' ) ) != -1 ) && + osl::FileBase::E_None == osl::DirectoryItem::get( url + configData.locale.subView( 0,idx ), aDirItem ) ) - ret = locale.copy( 0,idx ); + ret = configData.locale.copy( 0,idx ); else - { - locale = "en-US"; + { + configData.locale= "en-US"; ret = "en"; - } + } url += ret; // first of all, try do determine whether there are any *.tree files present // Start with extensions to set them at the end of the list - TreeFileIterator aTreeIt( locale ); + TreeFileIterator aTreeIt(configData.locale); OUString aTreeFile; sal_Int32 nFileSize; for (;;) @@ -716,12 +719,7 @@ ConfigData TVChildTarget::init( const Reference< XComponentContext >& xContext ) configData.m_vAdd[2] = 11; configData.m_vAdd[3] = 14; configData.m_vAdd[4] = 12; - configData.m_vReplacement[0] = utl::ConfigManager::getProductName(); - configData.m_vReplacement[1] = productVersion; - // m_vReplacement[2...4] (vendorName/-Version/-Short) are empty strings - configData.system = system; - configData.locale = locale; configData.appendix = "?Language=" + configData.locale + |