diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-10-04 13:11:10 +0300 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.co.uk> | 2017-11-21 16:09:43 +0530 |
commit | 0e75c5d5d26724402adfc9c6e939b59d4d29bc22 (patch) | |
tree | f040f7641c7082e6ed40d73e342283439d3f9b5b /cui | |
parent | 5222910f969390c64c18866834d9af53e7c4c189 (diff) |
Display the threaded calculation state in Help:About
Change-Id: I299e555392bb4b09325ad2c92f843b1e12ee4d31
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/about.cxx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index a7d219407249..c9ba680c8609 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -53,6 +53,7 @@ #include <opencl/openclwrapper.hxx> #endif #include <officecfg/Office/Common.hxx> +#include <officecfg/Office/Calc.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -334,19 +335,31 @@ OUString AboutDialog::GetVersionString() sVersion += m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr); } -#if HAVE_FEATURE_OPENCL OUString aCalcMode = "Calc: "; // Calc calculation mode + +#if HAVE_FEATURE_OPENCL bool bSWInterp = officecfg::Office::Common::Misc::UseSwInterpreter::get(); bool bOpenCL = openclwrapper::GPUEnv::isOpenCLEnabled(); if (bOpenCL) aCalcMode += "CL"; else if (bSWInterp) aCalcMode += "group"; - else - aCalcMode += "single"; - sVersion += "; " + aCalcMode; +#else + const bool bOpenCL = false; #endif + static const bool bThreadingProhibited = std::getenv("SC_NO_THREADED_CALCULATION"); + bool bThreadedCalc = officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::get(); + + if (!bThreadingProhibited && !bOpenCL && bThreadedCalc) + { + if (!aCalcMode.endsWith(" ")) + aCalcMode += " "; + aCalcMode += "threaded"; + } + + sVersion += "; " + aCalcMode; + return sVersion; } |