[Libreoffice-commits] core.git: 2 commits - scaddins/source sc/source sd/source xmloff/source xmlsecurity/inc

Noel Grandin noel.grandin at collabora.co.uk
Wed Mar 28 11:01:37 UTC 2018


 sc/source/core/opencl/formulagroupcl.cxx             |  375 -------------------
 sc/source/core/opencl/opbase.cxx                     |   15 
 sc/source/core/opencl/opbase.hxx                     |    5 
 sc/source/filter/excel/impop.cxx                     |    5 
 sc/source/filter/inc/imp_op.hxx                      |    4 
 sc/source/filter/inc/lotimpop.hxx                    |    2 
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx       |    3 
 sc/source/ui/inc/PivotLayoutTreeList.hxx             |    2 
 sc/source/ui/inc/PivotLayoutTreeListBase.hxx         |    2 
 sc/source/ui/inc/PivotLayoutTreeListData.hxx         |    2 
 scaddins/source/analysis/analysishelper.cxx          |    6 
 scaddins/source/analysis/analysishelper.hxx          |    9 
 sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx  |    2 
 sd/source/ui/sidebar/MasterPagesSelector.cxx         |    4 
 sd/source/ui/sidebar/MasterPagesSelector.hxx         |   14 
 xmloff/source/transform/ChartPlotAreaOOoTContext.hxx |    2 
 xmloff/source/transform/DeepTContext.hxx             |    2 
 xmloff/source/transform/FlatTContext.hxx             |    2 
 xmloff/source/transform/PersAttrListTContext.hxx     |    2 
 xmloff/source/transform/StyleOASISTContext.hxx       |    2 
 xmloff/source/transform/TransformerContext.cxx       |    5 
 xmloff/source/transform/TransformerContext.hxx       |    3 
 xmlsecurity/inc/framework/securityengine.hxx         |    6 
 xmlsecurity/inc/framework/signaturecreatorimpl.hxx   |    2 
 xmlsecurity/inc/framework/signatureengine.hxx        |    2 
 xmlsecurity/inc/framework/signatureverifierimpl.hxx  |    2 
 26 files changed, 23 insertions(+), 457 deletions(-)

New commits:
commit 867a22fd199e732803c9050fe9f84ad630ec27fb
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 28 10:00:30 2018 +0200

    loplugin:virtualdown in xmloff/xmlsecurity
    
    Change-Id: I884fe180be98fe29ddb7d2daf4c61f733236e8bd
    Reviewed-on: https://gerrit.libreoffice.org/51987
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx
index 93388283dacb..1554fe6b2ff3 100644
--- a/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx
+++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.hxx
@@ -43,7 +43,7 @@ public:
                                    const OUString& rQName,
                                    const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
     virtual void EndElement() override;
-    virtual void ExportContent() override;
+    void ExportContent();
 
 private:
     void AddContent( rtl::Reference<XMLAxisOOoContext> const & pContent );
diff --git a/xmloff/source/transform/DeepTContext.hxx b/xmloff/source/transform/DeepTContext.hxx
index efbed3b40415..c846fdb7c3ef 100644
--- a/xmloff/source/transform/DeepTContext.hxx
+++ b/xmloff/source/transform/DeepTContext.hxx
@@ -66,7 +66,7 @@ public:
         return !m_aChildContexts.empty();
     }
 
-    virtual void ExportContent() override;
+    void ExportContent();
 };
 
 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_DEEPTCONTEXT_HXX
diff --git a/xmloff/source/transform/FlatTContext.hxx b/xmloff/source/transform/FlatTContext.hxx
index 06d525c76df6..44a8c080adcf 100644
--- a/xmloff/source/transform/FlatTContext.hxx
+++ b/xmloff/source/transform/FlatTContext.hxx
@@ -51,7 +51,7 @@ public:
     // current element.
     virtual void Characters( const OUString& rChars ) override;
 
-    virtual void ExportContent() override;
+    void ExportContent();
 
     const OUString& GetTextContent() const { return m_aCharacters; }
 };
diff --git a/xmloff/source/transform/PersAttrListTContext.hxx b/xmloff/source/transform/PersAttrListTContext.hxx
index 1112376503ce..0d91cc92ab31 100644
--- a/xmloff/source/transform/PersAttrListTContext.hxx
+++ b/xmloff/source/transform/PersAttrListTContext.hxx
@@ -84,7 +84,7 @@ public:
 
     virtual bool IsPersistent() const override;
     virtual void Export() override;
-    virtual void ExportContent() override;
+    void ExportContent();
 
     const OUString& GetExportQName() const { return m_aElemQName; }
 
