[libreoffice/f19] Resolves: fdo#78294 default null-date, fdo#76663 matrix in PRODUCT
Eike Rathke
erack at fedoraproject.org
Tue May 6 11:41:49 UTC 2014
commit f835d667e9122df6f47c92f1c04fbe4ebf93d67b
Author: Eike Rathke <erack at redhat.com>
Date: Tue May 6 12:40:09 2014 +0100
Resolves: fdo#78294 default null-date, fdo#76663 matrix in PRODUCT
...et-s-not-skip-the-first-element-of-a-matr.patch | 114 ++++++++++++++++++++
...o-78294-default-null-date-for-document-im.patch | 48 ++++++++
libreoffice.spec | 8 ++-
3 files changed, 169 insertions(+), 1 deletions(-)
---
diff --git a/0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch b/0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch
new file mode 100644
index 0000000..9eef4e9
--- /dev/null
+++ b/0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch
@@ -0,0 +1,114 @@
+From 8d1f528394bdd81057c9776cbd5445a7da073c25 Mon Sep 17 00:00:00 2001
+Message-Id: <8d1f528394bdd81057c9776cbd5445a7da073c25.1399376034.git.erack at redhat.com>
+From: Kohei Yoshida <kohei.yoshida at collabora.com>
+Date: Thu, 24 Apr 2014 12:26:01 -0400
+Subject: [PATCH] fdo#76663: Let's not skip the first element of a matrix in
+ PRODUCT.
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+
+(cherry picked from commit 4158d8843d50d50e9830c8dc24af8722de77f4af)
+
+Conflicts:
+ sc/source/core/tool/interpr6.cxx
+
+Backported.
+
+Change-Id: I00683ce64fea58a80cd7137384e8f30464c44e9f
+Reviewed-on: https://gerrit.libreoffice.org/9159
+Reviewed-by: Eike Rathke <erack at redhat.com>
+Tested-by: Eike Rathke <erack at redhat.com>
+(cherry picked from commit b3d3c64a83c510a5c9aacf517eee8ca697e21d8f)
+Reviewed-on: https://gerrit.libreoffice.org/9160
+Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
+Reviewed-by: David Tardon <dtardon at redhat.com>
+---
+ sc/source/core/tool/interpr1.cxx | 1 +
+ sc/source/core/tool/scmatrix.cxx | 14 ++++++++++----
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch"
+
+diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
+index a03b13a..fd684ee 100644
+--- a/sc/source/core/tool/interpr1.cxx
++++ b/sc/source/core/tool/interpr1.cxx
+@@ -3946,6 +3946,7 @@ void IterateMatrix(
+ case ifPRODUCT:
+ {
+ ScMatrix::IterateResult aRes = pMat->Product(bTextAsZero);
++ fRes = aRes.mfFirst;
+ fRes *= aRes.mfRest;
+ rCount += aRes.mnCount;
+ }
+diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
+index eea3a71..933e808 100644
+--- a/sc/source/core/tool/scmatrix.cxx
++++ b/sc/source/core/tool/scmatrix.cxx
+@@ -976,7 +976,7 @@ namespace {
+
+ struct SumOp
+ {
+- static const int InitVal = 0;
++ static const double InitVal;
+
+ void operator() (double& rAccum, double fVal)
+ {
+@@ -984,9 +984,11 @@ struct SumOp
+ }
+ };
+
++const double SumOp::InitVal = 0.0;
++
+ struct SumSquareOp
+ {
+- static const int InitVal = 0;
++ static const double InitVal;
+
+ void operator() (double& rAccum, double fVal)
+ {
+@@ -994,9 +996,11 @@ struct SumSquareOp
+ }
+ };
+
++const double SumSquareOp::InitVal = 0.0;
++
+ struct ProductOp
+ {
+- static const int InitVal = 1;
++ static const double InitVal;
+
+ void operator() (double& rAccum, double fVal)
+ {
+@@ -1004,6 +1008,8 @@ struct ProductOp
+ }
+ };
+
++const double ProductOp::InitVal = 1.0;
++
+ template<typename _Op>
+ class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node_type, void>
+ {
+@@ -1013,7 +1019,7 @@ class WalkElementBlocks : std::unary_function<MatrixImplType::element_block_node
+ bool mbFirst:1;
+ bool mbTextAsZero:1;
+ public:
+- WalkElementBlocks(bool bTextAsZero) : maRes(0.0, _Op::InitVal, 0), mbFirst(true), mbTextAsZero(bTextAsZero) {}
++ WalkElementBlocks(bool bTextAsZero) : maRes(_Op::InitVal, _Op::InitVal, 0), mbFirst(true), mbTextAsZero(bTextAsZero) {}
+
+ const ScMatrix::IterateResult& getResult() const { return maRes; }
+
+
+--------------erAck-patch-parts--
+
+
diff --git a/0001-resolved-fdo-78294-default-null-date-for-document-im.patch b/0001-resolved-fdo-78294-default-null-date-for-document-im.patch
new file mode 100644
index 0000000..c62a066
--- /dev/null
+++ b/0001-resolved-fdo-78294-default-null-date-for-document-im.patch
@@ -0,0 +1,48 @@
+From 4da42b3b8dcd9e2abb24751b252c180b577b4144 Mon Sep 17 00:00:00 2001
+Message-Id: <4da42b3b8dcd9e2abb24751b252c180b577b4144.1399312709.git.erack at redhat.com>
+From: Eike Rathke <erack at redhat.com>
+Date: Mon, 5 May 2014 18:18:57 +0100
+Subject: [PATCH] resolved fdo#78294 default null-date for document import is
+ 1899-12-30
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+
+Change-Id: I9dfe76d422ad732a081442b95a995d8d395a098e
+(cherry picked from commit 571cefca474e6b77d68f9fa31f805dcf692927fd)
+---
+ sc/source/ui/docshell/docsh3.cxx | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-resolved-fdo-78294-default-null-date-for-document-im.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-resolved-fdo-78294-default-null-date-for-document-im.patch"
+
+diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
+index c07913f..64f3aa7 100644
+--- a/sc/source/ui/docshell/docsh3.cxx
++++ b/sc/source/ui/docshell/docsh3.cxx
+@@ -427,6 +427,12 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L
+ // so it must not be taken from the global options.
+ // Calculation settings are handled separately in ScXMLBodyContext::EndElement.
+ aDocOpt.SetStdPrecision( SvNumberFormatter::UNLIMITED_PRECISION );
++
++ // fdo#78294 The default null-date if
++ // <table:null-date table:date-value='...' />
++ // is absent is 1899-12-30 regardless what the configuration is set to.
++ // Import filters may override this value.
++ aDocOpt.SetDate( 30, 12, 1899);
+ }
+
+ aDocument.SetDocOptions( aDocOpt );
+
+--------------erAck-patch-parts--
+
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 1d9fbbc..7899348 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -42,7 +42,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
-Release: 1%{?libo_prerelease}%{?dist}
+Release: 2%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/default/
@@ -278,6 +278,8 @@ Patch38: 0001-actively-search-for-wizards-dir-in-all-internal-temp.patch
Patch39: 0001-never-run-autogen.sh.patch
Patch43: 0002-rhbz-1065629-RTF-import-re-implement-nested-tables.patch
Patch44: 0003-writerfilter-salvage-a-field-parameter-parsing-train.patch
+Patch45: 0001-resolved-fdo-78294-default-null-date-for-document-im.patch
+Patch46: 0001-fdo-76663-Let-s-not-skip-the-first-element-of-a-matr.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@@ -2155,6 +2157,10 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
+* Tue May 06 2014 Eike Rathke <erack at redhat.com> - 1:4.1.6.2-2
+- Resolves: fdo#78294 default null-date for document import is 1899-12-30
+- Resolves: fdo#76663 let's not skip the first element of a matrix in PRODUCT
+
* Tue Apr 29 2014 David Tardon <dtardon at redhat.com> - 1:4.1.6.2-1
- new upstream release
More information about the scm-commits
mailing list