use more officecfg in xmlhelp::Databases
Change-Id: Iba6c3d0ed3d4d029a4497f56a8412c88bde5246c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167702 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
86dcdfd097
commit
bab6d9c44b
@@ -57,6 +57,7 @@
|
||||
|
||||
#include <comphelper/propertyvalue.hxx>
|
||||
#include <comphelper/storagehelper.hxx>
|
||||
#include <officecfg/Office/Common.hxx>
|
||||
#include <utility>
|
||||
|
||||
#include "databases.hxx"
|
||||
@@ -176,26 +177,10 @@ Databases::~Databases()
|
||||
m_aKeywordInfo.clear();
|
||||
}
|
||||
|
||||
OString Databases::getImageTheme() const
|
||||
// static
|
||||
OString Databases::getImageTheme()
|
||||
{
|
||||
uno::Reference< lang::XMultiServiceFactory > xConfigProvider =
|
||||
configuration::theDefaultProvider::get(m_xContext);
|
||||
|
||||
// set root path
|
||||
uno::Sequence<uno::Any> lParams(comphelper::InitAnyPropertySequence(
|
||||
{
|
||||
{"nodepath", uno::Any(u"org.openoffice.Office.Common"_ustr)}
|
||||
}));
|
||||
|
||||
// open it
|
||||
uno::Reference< uno::XInterface > xCFG( xConfigProvider->createInstanceWithArguments(
|
||||
u"com.sun.star.configuration.ConfigurationAccess"_ustr,
|
||||
lParams) );
|
||||
|
||||
uno::Reference< container::XHierarchicalNameAccess > xAccess(xCFG, uno::UNO_QUERY_THROW);
|
||||
uno::Any aResult = xAccess->getByHierarchicalName(u"Misc/SymbolStyle"_ustr);
|
||||
OUString aSymbolsStyleName;
|
||||
aResult >>= aSymbolsStyleName;
|
||||
OUString aSymbolsStyleName = officecfg::Office::Common::Misc::SymbolStyle::get();
|
||||
|
||||
if ( aSymbolsStyleName.isEmpty() || aSymbolsStyleName == "auto" )
|
||||
{
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace chelp {
|
||||
|
||||
~Databases();
|
||||
|
||||
OString getImageTheme() const;
|
||||
static OString getImageTheme();
|
||||
|
||||
OUString getInstallPathAsURL();
|
||||
OUString getInstallPathAsURL(std::unique_lock<std::mutex>& rGuard);
|
||||
|
||||
@@ -746,7 +746,7 @@ InputStreamTransformer::InputStreamTransformer( URLParameter* urlParam,
|
||||
RTL_TEXTENCODING_UTF8 ) + "'";
|
||||
|
||||
parString[last++] = "imgtheme"_ostr;
|
||||
parString[last++] = "'" + pDatabases->getImageTheme() + "'";
|
||||
parString[last++] = "'" + chelp::Databases::getImageTheme() + "'";
|
||||
parString[last++] = "hp"_ostr;
|
||||
parString[last++] = "'" + urlParam->getByName( "HelpPrefix" ) + "'";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user