diff --git a/xmloff/source/transform/StyleOASISTContext.hxx b/xmloff/source/transform/StyleOASISTContext.hxx
index 081bacedb436..4a07fcc1fcc8 100644
--- a/xmloff/source/transform/StyleOASISTContext.hxx
+++ b/xmloff/source/transform/StyleOASISTContext.hxx
@@ -54,7 +54,7 @@ public:
     virtual void EndElement() override;
     virtual void Characters( const OUString& rChars ) override;
 
-    virtual void ExportContent() override;
+    void ExportContent();
 
     virtual bool IsPersistent() const override;
 
diff --git a/xmloff/source/transform/TransformerContext.cxx b/xmloff/source/transform/TransformerContext.cxx
index fd4005d73274..6a65ba145c75 100644
--- a/xmloff/source/transform/TransformerContext.cxx
+++ b/xmloff/source/transform/TransformerContext.cxx
@@ -85,9 +85,4 @@ void XMLTransformerContext::Export()
     OSL_ENSURE( false, "context is not persistent" );
 }
 
-void XMLTransformerContext::ExportContent()
-{
-    OSL_ENSURE( false, "context is not persistent" );
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/transform/TransformerContext.hxx b/xmloff/source/transform/TransformerContext.hxx
index 0a2446f252d4..07b0dbcb04b4 100644
--- a/xmloff/source/transform/TransformerContext.hxx
+++ b/xmloff/source/transform/TransformerContext.hxx
@@ -91,9 +91,6 @@ public:
 
     // Export the whole element. By default, nothing is done here
     virtual void Export();
-
-    // Export the element content. By default, nothing is done here
-    virtual void ExportContent();
 };
 
 
diff --git a/xmlsecurity/inc/framework/securityengine.hxx b/xmlsecurity/inc/framework/securityengine.hxx
index dbb4dbfe5777..6e40d7fd8b53 100644
--- a/xmlsecurity/inc/framework/securityengine.hxx
+++ b/xmlsecurity/inc/framework/securityengine.hxx
@@ -129,12 +129,6 @@ protected:
     virtual void notifyResultListener() const
         {};
 
-    /*
-     * checks whether everything is ready.
-     * Any derived class will implement this method respectively.
-     */
-    virtual bool checkReady() const { return true; };
-
 public:
     /* XReferenceResolvedListener */
     virtual void SAL_CALL referenceResolved( sal_Int32 referenceId ) override;
diff --git a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
index b7fffec12c6c..8637f29395bf 100644
--- a/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
+++ b/xmlsecurity/inc/framework/signaturecreatorimpl.hxx
@@ -61,7 +61,7 @@ private:
 
     virtual void notifyResultListener() const override;
     virtual void clearUp( ) const override;
-    virtual bool checkReady() const override;
+    bool checkReady() const;
     virtual void startEngine( const rtl::Reference<XMLSignatureTemplateImpl>& xSignatureTemplate) override;
 
 public:
diff --git a/xmlsecurity/inc/framework/signatureengine.hxx b/xmlsecurity/inc/framework/signatureengine.hxx
index 62c0c5c5f24f..f1f53d4412a0 100644
--- a/xmlsecurity/inc/framework/signatureengine.hxx
+++ b/xmlsecurity/inc/framework/signatureengine.hxx
@@ -90,7 +90,7 @@ protected:
 
     virtual void tryToPerform( ) override;
     virtual void clearUp( ) const override;
