[arch-commits] Commit in libreoffice-still/repos (10 files)

Felix Yan felixonmars at archlinux.org
Thu Mar 21 21:55:33 UTC 2019


    Date: Thursday, March 21, 2019 @ 21:55:32
  Author: felixonmars
Revision: 348846

archrelease: copy trunk to staging-x86_64

Added:
  libreoffice-still/repos/staging-x86_64/
  libreoffice-still/repos/staging-x86_64/0001-Update-mdds-to-1.4.1.patch
    (from rev 348845, libreoffice-still/trunk/0001-Update-mdds-to-1.4.1.patch)
  libreoffice-still/repos/staging-x86_64/0001-Update-orcus-to-0.14.0.patch
    (from rev 348845, libreoffice-still/trunk/0001-Update-orcus-to-0.14.0.patch)
  libreoffice-still/repos/staging-x86_64/PKGBUILD
    (from rev 348845, libreoffice-still/trunk/PKGBUILD)
  libreoffice-still/repos/staging-x86_64/emfio.patch
    (from rev 348845, libreoffice-still/trunk/emfio.patch)
  libreoffice-still/repos/staging-x86_64/libreoffice-boost-1.69.patch
    (from rev 348845, libreoffice-still/trunk/libreoffice-boost-1.69.patch)
  libreoffice-still/repos/staging-x86_64/libreoffice-still.csh
    (from rev 348845, libreoffice-still/trunk/libreoffice-still.csh)
  libreoffice-still/repos/staging-x86_64/libreoffice-still.sh
    (from rev 348845, libreoffice-still/trunk/libreoffice-still.sh)
  libreoffice-still/repos/staging-x86_64/make-pyuno-work-with-system-wide-module-install.diff
    (from rev 348845, libreoffice-still/trunk/make-pyuno-work-with-system-wide-module-install.diff)
  libreoffice-still/repos/staging-x86_64/poppler-0.70.patch
    (from rev 348845, libreoffice-still/trunk/poppler-0.70.patch)

------------------------------------------------------+
 0001-Update-mdds-to-1.4.1.patch                      |  694 ++++++++++++++
 0001-Update-orcus-to-0.14.0.patch                    |  802 +++++++++++++++++
 PKGBUILD                                             |  337 +++++++
 emfio.patch                                          |  292 ++++++
 libreoffice-boost-1.69.patch                         |   17 
 libreoffice-still.csh                                |    5 
 libreoffice-still.sh                                 |    5 
 make-pyuno-work-with-system-wide-module-install.diff |   18 
 poppler-0.70.patch                                   |   45 
 9 files changed, 2215 insertions(+)

