summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-10-04 13:11:10 +0300
committerDennis Francis <dennis.francis@collabora.co.uk>2017-11-21 13:49:52 +0530
commit6147ba802ac891910c7404c697b0e9f57f0a44d4 (patch)
tree3b8615ec4c55b1f414b9ccb1e1b5fe2ac842da53
parentb8d13501fd75c8b71f0ab7a0d3f5b965738a2c2e (diff)
Display the threaded calculation state in Help:About
Change-Id: I299e555392bb4b09325ad2c92f843b1e12ee4d31
-rw-r--r--cui/source/dialogs/about.cxx21
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;
}