-    virtual bool checkReady() const override;
+    bool checkReady() const;
 
     /*
      * starts the main function. This method will be implemented by any sub-class.
diff --git a/xmlsecurity/inc/framework/signatureverifierimpl.hxx b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
index d3b8c8e166f6..7c609804aa85 100644
--- a/xmlsecurity/inc/framework/signatureverifierimpl.hxx
+++ b/xmlsecurity/inc/framework/signatureverifierimpl.hxx
@@ -55,7 +55,7 @@ private:
     css::uno::Reference< css::xml::crypto::XXMLSecurityContext > m_xXMLSecurityContext;
 
     virtual void notifyResultListener() const override;
-    virtual bool checkReady() const override;
+    bool checkReady() const;
     virtual void startEngine( const rtl::Reference<XMLSignatureTemplateImpl>& xSignatureTemplate) override;
 
 public:
commit 149a4d756699f4275f9f84807e72526e73aed1b2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Mar 28 10:01:13 2018 +0200

    loplugin:virtualdown in sc..sd
    
    Change-Id: If93dc12f484839e6d2b44d6568b506f0c15b4735
    Reviewed-on: https://gerrit.libreoffice.org/51989
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 6325694ffdbf..b151451dbd9a 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -853,7 +853,7 @@ public:
         ss << ", ";
         mStringArgument.GenSlidingWindowDecl(ss);
     }
-    virtual bool IsMixedArgument() const override { return true;}
+    virtual bool IsMixedArgument() const { return true;}
     virtual void GenSlidingWindowFunction( std::stringstream& ) override { }
     /// Generate declaration
     virtual void GenDecl( std::stringstream& ss ) const override
@@ -868,11 +868,11 @@ public:
         ss << ",";
         mStringArgument.GenDeclRef(ss);
     }
-    virtual void GenNumDeclRef( std::stringstream& ss ) const override
+    virtual void GenNumDeclRef( std::stringstream& ss ) const
     {
         VectorRef::GenSlidingWindowDecl(ss);
     }
-    virtual void GenStringDeclRef( std::stringstream& ss ) const override
+    virtual void GenStringDeclRef( std::stringstream& ss ) const
     {
         mStringArgument.GenSlidingWindowDecl(ss);
     }
@@ -930,15 +930,6 @@ public:
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
     }
-    // Should only be called by SumIfs. Yikes!
-    virtual bool NeedParallelReduction() const
-    {
-        assert(dynamic_cast<OpSumIfs*>(mpCodeGen.get()));
-        return GetWindowSize() > 100 &&
-               ((GetStartFixed() && GetEndFixed()) ||
-            (!GetStartFixed() && !GetEndFixed()));
-    }
-    virtual void GenSlidingWindowFunction( std::stringstream& ) { }
 
     virtual std::string GenSlidingWindowDeclRef( bool nested = false ) const
     {
@@ -1127,7 +1118,7 @@ public:
         ss << ")";
         return ss.str();
     }
-    virtual bool IsMixedArgument() const override { return true;}
+    virtual bool IsMixedArgument() const { return true;}
     virtual std::string GenDoubleSlidingWindowDeclRef( bool = false ) const override
     {
         std::stringstream ss;
@@ -1140,11 +1131,11 @@ public:
         ss << mStringArgument.GenSlidingWindowDeclRef();
         return ss.str();
     }
-    virtual void GenNumDeclRef( std::stringstream& ss ) const override
+    virtual void GenNumDeclRef( std::stringstream& ss ) const
     {
         mDoubleArgument.GenDeclRef(ss);
     }
-    virtual void GenStringDeclRef( std::stringstream& ss ) const override
+    virtual void GenStringDeclRef( std::stringstream& ss ) const
     {
         mStringArgument.GenDeclRef(ss);
     }
@@ -1215,195 +1206,6 @@ public:
         bIsStartFixed = mpDVR->IsStartFixed();
         bIsEndFixed = mpDVR->IsEndFixed();
     }
-    /// Emit the definition for the auxiliary reduction kernel
-    virtual void GenSlidingWindowFunction( std::stringstream& ss )
-    {
-        if (!dynamic_cast<OpAverage*>(mpCodeGen.get()))
-        {
-            std::string name = Base::GetName();
-            ss << "__kernel void " << name;
-            ss << "_reduction(__global double* A, "
-                "__global double *result,int arrayLength,int windowSize){\n";
-            ss << "    double tmp, current_result =" <<
-                mpCodeGen->GetBottom();
-            ss << ";\n";
-            ss << "    int writePos = get_group_id(1);\n";
-            ss << "    int lidx = get_local_id(0);\n";
-            ss << "    __local double shm_buf[256];\n";
-            if (mpDVR->IsStartFixed())
-                ss << "    int offset = 0;\n";
-            else // if (!mpDVR->IsStartFixed())
-                ss << "    int offset = get_group_id(1);\n";
-            if (mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            else if (!mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = offset + windowSize;\n";
-            else if (mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = windowSize + get_group_id(1);\n";
-            else if (!mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            ss << "    end = min(end, arrayLength);\n";
-
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    int loop = arrayLength/512 + 1;\n";
-            ss << "    for (int l=0; l<loop; l++){\n";
-            ss << "    tmp = " << mpCodeGen->GetBottom() << ";\n";
-            ss << "    int loopOffset = l*512;\n";
-            ss << "    if((loopOffset + lidx + offset + 256) < end) {\n";
-            ss << "        tmp = legalize(" << mpCodeGen->Gen2(
-                "A[loopOffset + lidx + offset]", "tmp") << ", tmp);\n";
-            ss << "        tmp = legalize(" << mpCodeGen->Gen2(
-                "A[loopOffset + lidx + offset + 256]", "tmp") << ", tmp);\n";
-            ss << "    } else if ((loopOffset + lidx + offset) < end)\n";
-            ss << "        tmp = legalize(" << mpCodeGen->Gen2(
-                "A[loopOffset + lidx + offset]", "tmp") << ", tmp);\n";
-            ss << "    shm_buf[lidx] = tmp;\n";
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    for (int i = 128; i >0; i/=2) {\n";
-            ss << "        if (lidx < i)\n";
-            ss << "            shm_buf[lidx] = ";
-            // Special case count
-            if (dynamic_cast<OpCount*>(mpCodeGen.get()))
-                ss << "shm_buf[lidx] + shm_buf[lidx + i];\n";
-            else
-                ss << mpCodeGen->Gen2("shm_buf[lidx]", "shm_buf[lidx + i]") << ";\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "        if (lidx == 0)\n";
-            ss << "            current_result =";
-            if (dynamic_cast<OpCount*>(mpCodeGen.get()))
-                ss << "current_result + shm_buf[0]";
-            else
-                ss << mpCodeGen->Gen2("current_result", "shm_buf[0]");
-            ss << ";\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "    if (lidx == 0)\n";
-            ss << "        result[writePos] = current_result;\n";
-            ss << "}\n";
-        }
-        else
-        {
-            std::string name = Base::GetName();
-            /*sum reduction*/
-            ss << "__kernel void " << name << "_sum";
-            ss << "_reduction(__global double* A, "
-                "__global double *result,int arrayLength,int windowSize){\n";
-            ss << "    double tmp, current_result =" <<
-                mpCodeGen->GetBottom();
-            ss << ";\n";
-            ss << "    int writePos = get_group_id(1);\n";
-            ss << "    int lidx = get_local_id(0);\n";
-            ss << "    __local double shm_buf[256];\n";
-            if (mpDVR->IsStartFixed())
-                ss << "    int offset = 0;\n";
-            else // if (!mpDVR->IsStartFixed())
-                ss << "    int offset = get_group_id(1);\n";
-            if (mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            else if (!mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = offset + windowSize;\n";
-            else if (mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = windowSize + get_group_id(1);\n";
-            else if (!mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            ss << "    end = min(end, arrayLength);\n";
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    int loop = arrayLength/512 + 1;\n";
-            ss << "    for (int l=0; l<loop; l++){\n";
-            ss << "    tmp = " << mpCodeGen->GetBottom() << ";\n";
-            ss << "    int loopOffset = l*512;\n";
-            ss << "    if((loopOffset + lidx + offset + 256) < end) {\n";
-            ss << "        tmp = legalize(";
-            ss << "(A[loopOffset + lidx + offset]+ tmp)";
-            ss << ", tmp);\n";
-            ss << "        tmp = legalize((A[loopOffset + lidx + offset + 256]+ tmp)";
-            ss << ", tmp);\n";
-            ss << "    } else if ((loopOffset + lidx + offset) < end)\n";
-            ss << "        tmp = legalize((A[loopOffset + lidx + offset] + tmp)";
-            ss << ", tmp);\n";
-            ss << "    shm_buf[lidx] = tmp;\n";
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    for (int i = 128; i >0; i/=2) {\n";
-            ss << "        if (lidx < i)\n";
-            ss << "            shm_buf[lidx] = ";
-            ss << "shm_buf[lidx] + shm_buf[lidx + i];\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "        if (lidx == 0)\n";
-            ss << "            current_result =";
-            ss << "current_result + shm_buf[0]";
-            ss << ";\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "    if (lidx == 0)\n";
-            ss << "        result[writePos] = current_result;\n";
-            ss << "}\n";
-            /*count reduction*/
-            ss << "__kernel void " << name << "_count";
-            ss << "_reduction(__global double* A, "
-                "__global double *result,int arrayLength,int windowSize){\n";
-            ss << "    double tmp, current_result =" <<
-                mpCodeGen->GetBottom();
-            ss << ";\n";
-            ss << "    int writePos = get_group_id(1);\n";
-            ss << "    int lidx = get_local_id(0);\n";
-            ss << "    __local double shm_buf[256];\n";
-            if (mpDVR->IsStartFixed())
-                ss << "    int offset = 0;\n";
-            else // if (!mpDVR->IsStartFixed())
-                ss << "    int offset = get_group_id(1);\n";
-            if (mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            else if (!mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = offset + windowSize;\n";
-            else if (mpDVR->IsStartFixed() && !mpDVR->IsEndFixed())
-                ss << "    int end = windowSize + get_group_id(1);\n";
-            else if (!mpDVR->IsStartFixed() && mpDVR->IsEndFixed())
-                ss << "    int end = windowSize;\n";
-            ss << "    end = min(end, arrayLength);\n";
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    int loop = arrayLength/512 + 1;\n";
-            ss << "    for (int l=0; l<loop; l++){\n";
-            ss << "    tmp = " << mpCodeGen->GetBottom() << ";\n";
-            ss << "    int loopOffset = l*512;\n";
-            ss << "    if((loopOffset + lidx + offset + 256) < end) {\n";
-            ss << "        tmp = legalize((isnan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)";
-            ss << ", tmp);\n";
-            ss << "        tmp = legalize((isnan(A[loopOffset + lidx + offset+256])?tmp:tmp+1.0)";
-            ss << ", tmp);\n";
-            ss << "    } else if ((loopOffset + lidx + offset) < end)\n";
-            ss << "        tmp = legalize((isnan(A[loopOffset + lidx + offset])?tmp:tmp+1.0)";
-            ss << ", tmp);\n";
-            ss << "    shm_buf[lidx] = tmp;\n";
-            ss << "    barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    for (int i = 128; i >0; i/=2) {\n";
-            ss << "        if (lidx < i)\n";
-            ss << "            shm_buf[lidx] = ";
-            ss << "shm_buf[lidx] + shm_buf[lidx + i];\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "        if (lidx == 0)\n";
-            ss << "            current_result =";
-            ss << "current_result + shm_buf[0];";
-            ss << ";\n";
-            ss << "        barrier(CLK_LOCAL_MEM_FENCE);\n";
-            ss << "    }\n";
-            ss << "    if (lidx == 0)\n";
-            ss << "        result[writePos] = current_result;\n";
-            ss << "}\n";
-        }
-
-    }
-    virtual std::string GenSlidingWindowDeclRef( bool ) const
-    {
-        std::stringstream ss;
-        if (!bIsStartFixed && !bIsEndFixed)
-            ss << Base::GetName() << "[i + gid0]";
-        else
-            ss << Base::GetName() << "[i]";
-        return ss.str();
-    }
     /// Controls how the elements in the DoubleVectorRef are traversed
     virtual size_t GenReductionLoopHeader(
         std::stringstream& ss, int nResultSize, bool& needBody )
@@ -1429,171 +1231,6 @@ public:
         return nCurWindowSize;
     }
 
-    virtual size_t Marshal( cl_kernel k, int argno, int w, cl_program mpProgram )
-    {
-        assert(Base::mpClmem == nullptr);
-
-        openclwrapper::KernelEnv kEnv;
-        openclwrapper::setKernelEnv(&kEnv);
-        cl_int err;
-        size_t nInput = mpDVR->GetArrayLength();
-        size_t nCurWindowSize = mpDVR->GetRefRowSize();
-        // create clmem buffer
-        if (mpDVR->GetArrays()[Base::mnIndex].mpNumericArray == nullptr)
-            throw Unhandled(__FILE__, __LINE__);
-        double* pHostBuffer = const_cast<double*>(
-            mpDVR->GetArrays()[Base::mnIndex].mpNumericArray);
-        size_t szHostBuffer = nInput * sizeof(double);
-        Base::mpClmem = clCreateBuffer(kEnv.mpkContext,
-            cl_mem_flags(CL_MEM_READ_ONLY) | CL_MEM_USE_HOST_PTR,
-            szHostBuffer,
-            pHostBuffer, &err);
-        SAL_INFO("sc.opencl", "Created buffer " << Base::mpClmem << " size " << nInput << "*" << sizeof(double) << "=" << szHostBuffer << " using host buffer " << pHostBuffer);
-
-        mpClmem2 = clCreateBuffer(kEnv.mpkContext,
-            CL_MEM_READ_WRITE | CL_MEM_ALLOC_HOST_PTR,
-            sizeof(double) * w, nullptr, nullptr);
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
-        SAL_INFO("sc.opencl", "Created buffer " << mpClmem2 << " size " << sizeof(double) << "*" << w << "=" << (sizeof(double)*w));
-
-        // reproduce the reduction function name
-        std::string kernelName;
-        if (!dynamic_cast<OpAverage*>(mpCodeGen.get()))
-            kernelName = Base::GetName() + "_reduction";
-        else
-            kernelName = Base::GetName() + "_sum_reduction";
-        cl_kernel redKernel = clCreateKernel(mpProgram, kernelName.c_str(), &err);
-        if (err != CL_SUCCESS)
-            throw OpenCLError("clCreateKernel", err, __FILE__, __LINE__);
-        SAL_INFO("sc.opencl", "Created kernel " << redKernel << " with name " << kernelName << " in program " << mpProgram);
-
-        // set kernel arg of reduction kernel
-        // TODO(Wei Wei): use unique name for kernel
-        cl_mem buf = Base::GetCLBuffer();
-        SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 0 << ": cl_mem: " << buf);
-        err = clSetKernelArg(redKernel, 0, sizeof(cl_mem),
-            static_cast<void*>(&buf));
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-        SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 1 << ": cl_mem: " << mpClmem2);
-        err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), &mpClmem2);
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-        SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 2 << ": cl_int: " << nInput);
-        err = clSetKernelArg(redKernel, 2, sizeof(cl_int), static_cast<void*>(&nInput));
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-        SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 3 << ": cl_int: " << nCurWindowSize);
-        err = clSetKernelArg(redKernel, 3, sizeof(cl_int), static_cast<void*>(&nCurWindowSize));
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-        // set work group size and execute
-        size_t global_work_size[] = { 256, static_cast<size_t>(w) };
-        size_t const local_work_size[] = { 256, 1 };
-        SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
-        err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
-            global_work_size, local_work_size, 0, nullptr, nullptr);
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
-        err = clFinish(kEnv.mpkCmdQueue);
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clFinish", err, __FILE__, __LINE__);
-        if (dynamic_cast<OpAverage*>(mpCodeGen.get()))
-        {
-            /*average need more reduction kernel for count computing*/
-            std::unique_ptr<double[]> pAllBuffer(new double[2 * w]);
-            double* resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
-                mpClmem2,
-                CL_TRUE, CL_MAP_READ, 0,
-                sizeof(double) * w, 0, nullptr, nullptr,
-                &err));
-            if (err != CL_SUCCESS)
-                throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
-
-            for (int i = 0; i < w; i++)
-                pAllBuffer[i] = resbuf[i];
-            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, nullptr, nullptr);
-            if (err != CL_SUCCESS)
-                throw OpenCLError("clEnqueueUnmapMemObject", err, __FILE__, __LINE__);
-
-            kernelName = Base::GetName() + "_count_reduction";
-            redKernel = clCreateKernel(mpProgram, kernelName.c_str(), &err);
-            if (err != CL_SUCCESS)
-                throw OpenCLError("clCreateKernel", err, __FILE__, __LINE__);
-            SAL_INFO("sc.opencl", "Created kernel " << redKernel << " with name " << kernelName << " in program " << mpProgram);
-
-            // set kernel arg of reduction kernel
-            buf = Base::GetCLBuffer();
-            SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 0 << ": cl_mem: " << buf);
-            err = clSetKernelArg(redKernel, 0, sizeof(cl_mem),
-                static_cast<void*>(&buf));
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-            SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 1 << ": cl_mem: " << mpClmem2);
-            err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), &mpClmem2);
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-            SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 2 << ": cl_int: " << nInput);
-            err = clSetKernelArg(redKernel, 2, sizeof(cl_int), static_cast<void*>(&nInput));
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-            SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 3 << ": cl_int: " << nCurWindowSize);
-            err = clSetKernelArg(redKernel, 3, sizeof(cl_int), static_cast<void*>(&nCurWindowSize));
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-
-            // set work group size and execute
-            size_t global_work_size1[] = { 256, static_cast<size_t>(w) };
-            size_t const local_work_size1[] = { 256, 1 };
-            SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
-            err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
-                global_work_size1, local_work_size1, 0, nullptr, nullptr);
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clEnqueueNDRangeKernel", err, __FILE__, __LINE__);
-            err = clFinish(kEnv.mpkCmdQueue);
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clFinish", err, __FILE__, __LINE__);
-            resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
-                mpClmem2,
-                CL_TRUE, CL_MAP_READ, 0,
-                sizeof(double) * w, 0, nullptr, nullptr,
-                &err));
-            if (err != CL_SUCCESS)
-                throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
-            for (int i = 0; i < w; i++)
-                pAllBuffer[i + w] = resbuf[i];
-            err = clEnqueueUnmapMemObject(kEnv.mpkCmdQueue, mpClmem2, resbuf, 0, nullptr, nullptr);
-            // FIXME: Is it intentional to not throw an OpenCLError even if the clEnqueueUnmapMemObject() fails?
-            if (CL_SUCCESS != err)
-                SAL_WARN("sc.opencl", "clEnqueueUnmapMemObject failed: " << openclwrapper::errorString(err));
-            if (mpClmem2)
-            {
-                err = clReleaseMemObject(mpClmem2);
-                SAL_WARN_IF(err != CL_SUCCESS, "sc.opencl", "clReleaseMemObject failed: " << openclwrapper::errorString(err));
-                mpClmem2 = nullptr;
-            }
-            mpClmem2 = clCreateBuffer(kEnv.mpkContext,
-                cl_mem_flags(CL_MEM_READ_WRITE) | CL_MEM_COPY_HOST_PTR,
-                w * sizeof(double) * 2, pAllBuffer.get(), &err);
-            if (CL_SUCCESS != err)
-                throw OpenCLError("clCreateBuffer", err, __FILE__, __LINE__);
-            SAL_INFO("sc.opencl", "Created buffer " << mpClmem2 << " size " << w << "*" << sizeof(double) << "=" << (w*sizeof(double)) << " copying host buffer " << pAllBuffer.get());
-        }
-        // set kernel arg
-        SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << mpClmem2);
-        err = clSetKernelArg(k, argno, sizeof(cl_mem), &(mpClmem2));
-        if (CL_SUCCESS != err)
-            throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
-        return 1;
-    }
     ~ParallelReductionVectorRef()
     {
         if (mpClmem2)
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index 4b1a6a8256e3..9e162ac45fb6 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -47,27 +47,12 @@ std::string DynamicKernelArgument::GenStringSlidingWindowDeclRef( bool ) const
     return std::string("");
 }
 