Copied: libreoffice-still/repos/staging-x86_64/0001-Update-mdds-to-1.4.1.patch (from rev 348845, libreoffice-still/trunk/0001-Update-mdds-to-1.4.1.patch)
===================================================================
--- staging-x86_64/0001-Update-mdds-to-1.4.1.patch	                        (rev 0)
+++ staging-x86_64/0001-Update-mdds-to-1.4.1.patch	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,694 @@
+From 3debd23d47d1fcbef76033c739a0b7003824d4ca Mon Sep 17 00:00:00 2001
+From: Noel Grandin <noel.grandin at collabora.co.uk>
+Date: Sat, 11 Aug 2018 13:25:09 +0200
+Subject: [PATCH] Update mdds to 1.4.1
+
+loplugin:constantparam
+
+Reviewed-on: https://gerrit.libreoffice.org/58875
+Tested-by: Jenkins
+Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
+(cherry picked from commit bb6f2b12e8f0bbc99a5ca93141d35fd40b043e55)
+
+Update mdds to 1.4.1.
+
+The largest change in 1.4.x relevant to the calc code is that the
+multi_type_matrix::walk() methods now take a copy of the function
+object rather than a reference, to allow for it to take an inline
+lambda function.  Instead, it does return a instance of the input
+function object, similar to how std::for_each() behaves.
+
+In case the function object contains a large data member, try to
+make it a moveable so that it will get moved rather than copied
+when going through one of the walk() methods.
+
+Reviewed-on: https://gerrit.libreoffice.org/59584
+Tested-by: Jenkins
+Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
+(cherry picked from commit 51f73f35ea61dd81dd3194af50394b98ff1bf8e9)
+
+mdds 1.4.1 is now a minimum requirement.
+
+Reviewed-on: https://gerrit.libreoffice.org/59614
+Tested-by: Jenkins
+Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
+(cherry picked from commit 4d1f735fcf064b18ef2848cc1f5a2a0616b0b33d)
+
+fd08fc4a2ed75039e5292a35ff08726e0126c77f
+647bcfbdd8e0417990ed93b25c1bca00f60df709
+
+Change-Id: I676a8408e97cc8134009f764736cad68513c89ad
+---
+ configure.ac                          |   2 +-
+ download.lst                          |   4 +-
+ external/mdds/UnpackedTarball_mdds.mk |   3 -
+ external/mdds/c++17.patch             |  22 ---
+ sc/inc/scmatrix.hxx                   |   6 +-
+ sc/source/core/tool/interpr3.cxx      |   4 +-
+ sc/source/core/tool/scmatrix.cxx      | 208 +++++++++++++++++++-------
+ 7 files changed, 161 insertions(+), 88 deletions(-)
+ delete mode 100644 external/mdds/c++17.patch
+
+diff --git a/configure.ac b/configure.ac
+index 735ebf2e360a..3ff574a3f24f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8883,7 +8883,7 @@ AC_SUBST(SYSTEM_BOOST)
+ dnl ===================================================================
+ dnl Check for system mdds
+ dnl ===================================================================
+-libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.2 >= 1.2.3], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
++libo_CHECK_SYSTEM_MODULE([mdds], [MDDS], [mdds-1.4 >= 1.4.1], ["-I${WORKDIR}/UnpackedTarball/mdds/include"])
+ 
+ dnl ===================================================================
+ dnl Check for system glm
+diff --git a/download.lst b/download.lst
+index c40bece90e26..d4c145a0cfc9 100644
+--- a/download.lst
++++ b/download.lst
+@@ -166,8 +166,8 @@ export LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a
+ export LXML_TARBALL := lxml-4.1.1.tgz
+ export MARIADB_CONNECTOR_C_SHA256SUM := fd2f751dea049c1907735eb236aeace1d811d6a8218118b00bbaa9b84dc5cd60
+ export MARIADB_CONNECTOR_C_TARBALL := a233181e03d3c307668b4c722d881661-mariadb_client-2.0.0-src.tar.gz
+-export MDDS_SHA256SUM := dcb8cd2425567a5a5ec164afea475bce57784bca3e352ad4cbdd3d1a7e08e5a1
+-export MDDS_TARBALL := mdds-1.3.1.tar.bz2
++export MDDS_SHA256SUM := 9ac690c37f5f06dc88551405d5daf9d9ad25edf65aae6325b59e905c2ba444c3
++export MDDS_TARBALL := mdds-1.4.1.tar.bz2
+ export MDNSRESPONDER_SHA256SUM := 4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09c13e3006e58f8d92c0
+ export MDNSRESPONDER_TARBALL := mDNSResponder-576.30.4.tar.gz
+ export MSPUB_SHA256SUM := ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
+diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
+index 4f6db6b24e7b..c015f4c13f5a 100644
+--- a/external/mdds/UnpackedTarball_mdds.mk
++++ b/external/mdds/UnpackedTarball_mdds.mk
+@@ -13,10 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
+ 
+ $(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
+ 
+-# c++17.patch upstreamed as <https://gitlab.com/mdds/mdds/merge_requests/11> "Remove some
+-# unnecessary uses of obsolete std::unary_function":
+ $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
+-    external/mdds/c++17.patch \
+ ))
+ 
+ # vim: set noet sw=4 ts=4:
+diff --git a/external/mdds/c++17.patch b/external/mdds/c++17.patch
+deleted file mode 100644
+index d96910f34e68..000000000000
+--- a/external/mdds/c++17.patch
++++ /dev/null
+@@ -1,22 +0,0 @@
+---- include/mdds/multi_type_matrix.hpp
+-+++ include/mdds/multi_type_matrix.hpp
+-@@ -149,7 +149,7 @@
+- 
+- private:
+-     template<typename _Func>
+--    struct walk_func : std::unary_function<typename store_type::const_iterator::value_type, void>
+-+    struct walk_func
+-     {
+-         _Func& m_func;
+-         walk_func(_Func& func) : m_func(func) {}
+---- include/mdds/multi_type_vector.hpp
+-+++ include/mdds/multi_type_vector.hpp
+-@@ -139,7 +139,7 @@
+-         block& operator=(block);
+-     };
+- 
+--    struct element_block_deleter : public std::unary_function<void, const element_block_type*>
+-+    struct element_block_deleter
+-     {
+-         void operator() (const element_block_type* p)
+-         {
+diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
+index 9be335fbc06b..b1bc5e0e3047 100644
+--- a/sc/inc/scmatrix.hxx
++++ b/sc/inc/scmatrix.hxx
+@@ -399,7 +399,7 @@ public:
+     virtual void DivOp(bool bFlag, double fVal, ScMatrix& rMat) = 0;
+     virtual void PowOp(bool bFlag, double fVal, ScMatrix& rMat) = 0;
+ 
+-    virtual std::vector<ScMatrix::IterateResult> Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp) = 0;
++    virtual std::vector<ScMatrix::IterateResult> Collect(const std::vector<std::unique_ptr<sc::op::Op>>& aOp) = 0;
+ 
+     virtual void ExecuteOperation(const std::pair<size_t, size_t>& rStartPos, const std::pair<size_t, size_t>& rEndPos,
+             DoubleOpFunction aDoubleFunc, BoolOpFunction aBoolFunc, StringOpFunction aStringFunc,
+@@ -617,7 +617,7 @@ public:
+     virtual void DivOp(bool bFlag, double fVal, ScMatrix& rMat) override;
+     virtual void PowOp(bool bFlag, double fVal, ScMatrix& rMat) override;
+ 
+-    virtual std::vector<ScMatrix::IterateResult> Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp) override;
++    virtual std::vector<ScMatrix::IterateResult> Collect(const std::vector<std::unique_ptr<sc::op::Op>>& aOp) override;
+ 
+     virtual void ExecuteOperation(const std::pair<size_t, size_t>& rStartPos, const std::pair<size_t, size_t>& rEndPos,
+             DoubleOpFunction aDoubleFunc, BoolOpFunction aBoolFunc, StringOpFunction aStringFunc,
+@@ -837,7 +837,7 @@ public:
+     virtual void DivOp(bool bFlag, double fVal, ScMatrix& rMat) override;
+     virtual void PowOp(bool bFlag, double fVal, ScMatrix& rMat) override;
+ 
+-    virtual std::vector<ScMatrix::IterateResult> Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp) override;
++    virtual std::vector<ScMatrix::IterateResult> Collect(const std::vector<std::unique_ptr<sc::op::Op>>& aOp) override;
+ 
+     virtual void ExecuteOperation(const std::pair<size_t, size_t>& rStartPos, const std::pair<size_t, size_t>& rEndPos,
+             DoubleOpFunction aDoubleFunc, BoolOpFunction aBoolFunc, StringOpFunction aStringFunc,
+diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
+index 28e8cd9a9c48..88c0d8353783 100644
+--- a/sc/source/core/tool/interpr3.cxx
++++ b/sc/source/core/tool/interpr3.cxx
+@@ -2745,12 +2745,12 @@ void ScInterpreter::ScFTest()
+     aOp.emplace_back(new sc::op::Op(0.0, [](double& rAccum, double fVal){rAccum += fVal;}));
+     aOp.emplace_back(new sc::op::Op(0.0, [](double& rAccum, double fVal){rAccum += fVal * fVal;}));
+ 
+-    auto aVal1 = pMat1->Collect(false, aOp);
++    auto aVal1 = pMat1->Collect(aOp);
+     fSum1 = aVal1[0].mfFirst + aVal1[0].mfRest;
+     fSumSqr1 = aVal1[1].mfFirst + aVal1[1].mfRest;
+     fCount1 = aVal1[2].mnCount;
+ 
+-    auto aVal2 = pMat2->Collect(false, aOp);
++    auto aVal2 = pMat2->Collect(aOp);
+     fSum2 = aVal2[0].mfFirst + aVal2[0].mfRest;
+     fSumSqr2 = aVal2[1].mfFirst + aVal2[1].mfRest;
+     fCount2 = aVal2[2].mnCount;
+diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
+index 7f8c8767e917..7dadec9f0b57 100644
+--- a/sc/source/core/tool/scmatrix.cxx
++++ b/sc/source/core/tool/scmatrix.cxx
+@@ -160,6 +160,12 @@ public:
+         maNewMatValues.reserve(nRow*nCol);
+     }
+ 
++    CompareMatrixElemFunc( const CompareMatrixElemFunc& ) = delete;
++    CompareMatrixElemFunc& operator= ( const CompareMatrixElemFunc& ) = delete;
++
++    CompareMatrixElemFunc( CompareMatrixElemFunc&& ) = default;
++    CompareMatrixElemFunc& operator= ( CompareMatrixElemFunc&& ) = default;
++
+     void operator() (const MatrixImplType::element_block_node_type& node)
+     {
+         switch (node.type)
+@@ -323,7 +329,7 @@ public:
+             const ScFullMatrix::EmptyOpFunction& aEmptyFunc) const;
+ 
+     template<typename T>
+-    std::vector<ScMatrix::IterateResult> ApplyCollectOperation(bool bTextAsZero, const std::vector<std::unique_ptr<T>>& aOp);
++    std::vector<ScMatrix::IterateResult> ApplyCollectOperation(const std::vector<std::unique_ptr<T>>& aOp);
+ 
+     void MatConcat(SCSIZE nMaxCol, SCSIZE nMaxRow, const ScMatrixRef& xMat1, const ScMatrixRef& xMat2,
+             SvNumberFormatter& rFormatter, svl::SharedStringPool& rPool);
+@@ -979,7 +985,7 @@ void ScMatrixImpl::CompareEqual()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemEqualZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -987,7 +993,7 @@ void ScMatrixImpl::CompareNotEqual()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemNotEqualZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -995,7 +1001,7 @@ void ScMatrixImpl::CompareLess()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemLessZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -1003,7 +1009,7 @@ void ScMatrixImpl::CompareGreater()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemGreaterZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -1011,7 +1017,7 @@ void ScMatrixImpl::CompareLessEqual()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemLessEqualZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -1019,7 +1025,7 @@ void ScMatrixImpl::CompareGreaterEqual()
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     CompareMatrixElemFunc<ElemGreaterEqualZero> aFunc(aSize.row, aSize.column);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(maMat);
+ }
+ 
+@@ -1174,21 +1180,34 @@ public:
+ template<typename Op>
+ class WalkElementBlocksMultipleValues
+ {
+-    const std::vector<std::unique_ptr<Op>>& maOp;
++    const std::vector<std::unique_ptr<Op>>* mpOp;
+     std::vector<ScMatrix::IterateResult> maRes;
+     bool mbFirst:1;
+-    bool mbTextAsZero:1;
+ public:
+-    WalkElementBlocksMultipleValues(bool bTextAsZero, const std::vector<std::unique_ptr<Op>>& aOp) :
+-        maOp(aOp), mbFirst(true), mbTextAsZero(bTextAsZero)
++    WalkElementBlocksMultipleValues(const std::vector<std::unique_ptr<Op>>& aOp) :
++        mpOp(&aOp), mbFirst(true)
+     {
+-        for (const auto& rpOp : maOp)
++        for (const auto& rpOp : *mpOp)
+         {
+             maRes.emplace_back(rpOp->mInitVal, rpOp->mInitVal, 0);
+         }
+         maRes.emplace_back(0.0, 0.0, 0); // count
+     }
+ 
++    WalkElementBlocksMultipleValues( const WalkElementBlocksMultipleValues& ) = delete;
++    WalkElementBlocksMultipleValues& operator= ( const WalkElementBlocksMultipleValues& ) = delete;
++
++    WalkElementBlocksMultipleValues( WalkElementBlocksMultipleValues&& r ) :
++        mpOp(r.mpOp), maRes(std::move(r.maRes)), mbFirst(r.mbFirst) {}
++
++    WalkElementBlocksMultipleValues& operator= ( WalkElementBlocksMultipleValues&& r )
++    {
++        mpOp = r.mpOp;
++        maRes = std::move(r.maRes);
++        mbFirst = r.mbFirst;
++        return *this;
++    }
++
+     const std::vector<ScMatrix::IterateResult>& getResult() const { return maRes; }
+ 
+     void operator() (const MatrixImplType::element_block_node_type& node)
+@@ -1205,17 +1224,17 @@ public:
+                 {
+                     if (mbFirst)
+                     {
+-                        for (auto i = 0u; i < maOp.size(); ++i)
++                        for (auto i = 0u; i < mpOp->size(); ++i)
+                         {
+-                            (*maOp[i])(maRes[i].mfFirst, *it);
++                            (*(*mpOp)[i])(maRes[i].mfFirst, *it);
+                         }
+                         mbFirst = false;
+                     }
+                     else
+                     {
+-                        for (auto i = 0u; i < maOp.size(); ++i)
++                        for (auto i = 0u; i < mpOp->size(); ++i)
+                         {
+-                            (*maOp[i])(maRes[i].mfRest, *it);
++                            (*(*mpOp)[i])(maRes[i].mfRest, *it);
+                         }
+                     }
+                 }
+@@ -1232,17 +1251,17 @@ public:
+                 {
+                     if (mbFirst)
+                     {
+-                        for (auto i = 0u; i < maOp.size(); ++i)
++                        for (auto i = 0u; i < mpOp->size(); ++i)
+                         {
+-                            (*maOp[i])(maRes[i].mfFirst, *it);
++                            (*(*mpOp)[i])(maRes[i].mfFirst, *it);
+                         }
+                         mbFirst = false;
+                     }
+                     else
+                     {
+-                        for (auto i = 0u; i < maOp.size(); ++i)
++                        for (auto i = 0u; i < mpOp->size(); ++i)
+                         {
+-                            (*maOp[i])(maRes[i].mfRest, *it);
++                            (*(*mpOp)[i])(maRes[i].mfRest, *it);
+                         }
+                     }
+                 }
+@@ -1250,9 +1269,6 @@ public:
+             }
+             break;
+             case mdds::mtm::element_string:
+-                if (mbTextAsZero)
+-                    maRes.back().mnCount += node.size;
+-            break;
+             case mdds::mtm::element_empty:
+             default:
+                 ;
+@@ -1310,8 +1326,8 @@ template<typename Type>
+ class WalkAndMatchElements
+ {
+     Type maMatchValue;
+-    const size_t mnStartIndex;
+-    const size_t mnStopIndex;
++    size_t mnStartIndex;
++    size_t mnStopIndex;
+     size_t mnResult;
+     size_t mnIndex;
+ 
+@@ -1669,6 +1685,24 @@ public:
+         maResValues.reserve(nResSize);
+     }
+ 
++    CompareMatrixFunc( const CompareMatrixFunc& ) = delete;
++    CompareMatrixFunc& operator= ( const CompareMatrixFunc& ) = delete;
++
++    CompareMatrixFunc( CompareMatrixFunc&& r ) :
++        mrComp(r.mrComp),
++        mnMatPos(r.mnMatPos),
++        mpOptions(r.mpOptions),
++        maResValues(std::move(r.maResValues)) {}
++
++    CompareMatrixFunc& operator= ( CompareMatrixFunc&& r )
++    {
++        mrComp = r.mrComp;
++        mnMatPos = r.mnMatPos;
++        mpOptions = r.mpOptions;
++        maResValues = std::move(r.maResValues);
++        return *this;
++    }
++
+     void operator() (const MatrixImplType::element_block_node_type& node)
+     {
+         sc::Compare::Cell& rCell = mrComp.maCells[mnMatPos];
+@@ -1777,6 +1811,24 @@ public:
+         maResValues.reserve(nResSize);
+     }
+ 
++    CompareMatrixToNumericFunc( const CompareMatrixToNumericFunc& ) = delete;
++    CompareMatrixToNumericFunc& operator= ( const CompareMatrixToNumericFunc& ) = delete;
++
++    CompareMatrixToNumericFunc( CompareMatrixToNumericFunc&& r ) :
++        mrComp(r.mrComp),
++        mfRightValue(r.mfRightValue),
++        mpOptions(r.mpOptions),
++        maResValues(std::move(r.maResValues)) {}
++
++    CompareMatrixToNumericFunc& operator= ( CompareMatrixToNumericFunc&& r )
++    {
++        mrComp = r.mrComp;
++        mfRightValue = r.mfRightValue;
++        mpOptions = r.mpOptions;
++        maResValues = std::move(r.maResValues);
++        return *this;
++    }
++
+     void operator() (const MatrixImplType::element_block_node_type& node)
+     {
+         sc::Compare::Cell& rCell = mrComp.maCells[0];
+@@ -1840,6 +1892,17 @@ class ToDoubleArray
+     double mfNaN;
+     bool mbEmptyAsZero;
+ 
++    void moveArray( ToDoubleArray& r )
++    {
++        // Re-create the iterator from the new array after the array has been
++        // moved, to ensure that the iterator points to a valid array
++        // position.
++        size_t n = std::distance(r.maArray.begin(), r.miPos);
++        maArray = std::move(r.maArray);
++        miPos = maArray.begin();
++        std::advance(miPos, n);
++    }
++
+ public:
+     ToDoubleArray( size_t nSize, bool bEmptyAsZero ) :
+         maArray(nSize, 0.0), miPos(maArray.begin()), mbEmptyAsZero(bEmptyAsZero)
+@@ -1847,6 +1910,23 @@ public:
+         mfNaN = CreateDoubleError( FormulaError::ElementNaN);
+     }
+ 
++    ToDoubleArray( const ToDoubleArray& ) = delete;
++    ToDoubleArray& operator= ( const ToDoubleArray& ) = delete;
++
++    ToDoubleArray( ToDoubleArray&& r ) :
++        mfNaN(r.mfNaN), mbEmptyAsZero(r.mbEmptyAsZero)
++    {
++        moveArray(r);
++    }
++
++    ToDoubleArray& operator= ( ToDoubleArray&& r )
++    {
++        mfNaN = r.mfNaN;
++        mbEmptyAsZero = r.mbEmptyAsZero;
++        moveArray(r);
++        return *this;
++    }
++
+     void operator() (const MatrixImplType::element_block_node_type& node)
+     {
+         using namespace mdds::mtv;
+@@ -1917,6 +1997,12 @@ public:
+         mfNaN = CreateDoubleError( FormulaError::ElementNaN);
+     }
+ 
++    MergeDoubleArrayFunc( const MergeDoubleArrayFunc& ) = delete;
++    MergeDoubleArrayFunc& operator= ( const MergeDoubleArrayFunc& ) = delete;
++
++    MergeDoubleArrayFunc( MergeDoubleArrayFunc&& ) = default;
++    MergeDoubleArrayFunc& operator= ( MergeDoubleArrayFunc&& ) = default;
++
+     void operator() (const MatrixImplType::element_block_node_type& node)
+     {
+         using namespace mdds::mtv;
+@@ -1982,7 +2068,7 @@ template<typename TOp>
+ ScMatrix::IterateResult GetValueWithCount(bool bTextAsZero, const MatrixImplType& maMat)
+ {
+     WalkElementBlocks<TOp> aFunc(bTextAsZero);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getResult();
+ }
+ 
+@@ -2006,49 +2092,49 @@ ScMatrix::IterateResult ScMatrixImpl::Product(bool bTextAsZero) const
+ size_t ScMatrixImpl::Count(bool bCountStrings, bool bCountErrors) const
+ {
+     CountElements aFunc(bCountStrings, bCountErrors);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getCount();
+ }
+ 
+ size_t ScMatrixImpl::MatchDoubleInColumns(double fValue, size_t nCol1, size_t nCol2) const
+ {
+     WalkAndMatchElements<double> aFunc(fValue, maMat.size(), nCol1, nCol2);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getMatching();
+ }
+ 
+ size_t ScMatrixImpl::MatchStringInColumns(const svl::SharedString& rStr, size_t nCol1, size_t nCol2) const
+ {
+     WalkAndMatchElements<svl::SharedString> aFunc(rStr, maMat.size(), nCol1, nCol2);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getMatching();
+ }
+ 
+ double ScMatrixImpl::GetMaxValue( bool bTextAsZero ) const
+ {
+     CalcMaxMinValue<MaxOp> aFunc(bTextAsZero);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getValue();
+ }
+ 
+ double ScMatrixImpl::GetMinValue( bool bTextAsZero ) const
+ {
+     CalcMaxMinValue<MinOp> aFunc(bTextAsZero);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getValue();
+ }
+ 
+ double ScMatrixImpl::GetGcd() const
+ {
+     CalcGcdLcm<Gcd> aFunc;
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getResult();
+ }
+ 
+ double ScMatrixImpl::GetLcm() const
+ {
+     CalcGcdLcm<Lcm> aFunc;
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+     return aFunc.getResult();
+ }
+ 
+@@ -2065,7 +2151,7 @@ ScMatrixRef ScMatrixImpl::CompareMatrix(
+             // function object that has much less branching for much better
+             // performance.
+             CompareMatrixToNumericFunc aFunc(nSize, rComp, rComp.maCells[1].mfValue, pOptions);
+-            maMat.walk(aFunc);
++            aFunc = maMat.walk(std::move(aFunc));
+ 
+             // We assume the result matrix has the same dimension as this matrix.
+             const std::vector<double>& rResVal = aFunc.getValues();
+@@ -2077,7 +2163,7 @@ ScMatrixRef ScMatrixImpl::CompareMatrix(
+     }
+ 
+     CompareMatrixFunc aFunc(nSize, rComp, nMatPos, pOptions);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+ 
+     // We assume the result matrix has the same dimension as this matrix.
+     const std::vector<double>& rResVal = aFunc.getValues();
+@@ -2091,7 +2177,7 @@ void ScMatrixImpl::GetDoubleArray( std::vector<double>& rArray, bool bEmptyAsZer
+ {
+     MatrixImplType::size_pair_type aSize = maMat.size();
+     ToDoubleArray aFunc(aSize.row*aSize.column, bEmptyAsZero);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(std::move(aFunc));
+     aFunc.swap(rArray);
+ }
+ 
+@@ -2107,7 +2193,7 @@ void ScMatrixImpl::MergeDoubleArray( std::vector<double>& rArray, ScFullMatrix::
+         case ScFullMatrix::Mul:
+         {
+             MergeDoubleArrayFunc<ArrayMul> aFunc(rArray);
+-            maMat.walk(aFunc);
++            aFunc = maMat.walk(std::move(aFunc));
+         }
+         break;
+         default:
+@@ -2329,16 +2415,26 @@ struct MatrixOpWrapper
+ private:
+     MatrixImplType& mrMat;
+     MatrixImplType::position_type pos;
+-    T maOp;
++    const T* mpOp;
+ 
+ public:
+-    MatrixOpWrapper(MatrixImplType& rMat, T const & aOp):
++    MatrixOpWrapper(MatrixImplType& rMat, const T& aOp):
+         mrMat(rMat),
+         pos(rMat.position(0,0)),
+-        maOp(aOp)
++        mpOp(&aOp)
+     {
+     }
+ 
++    MatrixOpWrapper( const MatrixOpWrapper& r ) : mrMat(r.mrMat), pos(r.pos), mpOp(r.mpOp) {}
++
++    MatrixOpWrapper& operator= ( const MatrixOpWrapper& r )
++    {
++        mrMat = r.mrMat;
++        pos = r.pos;
++        mpOp = r.mpOp;
++        return *this;
++    }
++
+     void operator()(const MatrixImplType::element_block_node_type& node)
+     {
+         switch (node.type)
+@@ -2349,7 +2445,7 @@ public:
+ 
+                 block_type::const_iterator it = block_type::begin(*node.data);
+                 block_type::const_iterator itEnd = block_type::end(*node.data);
+-                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, maOp);
++                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, *mpOp);
+                 pos = mrMat.set(pos,aFunc.begin(), aFunc.end());
+             }
+             break;
+@@ -2360,7 +2456,7 @@ public:
+                 block_type::const_iterator it = block_type::begin(*node.data);
+                 block_type::const_iterator itEnd = block_type::end(*node.data);
+ 
+-                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, maOp);
++                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, *mpOp);
+                 pos = mrMat.set(pos, aFunc.begin(), aFunc.end());
+             }
+             break;
+@@ -2371,17 +2467,17 @@ public:
+                 block_type::const_iterator it = block_type::begin(*node.data);
+                 block_type::const_iterator itEnd = block_type::end(*node.data);
+ 
+-                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, maOp);
++                MatrixIteratorWrapper<block_type, T, typename T::number_value_type> aFunc(it, itEnd, *mpOp);
+                 pos = mrMat.set(pos, aFunc.begin(), aFunc.end());
+             }
+             break;
+             case mdds::mtm::element_empty:
+             {
+-                if (maOp.useFunctionForEmpty())
++                if (mpOp->useFunctionForEmpty())
+                 {
+                     std::vector<char> aVec(node.size);
+                     MatrixIteratorWrapper<std::vector<char>, T, typename T::number_value_type>
+-                        aFunc(aVec.begin(), aVec.end(), maOp);
++                        aFunc(aVec.begin(), aVec.end(), *mpOp);
+                     pos = mrMat.set(pos, aFunc.begin(), aFunc.end());
+                 }
+             }
+@@ -2397,14 +2493,14 @@ template<typename T>
+ void ScMatrixImpl::ApplyOperation(T aOp, ScMatrixImpl& rMat)
+ {
+     MatrixOpWrapper<T> aFunc(rMat.maMat, aOp);
+-    maMat.walk(aFunc);
++    aFunc = maMat.walk(aFunc);
+ }
+ 
+ template<typename T>
+-std::vector<ScMatrix::IterateResult> ScMatrixImpl::ApplyCollectOperation(bool bTextAsZero, const std::vector<std::unique_ptr<T>>& aOp)
++std::vector<ScMatrix::IterateResult> ScMatrixImpl::ApplyCollectOperation(const std::vector<std::unique_ptr<T>>& aOp)
+ {
+-    WalkElementBlocksMultipleValues<T> aFunc(bTextAsZero, aOp);
+-    maMat.walk(aFunc);
++    WalkElementBlocksMultipleValues<T> aFunc(aOp);
++    aFunc = maMat.walk(std::move(aFunc));
+     return aFunc.getResult();
+ }
+ 
+@@ -2544,8 +2640,10 @@ void ScMatrixImpl::ExecuteOperation(const std::pair<size_t, size_t>& rStartPos,
+ {
+     WalkElementBlockOperation aFunc(maMat.size().row,
+             aDoubleFunc, aBoolFunc, aStringFunc, aEmptyFunc);
+-    maMat.walk(aFunc, MatrixImplType::size_pair_type(rStartPos.first, rStartPos.second),
+-            MatrixImplType::size_pair_type(rEndPos.first, rEndPos.second));
++    aFunc = maMat.walk(
++        aFunc,
++        MatrixImplType::size_pair_type(rStartPos.first, rStartPos.second),
++        MatrixImplType::size_pair_type(rEndPos.first, rEndPos.second));
+ }
+ 
+ #if DEBUG_MATRIX
+@@ -3452,9 +3550,9 @@ void ScFullMatrix::ExecuteOperation(const std::pair<size_t, size_t>& rStartPos,
+     pImpl->ExecuteOperation(rStartPos, rEndPos, aDoubleFunc, aBoolFunc, aStringFunc, aEmptyFunc);
+ }
+ 
+-std::vector<ScMatrix::IterateResult> ScFullMatrix::Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp)
++std::vector<ScMatrix::IterateResult> ScFullMatrix::Collect(const std::vector<std::unique_ptr<sc::op::Op>>& aOp)
+ {
+-    return pImpl->ApplyCollectOperation(bTextAsZero, aOp);
++    return pImpl->ApplyCollectOperation(aOp);
+ }
+ 
+ ScFullMatrix& ScFullMatrix::operator+= ( const ScFullMatrix& r )
+@@ -4216,10 +4314,10 @@ void ScVectorRefMatrix::PowOp(bool bFlag, double fVal, ScMatrix& rMat)
+     mpFullMatrix->PowOp(bFlag, fVal, rMat);
+ }
+ 
+-std::vector<ScMatrix::IterateResult> ScVectorRefMatrix::Collect(bool bTextAsZero, const std::vector<std::unique_ptr<sc::op::Op>>& aOp)
++std::vector<ScMatrix::IterateResult> ScVectorRefMatrix::Collect(const std::vector<std::unique_ptr<sc::op::Op>>& aOp)
+ {
+     ensureFullMatrix();
+-    return mpFullMatrix->Collect(bTextAsZero, aOp);
++    return mpFullMatrix->Collect(aOp);
+ }
+ 
+ void ScVectorRefMatrix::ExecuteOperation(const std::pair<size_t, size_t>& rStartPos,
+-- 
+2.17.1
+
+

Copied: libreoffice-still/repos/staging-x86_64/0001-Update-orcus-to-0.14.0.patch (from rev 348845, libreoffice-still/trunk/0001-Update-orcus-to-0.14.0.patch)
===================================================================
--- staging-x86_64/0001-Update-orcus-to-0.14.0.patch	                        (rev 0)
+++ staging-x86_64/0001-Update-orcus-to-0.14.0.patch	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,802 @@
+From 1d0727a104d76210814f41c1169df318e40c9d80 Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida at gmail.com>
+Date: Mon, 27 Aug 2018 11:06:17 -0400
+Subject: [PATCH] Update orcus to 0.14.0.
+
+And make all necessary adjustments for the new version of orcus.
+
+Change-Id: I0dc207162a3ddfaad6da198a3d13b65f530757d5
+Reviewed-on: https://gerrit.libreoffice.org/59884
+Tested-by: Jenkins
+Reviewed-by: Kohei Yoshida <libreoffice at kohei.us>
+---
+ RepositoryExternal.mk                         |   4 +-
+ configure.ac                                  |   2 +-
+ download.lst                                  |   4 +-
+ .../0001-Missing-header-for-std-tolower.patch |  24 ++
+ external/liborcus/ExternalPackage_liborcus.mk |   8 +-
+ external/liborcus/ExternalProject_liborcus.mk |   4 +-
+ external/liborcus/Library_orcus.mk            |   2 +
+ external/liborcus/UnpackedTarball_liborcus.mk |   1 +
+ external/liborcus/gcc9.patch.0                |   3 +-
+ sc/source/filter/inc/orcusinterface.hxx       | 107 ++++--
+ sc/source/filter/orcus/interface.cxx          | 322 +++++++++++++-----
+ sc/source/filter/orcus/xmlcontext.cxx         |   5 +-
+ 12 files changed, 360 insertions(+), 126 deletions(-)
+ create mode 100644 external/liborcus/0001-Missing-header-for-std-tolower.patch
+
+diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
+index cec79cc105e8..f172765a84f8 100644
+--- a/RepositoryExternal.mk
++++ b/RepositoryExternal.mk
+@@ -3295,7 +3295,7 @@ $(call gb_LinkTarget_set_include,$(1),\
+ )
+ 
+ $(call gb_LinkTarget_add_libs,$(1),\
+-       -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.13 \
++       -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.14 \
+ )
+ 
+ $(if $(SYSTEM_BOOST), \
+@@ -3314,7 +3314,7 @@ $(call gb_LinkTarget_set_include,$(1),\
+ )
+ 
+ $(call gb_LinkTarget_add_libs,$(1),\
+-	-L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.13 \
++	-L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.14 \
+ )
+ 
+ endef
+diff --git a/configure.ac b/configure.ac
+index 3c9e5dc5e908..a60a3e72689f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -9196,7 +9196,7 @@ AC_SUBST(ENABLE_FUZZERS)
+ dnl ===================================================================
+ dnl Orcus
+ dnl ===================================================================
+-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.13 >= 0.13.3])
++libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.14 >= 0.14.0])
+ if test "$with_system_orcus" != "yes"; then
+     if test "$SYSTEM_BOOST" = "TRUE"; then
+         # ===========================================================
+diff --git a/download.lst b/download.lst
+index 1ed75b36f3b3..3532e2be3aa3 100644
+--- a/download.lst
++++ b/download.lst
+@@ -194,8 +194,8 @@ export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb89
+ export OPENLDAP_TARBALL := openldap-2.4.45.tgz
+ export OPENSSL_SHA256SUM := 50a98e07b1a89eb8f6a99477f262df71c6fa7bef77df4dc83025a2845c827d00
+ export OPENSSL_TARBALL := openssl-1.0.2p.tar.gz
+-export ORCUS_SHA256SUM := bc01b1b3e9091416f498840d3c19a1aa2704b448100e7f6b80eefe88aab06d5b
+-export ORCUS_TARBALL := liborcus-0.13.4.tar.gz
++export ORCUS_SHA256SUM := 7bcfac3f4f490540292cfc87d3fde7b47eafa8450afa1e1a2c181d8293dcd4ef
++export ORCUS_TARBALL := liborcus-0.14.0.tar.gz
+ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
+ export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
+ export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
+diff --git a/external/liborcus/0001-Missing-header-for-std-tolower.patch b/external/liborcus/0001-Missing-header-for-std-tolower.patch
+new file mode 100644
+index 000000000000..2e00be92a872
+--- /dev/null
++++ b/external/liborcus/0001-Missing-header-for-std-tolower.patch
+@@ -0,0 +1,24 @@
++From 3a6bb93a382b4d5f1463ee3fdd54cab7048ff996 Mon Sep 17 00:00:00 2001
++From: Kohei Yoshida <kohei.yoshida at gmail.com>
++Date: Fri, 31 Aug 2018 16:07:06 -0400
++Subject: [PATCH] Missing header for std::tolower.
++
++---
++ src/parser/sax_token_parser.cpp | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/src/parser/sax_token_parser.cpp b/src/parser/sax_token_parser.cpp
++index 9790b498..44ba5844 100644
++--- a/src/parser/sax_token_parser.cpp
+++++ b/src/parser/sax_token_parser.cpp
++@@ -9,6 +9,7 @@
++ #include "orcus/tokens.hpp"
++ 
++ #include <mdds/sorted_string_map.hpp>
+++#include <cctype>
++ 
++ namespace orcus {
++ 
++-- 
++2.17.1
++
+diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
+index 32382b7d89a1..ffa0b38bea19 100644
+--- a/external/liborcus/ExternalPackage_liborcus.mk
++++ b/external/liborcus/ExternalPackage_liborcus.mk
+@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
+ $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
+ 
+ ifeq ($(OS),MACOSX)
+-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.13.0.dylib,src/liborcus/.libs/liborcus-0.13.0.dylib))
+-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.13.0.dylib,src/parser/.libs/liborcus-parser-0.13.0.dylib))
++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.14.0.dylib,src/liborcus/.libs/liborcus-0.14.0.dylib))
++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.14.0.dylib,src/parser/.libs/liborcus-parser-0.14.0.dylib))
+ else ifeq ($(DISABLE_DYNLOADING),)
+-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.13.so.0,src/liborcus/.libs/liborcus-0.13.so.0.0.0))
+-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.13.so.0,src/parser/.libs/liborcus-parser-0.13.so.0.0.0))
++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.14.so.0,src/liborcus/.libs/liborcus-0.14.so.0.0.0))
++$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.14.so.0,src/parser/.libs/liborcus-parser-0.14.so.0.0.0))
+ endif
+ 
+ # vim: set noet sw=4 ts=4:
+diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
+index 928c78e3a267..1aa591228f40 100644
+--- a/external/liborcus/ExternalProject_liborcus.mk
++++ b/external/liborcus/ExternalProject_liborcus.mk
+@@ -114,8 +114,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
+ 		   $(MAKE) \
+ 		$(if $(filter MACOSX,$(OS)),\
+ 			&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
+-				$(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.13.0.dylib \
+-				$(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.13.0.dylib \
++				$(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.14.0.dylib \
++				$(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.14.0.dylib \
+ 		) \
+ 	)
+ 
+diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
+index 6457ec4afc0c..1f026c425244 100644
+--- a/external/liborcus/Library_orcus.mk
++++ b/external/liborcus/Library_orcus.mk
+@@ -55,6 +55,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
+ 	UnpackedTarball/liborcus/src/liborcus/detection_result \
+ 	UnpackedTarball/liborcus/src/liborcus/dom_tree \
+ 	UnpackedTarball/liborcus/src/liborcus/format_detection \
++	UnpackedTarball/liborcus/src/liborcus/formula_result \
+ 	UnpackedTarball/liborcus/src/liborcus/global \
+ 	UnpackedTarball/liborcus/src/liborcus/gnumeric_cell_context \
+ 	UnpackedTarball/liborcus/src/liborcus/gnumeric_context \
+@@ -96,6 +97,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
+ 	UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \
+ 	UnpackedTarball/liborcus/src/liborcus/orcus_xml \
+ 	UnpackedTarball/liborcus/src/liborcus/session_context \
++	UnpackedTarball/liborcus/src/liborcus/spreadsheet_iface_util \
+ 	UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \
+ 	UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \
+ 	UnpackedTarball/liborcus/src/liborcus/string_helper \
+diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
+index 215bd4b8cc15..f637cc73db46 100644
+--- a/external/liborcus/UnpackedTarball_liborcus.mk
++++ b/external/liborcus/UnpackedTarball_liborcus.mk
+@@ -19,5 +19,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
+ 	external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
+ 	external/liborcus/rpath.patch.0 \
++	external/liborcus/0001-Missing-header-for-std-tolower.patch \
+ ))
+ 
+ ifeq ($(OS),WNT)
+diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
+index 028fb4126f01..dce0d5b0a64e 100644
+--- a/sc/source/filter/inc/orcusinterface.hxx
++++ b/sc/source/filter/inc/orcusinterface.hxx
+@@ -54,6 +54,7 @@ public:
+     ScOrcusGlobalSettings(ScDocumentImport& rDoc);
+ 
+     virtual void set_origin_date(int year, int month, int day) override;
++    virtual void set_character_set(orcus::character_set_t cs) override;
+ 
+     virtual void set_default_formula_grammar(orcus::spreadsheet::formula_grammar_t grammar) override;
+     virtual orcus::spreadsheet::formula_grammar_t get_default_formula_grammar() const override;
+@@ -181,7 +182,7 @@ public:
+ 
+     virtual ~ScOrcusAutoFilter() override;
+ 
+-    virtual void set_range(const char* p_ref, size_t n_ref) override;
++    virtual void set_range(const orcus::spreadsheet::range_t& range) override;
+ 
+     virtual void set_column(orcus::spreadsheet::col_t col) override;
+ 
+@@ -214,22 +215,95 @@ public:
+     virtual void set_merge_cell_range(const orcus::spreadsheet::range_t& range) override;
+ };
+ 
++class ScOrcusSheet;
++
++class ScOrcusFormula : public orcus::spreadsheet::iface::import_formula
++{
++    enum class ResultType { NotSet, String, Value, Empty };
++
++    friend class ScOrcusSheet;
++
++    ScOrcusSheet& mrSheet;
++
++    SCCOL mnCol;
++    SCROW mnRow;
++    OUString maFormula;
++    formula::FormulaGrammar::Grammar meGrammar;
++    size_t mnSharedFormulaIndex;
++    bool mbShared;
++
++    ResultType meResType;
++    size_t mnResult; // result string index.
++    double mfResult;
++
++    void reset();
++
++public:
++    ScOrcusFormula( ScOrcusSheet& rSheet );
++    virtual ~ScOrcusFormula() override;
++
++    virtual void set_position(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
++    virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
++    virtual void set_shared_formula_index(size_t index) override;
++    virtual void set_result_value(double value) override;
++    virtual void set_result_string(size_t sindex) override;
++    virtual void set_result_empty() override;
++    virtual void set_result_bool(bool value) override;
++    virtual void commit() override;
++};
++
++class ScOrcusArrayFormula : public orcus::spreadsheet::iface::import_array_formula
++{
++    friend class ScOrcusSheet;
++
++    ScOrcusSheet& mrSheet;
++
++    SCCOL mnCol;
++    SCROW mnRow;
++    uint32_t mnColRange;
++    uint32_t mnRowRange;
++    OUString maFormula;
++    formula::FormulaGrammar::Grammar meGrammar;
++
++    void reset();
++
++public:
++    ScOrcusArrayFormula( ScOrcusSheet& rSheet );
++    virtual ~ScOrcusArrayFormula() override;
++
++    virtual void set_range(const orcus::spreadsheet::range_t& range) override;
++    virtual void set_formula(orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
++    virtual void set_result_value(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double value) override;
++    virtual void set_result_string(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
++    virtual void set_result_empty(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col) override;
++    virtual void set_result_bool(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, bool value) override;
++    virtual void commit() override;
++};
++
+ class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet
+ {
++    friend class ScOrcusFormula;
++    friend class ScOrcusArrayFormula;
++
+     ScDocumentImport& mrDoc;
+     SCTAB mnTab;
+     ScOrcusFactory& mrFactory;
+     ScOrcusStyles& mrStyles;
+     sc::SharedFormulaGroups maFormulaGroups;
++
+     ScOrcusAutoFilter maAutoFilter;
+     ScOrcusSheetProperties maProperties;
+     ScOrcusConditionalFormat maConditionalFormat;
+     ScOrcusNamedExpression maNamedExpressions;
++    ScOrcusFormula maFormula;
++    ScOrcusArrayFormula maArrayFormula;
+ 
+     int mnCellCount;
+ 
+     void cellInserted();
+ 
++    ScDocumentImport& getDoc();
++
+ public:
+     ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& rFactory);
+ 
+@@ -238,6 +312,8 @@ public:
+     virtual orcus::spreadsheet::iface::import_sheet_properties* get_sheet_properties() override;
+     virtual orcus::spreadsheet::iface::import_conditional_format* get_conditional_format() override;
+     virtual orcus::spreadsheet::iface::import_named_expression* get_named_expression() override;
++    virtual orcus::spreadsheet::iface::import_formula* get_formula() override;
++    virtual orcus::spreadsheet::iface::import_array_formula* get_array_formula() override;
+ 
+     // Orcus import interface
+     virtual void set_auto(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
+@@ -251,33 +327,13 @@ public:
+     virtual void set_format(orcus::spreadsheet::row_t row_start, orcus::spreadsheet::col_t col_start,
+             orcus::spreadsheet::row_t row_end, orcus::spreadsheet::col_t col_end, size_t xf_index) override;
+ 
+-    virtual void set_formula(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, const char* p, size_t n) override;
+-    virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, const char* p, size_t n) override;
+-    virtual void set_formula_result(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, double val) override;
+-
+-    virtual void set_shared_formula(
+-        orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, size_t sindex,
+-        const char* p_formula, size_t n_formula) override;
+-
+-    virtual void set_shared_formula(
+-        orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar, size_t sindex,
+-        const char* p_formula, size_t n_formula, const char* p_range, size_t n_range) override;
+-
+-    virtual void set_shared_formula(orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, size_t sindex) override;
+-
+-    virtual void set_array_formula(
+-        orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar,
+-        const char* p, size_t n, orcus::spreadsheet::row_t array_rows, orcus::spreadsheet::col_t array_cols) override;
+-
+-    virtual void set_array_formula(
+-        orcus::spreadsheet::row_t row, orcus::spreadsheet::col_t col, orcus::spreadsheet::formula_grammar_t grammar,
+-        const char* p, size_t n, const char* p_range, size_t n_range) override;
+-
+     virtual orcus::spreadsheet::range_size_t get_sheet_size() const override;
+ 
+     SCTAB getIndex() const { return mnTab; }
+ 
+     const sc::SharedFormulaGroups& getSharedFormulaGroups() const;
++    sc::SharedFormulaGroups& getSharedFormulaGroups();
++    ScOrcusFactory& getFactory();
+ };
+ 
+ class ScOrcusStyles : public orcus::spreadsheet::iface::import_styles
+@@ -312,7 +368,7 @@ private:
+ 
+     struct fill
+     {
+-        OUString maPattern;
++        orcus::spreadsheet::fill_pattern_t mePattern;
+         Color maFgColor;
+         Color maBgColor;
+ 
+@@ -446,7 +502,7 @@ public:
+     // fill
+ 
+     virtual void set_fill_count(size_t n) override;
+-    virtual void set_fill_pattern_type(const char* s, size_t n) override;
++    virtual void set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp) override;
+     virtual void set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
+     virtual void set_fill_bg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue) override;
+     virtual size_t commit_fill() override;
+@@ -580,6 +636,7 @@ public:
+ 
+     size_t appendString(const OUString& rStr);
+     size_t addString(const OUString& rStr);
++    const OUString* getString(size_t nIndex) const;
+ 
+     void pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal );
+     void pushCellStoreToken( const ScAddress& rPos, uint32_t nStrIndex );
+diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
+index dcf3e83d7eae..7b8425d3007d 100644
+--- a/sc/source/filter/orcus/interface.cxx
++++ b/sc/source/filter/orcus/interface.cxx
+@@ -101,6 +101,11 @@ void ScOrcusGlobalSettings::set_origin_date(int year, int month, int day)
+     mrDoc.setOriginDate(year, month, day);
+ }
+ 
++void ScOrcusGlobalSettings::set_character_set(orcus::character_set_t /*cs*/)
++{
++    // TODO
++}
++
+ void ScOrcusGlobalSettings::set_default_formula_grammar(os::formula_grammar_t grammar)
+ {
+     meCalcGrammar = getCalcGrammarFromOrcus(grammar);
+@@ -463,6 +468,11 @@ size_t ScOrcusFactory::addString(const OUString& rStr)
+     return appendString(rStr);
+ }
+ 
++const OUString* ScOrcusFactory::getString(size_t nIndex) const
++{
++    return nIndex < maStrings.size() ? &maStrings[nIndex] : nullptr;
++}
++
+ void ScOrcusFactory::pushCellStoreAutoToken( const ScAddress& rPos, const OUString& rVal )
+ {
+     maCellStoreTokens.emplace_back(rPos, CellStoreToken::Type::Auto);
+@@ -816,10 +826,197 @@ ScOrcusSheet::ScOrcusSheet(ScDocumentImport& rDoc, SCTAB nTab, ScOrcusFactory& r
+     maProperties(mnTab, mrDoc),
+     maConditionalFormat(mnTab, rDoc.getDoc()),
+     maNamedExpressions(rDoc, rFactory.getGlobalSettings(), nTab),
++    maFormula(*this),
++    maArrayFormula(*this),
+     mnCellCount(0)
+ {
+ }
+ 
++void ScOrcusFormula::reset()
++{
++    mnCol = -1;
++    mnRow = -1;
++    maFormula.clear();
++    meGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED;
++    mnSharedFormulaIndex = 0;
++    mbShared = false;
++    meResType = ResultType::NotSet;
++    mnResult = 0;
++    mfResult = 0.0;
++}
++
++ScOrcusFormula::ScOrcusFormula( ScOrcusSheet& rSheet ) :
++    mrSheet(rSheet),
++    mnCol(-1),
++    mnRow(-1),
++    meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED),
++    mnSharedFormulaIndex(0),
++    mbShared(false),
++    meResType(ResultType::NotSet),
++    mnResult(0),
++    mfResult(0.0) {}
++
++ScOrcusFormula::~ScOrcusFormula() {}
++
++void ScOrcusFormula::set_position(os::row_t row, os::col_t col)
++{
++    mnCol = col;
++    mnRow = row;
++}
++
++void ScOrcusFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
++{
++    maFormula = OUString(p, n, RTL_TEXTENCODING_UTF8);
++    meGrammar = getCalcGrammarFromOrcus(grammar);
++}
++
++void ScOrcusFormula::set_shared_formula_index(size_t index)
++{
++    mnSharedFormulaIndex = index;
++    mbShared = true;
++}
++
++void ScOrcusFormula::set_result_value(double value)
++{
++    meResType = ResultType::Value;
++    mfResult = value;
++}
++
++void ScOrcusFormula::set_result_string(size_t sindex)
++{
++    meResType = ResultType::String;
++    mnResult = sindex;
++}
++
++void ScOrcusFormula::set_result_empty()
++{
++    meResType = ResultType::Empty;
++}
++
++void ScOrcusFormula::set_result_bool(bool value)
++{
++    meResType = ResultType::Value;
++    mfResult = value ? 1.0 : 0.0;
++}
++
++void ScOrcusFormula::commit()
++{
++    ScOrcusFactory& rFactory = mrSheet.getFactory();
++    sc::SharedFormulaGroups& rGroups = mrSheet.getSharedFormulaGroups();
++    ScAddress aPos(mnCol, mnRow, mrSheet.getIndex());
++
++    if (mbShared)
++    {
++        if (maFormula.isEmpty())
++        {
++            // shared formula that references existing formula token.
++            const ScTokenArray* pArray = rGroups.get(mnSharedFormulaIndex);
++            if (!pArray)
++                return;
++        }
++        else
++        {
++            // topmost shared formula with new formula token.
++
++            // Compile the formula expression into tokens.
++            ScCompiler aComp(&mrSheet.getDoc().getDoc(), aPos, meGrammar);
++            ScTokenArray* pArray = aComp.CompileString(maFormula);
++            if (!pArray)
++                // Tokenization failed.
++                return;
++
++            rGroups.set(mnSharedFormulaIndex, pArray);
++        }
++        rFactory.pushSharedFormulaToken(aPos, mnSharedFormulaIndex);
++    }
++    else
++    {
++        // non-shared formula
++        rFactory.pushCellStoreToken(aPos, maFormula, meGrammar);
++    }
++
++    switch (meResType)
++    {
++        case ResultType::String:
++        {
++            const OUString* pStr = rFactory.getString(mnResult);
++            if (pStr)
++                rFactory.pushFormulaResult(aPos, *pStr);
++            break;
++        }
++        case ResultType::Value:
++            rFactory.pushFormulaResult(aPos, mfResult);
++            break;
++        default:
++            ;
++    }
++
++    mrSheet.cellInserted();
++}
++
++void ScOrcusArrayFormula::reset()
++{
++    mnCol = -1;
++    mnRow = -1;
++    mnColRange = 0;
++    mnRowRange = 0;
++
++    maFormula.clear();
++    meGrammar = formula::FormulaGrammar::GRAM_UNSPECIFIED;
++}
++
++ScOrcusArrayFormula::ScOrcusArrayFormula( ScOrcusSheet& rSheet ) :
++    mrSheet(rSheet),
++    mnCol(-1),
++    mnRow(-1),
++    mnColRange(0),
++    mnRowRange(0),
++    meGrammar(formula::FormulaGrammar::GRAM_UNSPECIFIED) {}
++
++ScOrcusArrayFormula::~ScOrcusArrayFormula() {}
++
++void ScOrcusArrayFormula::set_range(const os::range_t& range)
++{
++    mnCol = range.first.column;
++    mnRow = range.first.row;
++
++    mnColRange = range.last.column - range.first.column + 1;
++    mnRowRange = range.last.row - range.first.column + 1;
++}
++
++void ScOrcusArrayFormula::set_formula(os::formula_grammar_t grammar, const char* p, size_t n)
++{
++    meGrammar = getCalcGrammarFromOrcus(grammar);
++    maFormula = OUString(p, n, RTL_TEXTENCODING_UTF8);
++}
++
++void ScOrcusArrayFormula::set_result_value(os::row_t /*row*/, os::col_t /*col*/, double /*value*/)
++{
++    // TODO : implement result cache for matrix
++}
++
++void ScOrcusArrayFormula::set_result_string(os::row_t /*row*/, os::col_t /*col*/, size_t /*sindex*/)
++{
++    // TODO : implement result cache for matrix
++}
++
++void ScOrcusArrayFormula::set_result_empty(os::row_t /*row*/, os::col_t /*col*/)
++{
++    // TODO : implement result cache for matrix
++}
++
++void ScOrcusArrayFormula::set_result_bool(os::row_t /*row*/, os::col_t /*col*/, bool /*value*/)
++{
++    // TODO : implement result cache for matrix
++}
++
++void ScOrcusArrayFormula::commit()
++{
++    ScAddress aPos(mnCol, mnRow, mrSheet.getIndex());
++    mrSheet.getFactory().pushMatrixFormulaToken(aPos, maFormula, meGrammar, mnRowRange, mnColRange);
++    mrSheet.cellInserted();
++}
++
+ void ScOrcusSheet::cellInserted()
+ {
+     ++mnCellCount;
+@@ -830,6 +1027,11 @@ void ScOrcusSheet::cellInserted()
+     }
+ }
+ 
++ScDocumentImport& ScOrcusSheet::getDoc()
++{
++    return mrDoc;
++}
++
+ os::iface::import_auto_filter* ScOrcusSheet::get_auto_filter()
+ {
+     return &maAutoFilter;
+@@ -855,6 +1057,18 @@ os::iface::import_named_expression* ScOrcusSheet::get_named_expression()
+     return &maNamedExpressions;
+ }
+ 
++os::iface::import_formula* ScOrcusSheet::get_formula()
++{
++    maFormula.reset();
++    return &maFormula;
++}
++
++os::iface::import_array_formula* ScOrcusSheet::get_array_formula()
++{
++    maArrayFormula.reset();
++    return &maArrayFormula;
++}
++
+ void ScOrcusSheet::set_auto(os::row_t row, os::col_t col, const char* p, size_t n)
+ {
+     OUString aVal(p, n, RTL_TEXTENCODING_UTF8);
+@@ -921,83 +1135,6 @@ void ScOrcusSheet::set_format(os::row_t row_start, os::col_t col_start,
+     mrDoc.getDoc().ApplyPatternAreaTab(col_start, row_start, col_end, row_end, mnTab, aPattern);
+ }
+ 
+-void ScOrcusSheet::set_formula(
+-    os::row_t row, os::col_t col, os::formula_grammar_t grammar, const char* p, size_t n)
+-{
+-    OUString aFormula(p, n, RTL_TEXTENCODING_UTF8);
+-    mrFactory.pushCellStoreToken(
+-        ScAddress(col, row, mnTab), aFormula, getCalcGrammarFromOrcus(grammar));
+-    cellInserted();
+-}
+-
+-void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, const char* p, size_t n)
+-{
+-    OUString aResult( p, n, RTL_TEXTENCODING_UTF8);
+-    mrFactory.pushFormulaResult(ScAddress(col, row, mnTab), aResult);
+-}
+-
+-void ScOrcusSheet::set_formula_result(os::row_t row, os::col_t col, double val)
+-{
+-    mrFactory.pushFormulaResult(ScAddress(col, row, mnTab), val);
+-}
+-
+-void ScOrcusSheet::set_shared_formula(
+-    os::row_t row, os::col_t col, os::formula_grammar_t grammar, size_t sindex,
+-    const char* p_formula, size_t n_formula)
+-{
+-    ScAddress aPos(col, row, mnTab);
+-    OUString aFormula(p_formula, n_formula, RTL_TEXTENCODING_UTF8);
+-    formula::FormulaGrammar::Grammar eGram = getCalcGrammarFromOrcus(grammar);
+-
+-    // Compile the formula expression into tokens.
+-    ScCompiler aComp(&mrDoc.getDoc(), aPos, eGram);
+-    ScTokenArray* pArray = aComp.CompileString(aFormula);
+-    if (!pArray)
+-        // Tokenization failed.
+-        return;
+-
+-    maFormulaGroups.set(sindex, pArray);
+-
+-    mrFactory.pushSharedFormulaToken(aPos, sindex);
+-    cellInserted();
+-}
+-
+-void ScOrcusSheet::set_shared_formula(
+-    os::row_t row, os::col_t col, os::formula_grammar_t grammar, size_t sindex,
+-    const char* p_formula, size_t n_formula, const char* /*p_range*/, size_t /*n_range*/)
+-{
+-    set_shared_formula(row, col, grammar, sindex, p_formula, n_formula);
+-}
+-
+-void ScOrcusSheet::set_shared_formula(os::row_t row, os::col_t col, size_t sindex)
+-{
+-    ScAddress aPos(col, row, mnTab);
+-
+-    const ScTokenArray* pArray = maFormulaGroups.get(sindex);
+-    if (!pArray)
+-        return;
+-
+-    mrFactory.pushSharedFormulaToken(aPos, sindex);
+-    cellInserted();
+-}
+-
+-void ScOrcusSheet::set_array_formula(
+-    os::row_t row, os::col_t col, os::formula_grammar_t grammar,
+-    const char* p, size_t n, os::row_t array_rows, os::col_t array_cols)
+-{
+-    OUString aFormula(p, n, RTL_TEXTENCODING_UTF8);
+-    formula::FormulaGrammar::Grammar eGrammar = getCalcGrammarFromOrcus(grammar);
+-
+-    ScAddress aPos(col, row, mnTab);
+-    mrFactory.pushMatrixFormulaToken(aPos, aFormula, eGrammar, array_rows, array_cols);
+-}
+-
+-void ScOrcusSheet::set_array_formula(
+-    os::row_t /*row*/, os::col_t /*col*/, os::formula_grammar_t /*grammar*/,
+-    const char* /*p*/, size_t /*n*/, const char* /*p_range*/, size_t /*n_range*/)
+-{
+-}
+-
+ orcus::spreadsheet::range_size_t ScOrcusSheet::get_sheet_size() const
+ {
+     orcus::spreadsheet::range_size_t ret;
+@@ -1012,6 +1149,16 @@ const sc::SharedFormulaGroups& ScOrcusSheet::getSharedFormulaGroups() const
+     return maFormulaGroups;
+ }
+ 
++sc::SharedFormulaGroups& ScOrcusSheet::getSharedFormulaGroups()
++{
++    return maFormulaGroups;
++}
++
++ScOrcusFactory& ScOrcusSheet::getFactory()
++{
++    return mrFactory;
++}
++
+ ScOrcusSharedStrings::ScOrcusSharedStrings(ScOrcusFactory& rFactory) :
+     mrFactory(rFactory) {}
+ 
+@@ -1087,7 +1234,7 @@ ScOrcusStyles::font::font():
+ }
+ 
+ ScOrcusStyles::fill::fill():
+-    maPattern(""),
++    mePattern(orcus::spreadsheet::fill_pattern_t::none),
+     maFgColor(COL_WHITE),
+     maBgColor(COL_WHITE),
+     mbHasFillAttr(false)
+@@ -1143,13 +1290,13 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
+ 
+ void ScOrcusStyles::fill::applyToItemSet(SfxItemSet& rSet) const
+ {
+-    if (maPattern.equalsIgnoreAsciiCase("none"))
++    if (mePattern == orcus::spreadsheet::fill_pattern_t::none)
+     {
+         SAL_INFO("sc.orcus.style", "no fill style");
+         return;
+     }
+ 
+-    if (maPattern.equalsIgnoreAsciiCase("solid"))
++    if (mePattern == orcus::spreadsheet::fill_pattern_t::solid)
+         rSet.Put(SvxBrushItem(maFgColor, ATTR_BACKGROUND));
+ }
+ 
+@@ -1575,10 +1722,9 @@ void ScOrcusStyles::set_fill_count(size_t /*n*/)
+     // needed at all?
+ }
+ 
+-void ScOrcusStyles::set_fill_pattern_type(const char* s, size_t n)
++void ScOrcusStyles::set_fill_pattern_type(orcus::spreadsheet::fill_pattern_t fp)
+ {
+-    maCurrentFill.maPattern = OUString(s, n, RTL_TEXTENCODING_UTF8);
+-    maCurrentFill.mbHasFillAttr = true;
++    maCurrentFill.mePattern = fp;
+ }
+ 
+ void ScOrcusStyles::set_fill_fg_color(
+@@ -1962,12 +2108,12 @@ ScOrcusAutoFilter::~ScOrcusAutoFilter()
+ {
+ }
+ 
+-void ScOrcusAutoFilter::set_range(const char* p_ref, size_t n_ref)
++void ScOrcusAutoFilter::set_range(const orcus::spreadsheet::range_t& range)
+ {
+-    OUString aRange(p_ref, n_ref, RTL_TEXTENCODING_UTF8);
+-    SAL_INFO("sc.orcus.autofilter", "set_range: " << aRange);
+-
+-    maRange.Parse(aRange);
++    maRange.aStart.SetRow(range.first.row);
++    maRange.aStart.SetCol(range.first.column);
++    maRange.aEnd.SetRow(range.last.row);
++    maRange.aEnd.SetCol(range.last.column);
+ }
+ 
+ void ScOrcusAutoFilter::set_column(orcus::spreadsheet::col_t col)
+diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
+index e47b862c2138..5494ddefc434 100644
+--- a/sc/source/filter/orcus/xmlcontext.cxx
++++ b/sc/source/filter/orcus/xmlcontext.cxx
+@@ -24,6 +24,7 @@
+ #include <orcus/orcus_xml.hpp>
+ #include <orcus/global.hpp>
+ #include <orcus/sax_parser_base.hpp>
++#include <orcus/stream.hpp>
+ 
+ #include <com/sun/star/ucb/XCommandEnvironment.hpp>
+ #include <comphelper/processfactory.hxx>
+@@ -289,7 +290,9 @@ void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam)
+             }
+         }
+ 
+-        filter.read_file(path);
++        std::string content = orcus::load_file_content(path);
++        filter.read_stream(content.data(), content.size());
++
+         aFactory.finalize();
+     }
+     catch (const std::exception&)
+-- 
+2.17.1
+
+

