diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-27 14:16:36 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-28 10:23:50 +0200 |
commit | d4f63f5e767d23675240e9dd6d95fc9496ad9df5 (patch) | |
tree | b635600faefbb593ed11cb05082654efabb9d552 /sc/source/ui | |
parent | 8f4549109da2a7a0860cdebedcb2cbe8ddbd601a (diff) |
Fix OpenCL-less build harder
Change-Id: I1627f534505c735455c50f9b4f6e4d1c698ab9d2
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a4de29cad0d4..bf89e009ae94 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2353,7 +2353,11 @@ void ScModelObj::enableAutomaticDeviceSelection(sal_Bool bForce) ScFormulaOptions aOptions = SC_MOD()->GetFormulaOptions(); aOptions.SetCalcConfig(aConfig); SC_MOD()->SetFormulaOptions(aOptions); +#if !HAVE_FEATURE_OPENCL + (void) bForce; +#else sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(), true, bForce); +#endif } void ScModelObj::disableAutomaticDeviceSelection() @@ -2392,19 +2396,27 @@ void ScModelObj::selectOpenCLDevice( sal_Int32 nPlatform, sal_Int32 nDevice ) sal_Int32 ScModelObj::getPlatformID() throw (uno::RuntimeException, std::exception) { +#if !HAVE_FEATURE_OPENCL + return -1; +#else sal_Int32 nPlatformId; sal_Int32 nDeviceId; sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId); return nPlatformId; +#endif } sal_Int32 ScModelObj::getDeviceID() throw (uno::RuntimeException, std::exception) { +#if !HAVE_FEATURE_OPENCL + return -1; +#else sal_Int32 nPlatformId; sal_Int32 nDeviceId; sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId); return nDeviceId; +#endif } uno::Sequence< sheet::opencl::OpenCLPlatform > ScModelObj::getOpenCLPlatforms() |