-bool DynamicKernelArgument::IsMixedArgument() const
-{
-    return false;
-}
-
 /// Generate use/references to the argument
 void DynamicKernelArgument::GenDeclRef( std::stringstream& ss ) const
 {
     ss << mSymName;
 }
 
-void DynamicKernelArgument::GenNumDeclRef( std::stringstream& ss ) const
-{
-    ss << ",";
-}
-
-void DynamicKernelArgument::GenStringDeclRef( std::stringstream& ss ) const
-{
-    ss << ",";
-}
-
 void DynamicKernelArgument::GenSlidingWindowFunction( std::stringstream& ) {}
 
 FormulaToken* DynamicKernelArgument::GetFormulaToken() const
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index e33431fd139d..7085c0a0a82e 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -112,13 +112,8 @@ public:
     /// When Mix, it will be called
     virtual std::string GenStringSlidingWindowDeclRef( bool = false ) const;
 
-    virtual bool IsMixedArgument() const;
-
     /// Generate use/references to the argument
     virtual void GenDeclRef( std::stringstream& ss ) const;
-    virtual void GenNumDeclRef( std::stringstream& ss ) const;
-
-    virtual void GenStringDeclRef( std::stringstream& ss ) const;
 
     virtual void GenSlidingWindowFunction( std::stringstream& );
     formula::FormulaToken* GetFormulaToken() const;
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 136904fa87c4..90616ce57d2a 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -99,11 +99,6 @@ ImportTyp::~ImportTyp()
 {
 }
 
