sc/qa/unit/subsequent_export-test.cxx |   12 +-----------
 sc/source/core/tool/interpr1.cxx      |   12 ++++++------
 sc/source/core/tool/interpr2.cxx      |    8 ++++----
 solenv/gbuild/CppunitTest.mk          |    2 ++
 solenv/sanitizers/ubsan-suppressions  |    1 +
 5 files changed, 14 insertions(+), 21 deletions(-)

New commits:
commit f2033c28f4ddb5984fc9b2374486f229f296d5f6
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Aug 17 13:21:11 2016 +0100

    enable password export tests under macosx
    
    gerrit says they build with this cert folder
    disable variable in place
    
    Change-Id: Ibf711a01e6c055613c65dd94d85b523e7c8b5acd

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 60131bc..8cbb1fa 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -84,14 +84,10 @@ public:
     virtual void setUp() override;
     virtual void tearDown() override;
 
-#if !defined MACOSX && !defined DRAGONFLY
     ScDocShellRef saveAndReloadPassword( ScDocShell*, const OUString&, const 
OUString&, const OUString&, SfxFilterFlags );
-#endif
 
     void test();
-#if !defined MACOSX && !defined DRAGONFLY
     void testPasswordExport();
-#endif
     void testConditionalFormatExportODS();
     void testConditionalFormatExportXLSX();
     void testColorScaleExportODS();
@@ -178,9 +174,7 @@ public:
 
     CPPUNIT_TEST_SUITE(ScExportTest);
     CPPUNIT_TEST(test);
-#if !defined(MACOSX) && !defined(DRAGONFLY)
     CPPUNIT_TEST(testPasswordExport);
-#endif
     CPPUNIT_TEST(testConditionalFormatExportODS);
     CPPUNIT_TEST(testConditionalFormatExportXLSX);
     CPPUNIT_TEST(testColorScaleExportODS);
@@ -294,7 +288,6 @@ void ScExportTest::registerNamespaces(xmlXPathContextPtr& 
pXmlXPathCtx)
     }
 }
 
-#if !defined MACOSX && !defined DRAGONFLY
 ScDocShellRef ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const 
OUString &rFilter,
     const OUString &rUserData, const OUString& rTypeName, SfxFilterFlags 
