[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - 21 commits - config_host.mk.in configure.ac cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk download.lst external/clcc external/Module_external.mk include/opencl Makefile.fetch officecfg/registry opencl/inc opencl/Library_opencl.mk opencl/Makefile opencl/Module_opencl.mk opencl/README opencl/source RepositoryExternal.mk Repository.mk RepositoryModule_host.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_ucalc.mk sc/inc sc/Library_sc.mk sc/Library_scui.mk sc/qa sc/source sc/uiconfig

Tor Lillqvist tml at collabora.com
Fri Nov 28 01:24:35 PST 2014


 Makefile.fetch                                             |    1 
 Repository.mk                                              |    2 
 RepositoryExternal.mk                                      |   11 
 RepositoryModule_host.mk                                   |    1 
 config_host.mk.in                                          |    1 
 configure.ac                                               |    7 
 cui/Library_cui.mk                                         |    6 
 cui/UIConfig_cui.mk                                        |    3 
 cui/source/inc/cuires.hrc                                  |    2 
 cui/source/options/optopencl.cxx                           |  283 ++
 cui/source/options/optopencl.hxx                           |   71 
 cui/source/options/treeopt.cxx                             |    6 
 cui/source/options/treeopt.src                             |    1 
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui             |  281 ++
 cui/uiconfig/ui/optopenclpage.ui                           |  349 +++
 download.lst                                               |    2 
 external/Module_external.mk                                |    1 
 external/clcc/Library_clew.mk                              |   35 
 external/clcc/Makefile                                     |    7 
 external/clcc/Module_clcc.mk                               |   17 
 external/clcc/UnpackedTarball_clcc.mk                      |   25 
 external/clcc/clew-non-static.patch                        |   52 
 include/opencl/openclconfig.hxx                            |  100 
 include/opencl/opencldllapi.h                              |   34 
 include/opencl/openclwrapper.hxx                           |   86 
 include/opencl/platforminfo.hxx                            |   51 
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs   |   21 
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   21 
 opencl/Library_opencl.mk                                   |   55 
 opencl/Makefile                                            |   14 
 opencl/Module_opencl.mk                                    |   16 
 opencl/README                                              |    7 
 opencl/inc/opencl_device.hxx                               |   25 
 opencl/inc/opencl_device_selection.h                       |  641 ++++++
 opencl/source/opencl_device.cxx                            |  597 +++++
 opencl/source/openclconfig.cxx                             |  256 ++
 opencl/source/openclwrapper.cxx                            |  809 +++++++
 opencl/source/platforminfo.cxx                             |   46 
 sc/CppunitTest_sc_opencl_test.mk                           |    8 
 sc/CppunitTest_sc_ucalc.mk                                 |    6 
 sc/Library_sc.mk                                           |   25 
 sc/Library_scui.mk                                         |    3 
 sc/inc/calcconfig.hxx                                      |   60 
 sc/inc/formulagroup.hxx                                    |    9 
 sc/inc/platforminfo.hxx                                    |   50 
 sc/qa/unit/opencl-test.cxx                                 |    2 
 sc/source/core/data/formulacell.cxx                        |    7 
 sc/source/core/inc/clcc/clew.h                             | 1316 -------------
 sc/source/core/inc/openclwrapper.hxx                       |  111 -
 sc/source/core/opencl/clcc/clew.cxx                        |  324 ---
 sc/source/core/opencl/formulagroupcl.cxx                   |   60 
 sc/source/core/opencl/opbase.hxx                           |    2 
 sc/source/core/opencl/opencl_device.cxx                    |  594 -----
 sc/source/core/opencl/opencl_device.hxx                    |   26 
 sc/source/core/opencl/opencl_device_selection.h            |  642 ------
 sc/source/core/opencl/openclwrapper.cxx                    |  885 --------
 sc/source/core/tool/calcconfig.cxx                         |   46 
 sc/source/core/tool/formulagroup.cxx                       |   51 
 sc/source/core/tool/formulaopt.cxx                         |  137 -
 sc/source/core/tool/interpr5.cxx                           |    3 
 sc/source/core/tool/platforminfo.cxx                       |   48 
 sc/source/ui/optdlg/calcoptionsdlg.cxx                     |  230 --
 sc/source/ui/optdlg/calcoptionsdlg.hxx                     |   30 
 sc/source/ui/unoobj/docuno.cxx                             |   40 
 sc/uiconfig/scalc/ui/formulacalculationoptions.ui          |  315 ---
 65 files changed, 4072 insertions(+), 4901 deletions(-)

New commits:
commit 8c1888350871bdf258e8b0da7c38377830bdd8d8
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 28 09:45:27 2014 +0200

    Fix packing overlap
    
    Change-Id: I3fa211be09daf3089b0ac54f885a3fb7d1753b2f

diff --git a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
index 3c2b238..12feaa3 100644
--- a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
+++ b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
@@ -106,7 +106,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="top_attach">1</property>
                   </packing>
                 </child>
                 <child>
@@ -120,7 +120,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">0</property>
+                    <property name="top_attach">2</property>
                   </packing>
                 </child>
                 <child>
@@ -132,7 +132,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">1</property>
+                    <property name="top_attach">3</property>
                   </packing>
                 </child>
                 <child>
@@ -146,7 +146,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">2</property>
+                    <property name="top_attach">4</property>
                   </packing>
                 </child>
                 <child>
@@ -158,7 +158,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">3</property>
+                    <property name="top_attach">5</property>
                   </packing>
                 </child>
                 <child>
@@ -172,7 +172,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">4</property>
+                    <property name="top_attach">6</property>
                   </packing>
                 </child>
                 <child>
@@ -184,7 +184,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">5</property>
+                    <property name="top_attach">7</property>
                   </packing>
                 </child>
                 <child>
@@ -198,7 +198,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">6</property>
+                    <property name="top_attach">8</property>
                   </packing>
                 </child>
                 <child>
@@ -210,7 +210,7 @@
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
-                    <property name="top_attach">7</property>
+                    <property name="top_attach">9</property>
                   </packing>
                 </child>
               </object>
commit 8e040db79955f4d907d7280e78044c183972fac9
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 28 09:28:14 2014 +0200

    The compiler-generated dtor is good enough, no need for this
    
    Change-Id: Ib72e0df4ac3ca90d440a32359e711d77e758cca0

diff --git a/include/opencl/platforminfo.hxx b/include/opencl/platforminfo.hxx
index 28c7ba8..6c40c43 100644
--- a/include/opencl/platforminfo.hxx
+++ b/include/opencl/platforminfo.hxx
@@ -43,9 +43,6 @@ struct OPENCL_DLLPUBLIC OpenCLPlatformInfo
     std::vector<OpenCLDeviceInfo> maDevices;
 
     OpenCLPlatformInfo();
-    ~OpenCLPlatformInfo()
-    {
-    }
 };
 
 OPENCL_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const OpenCLPlatformInfo& rPlatform);
commit b196202b92b540e28b0de873bf300c782aaec30e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 28 09:26:55 2014 +0200

    scui needs the opencl library at least on Windows
    
    Change-Id: I4183b957d59bb81b8df7a5f51418be94c879b3fe

diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk
index a00e81a..781b2e9 100644
--- a/sc/Library_scui.mk
+++ b/sc/Library_scui.mk
@@ -24,7 +24,7 @@ $(eval $(call gb_Library_use_sdk_api,scui))
 
 $(eval $(call gb_Library_use_externals,scui,\
 	boost_headers \
-    $(call gb_Helper_optional,OPENCL,clew) \
+	$(call gb_Helper_optional,OPENCL,clew) \
 	mdds_headers \
 ))
 