-ErrCode ImportTyp::Read()
-{
-    return SCERR_IMPORT_INTERNAL;
-}
-
 ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ):
     ImportTyp( &rImpData.mrDoc, rImpData.meTextEnc ),
     XclImpRoot( rImpData ),
diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx
index a386ecc67389..2d4bdf0e678f 100644
--- a/sc/source/filter/inc/imp_op.hxx
+++ b/sc/source/filter/inc/imp_op.hxx
@@ -51,8 +51,6 @@ protected:
 public:
                         ImportTyp( ScDocument*, rtl_TextEncoding eSrc );
     virtual             ~ImportTyp();
-
-    virtual ErrCode     Read();
 };
 
 class XclImpOutlineDataBuffer : protected XclImpRoot
@@ -201,7 +199,7 @@ public:
 
     virtual                 ~ImportExcel() override;
 
-    virtual ErrCode         Read() override;
+    virtual ErrCode         Read();
 };
 
 #endif
diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx
index 17fca962caf6..0b3dc6122547 100644
--- a/sc/source/filter/inc/lotimpop.hxx
+++ b/sc/source/filter/inc/lotimpop.hxx
@@ -80,7 +80,7 @@ public:
     virtual             ~ImportLotus() override;
 
     ErrCode             parse(); //parse + CalcAfterLoad