nFormatType)
 {
@@ -329,7 +322,6 @@ ScDocShellRef 
ScExportTest::saveAndReloadPassword(ScDocShell* pShell, const OUSt
     OUString aPass("test");
     return load(aTempFile.GetURL(), rFilter, rUserData, rTypeName, 
nFormatType, nFormat, SOFFICE_FILEFORMAT_CURRENT, &aPass);
 }
-#endif
 
 void ScExportTest::test()
 {
@@ -352,7 +344,6 @@ void ScExportTest::test()
     xDocSh->DoClose();
 }
 
-#if !defined MACOSX && !defined DRAGONFLY
 void ScExportTest::testPasswordExport()
 {
     ScDocShell* pShell = new ScDocShell(
@@ -363,7 +354,7 @@ void ScExportTest::testPasswordExport()
 
     ScDocument& rDoc = pShell->GetDocument();
 
-    rDoc.SetValue(0,0,0, 1.0);
+    rDoc.SetValue(0, 0, 0, 1.0);
 
     sal_Int32 nFormat = FORMAT_ODS;
     OUString aFilterName(getFileFormats()[nFormat].pFilterName, 
strlen(getFileFormats()[nFormat].pFilterName), RTL_TEXTENCODING_UTF8) ;
@@ -377,7 +368,6 @@ void ScExportTest::testPasswordExport()
 
     xDocSh->DoClose();
 }
-#endif
 
 void ScExportTest::testConditionalFormatExportODS()
 {
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 5532192..f192b1e 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -21,6 +21,8 @@
 
 # Cap the number of threads unittests use.
 export MAX_CONCURRENCY=4
+# Disable searching for certificates by default
+export MOZILLA_CERTIFICATE_FOLDER=0
 
 gb_CppunitTest_UNITTESTFAILED ?= 
$(GBUILDDIR)/platform/unittest-failed-default.sh
 gb_CppunitTest_PYTHONDEPS ?= $(call gb_Library_get_target,pyuno_wrapper) $(if 
$(SYSTEM_PYTHON),,$(call gb_Package_get_target,python3))
commit 34d7a1d9bf0866b9dddb684e723d9f1e5e9a3697
Author: Caolán McNamara <caol...@redhat.com>
Date:   Wed Aug 17 15:10:59 2016 +0100

    revert div by 0 ubsan hackarounds now
    
    Change-Id: I6497a87d3071f91d5465033d2dc6ecafaa6461f4
    
    Revert "use div() instead of /0 to content ubsan"
    
    This reverts commit fa293f7d6792a2beab048461c8a067e9ca980bb8.
    
    Revert "use div() instead of /0 to content ubsan"
    
    This reverts commit e043cce9a48c1e4f4dd232a58de64f03d1d3919f.
    
    Revert "use div() instead of /0 to content ubsan"
    
    This reverts commit ebe04c075649c677b55941e3b4e57fbca150b5db.
    
    Revert "use div() instead of /0 to content ubsan"
    
    This reverts commit fb2c146752074b132d665e40343a08dcb2e6672e.

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index bec54db..52db341 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1697,7 +1697,7 @@ void ScInterpreter::ScTan()
 
 void ScInterpreter::ScCot()
 {
-    PushDouble(div(1.0, ::rtl::math::tan(GetDouble())));
+    PushDouble(1.0 / ::rtl::math::tan(GetDouble()));
 }
 
 void ScInterpreter::ScArcSin()
@@ -1737,7 +1737,7 @@ void ScInterpreter::ScTanHyp()
 
 void ScInterpreter::ScCotHyp()
 {
-    PushDouble(div(1.0, tanh(GetDouble())));
+    PushDouble(1.0 / tanh(GetDouble()));
 }
 
 void ScInterpreter::ScArcSinHyp()
@@ -1774,22 +1774,22 @@ void ScInterpreter::ScArcCotHyp()
 
 void ScInterpreter::ScCosecant()
 {
-    PushDouble(div(1.0, ::rtl::math::sin(GetDouble())));
+    PushDouble(1.0 / ::rtl::math::sin(GetDouble()));
 }
 
 void ScInterpreter::ScSecant()
 {
-    PushDouble(div(1.0, ::rtl::math::cos(GetDouble())));
+    PushDouble(1.0 / ::rtl::math::cos(GetDouble()));
 }
 
 void ScInterpreter::ScCosecantHyp()
 {
-    PushDouble(div(1.0, sinh(GetDouble())));
+    PushDouble(1.0 / sinh(GetDouble()));
 }
 
 void ScInterpreter::ScSecantHyp()
 {
-    PushDouble(div(1.0, cosh(GetDouble())));
+    PushDouble(1.0 / cosh(GetDouble()));
 }
 
 void ScInterpreter::ScExp()
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 37d8465..6581198 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -1883,11 +1883,11 @@ double ScInterpreter::ScGetRmz(double fRate, double 
fNper, double fPv,
     else
     {
         if (bPayInAdvance) // payment in advance
-            fPayment = div((fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) 
) ) * fRate,
-                (::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) 
- fRate));
+            fPayment = (fFv + fPv * exp( fNper * ::rtl::math::log1p(fRate) ) ) 
* fRate /
+                (::rtl::math::expm1( (fNper + 1) * ::rtl::math::log1p(fRate) ) 
- fRate);
         else  // payment in arrear
-            fPayment = div((fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) 
) ) * fRate,
-                ::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) ));
+            fPayment = (fFv + fPv * exp(fNper * ::rtl::math::log1p(fRate) ) ) 
* fRate /
+                ::rtl::math::expm1( fNper * ::rtl::math::log1p(fRate) );
     }
     return -fPayment;
 }
diff --git a/solenv/sanitizers/ubsan-suppressions 
b/solenv/sanitizers/ubsan-suppressions
index 529f77c..05adbd3 100644
--- a/solenv/sanitizers/ubsan-suppressions
+++ b/solenv/sanitizers/ubsan-suppressions
@@ -13,6 +13,7 @@
 # UBSAN_OPTIONS environment variable (and making sure to compile with
 # -fsanitize-recover=float-divide-by-zero):
 
+float-divide-by-zero:sc/source/core/tool/interpr1.cxx
 float-divide-by-zero:sc/source/core/tool/interpr2.cxx
 float-divide-by-zero:scaddins/source/analysis/analysis.cxx
 float-divide-by-zero:scaddins/source/analysis/financial.cxx
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to