[Libreoffice-commits] core.git: 2 commits - officecfg/registry sc/Module_sc.mk sc/qa sc/source
Jan Holesovsky
kendy at collabora.com
Thu Mar 24 13:42:49 UTC 2016
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 +-
sc/Module_sc.mk | 2 +-
sc/qa/unit/bugfix-test.cxx | 13 +++++++++++++
sc/qa/unit/data/ods/tdf98657.ods |binary
sc/source/core/tool/scmatrix.cxx | 12 +++++++++++-
5 files changed, 26 insertions(+), 3 deletions(-)
New commits:
commit 0e59494525d8e94a9b7deeb63fcbb1c04801de4c
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Mar 24 14:10:58 2016 +0100
Revert "disable the SW interpreter by default, tdf#98657"
Now the root cause of tdf#98657 is fixed, hopefully we are good to enable the
SW interpreter again...
This reverts commit 70dad291a6baf1eff59b61f9d344c10018585dd4.
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 4052479..67b72cd 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5653,7 +5653,7 @@
<desc>Determines whether Software Interpreter can be used to speed
up some operations on Calc formulas.</desc>
</info>
- <value>false</value>
+ <value>true</value>
</prop>
<prop oor:name="MacroRecorderMode" oor:type="xs:boolean" oor:nillable="false">
<info>
commit 5d644eff8f593358f9f9d21949faa630d94e5665
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Mar 24 14:06:09 2016 +0100
tdf#98657: Fix a corner case when NaN's were added to ScFullMatrix.
Change-Id: Id3befb82c39f9caacc908d664d42365ce6996054
diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk
index 861532e..e0cbf5b 100644
--- a/sc/Module_sc.mk
+++ b/sc/Module_sc.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Module_add_check_targets,sc,\
Library_scqahelper \
$(if $(and $(filter $(COM),MSC),$(MERGELIBS)),, \
CppunitTest_sc_ucalc) \
+ CppunitTest_sc_bugfix_test \
CppunitTest_sc_filters_test \
CppunitTest_sc_rangelst_test \
CppunitTest_sc_mark_test \
@@ -54,7 +55,6 @@ $(eval $(call gb_Module_add_slowcheck_targets,sc, \
CppunitTest_sc_new_cond_format_api \
CppunitTest_sc_subsequent_filters_test \
CppunitTest_sc_subsequent_export_test \
- CppunitTest_sc_bugfix_test \
CppunitTest_sc_html_export_test \
CppunitTest_sc_opencl_test \
CppunitTest_sc_copypaste \
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index f545953..0296975 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -86,6 +86,7 @@ public:
void testTdf43534();
void testTdf91979();
// void testTdf40110();
+ void testTdf98657();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testTdf64229);
@@ -94,6 +95,7 @@ public:
CPPUNIT_TEST(testTdf43534);
CPPUNIT_TEST(testTdf91979);
// CPPUNIT_TEST(testTdf40110);
+ CPPUNIT_TEST(testTdf98657);
CPPUNIT_TEST_SUITE_END();
private:
uno::Reference<uno::XInterface> m_xCalcComponent;
@@ -230,6 +232,17 @@ void ScFiltersTest::testTdf40110()
}
*/
+void ScFiltersTest::testTdf98657()
+{
+ ScDocShellRef xDocSh = loadDoc("tdf98657.", FORMAT_ODS);
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ xDocSh->DoHardRecalc(true);
+
+ // this was a NaN before the fix
+ CPPUNIT_ASSERT_EQUAL(double(285.0), rDoc.GetValue(ScAddress(1, 1, 0)));
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "/sc/qa/unit/data" )
diff --git a/sc/qa/unit/data/ods/tdf98657.ods b/sc/qa/unit/data/ods/tdf98657.ods
new file mode 100644
index 0000000..c65e1fa
Binary files /dev/null and b/sc/qa/unit/data/ods/tdf98657.ods differ
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 90fea67..7c66db7 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -3261,7 +3261,14 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, const double* pNums, rtl_uString**
continue;
}
- // Empty cell. No action required.
+ // it's a NaN, need to flush the non-NaN segment if it exists
+
+ if (pNumHead)
+ {
+ // Flush this non-NaN segment to the matrix.
+ rMat.PutDouble(pNumHead, pNum - pNumHead, nCol, pNumHead - pNums);
+ pNumHead = nullptr;
+ }
}
if (pStrHead)
@@ -3287,6 +3294,9 @@ void ScVectorRefMatrix::ensureFullMatrix()
size_t nColSize = rArrays.size();
mpFullMatrix.reset(new ScFullMatrix(nColSize, mnRowSize));
+ if (mpErrorInterpreter)
+ mpFullMatrix->SetErrorInterpreter(mpErrorInterpreter);
+
size_t nRowSize = mnRowSize;
size_t nRowEnd = mnRowStart + mnRowSize;
size_t nDataRowEnd = mpToken->GetArrayLength();
More information about the Libreoffice-commits
mailing list