-    ErrCode             Read() override;
+    virtual ErrCode     Read();
     ErrCode             Read( SvStream& );                  // special for *.fm3 files
 };
 
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 236a939655ca..f1b02c8fef0e 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -100,9 +100,6 @@ void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector
 void ScPivotLayoutTreeListBase::InsertEntryForSourceTarget(SvTreeListEntry* /*pSource*/, SvTreeListEntry* /*pTarget*/)
 {}
 
-void ScPivotLayoutTreeListBase::InsertEntryForItem(ScItemValue* /*pItemValue*/, sal_uLong /*nPosition*/)
-{}
-
 void ScPivotLayoutTreeListBase::RemoveEntryForItem(const ScItemValue* pItemValue)
 {
     SvTreeListEntry* pEachEntry;
diff --git a/sc/source/ui/inc/PivotLayoutTreeList.hxx b/sc/source/ui/inc/PivotLayoutTreeList.hxx
index d4b5e8ff00cb..6fb9430e1267 100644
--- a/sc/source/ui/inc/PivotLayoutTreeList.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeList.hxx
@@ -29,7 +29,7 @@ public:
 
 protected:
     virtual void InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget) override;
-    virtual void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition) override;
+    virtual void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition);
 
     virtual void KeyInput(const KeyEvent& rKeyEvent) override;
 };