@@ -36,6 +36,8 @@ $(eval $(call gb_Library_use_libraries,scui,\
 	for \
 	forui \
 	i18nlangtag \
+	$(call gb_Helper_optional,OPENCL, \
+		opencl) \
 	sal \
 	sc \
 	sfx \
commit 0eb9e29b8010bf9f6941fdf17780e920bf6a5dfb
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 18:03:35 2014 +0200

    Put the KernelEnv struct inside the opencl namespace, too
    
    Change-Id: I33d51b0e30445c34c792210e7c656c1d48159019

diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index 6e520a7..5fd76ea 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -36,6 +36,8 @@ if( status != CL_SUCCESS )    \
 
 #include <cstdio>
 
+namespace opencl {
+
 struct KernelEnv
 {
     cl_context mpkContext;
@@ -43,8 +45,6 @@ struct KernelEnv
     cl_program mpkProgram;
 };
 
-namespace opencl {
-
 struct GPUEnv
 {
     //share vb in all modules in hb library
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 6ac2a5f..4fa3c5f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -113,7 +113,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
         throw Unhandled();
     }
     // Obtain cl context
-    KernelEnv kEnv;
+    ::opencl::KernelEnv kEnv;
     ::opencl::setKernelEnv(&kEnv);
     cl_int err;
     if (pHostBuffer)
@@ -204,7 +204,7 @@ public:
         }
         // marshaling
         // Obtain cl context
-        KernelEnv kEnv;
+        ::opencl::KernelEnv kEnv;
         ::opencl::setKernelEnv(&kEnv);
         // Pass the scalar result back to the rest of the formula kernel
         cl_int err = clSetKernelArg(k, argno, sizeof(cl_uint), (void*)&hashCode);
@@ -388,7 +388,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
 {
     FormulaToken* ref = mFormulaTree->GetFormulaToken();
     // Obtain cl context
-    KernelEnv kEnv;
+    ::opencl::KernelEnv kEnv;
     ::opencl::setKernelEnv(&kEnv);
     cl_int err;
     formula::VectorRefArray vRef;
@@ -1131,7 +1131,7 @@ public:
     {
         assert(Base::mpClmem == NULL);
         // Obtain cl context
-        KernelEnv kEnv;
+        ::opencl::KernelEnv kEnv;
         ::opencl::setKernelEnv(&kEnv);
         cl_int err;
         size_t nInput = mpDVR->GetArrayLength();
@@ -1912,7 +1912,7 @@ public:
         if (OpGeoMean* OpSumCodeGen = dynamic_cast<OpGeoMean*>(mpCodeGen.get()))
         {
             // Obtain cl context
-            KernelEnv kEnv;
+            ::opencl::KernelEnv kEnv;
             ::opencl::setKernelEnv(&kEnv);
             cl_int err;
             cl_mem pClmem2;
@@ -1970,7 +1970,7 @@ public:
         if (OpSumIfs* OpSumCodeGen = dynamic_cast<OpSumIfs*>(mpCodeGen.get()))
         {
             // Obtain cl context
-            KernelEnv kEnv;
+            ::opencl::KernelEnv kEnv;
             ::opencl::setKernelEnv(&kEnv);
             cl_int err;
             DynamicKernelArgument* Arg = mvSubArguments[0].get();
@@ -3354,7 +3354,7 @@ public:
     void Launch( size_t nr )
     {
         // Obtain cl context
-        KernelEnv kEnv;
+        ::opencl::KernelEnv kEnv;
         ::opencl::setKernelEnv(&kEnv);
         cl_int err;
         // The results
@@ -3416,7 +3416,7 @@ void DynamicKernel::CreateKernel()
     std::string kname = "DynamicKernel" + mKernelSignature;
     // Compile kernel here!!!
     // Obtain cl context
-    KernelEnv kEnv;
+    ::opencl::KernelEnv kEnv;
     ::opencl::setKernelEnv(&kEnv);
     const char* src = mFullProgramSrc.c_str();
     static std::string lastOneKernelHash = "";
@@ -3667,7 +3667,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
     try
     {
         // Obtain cl context
-        KernelEnv kEnv;
+        ::opencl::KernelEnv kEnv;
         ::opencl::setKernelEnv(&kEnv);
         // Run the kernel.
         pKernel->Launch(xGroup->mnLength);
commit b8b95ef627fdb4b19abb667c97ba3e61871a2270
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 17:56:21 2014 +0200

    The OpenCLEnv struct is used only inside openclwrapper.cxx
    
    Change-Id: I95fbee302213e6ced469dd7a2a1c254178159357

diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index 1a392e5..6e520a7 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -45,14 +45,6 @@ struct KernelEnv
 
 namespace opencl {
 
-struct OpenCLEnv
-{
-    cl_platform_id mpOclPlatformID;
-    cl_context mpOclContext;
-    cl_device_id mpOclDevsID;
-    cl_command_queue mpOclCmdQueue;
-};
-
 struct GPUEnv
 {
     //share vb in all modules in hb library
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index b181375..9ce2481 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -254,6 +254,14 @@ bool generatBinFromKernelSource( cl_program program, const char * clFileName )
 
 namespace {
 
+struct OpenCLEnv
+{
+    cl_platform_id mpOclPlatformID;
+    cl_context mpOclContext;
+    cl_device_id mpOclDevsID;
+    cl_command_queue mpOclCmdQueue;
+};
+
 bool initOpenCLAttr( OpenCLEnv * env )
 {
     if ( gpuEnv.mnIsUserCreated )
commit 8b96e6edc943186649b06312404dffe31eaf5013
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 17:43:55 2014 +0200

    Clean up confusing OpenCL code a bit
    
    Get rid of the silly OpenCLDevice class that had only static members. We can
    as well just use namespacing. Remove functions only used internally in
    openclwrapper.cxx from the now public openclwrapper.hxx header.
    
    Change-Id: If7336edd262c772564dc13e64113d72d0b52428c

diff --git a/include/opencl/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
index ba7aada..1a392e5 100644
--- a/include/opencl/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -68,25 +68,10 @@ struct GPUEnv
     bool mnAmdFp64Flag;
 };
 
-class OPENCL_DLLPUBLIC OpenCLDevice
-{
-public:
-    static GPUEnv gpuEnv;
-    static bool bIsInited;
-    static OString maCacheFolder;
-
-    static bool initOpenCLRunEnv( GPUEnv *gpu );
-    static void releaseOpenCLEnv( GPUEnv *gpuInfo );
-    static bool initOpenCLRunEnv( int argc );
-    static bool generatBinFromKernelSource( cl_program program, const char * clFileName );
-    static bool writeBinaryToFile( const OString& rName, const char* birary, size_t numBytes );
-    static std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileName, cl_context context);
-    static bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx);
-
-    static bool initOpenCLAttr( OpenCLEnv * env );
-    static void setKernelEnv( KernelEnv *envInfo );
-};
-
+extern OPENCL_DLLPUBLIC GPUEnv gpuEnv;
+OPENCL_DLLPUBLIC bool generatBinFromKernelSource( cl_program program, const char * clFileName );
+OPENCL_DLLPUBLIC bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuEnv, const char* filename, int idx);
+OPENCL_DLLPUBLIC void setKernelEnv( KernelEnv *envInfo );
 OPENCL_DLLPUBLIC const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo();
 
 /**
diff --git a/opencl/inc/opencl_device.hxx b/opencl/inc/opencl_device.hxx
index 7435879..057e2f4 100644
--- a/opencl/inc/opencl_device.hxx
+++ b/opencl/inc/opencl_device.hxx
@@ -12,7 +12,7 @@
 
 #include "opencl_device_selection.h"
 
-namespace OpenCLDevice {
+namespace opencl {
 
 ds_device getDeviceSelection(const char* pFileName, bool bForceSelection = false);
 bool selectedDeviceIsOpenCL(ds_device device);
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 204ab34..14eb703 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -44,9 +44,8 @@
     SAL_INFO("opencl.device", "Error code is " << status << " at " name); \
     }
 
-namespace OpenCLDevice {
+namespace opencl {
 
-bool bIsInited = false;
 bool bIsDeviceSelected = false;
 ds_device selectedDevice;
 
diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
index 86ba6cd..b181375 100644
--- a/opencl/source/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -48,11 +48,12 @@ using namespace std;
 
 namespace opencl {
 
-GPUEnv OpenCLDevice::gpuEnv;
-bool OpenCLDevice::bIsInited = false;
+GPUEnv gpuEnv;
 
 namespace {
 
+bool bIsInited = false;
+
 OString generateMD5(const void* pData, size_t length)
 {
     sal_uInt8 pBuffer[RTL_DIGEST_LENGTH_MD5];
@@ -81,11 +82,11 @@ OString getCacheFolder()
     return rtl::OUStringToOString(url, RTL_TEXTENCODING_UTF8);
 }
 
-}
+OString maCacheFolder = getCacheFolder();
 
-OString OpenCLDevice::maCacheFolder = getCacheFolder();
+}
 
-void OpenCLDevice::setKernelEnv( KernelEnv *envInfo )
+void setKernelEnv( KernelEnv *envInfo )
 {
     envInfo->mpkContext = gpuEnv.mpContext;
     envInfo->mpkCmdQueue = gpuEnv.mpCmdQueue;
@@ -121,13 +122,11 @@ OString createFileName(cl_device_id deviceId, const char* clFileName)
     OString aString = OString(deviceName) + driverVersion + platformVersion;
     OString aHash = generateMD5(aString.getStr(), aString.getLength());
 
-    return OpenCLDevice::maCacheFolder + fileName + "-" +
+    return maCacheFolder + fileName + "-" +
         aHash + ".bin";
 }
 
-}
-
-std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const char * clFileName, cl_context context )
+std::vector<boost::shared_ptr<osl::File> > binaryGenerated( const char * clFileName, cl_context context )
 {
     size_t numDevices=0;
 
@@ -170,7 +169,7 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
     return aGeneratedFiles;
 }
 
-bool OpenCLDevice::writeBinaryToFile( const OString& rFileName, const char* binary, size_t numBytes )
+bool writeBinaryToFile( const OString& rFileName, const char* binary, size_t numBytes )
 {
     osl::File file(rtl::OStringToOUString(rFileName, RTL_TEXTENCODING_UTF8));
     osl::FileBase::RC status = file.open(
@@ -187,7 +186,9 @@ bool OpenCLDevice::writeBinaryToFile( const OString& rFileName, const char* bina
     return true;
 }
 
-bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char * clFileName )
+}
+
+bool generatBinFromKernelSource( cl_program program, const char * clFileName )
 {
     cl_uint numDevices;
 
@@ -251,7 +252,9 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
     return true;
 }
 
-bool OpenCLDevice::initOpenCLAttr( OpenCLEnv * env )
+namespace {
+
+bool initOpenCLAttr( OpenCLEnv * env )
 {
     if ( gpuEnv.mnIsUserCreated )
         return true;
@@ -266,7 +269,7 @@ bool OpenCLDevice::initOpenCLAttr( OpenCLEnv * env )
     return false;
 }
 
-void OpenCLDevice::releaseOpenCLEnv( GPUEnv *gpuInfo )
+void releaseOpenCLEnv( GPUEnv *gpuInfo )
 {
     if ( !bIsInited )
     {
@@ -290,8 +293,6 @@ void OpenCLDevice::releaseOpenCLEnv( GPUEnv *gpuInfo )
     return;
 }
 
-namespace {
-
 bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
 {
     cl_int clStatus;
@@ -342,7 +343,7 @@ bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
             return false;
         }
 
-        OString aBuildLogFileURL = OpenCLDevice::maCacheFolder + "kernel-build.log";
+        OString aBuildLogFileURL = maCacheFolder + "kernel-build.log";
         osl::File aBuildLogFile(rtl::OStringToOUString(aBuildLogFileURL, RTL_TEXTENCODING_UTF8));
         osl::FileBase::RC status = aBuildLogFile.open(
                 osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -361,7 +362,7 @@ bool buildProgram(const char* buildOption, GPUEnv* gpuInfo, int idx)
 
 }
 
-bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char* filename, int idx)
+bool buildProgramFromBinary(const char* buildOption, GPUEnv* gpuInfo, const char* filename, int idx)
 {
     size_t numDevices;
     cl_int clStatus = clGetContextInfo( gpuInfo->mpContext, CL_CONTEXT_DEVICES,
@@ -428,45 +429,6 @@ bool OpenCLDevice::buildProgramFromBinary(const char* buildOption, GPUEnv* gpuIn
     return buildProgram(buildOption, gpuInfo, idx);
 }
 
-bool OpenCLDevice::initOpenCLRunEnv( int argc )
-{
-    if ( ( argc > MAX_CLFILE_NUM ) || ( argc < 0 ) )
-        return true;
-
-    if ( !bIsInited )
-    {
-        if ( !gpuEnv.mnIsUserCreated )
-            memset( &gpuEnv, 0, sizeof(gpuEnv) );
-
-        //initialize devices, context, command_queue
-        bool status = initOpenCLRunEnv( &gpuEnv );
-        if ( status )
-        {
-            return true;
-        }
-        //initialize program, kernelName, kernelCount
-        if( getenv( "SC_FLOAT" ) )
-        {
-            gpuEnv.mnKhrFp64Flag = false;
-            gpuEnv.mnAmdFp64Flag = false;
-        }
-        if( gpuEnv.mnKhrFp64Flag )
-        {
-            SAL_INFO("opencl", "Use Khr double");
-        }
-        else if( gpuEnv.mnAmdFp64Flag )
-        {
-            SAL_INFO("opencl", "Use AMD double type");
-        }
-        else
-        {
-            SAL_INFO("opencl", "USE float type");
-        }
-        bIsInited = true;
-    }
-    return false;
-}
-
 namespace {
 
 void checkDeviceForDoubleSupport(cl_device_id deviceId, bool& bKhrFp64, bool& bAmdFp64)
@@ -501,9 +463,7 @@ void checkDeviceForDoubleSupport(cl_device_id deviceId, bool& bKhrFp64, bool& bA
     }
 }
 
-}
-
-bool OpenCLDevice::initOpenCLRunEnv( GPUEnv *gpuInfo )
+bool initOpenCLRunEnv( GPUEnv *gpuInfo )
 {
     bool bKhrFp64 = false;
     bool bAmdFp64 = false;
@@ -516,7 +476,44 @@ bool OpenCLDevice::initOpenCLRunEnv( GPUEnv *gpuInfo )
     return false;
 }
 
-namespace {
+bool initOpenCLRunEnv( int argc )
+{
+    if ( ( argc > MAX_CLFILE_NUM ) || ( argc < 0 ) )
+        return true;
+
+    if ( !bIsInited )
+    {
+        if ( !gpuEnv.mnIsUserCreated )
+            memset( &gpuEnv, 0, sizeof(gpuEnv) );
+
+        //initialize devices, context, command_queue
+        bool status = initOpenCLRunEnv( &gpuEnv );
+        if ( status )
+        {
+            return true;
+        }
+        //initialize program, kernelName, kernelCount
+        if( getenv( "SC_FLOAT" ) )
+        {
+            gpuEnv.mnKhrFp64Flag = false;
+            gpuEnv.mnAmdFp64Flag = false;
+        }
+        if( gpuEnv.mnKhrFp64Flag )
+        {
+            SAL_INFO("opencl", "Use Khr double");
+        }
+        else if( gpuEnv.mnAmdFp64Flag )
+        {
+            SAL_INFO("opencl", "Use AMD double type");
+        }
+        else
+        {
+            SAL_INFO("opencl", "USE float type");
+        }
+        bIsInited = true;
+    }
+    return false;
+}
 
 // based on crashes and hanging during kernel compilation
 void createDeviceInfo(cl_device_id aDeviceId, OpenCLPlatformInfo& rPlatformInfo)
@@ -725,12 +722,12 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
         OUString path;
         osl::FileBase::getSystemPathFromFileURL(url,path);
         OString dsFileName = rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8);
-        ds_device pSelectedDevice = ::OpenCLDevice::getDeviceSelection(dsFileName.getStr(), bForceEvaluation);
+        ds_device pSelectedDevice = getDeviceSelection(dsFileName.getStr(), bForceEvaluation);
         pDeviceId = pSelectedDevice.oclDeviceID;
 
     }
 
-    if(OpenCLDevice::gpuEnv.mpDevID == pDeviceId)
+    if(gpuEnv.mpDevID == pDeviceId)
     {
         // we don't need to change anything
         // still the same device
@@ -769,13 +766,13 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
         return false;
     }
 
-    OpenCLDevice::releaseOpenCLEnv(&OpenCLDevice::gpuEnv);
+    releaseOpenCLEnv(&gpuEnv);
     OpenCLEnv env;
     env.mpOclPlatformID = platformId;
     env.mpOclContext = context;
     env.mpOclDevsID = pDeviceId;
     env.mpOclCmdQueue = command_queue;
-    OpenCLDevice::initOpenCLAttr(&env);
+    initOpenCLAttr(&env);
 
     // why do we need this at all?
 
@@ -783,10 +780,10 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
     // initialisation below.) Because otherwise the code crashes in
     // initOpenCLRunEnv(). Confused? You should be.
 
-    OpenCLDevice::gpuEnv.mpArryDevsID = (cl_device_id*) malloc( sizeof(cl_device_id) );
-    OpenCLDevice::gpuEnv.mpArryDevsID[0] = pDeviceId;
+    gpuEnv.mpArryDevsID = (cl_device_id*) malloc( sizeof(cl_device_id) );
+    gpuEnv.mpArryDevsID[0] = pDeviceId;
 
-    return !OpenCLDevice::initOpenCLRunEnv(0);
+    return !initOpenCLRunEnv(0);
 }
 
 void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId)
@@ -795,7 +792,7 @@ void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId)
     if (status < 0)
         return;
 
-    cl_device_id id = OpenCLDevice::gpuEnv.mpDevID;
+    cl_device_id id = gpuEnv.mpDevID;
     findDeviceInfoFromDeviceId(id, rDeviceId, rPlatformId);
 }
 
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 0615410..6ac2a5f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -114,7 +114,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
     }
     // Obtain cl context
     KernelEnv kEnv;
-    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::setKernelEnv(&kEnv);
     cl_int err;
     if (pHostBuffer)
     {
@@ -205,7 +205,7 @@ public:
         // marshaling
         // Obtain cl context
         KernelEnv kEnv;
-        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::setKernelEnv(&kEnv);
         // Pass the scalar result back to the rest of the formula kernel
         cl_int err = clSetKernelArg(k, argno, sizeof(cl_uint), (void*)&hashCode);
         if (CL_SUCCESS != err)
@@ -389,7 +389,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
     FormulaToken* ref = mFormulaTree->GetFormulaToken();
     // Obtain cl context
     KernelEnv kEnv;
-    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::setKernelEnv(&kEnv);
     cl_int err;
     formula::VectorRefArray vRef;
     size_t nStrings = 0;
@@ -1132,7 +1132,7 @@ public:
         assert(Base::mpClmem == NULL);
         // Obtain cl context
         KernelEnv kEnv;
-        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::setKernelEnv(&kEnv);
         cl_int err;
         size_t nInput = mpDVR->GetArrayLength();
         size_t nCurWindowSize = mpDVR->GetRefRowSize();
@@ -1913,7 +1913,7 @@ public:
         {
             // Obtain cl context
             KernelEnv kEnv;
-            ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+            ::opencl::setKernelEnv(&kEnv);
             cl_int err;
             cl_mem pClmem2;
 
@@ -1971,7 +1971,7 @@ public:
         {
             // Obtain cl context
             KernelEnv kEnv;
-            ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+            ::opencl::setKernelEnv(&kEnv);
             cl_int err;
             DynamicKernelArgument* Arg = mvSubArguments[0].get();
             DynamicKernelSlidingArgument<VectorRef>* slidingArgPtr =
@@ -3282,11 +3282,11 @@ public:
                                                                DynamicKernelSoPArguments>(mpRoot, new OpNop);
 
         std::stringstream decl;
-        if (::opencl::OpenCLDevice::gpuEnv.mnKhrFp64Flag)
+        if (::opencl::gpuEnv.mnKhrFp64Flag)
         {
             decl << "#pragma OPENCL EXTENSION cl_khr_fp64: enable\n";
         }
-        else if (::opencl::OpenCLDevice::gpuEnv.mnAmdFp64Flag)
+        else if (::opencl::gpuEnv.mnAmdFp64Flag)
         {
             decl << "#pragma OPENCL EXTENSION cl_amd_fp64: enable\n";
         }
@@ -3355,7 +3355,7 @@ public:
     {
         // Obtain cl context
         KernelEnv kEnv;
-        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::setKernelEnv(&kEnv);
         cl_int err;
         // The results
         mpResClmem = clCreateBuffer(kEnv.mpkContext,
@@ -3417,7 +3417,7 @@ void DynamicKernel::CreateKernel()
     // Compile kernel here!!!
     // Obtain cl context
     KernelEnv kEnv;
-    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::setKernelEnv(&kEnv);
     const char* src = mFullProgramSrc.c_str();
     static std::string lastOneKernelHash = "";
     static std::string lastSecondKernelHash = "";
@@ -3439,11 +3439,11 @@ void DynamicKernel::CreateKernel()
         {
             clReleaseProgram(lastSecondProgram);
         }
-        if (::opencl::OpenCLDevice::buildProgramFromBinary("",
-                &::opencl::OpenCLDevice::gpuEnv, KernelHash.c_str(), 0))
+        if (::opencl::buildProgramFromBinary("",
+                &::opencl::gpuEnv, KernelHash.c_str(), 0))
         {
-            mpProgram = ::opencl::OpenCLDevice::gpuEnv.mpArryPrograms[0];
-            ::opencl::OpenCLDevice::gpuEnv.mpArryPrograms[0] = NULL;
+            mpProgram = ::opencl::gpuEnv.mpArryPrograms[0];
+            ::opencl::gpuEnv.mpArryPrograms[0] = NULL;
         }
         else
         {
@@ -3452,7 +3452,7 @@ void DynamicKernel::CreateKernel()
             if (err != CL_SUCCESS)
                 throw OpenCLError(err, __FILE__, __LINE__);
             err = clBuildProgram(mpProgram, 1,
-                ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID, "", NULL, NULL);
+                ::opencl::gpuEnv.mpArryDevsID, "", NULL, NULL);
             if (err != CL_SUCCESS)
             {
 #if OSL_DEBUG_LEVEL > 0
@@ -3460,7 +3460,7 @@ void DynamicKernel::CreateKernel()
                 {
                     cl_build_status stat;
                     cl_int e = clGetProgramBuildInfo(
-                        mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                        mpProgram, ::opencl::gpuEnv.mpArryDevsID[0],
                         CL_PROGRAM_BUILD_STATUS, sizeof(cl_build_status),
                         &stat, 0);
                     SAL_WARN_IF(
@@ -3472,7 +3472,7 @@ void DynamicKernel::CreateKernel()
                     {
                         size_t n;
                         e = clGetProgramBuildInfo(
-                            mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                            mpProgram, ::opencl::gpuEnv.mpArryDevsID[0],
                             CL_PROGRAM_BUILD_LOG, 0, 0, &n);
                         SAL_WARN_IF(
                             e != CL_SUCCESS || n == 0, "sc.opencl",
@@ -3483,7 +3483,7 @@ void DynamicKernel::CreateKernel()
                         {
                             std::vector<char> log(n);
                             e = clGetProgramBuildInfo(
-                                mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                                mpProgram, ::opencl::gpuEnv.mpArryDevsID[0],
                                 CL_PROGRAM_BUILD_LOG, n, &log[0], 0);
                             SAL_WARN_IF(
                                 e != CL_SUCCESS || n == 0, "sc.opencl",
@@ -3502,7 +3502,7 @@ void DynamicKernel::CreateKernel()
                 throw OpenCLError(err, __FILE__, __LINE__);
             }
             // Generate binary out of compiled kernel.
-            ::opencl::OpenCLDevice::generatBinFromKernelSource(mpProgram,
+            ::opencl::generatBinFromKernelSource(mpProgram,
                 (mKernelSignature + GetMD5()).c_str());
         }
         lastSecondKernelHash = lastOneKernelHash;
@@ -3668,7 +3668,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
     {
         // Obtain cl context
         KernelEnv kEnv;
-        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::setKernelEnv(&kEnv);
         // Run the kernel.
         pKernel->Launch(xGroup->mnLength);
         // Map results back
commit c2582649289fee3af316593772448407dffb4624
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 16:15:22 2014 +0200

    Need -lrt for clock_gettime() with older glibc versions
    
    Change-Id: I4651f74a89b8707cbf0ebdd3b950df3a5b99177a

diff --git a/opencl/Library_opencl.mk b/opencl/Library_opencl.mk
index ad1af37..eb83220 100644
--- a/opencl/Library_opencl.mk
+++ b/opencl/Library_opencl.mk
@@ -46,4 +46,10 @@ $(eval $(call gb_Library_add_exception_objects,opencl,\
     opencl/source/platforminfo \
 ))
 
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,opencl,\
+    -lrt \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
commit d7d945cef53edac1a768bb96e5f8cab1b896ad3a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 15:41:49 2014 +0200

    Use correct SAL_INFO log area
    
    Change-Id: I47e6dcf18fe141b8dba33a8c3cd83f80950045cd

diff --git a/opencl/source/openclconfig.cxx b/opencl/source/openclconfig.cxx
index aa7a07a..dd50649 100644
--- a/opencl/source/openclconfig.cxx
+++ b/opencl/source/openclconfig.cxx
@@ -159,12 +159,12 @@ bool match(const OpenCLConfig::ImplMatcherSet& rList, const OpenCLPlatformInfo&
 {
     for (auto i = rList.cbegin(); i != rList.end(); ++i)
     {
-        SAL_INFO("sc.opencl", "Looking for match for platform=" << rPlatform << ", device=" << rDevice <<
+        SAL_INFO("opencl", "Looking for match for platform=" << rPlatform << ", device=" << rDevice <<
                  " in " << sKindOfList << " entry=" << *i);
 
         if (match(*i, rPlatform, rDevice))
         {
-            SAL_INFO("sc.opencl", "Match!");
+            SAL_INFO("opencl", "Match!");
             return true;
         }
     }
commit 04e4fc2bdaacf1cbfee6676ba6ac921e61218f4f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 15:32:45 2014 +0200

    WaE: variable 'bSetOpenCL' set but not used
    
    Change-Id: I897accf5b4259a4a01198118421abaa55465207e

diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index 60378df..5da7b01 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -649,7 +649,9 @@ void ScFormulaCfg::Commit()
             break;
         }
     }
-#if HAVE_FEATURE_OPENCL
+#if !HAVE_FEATURE_OPENCL
+    (void) bSetOpenCL;
+#else
     if(bSetOpenCL)
         sc::FormulaGroupInterpreter::switchOpenCLDevice(
                 GetCalcConfig().maOpenCLDevice, GetCalcConfig().mbOpenCLAutoSelect);
commit 87c18d6f4cb9bcb8c4c9e2c80e4d779f01675ff6
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 15:13:12 2014 +0200

    Move more Calc-independent OpenCL stuff from the sc to the opencl module
    
    No cleanups yet. Just removed the "sc" namespace parts now when this stuff is
    no longer Calc-specific. There is still horribly confusing use of the same
    OpenCLDevice name for both a class and as a namespace, for instance. And the
    OpenCLDevice class has only public static members even, so effectively it acts
    as just a namespace anyway... Etc.
    
    Change-Id: Idc5f30a721df0101426c676f04a85e02c5dc8443

diff --git a/sc/source/core/inc/openclwrapper.hxx b/include/opencl/openclwrapper.hxx
similarity index 87%
rename from sc/source/core/inc/openclwrapper.hxx
rename to include/opencl/openclwrapper.hxx
index 9dad747..ba7aada 100644
--- a/sc/source/core/inc/openclwrapper.hxx
+++ b/include/opencl/openclwrapper.hxx
@@ -11,16 +11,19 @@
 #define INCLUDED_SC_SOURCE_CORE_OPENCL_OPENCLWRAPPER_HXX
 
 #include <config_features.h>
-#include <sal/detail/log.h>
-#include <opencl/platforminfo.hxx>
-#include <osl/file.hxx>
+
+#include <cassert>
 #include <vector>
+
 #include <boost/shared_ptr.hpp>
-#include <cassert>
+#include <clew.h>
 
+#include <sal/detail/log.h>
+#include <opencl/opencldllapi.h>
+#include <opencl/platforminfo.hxx>
+#include <osl/file.hxx>
 #include <rtl/string.hxx>
 
-#include <clew.h>
 
 #define CHECK_OPENCL(status,name)    \
 if( status != CL_SUCCESS )    \
@@ -40,9 +43,7 @@ struct KernelEnv
     cl_program mpkProgram;
 };
 
-namespace sc { namespace opencl {
-
-typedef unsigned int uint;
+namespace opencl {
 
 struct OpenCLEnv
 {
@@ -67,7 +68,7 @@ struct GPUEnv
     bool mnAmdFp64Flag;
 };
 
-class OpenCLDevice
+class OPENCL_DLLPUBLIC OpenCLDevice
 {
 public:
     static GPUEnv gpuEnv;
@@ -86,7 +87,7 @@ public:
     static void setKernelEnv( KernelEnv *envInfo );
 };
 
-const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo();
+OPENCL_DLLPUBLIC const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo();
 
 /**
  * Used to set or switch between OpenCL devices.
@@ -96,12 +97,12 @@ const std::vector<OpenCLPlatformInfo>& fillOpenCLInfo();
  *
  * @return returns true if there is a valid opencl device that has been set up
  */
-bool switchOpenCLDevice(const OUString* pDeviceId, bool bAutoSelect,
-        bool bForceEvaluation);
+OPENCL_DLLPUBLIC bool switchOpenCLDevice(const OUString* pDeviceId, bool bAutoSelect,
+                                         bool bForceEvaluation);
 
-void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId);
+OPENCL_DLLPUBLIC void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId);
 
-}}
+}
 
 #endif
 
diff --git a/opencl/Library_opencl.mk b/opencl/Library_opencl.mk
index 51ca62c..ad1af37 100644
--- a/opencl/Library_opencl.mk
+++ b/opencl/Library_opencl.mk
@@ -9,6 +9,11 @@
 
 $(eval $(call gb_Library_Library,opencl))
 
+$(eval $(call gb_Library_set_include,opencl,\
+    -I$(SRCDIR)/opencl/inc \
+    $$(INCLUDE) \
+))
+
 $(eval $(call gb_Library_add_defs,opencl,\
     -DOPENCL_DLLIMPLEMENTATION \
 ))
@@ -36,6 +41,8 @@ $(eval $(call gb_Library_use_libraries,opencl,\
 
 $(eval $(call gb_Library_add_exception_objects,opencl,\
     opencl/source/openclconfig \
+    opencl/source/openclwrapper \
+    opencl/source/opencl_device \
     opencl/source/platforminfo \
 ))
 
diff --git a/sc/source/core/opencl/opencl_device.hxx b/opencl/inc/opencl_device.hxx
similarity index 78%
rename from sc/source/core/opencl/opencl_device.hxx
rename to opencl/inc/opencl_device.hxx
index c5367f2..7435879 100644
--- a/sc/source/core/opencl/opencl_device.hxx
+++ b/opencl/inc/opencl_device.hxx
@@ -7,19 +7,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OPENCL_DEVICE_HXX
-#define INCLUDED_SC_SOURCE_CORE_OPENCL_OPENCL_DEVICE_HXX
+#ifndef INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
+#define INCLUDED_OPENCL_INC_OPENCL_DEVICE_HXX
 
-#pragma once
 #include "opencl_device_selection.h"
 
-namespace sc { namespace OpenCLDevice {
+namespace OpenCLDevice {
 
 ds_device getDeviceSelection(const char* pFileName, bool bForceSelection = false);
 bool selectedDeviceIsOpenCL(ds_device device);
 bool selectedDeviceIsNativeCPU(ds_device device);
 
-}}
+}
 
 #endif
 
diff --git a/sc/source/core/opencl/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h
similarity index 99%
rename from sc/source/core/opencl/opencl_device_selection.h
rename to opencl/inc/opencl_device_selection.h
index 30e947a..03373f4 100644
--- a/sc/source/core/opencl/opencl_device_selection.h
+++ b/opencl/inc/opencl_device_selection.h
@@ -7,9 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OPENCL_DEVICE_SELECTION_H
-#define INCLUDED_SC_SOURCE_CORE_OPENCL_OPENCL_DEVICE_SELECTION_H
-
+#ifndef INCLUDED_OPENCL_INC_OPENCL_DEVICE_SELECTION_H
+#define INCLUDED_OPENCL_INC_OPENCL_DEVICE_SELECTION_H
 
 #ifdef _MSC_VER
 #define _CRT_SECURE_NO_WARNINGS
diff --git a/sc/source/core/opencl/opencl_device.cxx b/opencl/source/opencl_device.cxx
similarity index 89%
rename from sc/source/core/opencl/opencl_device.cxx
rename to opencl/source/opencl_device.cxx
index f845f42..204ab34 100644
--- a/sc/source/core/opencl/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -15,6 +15,7 @@
 #else
 #include <sys/time.h>
 #endif
+
 #include <time.h>
 #include <math.h>
 #include <float.h>
@@ -26,11 +27,11 @@
 
 #include <comphelper/random.hxx>
 #include <opencl/openclconfig.hxx>
+#include <opencl/openclwrapper.hxx>
 #include <opencl/platforminfo.hxx>
 #include <sal/log.hxx>
 
 #include "opencl_device.hxx"
-#include "openclwrapper.hxx"
 
 #define INPUTSIZE  15360
 #define OUTPUTSIZE 15360
@@ -40,10 +41,10 @@
 #define DS_CHECK_STATUS(status, name) \
     if (CL_SUCCESS != status) \
     { \
-    SAL_INFO("sc.opencl.device", "Error code is " << status << " at " name); \
+    SAL_INFO("opencl.device", "Error code is " << status << " at " name); \
     }
 
-namespace sc { namespace OpenCLDevice {
+namespace OpenCLDevice {
 
 bool bIsInited = false;
 bool bIsDeviceSelected = false;
@@ -230,7 +231,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
     if (DS_DEVICE_OPENCL_DEVICE == device->type)
     {
         /* Evaluating an OpenCL device */
-        SAL_INFO("sc.opencl.device", "Device: \"" << device->oclDeviceName << "\" (OpenCL) evaluation...");
+        SAL_INFO("opencl.device", "Device: \"" << device->oclDeviceName << "\" (OpenCL) evaluation...");
         cl_int clStatus;
         /* Check for 64-bit float extensions */
         size_t aDevExtInfoSize = 0;
@@ -254,7 +255,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
             //buildOption = "-D KHR_DP_EXTENSION -Dfp_t=double -Dfp_t4=double4 -Dfp_t16=double16";
             tmpStr.append(" -DKHR_DP_EXTENSION");
             buildOption = tmpStr.c_str();
-            SAL_INFO("sc.opencl.device", "... has cl_khr_fp64");
+            SAL_INFO("opencl.device", "... has cl_khr_fp64");
         }
         else if ((std::string(aExtInfo)).find("cl_amd_fp64") != std::string::npos)
         {
@@ -262,7 +263,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
             //buildOption = "-D AMD_DP_EXTENSION -Dfp_t=double -Dfp_t4=double4 -Dfp_t16=double16";
             tmpStr.append(" -DAMD_DP_EXTENSION");
             buildOption = tmpStr.c_str();
-            SAL_INFO("sc.opencl.device", "... has cl_amd_fp64");
+            SAL_INFO("opencl.device", "... has cl_amd_fp64");
         }
         delete[] aExtInfo;
 
@@ -272,7 +273,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
             device->score = (void*)new LibreOfficeDeviceScore;
             ((LibreOfficeDeviceScore*)device->score)->fTime = DBL_MAX;
             ((LibreOfficeDeviceScore*)device->score)->bNoCLErrors = true;
-            SAL_INFO("sc.opencl.device", "... no fp64 support");
+            SAL_INFO("opencl.device", "... no fp64 support");
         }
         else
         {
@@ -297,7 +298,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
                 clStatus = clGetProgramBuildInfo(clProgram, device->oclDeviceID, CL_PROGRAM_BUILD_LOG, 0, NULL, &length);
                 buildLog = (char*)malloc(length);
                 clGetProgramBuildInfo(clProgram, device->oclDeviceID, CL_PROGRAM_BUILD_LOG, length, buildLog, &length);
-                SAL_INFO("sc.opencl.device", "Build Errors:\n" << buildLog);
+                SAL_INFO("opencl.device", "Build Errors:\n" << buildLog);
                 free(buildLog);
 
                 device->score = (void*)new LibreOfficeDeviceScore;
@@ -359,7 +360,7 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
     else
     {
         /* Evaluating an Native CPU device */
-        SAL_INFO("sc.opencl.device", "Device: \"CPU\" (Native) evaluation...");
+        SAL_INFO("opencl.device", "Device: \"CPU\" (Native) evaluation...");
         timer kernelTime;
         timerStart(&kernelTime);
 
@@ -423,7 +424,7 @@ ds_status pickBestDevice(ds_profile* profile, int* bestDeviceIdx)
             // If blacklisted or not whitelisted, ignore it
             if (OpenCLConfig::get().checkImplementation(aPlatform, aDevice))
             {
-                SAL_INFO("sc.opencl.device", "Device[" << d << "] " << device.oclDeviceName << " is blacklisted or not whitelisted");
+                SAL_INFO("opencl.device", "Device[" << d << "] " << device.oclDeviceName << " is blacklisted or not whitelisted");
                 pScore->fTime = DBL_MAX;
                 pScore->bNoCLErrors = true;
             }
@@ -436,16 +437,16 @@ ds_status pickBestDevice(ds_profile* profile, int* bestDeviceIdx)
         }
         else
         {
-            SAL_INFO("sc.opencl.device", "Unusual null score");
+            SAL_INFO("opencl.device", "Unusual null score");
         }
 
         if (DS_DEVICE_OPENCL_DEVICE == device.type)
         {
-            SAL_INFO("sc.opencl.device", "Device[" << d << "] " << device.oclDeviceName << " (OpenCL) score is " << fScore);
+            SAL_INFO("opencl.device", "Device[" << d << "] " << device.oclDeviceName << " (OpenCL) score is " << fScore);
         }
         else
         {
-            SAL_INFO("sc.opencl.device", "Device[" << d << "] CPU (Native) score is " << fScore);
+            SAL_INFO("opencl.device", "Device[" << d << "] CPU (Native) score is " << fScore);
         }
         if (fScore < bestScore)
         {
@@ -455,11 +456,11 @@ ds_status pickBestDevice(ds_profile* profile, int* bestDeviceIdx)
     }
     if (DS_DEVICE_OPENCL_DEVICE == profile->devices[*bestDeviceIdx].type)
     {
-        SAL_INFO("sc.opencl.device", "Selected Device[" << *bestDeviceIdx << "]: " << profile->devices[*bestDeviceIdx].oclDeviceName << "(OpenCL).");
+        SAL_INFO("opencl.device", "Selected Device[" << *bestDeviceIdx << "]: " << profile->devices[*bestDeviceIdx].oclDeviceName << "(OpenCL).");
     }
     else
     {
-        SAL_INFO("sc.opencl.device", "Selected Device[" << *bestDeviceIdx << "]: CPU (Native).");
+        SAL_INFO("opencl.device", "Selected Device[" << *bestDeviceIdx << "]: CPU (Native).");
     }
 
     return DS_SUCCESS;
@@ -507,13 +508,13 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
         else
         {
             status = DS_INVALID_PROFILE;
-            SAL_INFO("sc.opencl.device", "Performing forced profiling.");
+            SAL_INFO("opencl.device", "Performing forced profiling.");
         }
         if (DS_SUCCESS != status)
         {
             if (!bForceSelection)
             {
-                SAL_INFO("sc.opencl.device", "Profile file not available (" << fileName << "); performing profiling.");
+                SAL_INFO("opencl.device", "Profile file not available (" << fileName << "); performing profiling.");
             }
 
             /* Populate input data for micro-benchmark */
@@ -537,21 +538,21 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
                 status = writeProfileToFile(profile, serializeScore, fileName);
                 if (DS_SUCCESS == status)
                 {
-                    SAL_INFO("sc.opencl.device", "Scores written to file (" << fileName << ").");
+                    SAL_INFO("opencl.device", "Scores written to file (" << fileName << ").");
                 }
                 else
                 {
-                    SAL_INFO("sc.opencl.device", "Error saving scores to file (" << fileName << "); scores not written to file.");
+                    SAL_INFO("opencl.device", "Error saving scores to file (" << fileName << "); scores not written to file.");
                 }
             }
             else
             {
-                SAL_INFO("sc.opencl.device", "Unable to evaluate performance; scores not written to file.");
+                SAL_INFO("opencl.device", "Unable to evaluate performance; scores not written to file.");
             }
         }
         else
         {
-            SAL_INFO("sc.opencl.device", "Profile read from file (" << fileName << ").");
+            SAL_INFO("opencl.device", "Profile read from file (" << fileName << ").");
         }
 
         /* Pick best device */
@@ -565,20 +566,20 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
             int overrideDeviceIdx = matchDevice(profile, overrideDeviceStr);
             if (-1 != overrideDeviceIdx)
             {
-                SAL_INFO("sc.opencl.device", "Overriding Device Selection (SC_OPENCL_DEVICE_OVERRIDE=" << overrideDeviceStr << ").");
+                SAL_INFO("opencl.device", "Overriding Device Selection (SC_OPENCL_DEVICE_OVERRIDE=" << overrideDeviceStr << ").");
                 bestDeviceIdx = overrideDeviceIdx;
                 if (DS_DEVICE_OPENCL_DEVICE == profile->devices[bestDeviceIdx].type)
                 {
-                    SAL_INFO("sc.opencl.device", "Selected Device[" << bestDeviceIdx << "]: " << profile->devices[bestDeviceIdx].oclDeviceName << " (OpenCL).");
+                    SAL_INFO("opencl.device", "Selected Device[" << bestDeviceIdx << "]: " << profile->devices[bestDeviceIdx].oclDeviceName << " (OpenCL).");
                 }
                 else
                 {
-                    SAL_INFO("sc.opencl.device", "Selected Device[" << bestDeviceIdx << "]: CPU (Native).");
+                    SAL_INFO("opencl.device", "Selected Device[" << bestDeviceIdx << "]: CPU (Native).");
                 }
             }
             else
             {
-                SAL_INFO("sc.opencl.device", "Ignoring invalid SC_OPENCL_DEVICE_OVERRIDE=" << overrideDeviceStr << ").");
+                SAL_INFO("opencl.device", "Ignoring invalid SC_OPENCL_DEVICE_OVERRIDE=" << overrideDeviceStr << ").");
             }
         }
 
@@ -592,6 +593,6 @@ ds_device getDeviceSelection(const char* sProfilePath, bool bForceSelection)
     return selectedDevice;
 }
 
-}}
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/opencl/source/openclwrapper.cxx
similarity index 95%
rename from sc/source/core/opencl/openclwrapper.cxx
rename to opencl/source/openclwrapper.cxx
index 20f4919..86ba6cd 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/opencl/source/openclwrapper.cxx
@@ -9,13 +9,11 @@
 
 #include <config_folders.h>
 
-#include "calcconfig.hxx"
-#include "interpre.hxx"
 #include "opencl_device.hxx"
-#include "openclwrapper.hxx"
 
 #include <comphelper/string.hxx>
 #include <opencl/openclconfig.hxx>
+#include <opencl/openclwrapper.hxx>
 #include <osl/file.hxx>
 #include <rtl/bootstrap.hxx>
 #include <rtl/digest.h>
@@ -48,7 +46,7 @@
 
 using namespace std;
 
-namespace sc { namespace opencl {
+namespace opencl {
 
 GPUEnv OpenCLDevice::gpuEnv;
 bool OpenCLDevice::bIsInited = false;
@@ -60,7 +58,7 @@ OString generateMD5(const void* pData, size_t length)
     sal_uInt8 pBuffer[RTL_DIGEST_LENGTH_MD5];
     rtlDigestError aError = rtl_digest_MD5(pData, length,
             pBuffer, RTL_DIGEST_LENGTH_MD5);
-    SAL_WARN_IF(aError != rtl_Digest_E_None, "sc", "md5 generation failed");
+    SAL_WARN_IF(aError != rtl_Digest_E_None, "opencl", "md5 generation failed");
 
     OStringBuffer aBuffer;
     const char* pString = "0123456789ABCDEF";
@@ -158,11 +156,11 @@ std::vector<boost::shared_ptr<osl::File> > OpenCLDevice::binaryGenerated( const
             if(pNewFile->open(osl_File_OpenFlag_Read) == osl::FileBase::E_None)
             {
                 aGeneratedFiles.push_back(boost::shared_ptr<osl::File>(pNewFile));
-                SAL_INFO("sc.opencl.file", "Opening binary file '" << fileName << "' for reading: success");
+                SAL_INFO("opencl.file", "Opening binary file '" << fileName << "' for reading: success");
             }
             else
             {
-                SAL_INFO("sc.opencl.file", "Opening binary file '" << fileName << "' for reading: FAIL");
+                SAL_INFO("opencl.file", "Opening binary file '" << fileName << "' for reading: FAIL");
                 delete pNewFile;
                 break;
             }
@@ -238,9 +236,9 @@ bool OpenCLDevice::generatBinFromKernelSource( cl_program program, const char *
             OString fileName = createFileName(pArryDevsID[i], clFileName);
             if ( !writeBinaryToFile( fileName,
                         binaries[i], binarySizes[i] ) )
-                SAL_INFO("sc.opencl.file", "Writing binary file '" << fileName << "': FAIL");
+                SAL_INFO("opencl.file", "Writing binary file '" << fileName << "': FAIL");
             else
-                SAL_INFO("sc.opencl.file", "Writing binary file '" << fileName << "': success");
+                SAL_INFO("opencl.file", "Writing binary file '" << fileName << "': success");
         }
     }
 
@@ -454,15 +452,15 @@ bool OpenCLDevice::initOpenCLRunEnv( int argc )
         }
         if( gpuEnv.mnKhrFp64Flag )
         {
-            SAL_INFO("sc.opencl", "Use Khr double");
+            SAL_INFO("opencl", "Use Khr double");
         }
         else if( gpuEnv.mnAmdFp64Flag )
         {
-            SAL_INFO("sc.opencl", "Use AMD double type");
+            SAL_INFO("opencl", "Use AMD double type");
         }
         else
         {
-            SAL_INFO("sc.opencl", "USE float type");
+            SAL_INFO("opencl", "USE float type");
         }
         bIsInited = true;
     }
@@ -727,7 +725,7 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
         OUString path;
         osl::FileBase::getSystemPathFromFileURL(url,path);
         OString dsFileName = rtl::OUStringToOString(path, RTL_TEXTENCODING_UTF8);
-        ds_device pSelectedDevice = sc::OpenCLDevice::getDeviceSelection(dsFileName.getStr(), bForceEvaluation);
+        ds_device pSelectedDevice = ::OpenCLDevice::getDeviceSelection(dsFileName.getStr(), bForceEvaluation);
         pDeviceId = pSelectedDevice.oclDeviceID;
 
     }
@@ -754,7 +752,7 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
         if(context != NULL)
             clReleaseContext(context);
 
-        SAL_WARN("sc", "failed to set/switch opencl device");
+        SAL_WARN("opencl", "failed to set/switch opencl device");
         return false;
     }
 
@@ -767,7 +765,7 @@ bool switchOpenCLDevice(const OUString* pDevice, bool bAutoSelect, bool bForceEv
             clReleaseCommandQueue(command_queue);
 
         clReleaseContext(context);
-        SAL_WARN("sc", "failed to set/switch opencl device");
+        SAL_WARN("opencl", "failed to set/switch opencl device");
         return false;
     }
 
@@ -801,6 +799,6 @@ void getOpenCLDeviceInfo(size_t& rDeviceId, size_t& rPlatformId)
     findDeviceInfoFromDeviceId(id, rDeviceId, rPlatformId);
 }
 
-}}
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 51ad36e..7c9aab0 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -663,8 +663,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
 $(eval $(call gb_Helper_optional,OPENCL,\
 $(call gb_Library_add_exception_objects,sc,\
     sc/source/core/opencl/formulagroupcl \
-    sc/source/core/opencl/openclwrapper \
-    sc/source/core/opencl/opencl_device \
     sc/source/core/opencl/opbase \
     sc/source/core/opencl/op_financial \
     sc/source/core/opencl/op_database \
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 3dfcc10..0615410 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -19,7 +19,7 @@
 #include <formula/vectortoken.hxx>
 #include "scmatrix.hxx"
 
-#include "openclwrapper.hxx"
+#include <opencl/openclwrapper.hxx>
 
 #include "op_financial.hxx"
 #include "op_database.hxx"
@@ -114,7 +114,7 @@ size_t VectorRef::Marshal( cl_kernel k, int argno, int, cl_program )
     }
     // Obtain cl context
     KernelEnv kEnv;
-    OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
     cl_int err;
     if (pHostBuffer)
     {
@@ -205,7 +205,7 @@ public:
         // marshaling
         // Obtain cl context
         KernelEnv kEnv;
-        OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
         // Pass the scalar result back to the rest of the formula kernel
         cl_int err = clSetKernelArg(k, argno, sizeof(cl_uint), (void*)&hashCode);
         if (CL_SUCCESS != err)
@@ -389,7 +389,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
     FormulaToken* ref = mFormulaTree->GetFormulaToken();
     // Obtain cl context
     KernelEnv kEnv;
-    OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
     cl_int err;
     formula::VectorRefArray vRef;
     size_t nStrings = 0;
@@ -1132,7 +1132,7 @@ public:
         assert(Base::mpClmem == NULL);
         // Obtain cl context
         KernelEnv kEnv;
-        OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
         cl_int err;
         size_t nInput = mpDVR->GetArrayLength();
         size_t nCurWindowSize = mpDVR->GetRefRowSize();
@@ -1913,7 +1913,7 @@ public:
         {
             // Obtain cl context
             KernelEnv kEnv;
-            OpenCLDevice::setKernelEnv(&kEnv);
+            ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
             cl_int err;
             cl_mem pClmem2;
 
@@ -1971,7 +1971,7 @@ public:
         {
             // Obtain cl context
             KernelEnv kEnv;
-            OpenCLDevice::setKernelEnv(&kEnv);
+            ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
             cl_int err;
             DynamicKernelArgument* Arg = mvSubArguments[0].get();
             DynamicKernelSlidingArgument<VectorRef>* slidingArgPtr =
@@ -3282,11 +3282,11 @@ public:
                                                                DynamicKernelSoPArguments>(mpRoot, new OpNop);
 
         std::stringstream decl;
-        if (OpenCLDevice::gpuEnv.mnKhrFp64Flag)
+        if (::opencl::OpenCLDevice::gpuEnv.mnKhrFp64Flag)
         {
             decl << "#pragma OPENCL EXTENSION cl_khr_fp64: enable\n";
         }
-        else if (OpenCLDevice::gpuEnv.mnAmdFp64Flag)
+        else if (::opencl::OpenCLDevice::gpuEnv.mnAmdFp64Flag)
         {
             decl << "#pragma OPENCL EXTENSION cl_amd_fp64: enable\n";
         }
@@ -3355,7 +3355,7 @@ public:
     {
         // Obtain cl context
         KernelEnv kEnv;
-        OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
         cl_int err;
         // The results
         mpResClmem = clCreateBuffer(kEnv.mpkContext,
@@ -3417,7 +3417,7 @@ void DynamicKernel::CreateKernel()
     // Compile kernel here!!!
     // Obtain cl context
     KernelEnv kEnv;
-    OpenCLDevice::setKernelEnv(&kEnv);
+    ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
     const char* src = mFullProgramSrc.c_str();
     static std::string lastOneKernelHash = "";
     static std::string lastSecondKernelHash = "";
@@ -3439,11 +3439,11 @@ void DynamicKernel::CreateKernel()
         {
             clReleaseProgram(lastSecondProgram);
         }
-        if (OpenCLDevice::buildProgramFromBinary("",
-                &OpenCLDevice::gpuEnv, KernelHash.c_str(), 0))
+        if (::opencl::OpenCLDevice::buildProgramFromBinary("",
+                &::opencl::OpenCLDevice::gpuEnv, KernelHash.c_str(), 0))
         {
-            mpProgram = OpenCLDevice::gpuEnv.mpArryPrograms[0];
-            OpenCLDevice::gpuEnv.mpArryPrograms[0] = NULL;
+            mpProgram = ::opencl::OpenCLDevice::gpuEnv.mpArryPrograms[0];
+            ::opencl::OpenCLDevice::gpuEnv.mpArryPrograms[0] = NULL;
         }
         else
         {
@@ -3452,7 +3452,7 @@ void DynamicKernel::CreateKernel()
             if (err != CL_SUCCESS)
                 throw OpenCLError(err, __FILE__, __LINE__);
             err = clBuildProgram(mpProgram, 1,
-                OpenCLDevice::gpuEnv.mpArryDevsID, "", NULL, NULL);
+                ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID, "", NULL, NULL);
             if (err != CL_SUCCESS)
             {
 #if OSL_DEBUG_LEVEL > 0
@@ -3460,7 +3460,7 @@ void DynamicKernel::CreateKernel()
                 {
                     cl_build_status stat;
                     cl_int e = clGetProgramBuildInfo(
-                        mpProgram, OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                        mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
                         CL_PROGRAM_BUILD_STATUS, sizeof(cl_build_status),
                         &stat, 0);
                     SAL_WARN_IF(
@@ -3472,7 +3472,7 @@ void DynamicKernel::CreateKernel()
                     {
                         size_t n;
                         e = clGetProgramBuildInfo(
-                            mpProgram, OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                            mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
                             CL_PROGRAM_BUILD_LOG, 0, 0, &n);
                         SAL_WARN_IF(
                             e != CL_SUCCESS || n == 0, "sc.opencl",
@@ -3483,7 +3483,7 @@ void DynamicKernel::CreateKernel()
                         {
                             std::vector<char> log(n);
                             e = clGetProgramBuildInfo(
-                                mpProgram, OpenCLDevice::gpuEnv.mpArryDevsID[0],
+                                mpProgram, ::opencl::OpenCLDevice::gpuEnv.mpArryDevsID[0],
                                 CL_PROGRAM_BUILD_LOG, n, &log[0], 0);
                             SAL_WARN_IF(
                                 e != CL_SUCCESS || n == 0, "sc.opencl",
@@ -3502,7 +3502,7 @@ void DynamicKernel::CreateKernel()
                 throw OpenCLError(err, __FILE__, __LINE__);
             }
             // Generate binary out of compiled kernel.
-            OpenCLDevice::generatBinFromKernelSource(mpProgram,
+            ::opencl::OpenCLDevice::generatBinFromKernelSource(mpProgram,
                 (mKernelSignature + GetMD5()).c_str());
         }
         lastSecondKernelHash = lastOneKernelHash;
@@ -3668,7 +3668,7 @@ bool FormulaGroupInterpreterOpenCL::interpret( ScDocument& rDoc,
     {
         // Obtain cl context
         KernelEnv kEnv;
-        OpenCLDevice::setKernelEnv(&kEnv);
+        ::opencl::OpenCLDevice::setKernelEnv(&kEnv);
         // Run the kernel.
         pKernel->Launch(xGroup->mnLength);
         // Map results back
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 328e3c3..cc4f805 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -35,7 +35,7 @@
 #include <cstdio>
 
 #if HAVE_FEATURE_OPENCL
-#include "openclwrapper.hxx"
+#include <opencl/openclwrapper.hxx>
 #endif
 
 namespace sc {
@@ -542,7 +542,7 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
 void FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms)
 {
     const std::vector<OpenCLPlatformInfo>& rPlatformsFromWrapper =
-        sc::opencl::fillOpenCLInfo();
+        ::opencl::fillOpenCLInfo();
 
     rPlatforms.assign(rPlatformsFromWrapper.begin(), rPlatformsFromWrapper.end());
 }
@@ -564,7 +564,7 @@ bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool
         msInstance = new sc::FormulaGroupInterpreterSoftware();
         return true;
     }
-    bool bSuccess = sc::opencl::switchOpenCLDevice(&rDeviceId, bAutoSelect, bForceEvaluation);
+    bool bSuccess = ::opencl::switchOpenCLDevice(&rDeviceId, bAutoSelect, bForceEvaluation);
     if(!bSuccess)
         return false;
 
@@ -591,7 +591,7 @@ void FormulaGroupInterpreter::getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int3
     size_t aDeviceId = static_cast<size_t>(-1);
     size_t aPlatformId = static_cast<size_t>(-1);
 
-    sc::opencl::getOpenCLDeviceInfo(aDeviceId, aPlatformId);
+    ::opencl::getOpenCLDeviceInfo(aDeviceId, aPlatformId);
     rDeviceId = aDeviceId;
     rPlatformId = aPlatformId;
 }
commit d4f63f5e767d23675240e9dd6d95fc9496ad9df5
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 14:16:36 2014 +0200

    Fix OpenCL-less build harder
    
    Change-Id: I1627f534505c735455c50f9b4f6e4d1c698ab9d2

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 001891b..51ad36e 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -660,8 +660,8 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
     sc/source/ui/xmlsource/xmlsourcedlg \
 ))
 
-$(call gb_Helper_optional,OPENCL,\
-$(eval $(call gb_Library_add_exception_objects,sc,\
+$(eval $(call gb_Helper_optional,OPENCL,\
+$(call gb_Library_add_exception_objects,sc,\
     sc/source/core/opencl/formulagroupcl \
     sc/source/core/opencl/openclwrapper \
     sc/source/core/opencl/opencl_device \
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 705029b..328e3c3 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -523,10 +523,11 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
 
     if ( !msInstance )
     {
+#if HAVE_FEATURE_OPENCL
         const ScCalcConfig& rConfig = ScInterpreter::GetGlobalConfig();
         if (officecfg::Office::Common::Misc::UseOpenCL::get())
             switchOpenCLDevice(rConfig.maOpenCLDevice, rConfig.mbOpenCLAutoSelect, false);
-
+#endif
         if ( !msInstance ) // software fallback
         {
             SAL_INFO("sc.formulagroup", "Create S/W interpreter");
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index b0f76c8..60378df 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -649,10 +649,11 @@ void ScFormulaCfg::Commit()
             break;
         }
     }
+#if HAVE_FEATURE_OPENCL
     if(bSetOpenCL)
         sc::FormulaGroupInterpreter::switchOpenCLDevice(
                 GetCalcConfig().maOpenCLDevice, GetCalcConfig().mbOpenCLAutoSelect);
-
+#endif
     PutProperties(aNames, aValues);
 }
 
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index a4de29c..bf89e00 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()
commit 8f4549109da2a7a0860cdebedcb2cbe8ddbd601a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 14:02:01 2014 +0200

    Fix OpenCL-less build
    
    Change-Id: I8e049a6df5946344110b38887301d186991a475d

diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx
index 65e8695..9ac9335 100644
--- a/sc/inc/formulagroup.hxx
+++ b/sc/inc/formulagroup.hxx
@@ -10,12 +10,16 @@
 #ifndef INCLUDED_SC_INC_FORMULAGROUP_HXX
 #define INCLUDED_SC_INC_FORMULAGROUP_HXX
 
+#include <config_features.h>
+
 #include "address.hxx"
 #include "types.hxx"
 #include "stlalgorithm.hxx"
 
 #include <formula/opcode.hxx>
+#if HAVE_FEATURE_OPENCL
 #include <opencl/platforminfo.hxx>
+#endif
 #include <svl/sharedstringpool.hxx>
 
 #include <set>
@@ -122,11 +126,12 @@ class SC_DLLPUBLIC FormulaGroupInterpreter
 
  public:
     static FormulaGroupInterpreter *getStatic();
+#if HAVE_FEATURE_OPENCL
     static void fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms);
     static bool switchOpenCLDevice(const OUString& rDeviceId, bool bAutoSelect, bool bForceEvaluation = false);
     static void enableOpenCL(bool bEnable, bool bEnableCompletely = false, const std::set<OpCodeEnum>& rSubsetToEnable = std::set<OpCodeEnum>());
     static void getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int32& rPlatformId);
-
+#endif
     virtual ScMatrixRef inverseMatrix(const ScMatrix& rMat) = 0;
     virtual CompiledFormula* createCompiledFormula(ScDocument& rDoc,
                                                    const ScAddress& rTopPos,
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 332072c..705029b 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -21,7 +21,9 @@
 
 #include <formula/vectortoken.hxx>
 #include <officecfg/Office/Common.hxx>
+#if HAVE_FEATURE_OPENCL
 #include <opencl/platforminfo.hxx>
+#endif
 #include <rtl/bootstrap.hxx>
 
 #include <vector>
@@ -33,9 +35,7 @@
 #include <cstdio>
 
 #if HAVE_FEATURE_OPENCL
-
 #include "openclwrapper.hxx"
-
 #endif
 
 namespace sc {
@@ -537,16 +537,13 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
     return msInstance;
 }
 
+#if HAVE_FEATURE_OPENCL
 void FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms)
 {
-#if !HAVE_FEATURE_OPENCL
-    (void) rPlatforms;
-#else
     const std::vector<OpenCLPlatformInfo>& rPlatformsFromWrapper =
         sc::opencl::fillOpenCLInfo();
 
     rPlatforms.assign(rPlatformsFromWrapper.begin(), rPlatformsFromWrapper.end());
-#endif
 }
 
 bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool bAutoSelect, bool bForceEvaluation)
@@ -566,26 +563,19 @@ bool FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool
         msInstance = new sc::FormulaGroupInterpreterSoftware();
         return true;
     }
-#if HAVE_FEATURE_OPENCL
     bool bSuccess = sc::opencl::switchOpenCLDevice(&rDeviceId, bAutoSelect, bForceEvaluation);
     if(!bSuccess)
         return false;
-#else
-    (void) bAutoSelect;
-#endif
 
     delete msInstance;
     msInstance = NULL;
 
-#if HAVE_FEATURE_OPENCL
     if ( officecfg::Office::Common::Misc::UseOpenCL::get() )
     {
         msInstance = new sc::opencl::FormulaGroupInterpreterOpenCL();
         return msInstance != NULL;
     }
-#else
-    (void) bForceEvaluation;
-#endif
+
     return false;
 }
 
@@ -597,15 +587,12 @@ void FormulaGroupInterpreter::getOpenCLDeviceInfo(sal_Int32& rDeviceId, sal_Int3
     if(!bOpenCLEnabled)
         return;
 
-#if HAVE_FEATURE_OPENCL
-
     size_t aDeviceId = static_cast<size_t>(-1);
     size_t aPlatformId = static_cast<size_t>(-1);
 
     sc::opencl::getOpenCLDeviceInfo(aDeviceId, aPlatformId);
     rDeviceId = aDeviceId;
     rPlatformId = aPlatformId;
-#endif
 }
 
 void FormulaGroupInterpreter::enableOpenCL(bool bEnable, bool bEnableCompletely, const std::set<OpCodeEnum>& rSubsetToEnable)
@@ -620,6 +607,8 @@ void FormulaGroupInterpreter::enableOpenCL(bool bEnable, bool bEnableCompletely,
     ScInterpreter::SetGlobalConfig(aConfig);
 }
 
+#endif
+
 } // namespace sc
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2e1ee23..a4de29c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "scitems.hxx"
 #include <svx/fmdpage.hxx>
 #include <svx/fmview.hxx>
@@ -58,7 +60,9 @@
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/string.hxx>
 #include <cppuhelper/supportsservice.hxx>
+#if HAVE_FEATURE_OPENCL
 #include <opencl/platforminfo.hxx>
+#endif
 
 #include "docuno.hxx"
 #include "cellsuno.hxx"
@@ -2369,6 +2373,9 @@ void ScModelObj::selectOpenCLDevice( sal_Int32 nPlatform, sal_Int32 nDevice )
     if(nPlatform < 0 || nDevice < 0)
         throw uno::RuntimeException();
 
+#if !HAVE_FEATURE_OPENCL
+    throw uno::RuntimeException();
+#else
     std::vector<OpenCLPlatformInfo> aPlatformInfo;
     sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
     if(size_t(nPlatform) >= aPlatformInfo.size())
@@ -2379,6 +2386,7 @@ void ScModelObj::selectOpenCLDevice( sal_Int32 nPlatform, sal_Int32 nDevice )
 
     OUString aDeviceString = aPlatformInfo[nPlatform].maVendor + " " + aPlatformInfo[nPlatform].maDevices[nDevice].maName;
     sc::FormulaGroupInterpreter::switchOpenCLDevice(aDeviceString, false);
+#endif
 }
 
 sal_Int32 ScModelObj::getPlatformID()
@@ -2402,6 +2410,9 @@ sal_Int32 ScModelObj::getDeviceID()
 uno::Sequence< sheet::opencl::OpenCLPlatform > ScModelObj::getOpenCLPlatforms()
     throw (uno::RuntimeException, std::exception)
 {
+#if !HAVE_FEATURE_OPENCL
+    return uno::Sequence<sheet::opencl::OpenCLPlatform>();
+#else
     std::vector<OpenCLPlatformInfo> aPlatformInfo;
     sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
 
@@ -2422,6 +2433,7 @@ uno::Sequence< sheet::opencl::OpenCLPlatform > ScModelObj::getOpenCLPlatforms()
     }
 
     return aRet;
+#endif
 }
 
 ScDrawPagesObj::ScDrawPagesObj(ScDocShell* pDocSh) :
commit f0e75663c125bc87622544a91dbda3f91d3fe1c8
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 13:04:08 2014 +0200

    Add a README file
    
    Change-Id: Id0f8a146ca90efe6f84c7a0c377ad3f83ba7da8d

diff --git a/opencl/README b/opencl/README
new file mode 100644
index 0000000..c5699e7
--- /dev/null
+++ b/opencl/README
@@ -0,0 +1,7 @@
+OpenCL-related code that is not specific to any particular
+functionality OpenCL is used for. (Like formula group calculation in
+Calc.)
+
+Not compiled on platforms where OpenCL is not available (iOS and
+Android). On other platforms OpenCL is optional at run-time, but not
+at build time.
commit cae26b40472d151f12a380610dceb3a3b50344a2
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 11:53:42 2014 +0200

    Fix OpenCL-less build
    
    Change-Id: I36a0151640067e3d040ebf46784bdb8c534153e1

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 772f80f..46673d2 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -47,7 +47,9 @@
 #include "optjsearch.hxx"
 #include "optlingu.hxx"
 #include "optmemory.hxx"
+#if HAVE_FEATURE_OPENCL
 #include "optopencl.hxx"
+#endif
 #include "optpath.hxx"
 #include "optsave.hxx"
 #include "optupdt.hxx"
@@ -321,7 +323,9 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const Sf
         case RID_SVXPAGE_ACCESSIBILITYCONFIG:       fnCreate = &SvxAccessibilityOptionsTabPage::Create; break;
         case RID_SVXPAGE_OPTIONS_CTL:               fnCreate = &SvxCTLOptionsPage::Create ; break;
         case RID_SVXPAGE_OPTIONS_JAVA:              fnCreate = &SvxJavaOptionsPage::Create ; break;
+#if HAVE_FEATURE_OPENCL
         case RID_SVXPAGE_OPENCL:                    fnCreate = &SvxOpenCLTabPage::Create ; break;
+#endif
         case RID_SVXPAGE_ONLINEUPDATE:              fnCreate = &SvxOnlineUpdateTabPage::Create; break;
         case RID_OPTPAGE_CHART_DEFCOLORS:           fnCreate = &SvxDefaultColorOptPage::Create; break;
 #if HAVE_FEATURE_SCRIPTING
commit db0610e7b2db24ebd55fe16ac18341c97c97e110
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 11:43:14 2014 +0200

    Try to fix MSVC build
    
    Change-Id: I24c48d2540a8cb7d2a823862d53cddf90d41f94a

diff --git a/include/opencl/platforminfo.hxx b/include/opencl/platforminfo.hxx
index 6c40c43..28c7ba8 100644
--- a/include/opencl/platforminfo.hxx
+++ b/include/opencl/platforminfo.hxx
@@ -43,6 +43,9 @@ struct OPENCL_DLLPUBLIC OpenCLPlatformInfo
     std::vector<OpenCLDeviceInfo> maDevices;
 
     OpenCLPlatformInfo();
+    ~OpenCLPlatformInfo()
+    {
+    }
 };
 
 OPENCL_DLLPUBLIC std::ostream& operator<<(std::ostream& rStream, const OpenCLPlatformInfo& rPlatform);
commit a11ba9c127546b38099b4729736ec70c43e59147
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 27 11:16:31 2014 +0200

    Add the "Test" button back
    
    This functionality is Calc-specific and will stay in the Calc part of
    the options. Let's not give the false impression that it would be
    going away. (How it looks and works now is not final.)
    
    Change-Id: Ic2f783a6fd07de89eec7d7e685364dad71243b4b

diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 996334c..fb08756 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -153,6 +153,7 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
     get(mpBtnFalse, "false");
     get(mpSpinButton, "spinbutton");
     get(mpEditField, "entry");
+    get(mpTestButton, "test");
     get(mpOpenclInfoList, "opencl_list");
     get(mpBtnAutomaticSelectionTrue, "automatic_select_true");
     get(mpBtnAutomaticSelectionFalse, "automatic_select_false");
@@ -204,6 +205,8 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfi
     mpLbSettings->SetSelectHdl(aLink);
     mpLbOptionEdit->SetSelectHdl(aLink);
 
+    mpTestButton->SetClickHdl(LINK(this, ScCalcOptionsDialog, TestClickHdl));
+
     aLink = LINK(this, ScCalcOptionsDialog, BtnToggleHdl);
     mpBtnTrue->SetToggleHdl(aLink); // Set handler only to the 'True' button.
 
@@ -729,8 +732,6 @@ IMPL_LINK(ScCalcOptionsDialog, EditModifiedHdl, Control*, pCtrl)
     return 0;
 }
 
-#if 0
-
 namespace {
 
 struct Area
@@ -1163,6 +1164,4 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, )
     return 0;
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 789c01d..c7bfe4d 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -41,6 +41,7 @@ public:
     DECL_LINK( DeviceSelHdl, void* );
     DECL_LINK( NumModifiedHdl, void * );
     DECL_LINK( EditModifiedHdl, Control * );
+    DECL_LINK( TestClickHdl, PushButton* );
 
     const ScCalcConfig& GetConfig() const { return maConfig;}
 
@@ -74,6 +75,7 @@ private:
     RadioButton* mpBtnFalse;
     NumericField* mpSpinButton;
     Edit* mpEditField;
+    PushButton* mpTestButton;
 
     FixedText* mpFtAnnotation;
     FixedText* mpFtFrequency;
diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
index 37a10c6..6fee1af 100644
--- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
+++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
@@ -646,6 +646,20 @@
                 <property name="height">1</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkButton" id="test">
+                <property name="label" translatable="yes">_Test</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">28</property>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>
commit 7920af486b7124b85b2eb30c90aa26ddc471bd15
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Nov 26 22:30:33 2014 +0200

    Work in progress: Move Calc-independend OpenCL configuration out of sc
    
    Intermediate commit. More changes will follow: The device selection
    logic needs to be moved, too. (And cleaned up.) Instead of the
    separate formulacalculationoptions dialog we should simply have a
    normal options page for those OpenCL-related settings that will remain
    purely Calc-specific, like the formula opcode subsetting.
    
    Change-Id: Id60d95e80d377cbbf5780beb473b221bce06b5e5

diff --git a/Repository.mk b/Repository.mk
index fb599bf..41650b1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -402,6 +402,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 	odfflatxml \
 	offacc \
 	oox \
+	$(call gb_Helper_optional,OPENCL,opencl) \
 	passwordcontainer \
 	pcr \
 	$(if $(ENABLE_NPAPI_FROM_BROWSER),pl) \
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 6190e4b..4ad30ff 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 	officecfg \
 	oovbaapi \
 	oox \
+	$(call gb_Helper_optional,OPENCL,opencl) \
 	package \
 	postprocess \
 	$(call gb_Helper_optional,PYUNO,pyuno) \
diff --git a/config_host.mk.in b/config_host.mk.in
index a23629f..58e8899 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -157,7 +157,6 @@ export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
 export ENABLE_OOENV=@ENABLE_OOENV@
 export ENABLE_OPENGL=@ENABLE_OPENGL@
 export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
-export ENABLE_OPENCL=@ENABLE_OPENCL@
 export ENABLE_PACKAGEKIT=@ENABLE_PACKAGEKIT@
 export ENABLE_PCH=@ENABLE_PCH@
 export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
diff --git a/configure.ac b/configure.ac
index c867dc0..efa867b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10255,13 +10255,13 @@ dnl =================================================
 dnl Check whether to build with OpenCL support.
 dnl =================================================
 
-ENABLE_OPENCL=
 if test $_os != iOS -a $_os != Android; then
-    ENABLE_OPENCL=TRUE
-    BUILD_TYPE="$BUILD_TYPE CLCC"
+    # CLCC in BUILD_TYPE tells that we are building a bundled clcc (just the clew part), OPENCL in
+    # BUILD_TYPE tells that OpenCL is potentially available on the platform (optional at run-time,
+    # used through clew).
+    BUILD_TYPE="$BUILD_TYPE CLCC OPENCL"
     AC_DEFINE(HAVE_FEATURE_OPENCL)
 fi
-AC_SUBST(ENABLE_OPENCL)
 
 dnl ===================================================================
 dnl Check whether to enable glTF support
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index b821f2a..b564e4d 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -44,6 +44,8 @@ $(eval $(call gb_Library_use_libraries,cui,\
     $(if $(ENABLE_JAVA), \
         jvmfwk) \
     lng \
+	$(call gb_Helper_optional,OPENCL, \
+		opencl) \
     sal \
     salhelper \
     sax \
@@ -64,6 +66,8 @@ $(eval $(call gb_Library_use_libraries,cui,\
 
 $(eval $(call gb_Library_use_externals,cui,\
 	boost_headers \
+	$(call gb_Helper_optional,OPENCL,\
+		clew) \
     icuuc \
     icu_headers \
 ))
@@ -153,6 +157,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
     cui/source/options/optjsearch \
     cui/source/options/optlingu \
     cui/source/options/optmemory \
+	$(call gb_Helper_optional,OPENCL, \
+	    cui/source/options/optopencl) \
     cui/source/options/optpath \
     cui/source/options/optsave \
     cui/source/options/optupdt \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 70438d4..d8cd178 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/backgroundpage \
 	cui/uiconfig/ui/baselinksdialog \
 	cui/uiconfig/ui/bitmaptabpage \
+	cui/uiconfig/ui/blackorwhitelistentrydialog \
 	cui/uiconfig/ui/borderareatransparencydialog \
 	cui/uiconfig/ui/borderbackgrounddialog \
 	cui/uiconfig/ui/borderpage \
@@ -131,6 +132,8 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/optmemorypage \
 	cui/uiconfig/ui/optnewdictionarydialog \
 	cui/uiconfig/ui/optonlineupdatepage \
+	$(call gb_Helper_optional,OPENCL, \
+		cui/uiconfig/ui/optopenclpage) \
 	cui/uiconfig/ui/optpathspage \
 	cui/uiconfig/ui/optproxypage \
 	cui/uiconfig/ui/optsavepage \
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index d25afbb..f2202c2 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -436,6 +436,8 @@
 #define RID_SVXSTR_PERSONA_MUSIC                            (RID_SVX_START + 1288)
 #define RID_SVXSTR_PERSONA_NATURE                           (RID_SVX_START + 1289)
 
+#define RID_SVXPAGE_OPENCL                                  (RID_SVX_START + 254)
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 1f5c32e..29e1387 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -208,7 +208,6 @@ OfaMiscTabPage::OfaMiscTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
     get(m_pYearValueField, "year");
     get(m_pToYearFT, "toyear");
     get(m_pCollectUsageInfo, "collectusageinfo");
-    get(m_pUseOpenCL, "useopencl");
 
     if (m_pFileDlgCB->IsVisible() && SvtMiscOptions().IsUseSystemFileDialogReadOnly())
     {
@@ -301,12 +300,6 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
         bModified = true;
     }
 
-    if (m_pUseOpenCL->IsValueChangedFromSaved())
-    {
-        officecfg::Office::Common::Misc::UseOpenCL::set(m_pUseOpenCL->IsChecked(), batch);
-        bModified = true;
-    }
-
     batch->commit();
 
     return bModified;
@@ -348,9 +341,6 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet )
 
     m_pCollectUsageInfo->Check(officecfg::Office::Common::Misc::CollectUsageInformation::get());
     m_pCollectUsageInfo->SaveValue();
-
-    m_pUseOpenCL->Check(officecfg::Office::Common::Misc::UseOpenCL::get());
-    m_pUseOpenCL->SaveValue();
 }
 
 
diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx
index a6a7dac..3353457 100644
--- a/cui/source/options/optgdlg.hxx
+++ b/cui/source/options/optgdlg.hxx
@@ -57,8 +57,6 @@ private:
 
     CheckBox*     m_pCollectUsageInfo;
 
-    CheckBox*     m_pUseOpenCL;
-
     DECL_LINK( TwoFigureHdl, NumericField* );
     DECL_LINK( TwoFigureConfigHdl, NumericField* );
     DECL_LINK(HelpCheckHdl_Impl, void *);
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
new file mode 100644
index 0000000..1de17b8
--- /dev/null
+++ b/cui/source/options/optopencl.cxx
@@ -0,0 +1,283 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <vcl/fixed.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <vcl/settings.hxx>
+#include <svl/zforlist.hxx>
+#include <opencl/openclconfig.hxx>
+#include <officecfg/Office/Common.hxx>
+
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/util/XChangesBatch.hpp>
+#include <com/sun/star/setup/UpdateCheckConfig.hpp>
+
+#include "cuires.hrc"
+#include "optopencl.hxx"
+
+SvxOpenCLTabPage::SvxOpenCLTabPage(vcl::Window* pParent, const SfxItemSet& rSet) :
+    SfxTabPage(pParent, "OptOpenCLPage", "cui/ui/optopenclpage.ui", &rSet),
+    maConfig(OpenCLConfig::get())
+{
+    get(mpUseOpenCL, "useopencl");
+    get(mpBlackList, "blacklist");
+    get(mpBlackListEdit, "bledit");
+    get(mpBlackListAdd, "bladd");
+    get(mpBlackListDelete, "bldelete");
+    get(mpWhiteList, "whitelist");
+    get(mpWhiteListEdit, "wledit");
+    get(mpWhiteListAdd, "wladd");
+    get(mpWhiteListDelete, "wldelete");
+
+    mpBlackListEdit->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListEditHdl));
+    mpBlackListAdd->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListAddHdl));
+    mpBlackListDelete->SetClickHdl(LINK(this, SvxOpenCLTabPage, BlackListDeleteHdl));
+
+    mpWhiteListEdit->SetClickHdl(LINK(this, SvxOpenCLTabPage, WhiteListEditHdl));
+    mpWhiteListAdd->SetClickHdl(LINK(this, SvxOpenCLTabPage, WhiteListAddHdl));
+    mpWhiteListDelete->SetClickHdl(LINK(this, SvxOpenCLTabPage, WhiteListDeleteHdl));
+
+    mpBlackList->set_height_request(4 * mpBlackList->GetTextHeight());
+    mpWhiteList->set_height_request(4 * mpWhiteList->GetTextHeight());
+}
+
+SvxOpenCLTabPage::~SvxOpenCLTabPage()
+{
+}
+
+SfxTabPage*
+SvxOpenCLTabPage::Create( vcl::Window* pParent, const SfxItemSet* rAttrSet )
+{
+    return new SvxOpenCLTabPage(pParent, *rAttrSet);
+}
+
+bool SvxOpenCLTabPage::FillItemSet( SfxItemSet* )
+{
+    bool bModified = false;
+    boost::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
+
+    if (mpUseOpenCL->IsValueChangedFromSaved())
+        maConfig.mbUseOpenCL = mpUseOpenCL->IsChecked();
+
+    if (maConfig != OpenCLConfig::get())
+    {
+        maConfig.set();
+        bModified = true;
+    }
+
+    if (bModified)
+        batch->commit();
+
+    return bModified;
+}
+
+namespace {
+
+OUString format(const OpenCLConfig::ImplMatcher& rImpl)
+{
+    return (rImpl.maOS + " " +
+            rImpl.maOSVersion + " " +
+            rImpl.maPlatformVendor + " " +
+            rImpl.maDevice + " " +
+            rImpl.maDriverVersion);
+}
+
+void fillListBox(ListBox* pListBox, const OpenCLConfig::ImplMatcherSet& rSet)
+{
+    pListBox->SetUpdateMode(false);
+    pListBox->Clear();
+
+    for (auto i = rSet.cbegin(); i != rSet.cend(); ++i)
+    {
+        pListBox->InsertEntry(format(*i), LISTBOX_APPEND);
+    }
+
+    pListBox->SetUpdateMode(true);
+}
+
+}
+
+void SvxOpenCLTabPage::Reset( const SfxItemSet* )
+{
+    maConfig = OpenCLConfig::get();
+
+    mpUseOpenCL->Check(maConfig.mbUseOpenCL);
+    mpUseOpenCL->SaveValue();
+
+    fillListBox(mpBlackList, maConfig.maBlackList);
+    fillListBox(mpWhiteList, maConfig.maWhiteList);
+}
+
+void SvxOpenCLTabPage::FillUserData()
+{
+}
+
+namespace {
+
+class ListEntryDialog : public ModalDialog
+{
+public:
+    OpenCLConfig::ImplMatcher maEntry;
+
+    Edit* mpOS;
+    Edit* mpOSVersion;
+    Edit* mpPlatformVendor;
+    Edit* mpDevice;
+    Edit* mpDriverVersion;
+
+    DECL_LINK(EditModifiedHdl, Edit*);
+
+    ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag);
+};
+
+ListEntryDialog::ListEntryDialog(vcl::Window* pParent, const OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
+    : ModalDialog(pParent, "BlackOrWhiteListEntryDialog",
+                  "cui/ui/blackorwhitelistentrydialog.ui"),
+      maEntry(rEntry)
+{
+    get(mpOS, "os");
+    get(mpOSVersion, "osversion");
+    get(mpPlatformVendor, "platformvendor");
+    get(mpDevice, "device");
+    get(mpDriverVersion, "driverversion");
+
+    mpOS->SetText(rEntry.maOS);
+    mpOSVersion->SetText(rEntry.maOSVersion);
+    mpPlatformVendor->SetText(rEntry.maPlatformVendor);
+    mpDevice->SetText(rEntry.maDevice);
+    mpDriverVersion->SetText(rEntry.maDriverVersion);
+
+    mpOS->SetModifyHdl(LINK(this, ListEntryDialog, EditModifiedHdl));
+    mpOSVersion->SetModifyHdl(LINK(this, ListEntryDialog, EditModifiedHdl));
+    mpPlatformVendor->SetModifyHdl(LINK(this, ListEntryDialog, EditModifiedHdl));
+    mpDevice->SetModifyHdl(LINK(this, ListEntryDialog, EditModifiedHdl));
+    mpDriverVersion->SetModifyHdl(LINK(this, ListEntryDialog, EditModifiedHdl));
+
+    SetText(get<FixedText>(rTag + "title")->GetText());
+}
+
+IMPL_LINK(ListEntryDialog, EditModifiedHdl, Edit*, pEdit)
+{
+    if (pEdit == mpOS)
+        maEntry.maOS = pEdit->GetText();
+    else if (pEdit == mpOSVersion)
+        maEntry.maOSVersion = pEdit->GetText();
+    else if (pEdit == mpPlatformVendor)
+        maEntry.maPlatformVendor = pEdit->GetText();
+    else if (pEdit == mpDevice)
+        maEntry.maDevice = pEdit->GetText();
+    else if (pEdit == mpDriverVersion)
+        maEntry.maDriverVersion = pEdit->GetText();
+
+    return 0;
+}
+
+void openListDialog(SvxOpenCLTabPage* pTabPage, OpenCLConfig::ImplMatcher& rEntry, const OString& rTag)
+{
+    ListEntryDialog aDlg(pTabPage, rEntry, rTag);
+
+    if (aDlg.Execute() == RET_OK)
+        rEntry = aDlg.maEntry;
+}
+
+const OpenCLConfig::ImplMatcher& findCurrentEntry(OpenCLConfig::ImplMatcherSet& rSet, ListBox* pListBox)
+{
+    auto i = rSet.begin();
+    std::advance(i, pListBox->GetSelectEntryPos());
+
+    return *i;
+}
+
+}
+
+long SvxOpenCLTabPage::EditHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag)
+{
+    if (pListBox->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
+        return 0;
+
+    OpenCLConfig::ImplMatcher rEntry(findCurrentEntry(rSet, pListBox));
+    rSet.erase(rEntry);
+    openListDialog(this, rEntry, rTag);
+    rSet.insert(rEntry);
+    fillListBox(pListBox, rSet);
+
+    return 0;
+}
+
+long SvxOpenCLTabPage::AddHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag)
+{
+    OpenCLConfig::ImplMatcher rEntry;
+    openListDialog(this, rEntry, rTag);
+    if (rEntry != OpenCLConfig::ImplMatcher())
+    {
+        rSet.insert(rEntry);
+        fillListBox(pListBox, rSet);
+    }
+
+    return 0;
+}
+
+long SvxOpenCLTabPage::DeleteHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet)
+{
+    if (pListBox->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
+        return 0;
+
+    OpenCLConfig::ImplMatcher rEntry(findCurrentEntry(rSet, pListBox));
+    rSet.erase(rEntry);
+    fillListBox(pListBox, rSet);
+
+    return 0;
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, BlackListEditHdl)
+{
+    return EditHdl(mpBlackList, maConfig.maBlackList, "bledit");
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, BlackListAddHdl)
+{
+    return AddHdl(mpBlackList, maConfig.maBlackList, "bladd");
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, BlackListDeleteHdl)
+{
+    return DeleteHdl(mpBlackList, maConfig.maBlackList);
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, WhiteListEditHdl)
+{
+    return EditHdl(mpWhiteList, maConfig.maWhiteList, "wledit");
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, WhiteListAddHdl)
+{
+    return AddHdl(mpWhiteList, maConfig.maWhiteList, "wladd");
+}
+
+IMPL_LINK_NOARG(SvxOpenCLTabPage, WhiteListDeleteHdl)
+{
+    return DeleteHdl(mpWhiteList, maConfig.maWhiteList);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
new file mode 100644
index 0000000..818eec4
--- /dev/null
+++ b/cui/source/options/optopencl.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_CUI_SOURCE_OPTIONS_OPTOPENCL_HXX
+#define INCLUDED_CUI_SOURCE_OPTIONS_OPTOPENCL_HXX
+
+#include <opencl/openclconfig.hxx>
+#include <sfx2/tabdlg.hxx>
+#include <svtools/simptabl.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+
+class SvxOpenCLTabPage : public SfxTabPage
+{
+private:
+    OpenCLConfig maConfig;
+
+    CheckBox* mpUseOpenCL;
+
+    ListBox* mpBlackList;
+    PushButton* mpBlackListEdit;
+    PushButton* mpBlackListAdd;
+    PushButton* mpBlackListDelete;
+
+    ListBox* mpWhiteList;
+    PushButton* mpWhiteListEdit;
+    PushButton* mpWhiteListAdd;
+    PushButton* mpWhiteListDelete;
+
+    DECL_LINK(BlackListEditHdl, void*);
+    DECL_LINK(BlackListAddHdl, void*);
+    DECL_LINK(BlackListDeleteHdl, void*);
+
+    DECL_LINK(WhiteListEditHdl, void*);
+    DECL_LINK(WhiteListAddHdl, void*);
+    DECL_LINK(WhiteListDeleteHdl, void*);
+
+    long EditHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag);
+    long AddHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet, const OString& rTag);
+    long DeleteHdl(ListBox* pListBox, OpenCLConfig::ImplMatcherSet& rSet);
+
+public:
+    SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
+    virtual ~SvxOpenCLTabPage();
+
+    static SfxTabPage*      Create( vcl::Window* pParent, const SfxItemSet* rSet );
+
+    virtual bool            FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual void            Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
+    virtual void            FillUserData() SAL_OVERRIDE;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index fd7810c..772f80f 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -47,6 +47,7 @@
 #include "optjsearch.hxx"
 #include "optlingu.hxx"
 #include "optmemory.hxx"
+#include "optopencl.hxx"
 #include "optpath.hxx"
 #include "optsave.hxx"
 #include "optupdt.hxx"
@@ -320,6 +321,7 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, const Sf
         case RID_SVXPAGE_ACCESSIBILITYCONFIG:       fnCreate = &SvxAccessibilityOptionsTabPage::Create; break;
         case RID_SVXPAGE_OPTIONS_CTL:               fnCreate = &SvxCTLOptionsPage::Create ; break;
         case RID_SVXPAGE_OPTIONS_JAVA:              fnCreate = &SvxJavaOptionsPage::Create ; break;
+        case RID_SVXPAGE_OPENCL:                    fnCreate = &SvxOpenCLTabPage::Create ; break;
         case RID_SVXPAGE_ONLINEUPDATE:              fnCreate = &SvxOnlineUpdateTabPage::Create; break;
         case RID_OPTPAGE_CHART_DEFCOLORS:           fnCreate = &SvxDefaultColorOptPage::Create; break;
 #if HAVE_FEATURE_SCRIPTING
diff --git a/cui/source/options/treeopt.src b/cui/source/options/treeopt.src
index 54be930..fac9779 100644
--- a/cui/source/options/treeopt.src
+++ b/cui/source/options/treeopt.src
@@ -43,6 +43,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
             < "Advanced" ; RID_SVXPAGE_OPTIONS_JAVA ; > ;
             < "Basic IDE Options" ; RID_SVXPAGE_BASICIDE_OPTIONS ; > ;
             < "Online Update" ; RID_SVXPAGE_ONLINEUPDATE ; > ;
+            < "OpenCL" ; RID_SVXPAGE_OPENCL ; > ;
         };
     };
     StringArray SID_LANGUAGE_OPTIONS
diff --git a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
new file mode 100644
index 0000000..3c2b238
--- /dev/null
+++ b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
@@ -0,0 +1,281 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <requires lib="LibreOffice" version="1.0"/>
+  <object class="GtkDialog" id="BlackOrWhiteListEntryDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="no">dummy</property>
+    <property name="resizable">False</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+                <property name="secondary">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list