Copied: libreoffice-still/repos/staging-x86_64/PKGBUILD (from rev 348845, libreoffice-still/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,337 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Maintainer: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+
+# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
+# Note: These are for Arch Linux use ONLY. For your own distribution, please
+# get your own set of keys. Feel free to contact foutrelis at archlinux.org for
+# more information.
+_google_default_client_id=413772536636.apps.googleusercontent.com
+_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
+
+pkgbase=libreoffice-still
+pkgname=('libreoffice-still-sdk' 'libreoffice-still')
+_LOver=6.1.5.2
+pkgver=6.1.5
+pkgrel=3
+arch=('x86_64')
+license=('LGPL3')
+url="https://www.libreoffice.org/"
+makedepends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
+	'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib'
+	'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
+	'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
+	'libmspub' 'harfbuzz-icu' 'nss' 'hicolor-icon-theme'
+	'desktop-file-utils' 'shared-mime-info' 'gtk2' 'gst-plugins-base-libs'
+	'sane' 'perl-archive-zip' 'zip' 'unzip' 'unixodbc' 'ant' 
+	'gperf' 'gtk3' 'qt5-base' 'plasma-framework' 'cppunit' 'beanshell' 'clucene'
+	'junit' 'libmythes' 'libwpg'  'java-environment=8' 'postgresql-libs' 'libgl'
+	'bluez-libs' 'gdb' 'doxygen'  'libatomic_ops'  'mdds'
+	'apr' 'serf' 'ttf-liberation' 'ttf-dejavu' 'ttf-carlito' 'libxinerama' 'libpagemaker' 'glm'
+	'libabw' 'libmwaw' 'libe-book' 'coin-or-mp' 'liblangtag' 'liborcus' 
+	'libexttextcat' 'libcmis' 'gobject-introspection' 'libfbclient'
+	'libtommath' 'libzmf' 'gpgme' 'xmlsec' 'rxvt-unicode' 
+	'libepubgen' 'libfreehand' 'libqxp' 'libstaroffice'  'boost' 'libnumbertext'
+)
+
+_mirror="https://download.documentfoundation.org/libreoffice/src/${pkgver}"
+#_mirror="https://dev-builds.libreoffice.org/pre-releases/src"
+_additional_source_url="http://dev-www.libreoffice.org/src"
+_additional_source_url2="http://dev-www.libreoffice.org/extern"
+source=(${_mirror}/libreoffice{,-help,-translations}-${_LOver}.tar.xz{,.asc}
+	${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+	${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip # keep old bundled version, new system version ftbs
+	${_additional_source_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+	${_additional_source_url}/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
+	${_additional_source_url}/language-subtag-registry-2018-04-23.tar.bz2
+	${_additional_source_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
+	${_additional_source_url}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+	${_additional_source_url}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+	${_additional_source_url}/pdfium-3426.tar.bz2
+	${_additional_source_url}/lxml-4.1.1.tgz
+	${_additional_source_url2}/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar  # for test suite
+	${_additional_source_url2}/odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar # for test suite
+	${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+	make-pyuno-work-with-system-wide-module-install.diff
+	libreoffice-boost-1.69.patch
+	0001-Update-mdds-to-1.4.1.patch
+	0001-Update-orcus-to-0.14.0.patch
+	libreoffice-still.sh libreoffice-still.csh)
+noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+           798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+           a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+           0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
+           language-subtag-registry-2018-04-23.tar.bz2
+           17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
+           d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+           ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+           pdfium-3426.tar.bz2
+           lxml-4.1.1.tgz
+           8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar  # for test suite
+           odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies+ODFTOOLKIT-460+ODFTOOLKIT-475.jar  # for test suite
+           185d60944ea767075d27247c3162b3bc-unowinreg.dll
+)
+validpgpkeys=('C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3') # LibreOffice Build Team (CODE SIGNING KEY) <build at documentfoundation.org>
+sha256sums=('eb49fe8c8d1d18ffc8bcafff59d8c998f7df2e8f8683c55cb509ad3a31c408f2'
+            'SKIP'
+            'c4e44741b0bf8d4c5ccdcc1f8bb335f5c2ec2ce86ad2c198e49862bb4878d22d'
+            'SKIP'
+            'd1d5341df8375383000fa7f4096583e1364019110dec1282a17e8e854cb4cd95'
+            'SKIP'
+            '64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1'
+            '1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753'
+            '75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870'
+            '983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776'
+            '14c21f4533ca74e3af9e09184d6756a750d0cd46099015ba8c595e48499aa878'
+            'd30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370'
+            '1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133'
+            '233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd'
+            '80331b48166501a192d65476932f17044eeb5f10faa6ea50f4f175169475c957'
+            '940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e'
+            'f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770'
+            '702413413a5d8076c17fe79c0808dfba145a7260020f6c8627ea529a0cf83769'
+            'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6'
+            'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563'
+            '5099c5e7818a327b661c45c0bd218835c1e70b14861b5112525da1d48beebf8c'
+            '8e8460302a7febc9a29b32b98fb77c85910ccadc65c73e0e9997dc5aabaaeb2a'
+            '60560283a5e22acad7f341b16dff4a654559b36db5d49b1e59f3bb9ae9b2336c'
+            '52e90a5a3d8d5b626caa51675b601aba508463c2b9caa98d07cfa35220fc0b22'
+            '531de4133cb6ff5c841e4251fdafe69521ccd195f5933eb8c113291d3eff183a')
+
+prepare() {
+
+	cd libreoffice-$_LOver
+
+	# move external sources into place
+	mkdir ${srcdir}/ext_sources &&	pushd ${srcdir}/ext_sources
+	for source in "${noextract[@]}"; do
+		ln -s ${srcdir}/$source .
+	done
+	popd
+	
+	# unowinreg.dll must be a file not a symlink or the result will become a broken symlink
+	# /usr/share/libreoffice/sdk/classes/win/unowinreg.dll -> /build/libreoffice/src/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+	rm ${srcdir}/ext_sources/185d60944ea767075d27247c3162b3bc-unowinreg.dll
+	cp -f ${srcdir}/185d60944ea767075d27247c3162b3bc-unowinreg.dll ${srcdir}/ext_sources
+
+	# fix not upstreamable pyuno paths - FS#54250
+	patch -Np1 -i ${srcdir}/make-pyuno-work-with-system-wide-module-install.diff
+
+	# fix build with boost 1.69 (freebsd)
+	patch -p0 -i ../libreoffice-boost-1.69.patch
+
+	# fix build with new mdds 1.4.x, liborcus 0.14.x
+	patch -Np1 -i ../0001-Update-mdds-to-1.4.1.patch
+	patch -Np1 -i ../0001-Update-orcus-to-0.14.0.patch
+
+	#use the CFLAGS but remove the LibO overridden ones
+	for i in $CFLAGS; do
+		case "$i" in
+			-O?|-pipe|-Wall|-g|-fexceptions) continue;;
+		esac
+		ARCH_FLAGS="$ARCH_FLAGS $i"
+	done
+}
+
+build() {
+	cd libreoffice-$_LOver
+
+	# strip -s from Makeflags in case you use it to shorten build logs
+	_MAKEFLAGS=${MAKEFLAGS/-s/}
+
+	# http://site.icu-project.org/download/61#TOC-Migration-Issues
+	CPPFLAGS+=' -DU_USING_ICU_NAMESPACE=1'
+
+	./autogen.sh --with-build-version="${pkgver}-${pkgrel}" \
+		--with-vendor="Arch Linux" \
+		--enable-split-app-modules \
+		--with-parallelism=${_MAKEFLAGS/-j/} \
+		--with-external-tar="${srcdir}/ext_sources" \
+		--disable-fetch-external \
+		--enable-release-build \
+		--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc \
+		--libdir=/usr/lib --mandir=/usr/share/man \
+		--with-lang="" \
+		--with-help=html \
+		--disable-avahi \
+		--enable-dbus \
+		--enable-evolution2\
+		--enable-gio\
+		--enable-gtk3-kde5 \
+		--enable-gtk3 \
+		--enable-introspection \
+		--disable-gstreamer-0-10 \
+		--enable-openssl \
+		--enable-odk\
+		--enable-python=system \
+		--enable-scripting-beanshell \
+		--enable-scripting-javascript \
+		--disable-dconf \
+		--disable-report-builder \
+		--enable-ext-wiki-publisher \
+		--enable-ext-nlpsolver \
+		--without-fonts\
+		--with-system-apr \
+		--with-system-libcdr \
+		--with-system-mdds\
+		--without-myspell-dicts \
+		--with-system-libvisio \
+		--with-system-libcmis \
+		--with-system-libmspub \
+		--with-system-libexttextcat \
+		--with-system-orcus \
+		--with-system-liblangtag \
+		--with-system-libodfgen \
+		--with-system-libmwaw \
+		--with-system-libetonyek \
+		--with-system-libfreehand \
+		--with-system-firebird \
+		--with-system-libtommath \
+		--with-system-libatomic-ops \
+		--with-system-libebook \
+		--with-system-libabw \
+		--with-system-coinmp \
+		--with-system-dicts \
+		--with-external-dict-dir=/usr/share/hunspell \
+		--with-external-hyph-dir=/usr/share/hyphen \
+		--with-external-thes-dir=/usr/share/mythes \
+		--with-system-beanshell \
+		--with-system-cppunit\
+		--with-system-graphite\
+		--with-system-glm \
+		--with-system-libnumbertext \
+		--with-system-libwpg \
+		--with-system-libwps \
+		--with-system-redland\
+		--with-system-libzmf \
+		--with-system-gpgmepp \
+		--with-system-libstaroffice \
+		--with-system-serf \
+		--with-jdk-home="/usr/lib/jvm/default" \
+		--with-ant-home="/usr/share/ant"\
+		--with-system-boost\
+		--with-system-icu \
+		--with-system-cairo \
+		--with-system-libs \
+		--with-system-mythes \
+		--with-system-headers \
+		--without-system-hsqldb \
+		--with-alloc=system \
+		--with-system-clucene \
+		--with-gdrive-client-id=${_google_default_client_id} \
+		--with-gdrive-client-secret=${_google_default_client_secret} \
+		--disable-dependency-tracking
+
+	touch src.downloaded
+	make build-nocheck
+
+	mkdir ${srcdir}/fakeinstall
+	make DESTDIR=${srcdir}/fakeinstall distro-pack-install
+}
+
+#check() {
+#	cd ${srcdir}/build
+#	make check
+#}
+
+package_libreoffice-still-sdk() {
+	pkgdesc="Software Development Kit for LibreOffice maintenance branch"
+	depends=('libreoffice-still' 'gcc-libs' 'sh' 'make' 'zip' 'gcc' 'java-environment')
+	provides=('libreoffice-sdk')
+	conflicts=('libreoffice-fresh-sdk')
+
+	for dir in $(grep -h ^%dir libreoffice-$_LOver/file-lists/sdk{,_doc}_list.txt); do
+		install -dm755 ${pkgdir}/${dir/\%dir/}
+	done
+
+	for file in $(grep -h -v ^%dir libreoffice-$_LOver/file-lists/sdk{,_doc}_list.txt); do
+		dirname=$(dirname $file)
+		[[ -d ${pkgdir}/$dirname ]] || install -dm755 ${pkgdir}/$dirname
+		mv ${srcdir}/fakeinstall/${file} ${pkgdir}/$file
+	done
+
+	# fix environment path to keep compatibility with other java-environments
+	sed -i -e "s:\/usr\/lib\/jvm\/java-7-openjdk:\$J2SDKDIR:" \
+		${pkgdir}/usr/lib/libreoffice/sdk/setsdkenv_unix.sh
+
+	# fix permissions
+	find ${pkgdir}/usr/lib/libreoffice/sdk/examples -type f -exec chmod -x {} +
+	
+	# add LibreOfficeKit headers; FS#48066
+	install -dm755 ${pkgdir}/usr/include/LibreOfficeKit
+	install -v -m644 ${srcdir}/libreoffice-$_LOver/include/LibreOfficeKit/* ${pkgdir}/usr/include/LibreOfficeKit
+}
+
+package_libreoffice-still() {
+	pkgdesc="LibreOffice maintenance branch"
+	depends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
+		'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl'
+		'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
+		'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
+		'libmspub' 'harfbuzz-icu' 'nss' 'clucene' 'hicolor-icon-theme'
+		'desktop-file-utils' 'shared-mime-info' 'libpagemaker'
+		'libxinerama' 'libabw' 'libmwaw' 'libe-book' 'libcups'
+		'liblangtag' 'libexttextcat' 'libcmis' 'liborcus' 'libfbclient'
+		'libtommath' 'libzmf' 'libatomic_ops' 'xmlsec' 'gpgme' 'libnumbertext'
+		'libfreehand' 'libstaroffice' 'libepubgen' 'libqxp' 'libepoxy')
+	optdepends=('java-runtime:     adds java support'
+		'java-environment: required by extension-wiki-publisher and extension-nlpsolver'
+		'pstoedit:         translates PostScript and PDF graphics into other vector formats'
+		'libmythes:        for use in thesaurus'
+		'beanshell:       interactive java -- good for prototyping/macros'
+		'libwpg:           library for importing and converting WordPerfect Graphics format'
+		'sane:             for scanner access'
+		'unixodbc:         adds ODBC database support'
+		'gst-plugins-base-libs: for multimedia content, e.g. in Impress'
+		'libpaper:         takes care of papersize'
+		'postgresql-libs:  for postgresql-connector'
+		'coin-or-mp:	   required by the Calc solver'
+		'gtk2:             for GTK2 integration'
+		'gtk3:             for GTK3 integration'
+		'kio:              for KF5 KDE desktop integration')
+	backup=(etc/libreoffice/sofficerc
+		etc/libreoffice/bootstraprc
+		etc/libreoffice/psprint.conf
+		etc/profile.d/libreoffice-still.sh
+		etc/profile.d/libreoffice-still.csh)
+	provides=('libreoffice' 'libreoffice-en-US')
+	conflicts=('libreoffice-fresh')
+
+	mv fakeinstall/* ${pkgdir}/
+
+	# put configuration files into place
+	install -dm755 ${pkgdir}/etc/libreoffice
+	install -m644 ${pkgdir}/usr/lib/libreoffice/program/{bootstraprc,sofficerc} \
+		${pkgdir}/etc/libreoffice/
+	install -m644 ${pkgdir}/usr/lib/libreoffice/share/psprint/psprint.conf \
+	   	${pkgdir}/etc/libreoffice/
+
+	# install dummy links to make them found by LibO
+	cd ${pkgdir}/usr/lib/libreoffice/program/
+	ln -vsf /etc/libreoffice/{bootstraprc,sofficerc} .
+	cd ${pkgdir}/usr/lib/libreoffice/share/psprint/
+	ln -vsf /etc/libreoffice/psprint.conf .
+
+	# allow to preset desired VLC
+	install -dm755 ${pkgdir}/etc/profile.d
+	install -m644 ${srcdir}/libreoffice-still.{sh,csh} ${pkgdir}/etc/profile.d/
+
+	# make pyuno find its modules
+	install -dm755 ${pkgdir}/usr/lib/python3.7/site-packages
+	ln -svf /usr/lib/libreoffice/program/uno.py \
+		${pkgdir}/usr/lib/python3.7/site-packages/uno.py
+	ln -svf /usr/lib/libreoffice/program/unohelper.py \
+		${pkgdir}/usr/lib/python3.7/site-packages/unohelper.py
+		
+	# add a symlink required for gnome-documents; FS#51887
+	# https://lists.freedesktop.org/archives/libreoffice/2016-March/073787.html
+	ln -svf /usr/lib/libreoffice/program/liblibreofficekitgtk.so \
+		${pkgdir}/usr/lib/liblibreofficekitgtk.so  
+
+	# cleanup
+	rm -rf ${pkgdir}/usr/share/libreoffice/sdk
+
+	# add application descriptions
+	install -dm755 ${pkgdir}/usr/share/metainfo
+	install -v -m644 ${srcdir}/libreoffice-$_LOver/sysui/desktop/appstream-appdata/*.xml \
+		${pkgdir}/usr/share/metainfo
+}

Copied: libreoffice-still/repos/staging-x86_64/emfio.patch (from rev 348845, libreoffice-still/trunk/emfio.patch)
===================================================================
--- staging-x86_64/emfio.patch	                        (rev 0)
+++ staging-x86_64/emfio.patch	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,292 @@
+From 126f10840b0e5930be57cb55262789e85bff9b21 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Fri, 12 Jan 2018 20:24:43 +0100
+Subject: More loplugin:cstylecast: emfio
+
+auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
+loplugin:cstylecast for some more cases" plus
+solenv/clang-format/reformat-formatted-files
+
+Change-Id: Idffd3ef04b007f04b7022e54881254da9b2aa4a0
+---
+ emfio/qa/cppunit/emf/EmfImportTest.cxx |  6 +++---
+ emfio/source/reader/emfreader.cxx      |  8 ++++----
+ emfio/source/reader/mtftools.cxx       | 26 +++++++++++++-------------
+ emfio/source/reader/wmfreader.cxx      | 12 ++++++------
+ 4 files changed, 26 insertions(+), 26 deletions(-)
+
+diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
+index bc14c4b..9611db6 100644
+--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
++++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
+@@ -88,7 +88,7 @@ void Test::checkRectPrimitive(Primitive2DSequence const & rPrimitive)
+ void Test::testWorking()
+ {
+     Primitive2DSequence aSequenceRect = parseEmf("/emfio/qa/cppunit/emf/data/fdo79679-2.emf");
+-    CPPUNIT_ASSERT_EQUAL(1, (int) aSequenceRect.getLength());
++    CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRect.getLength()));
+     checkRectPrimitive(aSequenceRect);
+ }
+ 
+@@ -99,7 +99,7 @@ void Test::TestDrawString()
+ 
+     // first, get the sequence of primitives and dump it
+     Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawString.emf");
+-    CPPUNIT_ASSERT_EQUAL(1, (int) aSequence.getLength());
++    CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
+     Primitive2dXmlDump dumper;
+     xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
+     CPPUNIT_ASSERT (pDocument);
+@@ -120,7 +120,7 @@ void Test::TestDrawLine()
+ 
+     // first, get the sequence of primitives and dump it
+     Primitive2DSequence aSequence = parseEmf("/emfio/qa/cppunit/emf/data/TestDrawLine.emf");
+-    CPPUNIT_ASSERT_EQUAL(1, (int) aSequence.getLength());
++    CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
+     Primitive2dXmlDump dumper;
+     xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence));
+     CPPUNIT_ASSERT (pDocument);
+diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
+index 52e8661..ea557ea 100644
+--- a/emfio/source/reader/emfreader.cxx
++++ b/emfio/source/reader/emfreader.cxx
+@@ -590,7 +590,7 @@ namespace emfio
+         {
+             sal_uInt32 nPoints(0);
+             mpInputStream->ReadUInt32( nPoints );
+-            aPoints[i] = (sal_uInt16)nPoints;
++            aPoints[i] = static_cast<sal_uInt16>(nPoints);
+         }
+         if ( mpInputStream->good() && ( nGesPoints * (sizeof(T)+sizeof(T)) ) <= ( nEndPos - mpInputStream->Tell() ) )
+         {
+@@ -681,7 +681,7 @@ namespace emfio
+ 
+                     mpInputStream->ReadUInt32( nCommentId );
+ 
+-                    SAL_INFO ("emfio", "\t\tbegin " << (char)(nCommentId & 0xff) << (char)((nCommentId & 0xff00) >> 8) << (char)((nCommentId & 0xff0000) >> 16) << (char)((nCommentId & 0xff000000) >> 24) << " id: 0x" << std::hex << nCommentId << std::dec);
++                    SAL_INFO ("emfio", "\t\tbegin " << static_cast<char>(nCommentId & 0xff) << static_cast<char>((nCommentId & 0xff00) >> 8) << static_cast<char>((nCommentId & 0xff0000) >> 16) << static_cast<char>((nCommentId & 0xff000000) >> 24) << " id: 0x" << std::hex << nCommentId << std::dec);
+ 
+                     if( nCommentId == EMR_COMMENT_EMFPLUS && nRecSize >= 12 )
+                     {
+@@ -761,7 +761,7 @@ namespace emfio
+                     {
+                         mpInputStream->ReadUInt32( nNom1 ).ReadUInt32( nDen1 ).ReadUInt32( nNom2 ).ReadUInt32( nDen2 );
+                         if (nDen1 != 0 && nDen2 != 0)
+-                            ScaleWinExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 );
++                            ScaleWinExt( static_cast<double>(nNom1) / nDen1, static_cast<double>(nNom2) / nDen2 );
+                         else
+                             SAL_WARN("vcl.emf", "ignoring bogus divide by zero");
+                     }
+@@ -778,7 +778,7 @@ namespace emfio
+                     {
+                         mpInputStream->ReadUInt32( nNom1 ).ReadUInt32( nDen1 ).ReadUInt32( nNom2 ).ReadUInt32( nDen2 );
+                         if (nDen1 != 0 && nDen2 != 0)
+-                            ScaleDevExt( (double)nNom1 / nDen1, (double)nNom2 / nDen2 );
++                            ScaleDevExt( static_cast<double>(nNom1) / nDen1, static_cast<double>(nNom2) / nDen2 );
+                         else
+                             SAL_WARN("vcl.emf", "ignoring bogus divide by zero");
+                     }
+diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
+index 55fd4dd..e3bbb5f 100644
+--- a/emfio/source/reader/mtftools.cxx
++++ b/emfio/source/reader/mtftools.cxx
+@@ -272,7 +272,7 @@ namespace emfio
+         if( rFont.lfStrikeOut )
+             aFont.SetStrikeout( STRIKEOUT_SINGLE );
+ 
+-        aFont.SetOrientation( (short)rFont.lfEscapement );
++        aFont.SetOrientation( static_cast<short>(rFont.lfEscapement) );
+ 
+         Size aFontSize( Size( rFont.lfWidth, rFont.lfHeight ) );
+         if ( rFont.lfHeight > 0 )
+@@ -287,8 +287,8 @@ namespace emfio
+             long nHeight = aMetric.GetAscent() + aMetric.GetDescent();
+             if (nHeight)
+             {
+-                double fHeight = ((double)aFontSize.Height() * rFont.lfHeight ) / nHeight;
+-                aFontSize.Height() = (sal_Int32)( fHeight + 0.5 );
++                double fHeight = (static_cast<double>(aFontSize.Height()) * rFont.lfHeight ) / nHeight;
++                aFontSize.Height() = static_cast<sal_Int32>( fHeight + 0.5 );
+             }
+         }
+ 
+@@ -303,7 +303,7 @@ namespace emfio
+         sal_uInt32 nColor;
+ 
+         mpInputStream->ReadUInt32( nColor );
+-        return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
++        return Color( static_cast<sal_uInt8>(nColor), static_cast<sal_uInt8>( nColor >> 8 ), static_cast<sal_uInt8>( nColor >> 16 ) );
+     };
+ 
+     Point MtfTools::ImplScale(const Point& rPoint) // Hack to set varying defaults for incompletely defined files.
+@@ -394,8 +394,8 @@ namespace emfio
+                             fY2 *= mnDevHeight;
+                             fX2 += mnDevOrgX;
+                             fY2 += mnDevOrgY;   // fX2, fY2 now in device units
+-                            fX2 *= (double)mnMillX * 100.0 / (double)mnPixX;
+-                            fY2 *= (double)mnMillY * 100.0 / (double)mnPixY;
++                            fX2 *= static_cast<double>(mnMillX) * 100.0 / static_cast<double>(mnPixX);
++                            fY2 *= static_cast<double>(mnMillY) * 100.0 / static_cast<double>(mnPixY);
+                         }
+                     }
+                     break;
+@@ -482,8 +482,8 @@ namespace emfio
+                             fHeight /= mnWinExtY;
+                             fWidth *= mnDevWidth;
+                             fHeight *= mnDevHeight;
+-                            fWidth *= (double)mnMillX * 100.0 / (double)mnPixX;
+-                            fHeight *= (double)mnMillY * 100.0 / (double)mnPixY;
++                            fWidth *= static_cast<double>(mnMillX) * 100.0 / static_cast<double>(mnPixX);
++                            fHeight *= static_cast<double>(mnMillY) * 100.0 / static_cast<double>(mnPixY);
+                         }
+                     }
+                     break;
+@@ -558,7 +558,7 @@ namespace emfio
+     {
+         if ( nIndex & ENHMETA_STOCK_OBJECT )
+         {
+-            sal_uInt16 nStockId = (sal_uInt8)nIndex;
++            sal_uInt16 nStockId = static_cast<sal_uInt8>(nIndex);
+             switch( nStockId )
+             {
+                 case WHITE_BRUSH :
+@@ -617,7 +617,7 @@ namespace emfio
+ 
+             GDIObj *pGDIObj = nullptr;
+ 
+-            if ( (sal_uInt32)nIndex < mvGDIObj.size() )
++            if ( static_cast<sal_uInt32>(nIndex) < mvGDIObj.size() )
+                 pGDIObj = mvGDIObj[ nIndex ].get();
+ 
+             if ( pGDIObj )
+@@ -760,7 +760,7 @@ namespace emfio
+                     }
+                 }
+             }
+-            if ( (sal_uInt32)nIndex >= mvGDIObj.size() )
++            if ( static_cast<sal_uInt32>(nIndex) >= mvGDIObj.size() )
+                 ImplResizeObjectArry( nIndex + 16 );
+ 
+             mvGDIObj[ nIndex ] = std::move(pObject);
+@@ -776,7 +776,7 @@ namespace emfio
+     {
+         if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
+         {
+-            if ( (sal_uInt32)nIndex < mvGDIObj.size() )
++            if ( static_cast<sal_uInt32>(nIndex) < mvGDIObj.size() )
+             {
+                 mvGDIObj[ nIndex ].reset();
+             }
+@@ -1738,7 +1738,7 @@ namespace emfio
+                 pSave = rSaveList[i].get();
+ 
+                 sal_uInt32  nWinRop = pSave->nWinRop;
+-                sal_uInt8   nRasterOperation = (sal_uInt8)( nWinRop >> 16 );
++                sal_uInt8   nRasterOperation = static_cast<sal_uInt8>( nWinRop >> 16 );
+ 
+                 sal_uInt32  nUsed =  0;
+                 if ( ( nRasterOperation & 0xf )  != ( nRasterOperation >> 4 ) )
+diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
+index 7a925e7..e20576c 100644
+--- a/emfio/source/reader/wmfreader.cxx
++++ b/emfio/source/reader/wmfreader.cxx
+@@ -244,7 +244,7 @@ namespace emfio
+                     mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                     break;
+                 }
+-                ScaleWinExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
++                ScaleWinExt( static_cast<double>(nXNum) / nXDenom, static_cast<double>(nYNum) / nYDenom );
+             }
+             break;
+ 
+@@ -269,7 +269,7 @@ namespace emfio
+                     mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );
+                     break;
+                 }
+-                ScaleDevExt( (double)nXNum / nXDenom, (double)nYNum / nYDenom );
++                ScaleDevExt( static_cast<double>(nXNum) / nXDenom, static_cast<double>(nYNum) / nYDenom );
+             }
+             break;
+ 
+@@ -796,7 +796,7 @@ namespace emfio
+                         nCount++;
+                     pBmp.reset();
+                 }
+-                Color aColor( (sal_uInt8)( nRed / nCount ), (sal_uInt8)( nGreen / nCount ), (sal_uInt8)( nBlue / nCount ) );
++                Color aColor( static_cast<sal_uInt8>( nRed / nCount ), static_cast<sal_uInt8>( nGreen / nCount ), static_cast<sal_uInt8>( nBlue / nCount ) );
+                 CreateObject(o3tl::make_unique<WinMtfFillStyle>( aColor, false ));
+             }
+             break;
+@@ -1107,7 +1107,7 @@ namespace emfio
+                                 }
+                             }
+                         }
+-                        else if ( (nNewMagic == static_cast< sal_uInt32 >(0x43464D57)) && (nLen >= 34) && ( (sal_Int32)(nLen + 10) <= (sal_Int32)(mnRecSize * 2) ))
++                        else if ( (nNewMagic == static_cast< sal_uInt32 >(0x43464D57)) && (nLen >= 34) && ( static_cast<sal_Int32>(nLen + 10) <= static_cast<sal_Int32>(mnRecSize * 2) ))
+                         {
+                             sal_uInt32 nComType = 0, nVersion = 0, nFlags = 0, nComRecCount = 0,
+                                        nCurRecSize = 0, nRemainingSize = 0, nEMFTotalSize = 0;
+@@ -1252,8 +1252,8 @@ namespace emfio
+             {
+                 // #n417818#: If we have an external header then overwrite the bounds!
+                 tools::Rectangle aExtRect(0, 0,
+-                    (double)mpExternalHeader->xExt * 567 * mnUnitsPerInch / 1440000,
+-                    (double)mpExternalHeader->yExt * 567 * mnUnitsPerInch / 1440000);
++                    static_cast<double>(mpExternalHeader->xExt) * 567 * mnUnitsPerInch / 1440000,
++                    static_cast<double>(mpExternalHeader->yExt) * 567 * mnUnitsPerInch / 1440000);
+                 aPlaceableBound = aExtRect;
+ 
+                 SAL_INFO("vcl.wmf", "External header size "
+-- 
+cgit v1.1
+
+From 769ad348b0008d2879333a29a5570e185a9b5937 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Mon, 15 Jan 2018 09:05:51 +0100
+Subject: More loplugin:cstylecast: emfio
+
+Change-Id: I52e540bdd8ba0090dec752deb7b1fa5c67ae3c85
+---
+ emfio/source/reader/emfreader.cxx | 2 +-
+ emfio/source/reader/wmfreader.cxx | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
+index 8e9b6b5..d1873c7 100644
+--- a/emfio/source/reader/emfreader.cxx
++++ b/emfio/source/reader/emfreader.cxx
+@@ -823,7 +823,7 @@ namespace emfio
+                     case EMR_SETROP2 :
+                     {
+                         mpInputStream->ReadUInt32( nDat32 );
+-                        SetRasterOp( (WMFRasterOp)nDat32 );
++                        SetRasterOp( static_cast<WMFRasterOp>(nDat32) );
+                     }
+                     break;
+ 
+diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
+index 21f0bd2..5b4353f 100644
+--- a/emfio/source/reader/wmfreader.cxx
++++ b/emfio/source/reader/wmfreader.cxx
+@@ -203,7 +203,7 @@ namespace emfio
+             {
+                 sal_uInt16 nROP2 = 0;
+                 mpInputStream->ReadUInt16( nROP2 );
+-                SetRasterOp( (WMFRasterOp)nROP2 );
++                SetRasterOp( static_cast<WMFRasterOp>(nROP2) );
+             }
+             break;
+ 
+@@ -986,7 +986,7 @@ namespace emfio
+                 WMFRasterOp nOldROP = WMFRasterOp::NONE;
+                 mpInputStream->ReadUInt32( nROP );
+                 Size aSize = ReadYXExt();
+-                nOldROP = SetRasterOp( (WMFRasterOp)nROP );
++                nOldROP = SetRasterOp( static_cast<WMFRasterOp>(nROP) );
+                 DrawRect( tools::Rectangle( ReadYX(), aSize ), false );
+                 SetRasterOp( nOldROP );
+             }
+-- 
+cgit v1.1
+
+

Copied: libreoffice-still/repos/staging-x86_64/libreoffice-boost-1.69.patch (from rev 348845, libreoffice-still/trunk/libreoffice-boost-1.69.patch)
===================================================================
--- staging-x86_64/libreoffice-boost-1.69.patch	                        (rev 0)
+++ staging-x86_64/libreoffice-boost-1.69.patch	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,17 @@
+After https://github.com/boostorg/logic/commit/23cd89d4c80f build fails:
+
+sfx2/source/appl/shutdownicon.cxx:170:12: error: no viable conversion from returned value of type 'boost::logic::tribool' to function return type 'bool'
+    return loaded;
+           ^~~~~~
+
+--- sfx2/source/appl/shutdownicon.cxx.orig	2018-06-19 22:27:30 UTC
++++ sfx2/source/appl/shutdownicon.cxx
+@@ -167,7 +167,7 @@ bool LoadModule()
+ #endif // ENABLE_QUICKSTART_APPLET
+     }
+     assert(!boost::logic::indeterminate(loaded));
+-    return loaded;
++    return bool{loaded};
+ }
+ 
+ }

Copied: libreoffice-still/repos/staging-x86_64/libreoffice-still.csh (from rev 348845, libreoffice-still/trunk/libreoffice-still.csh)
===================================================================
--- staging-x86_64/libreoffice-still.csh	                        (rev 0)
+++ staging-x86_64/libreoffice-still.csh	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,5 @@
+# to force a certain look'n feel
+
+#setenv SAL_USE_VCLPLUGIN gen
+#setenv SAL_USE_VCLPLUGIN gtk
+#setenv SAL_USE_VCLPLUGIN gtk3

Copied: libreoffice-still/repos/staging-x86_64/libreoffice-still.sh (from rev 348845, libreoffice-still/trunk/libreoffice-still.sh)
===================================================================
--- staging-x86_64/libreoffice-still.sh	                        (rev 0)
+++ staging-x86_64/libreoffice-still.sh	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,5 @@
+# to force a certain look'n feel
+
+#export SAL_USE_VCLPLUGIN=gen
+#export SAL_USE_VCLPLUGIN=gtk
+#export SAL_USE_VCLPLUGIN=gtk3

Copied: libreoffice-still/repos/staging-x86_64/make-pyuno-work-with-system-wide-module-install.diff (from rev 348845, libreoffice-still/trunk/make-pyuno-work-with-system-wide-module-install.diff)
===================================================================
--- staging-x86_64/make-pyuno-work-with-system-wide-module-install.diff	                        (rev 0)
+++ staging-x86_64/make-pyuno-work-with-system-wide-module-install.diff	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,18 @@
+--- a/pyuno/source/module/uno.py	2017-05-03 18:46:29.000000000 +0200
++++ b/pyuno/source/module/uno.py.new	2017-06-06 17:11:27.585959637 +0200
+@@ -16,8 +16,14 @@
+ #   except in compliance with the License. You may obtain a copy of
+ #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ #
+-import pyuno
++
++# Special modification to make uno load on Arch
++import os
+ import sys
++sys.path.append("/usr/lib/libreoffice/program/")
++os.putenv("URE_BOOTSTRAP", "vnd.sun.star.pathname:/usr/lib/libreoffice/program/fundamentalrc")
++
++import pyuno
+ import traceback
+ import warnings
+ 

Copied: libreoffice-still/repos/staging-x86_64/poppler-0.70.patch (from rev 348845, libreoffice-still/trunk/poppler-0.70.patch)
===================================================================
--- staging-x86_64/poppler-0.70.patch	                        (rev 0)
+++ staging-x86_64/poppler-0.70.patch	2019-03-21 21:55:32 UTC (rev 348846)
@@ -0,0 +1,45 @@
+From 557ee0a0f4e40b934c72515f41f3a605803ddb1d Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Wed, 24 Oct 2018 17:48:53 +0300
+Subject: [PATCH] fix build with poppler 0.70
+
+---
+ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++
+ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+index 575a90acb..99219f7e6 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -578,7 +578,11 @@ void PDFOutDev::restoreState(GfxState*)
+     printf( "restoreState\n" );
+ }
+ 
++#if POPPLER_CHECK_VERSION(0, 70, 0)
++void PDFOutDev::setDefaultCTM(const double *pMat)
++#else
+ void PDFOutDev::setDefaultCTM(double *pMat)
++#endif
+ {
+     assert(pMat);
+ 
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+index da021a2a0..27440f2bb 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+@@ -166,7 +166,11 @@ namespace pdfi
+         //----- initialization and control
+ 
+         // Set default transform matrix.
++#if POPPLER_CHECK_VERSION(0, 70, 0)
++        virtual void setDefaultCTM(const double *ctm) override;
++#else
+         virtual void setDefaultCTM(double *ctm) override;
++#endif
+ 
+         // Start a page.
+         virtual void startPage(int pageNum, GfxState *state
+-- 
+2.19.1
+


More information about the arch-commits mailing list