diff --git a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
index 41ff3a344909..c3361a888d46 100644
--- a/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeListBase.hxx
@@ -61,8 +61,6 @@ public:
 
 protected:
     virtual void InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget);
-
-    virtual void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/PivotLayoutTreeListData.hxx b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
index 89a96cd7593f..0f2847c2c4dc 100644
--- a/sc/source/ui/inc/PivotLayoutTreeListData.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
@@ -27,7 +27,7 @@ public:
 
 private:
     virtual void InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget) override;
-    virtual void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition) override;
+    void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition);
 
     void AdjustDuplicateCount(ScItemValue* pInputItemValue);
 
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index e7dd010f426a..50e1c84720eb 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2254,12 +2254,6 @@ double ConvertData::Convert(
 }
 
 
-double ConvertData::ConvertToBase( double f, sal_Int16 n ) const
-{
-    return ::rtl::math::pow10Exp( f / fConst, n );
-}
-
-
 double ConvertData::ConvertFromBase( double f, sal_Int16 n ) const
 {
     return ::rtl::math::pow10Exp( f * fConst, -n );
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx
index fa68eee35f0d..2aaaef3a9af0 100644
--- a/scaddins/source/analysis/analysishelper.hxx
+++ b/scaddins/source/analysis/analysishelper.hxx
@@ -546,10 +546,6 @@ public:
     /// @throws css::lang::IllegalArgumentException
     virtual double          Convert( double fVal, const ConvertData& rTo,
                                 sal_Int16 nMatchLevelFrom, sal_Int16 nMatchLevelTo ) const;
-                                    // converts fVal from this unit to rFrom unit
-                                    // throws exception if not from same class
-                                    // this implementation is for proportional cases only
-    virtual double          ConvertToBase( double fVal, sal_Int16 nMatchLevel ) const;
     virtual double          ConvertFromBase( double fVal, sal_Int16 nMatchLevel ) const;
 
     inline ConvertDataClass Class() const;
@@ -572,7 +568,10 @@ public:
                                 sal_Int16 nMatchLevelFrom, sal_Int16 nMatchLevelTo ) const override;
                                     // for cases where f(x) = a + bx applies (e.g. Temperatures)
 
-    virtual double          ConvertToBase( double fVal, sal_Int16 nMatchLevel ) const override;
+                            // converts fVal from this unit to rFrom unit
+                            // throws exception if not from same class
+                           // this implementation is for proportional cases only
+    virtual double          ConvertToBase( double fVal, sal_Int16 nMatchLevel ) const;
     virtual double          ConvertFromBase( double fVal, sal_Int16 nMatchLevel ) const override;
 };
 
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
index 01f1d9b55e92..f20bf2ac2803 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.hxx
@@ -45,7 +45,7 @@ public:
         used by the currently selected page of the document in the
         center pane.
     */
-    virtual void UpdateSelection() override;
+    virtual void UpdateSelection();
 
     /** Copy all master pages that are to be shown into the given list.
     */
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 8fa6a644069b..3047153cc5f8 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -464,10 +464,6 @@ void MasterPagesSelector::SetUserData (int nIndex, UserData* pData)
     }
 }
 
-void MasterPagesSelector::UpdateSelection()
-{
-}
-
 void MasterPagesSelector::SetItem (
     sal_uInt16 nIndex,
     MasterPageContainer::Token aToken)
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index 1ed1279797b8..05c4461934c1 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -70,20 +70,6 @@ public:
 
     sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
 
-    /** Update the selection of previews according to whatever
-        influences them apart from mouse and keyboard.  If, for
-        example, the current page of the main pane changes, then call
-        this method at the CurrentMasterPagesSelector to select the
-        previews of the master pages that are assigned to the new
-        current page.
-
-        The default implementation of this method ignores the call. This is
-        used by e.g. the RecentMasterPagesSelector because it does not show
-        the currently used master pages by default and thus is not
-        influenced by its changes.
-    */
-    virtual void UpdateSelection();
-
     /** Make the selector empty.  This method clear the value set from any
         entries. Override this method to add functionality, especially to
         destroy objects set as data items at the value set.


More information about the Libreoffice-commits mailing list