sc/qa/extras/macros-test.cxx | 11 ++++------- sc/qa/unit/data/contentCSV/user-defined-function.csv | 1 + sc/qa/unit/data/ods/user-defined-function.ods |binary sc/qa/unit/helper/qahelper.cxx | 4 +++- sc/qa/unit/subsequent_filters-test.cxx | 7 +++++++ sc/source/core/opencl/formulagroupcl.cxx | 2 -- 6 files changed, 15 insertions(+), 10 deletions(-)
New commits: commit ac604d212512e45923df247661f965a910291cc0 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Mon Jan 12 11:29:43 2015 +0100 remove unused variable Change-Id: If22f2d90644f2c03f1b027c73574a857cea890c1 diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index d407a79..581bd24 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -3959,8 +3959,6 @@ public: CLInterpreterResult launchKernel() { - CLInterpreterResult aRes; // invalid by default. - if (!isValid()) return CLInterpreterResult(); commit 731a9aab0fa42ed42b5470e2c6f7e9fc6b1e3a85 Author: Raal <r...@post.cz> Date: Mon Jan 12 11:25:00 2015 +0100 add first test for user defined functions currently disabled as we have a crash on exit in the test related to the star basic code Change-Id: If321561a117ea2c55107916c9cb5e99a2c07bdc6 diff --git a/sc/qa/unit/data/contentCSV/user-defined-function.csv b/sc/qa/unit/data/contentCSV/user-defined-function.csv new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/sc/qa/unit/data/contentCSV/user-defined-function.csv @@ -0,0 +1 @@ +8 diff --git a/sc/qa/unit/data/ods/user-defined-function.ods b/sc/qa/unit/data/ods/user-defined-function.ods new file mode 100644 index 0000000..1976c85 Binary files /dev/null and b/sc/qa/unit/data/ods/user-defined-function.ods differ diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index e0ade4c..c64cac1 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/text/textfield/Type.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> +#include <com/sun/star/document/MacroExecMode.hpp> using namespace com::sun::star; using namespace ::com::sun::star::uno; @@ -546,11 +547,12 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite, SfxMedium* pSrcMed = new SfxMedium(rURL, bReadWrite ? STREAM_STD_READWRITE : STREAM_STD_READ ); pSrcMed->SetFilter(pFilter); pSrcMed->UseInteractionHandler(false); + SfxItemSet* pSet = pSrcMed->GetItemSet(); if (pPassword) { - SfxItemSet* pSet = pSrcMed->GetItemSet(); pSet->Put(SfxStringItem(SID_PASSWORD, *pPassword)); } + pSet->Put(SfxUInt16Item(SID_MACROEXECMODE,::com::sun::star::document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN)); SAL_INFO( "sc.qa", "about to load " << rURL ); if (!xDocShRef->DoLoad(pSrcMed)) { diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx index 87978d5..13c616d 100644 --- a/sc/qa/unit/subsequent_filters-test.cxx +++ b/sc/qa/unit/subsequent_filters-test.cxx @@ -481,6 +481,13 @@ void ScFiltersTest::testFunctionsODS() testFile(aCSVFileName, rDoc3, 0, PureString); xDocSh->DoClose(); + + // crashes at exit while unloading StarBasic code + // xDocSh = loadDoc("user-defined-function.", ODS); + // xDocSh->DoHardRecalc(true); + // ScDocument& rDocUserDef = xDocSh->GetDocument(); + // createCSVPath("user-defined-function.", aCSVFileName); + // testFile(aCSVFileName, rDocUserDef, 0); } void ScFiltersTest::testFunctionsExcel2010() commit 964ddc1469fb7fb7f1c4b66ad8c1479c6283d56e Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Sat Jan 10 20:35:12 2015 +0100 std::cout to SAL_INFO Change-Id: I92c48f71baa24cef3b061b9bb6853b99ea1546d4 diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index c2948e7..2c6ac2b 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -69,7 +69,6 @@ void ScMacrosTest::testMSP() const OUString aFileNameBase("MasterScriptProviderProblem.ods"); OUString aFileName; createFileURL(aFileNameBase, aFileName); - std::cout << "MasterScriptProviderProblem (fdo#67547) test" << std::endl; uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("Failed to load MasterScriptProviderProblem.ods", xComponent.is()); @@ -92,7 +91,7 @@ void ScMacrosTest::testMSP() OUString sResult; aRet >>= sResult; - std::cout << "Result is " << sResult << std::endl; + SAL_INFO("sc.qa", "Result is " << sResult ); CPPUNIT_ASSERT_MESSAGE("TestMSP ( for fdo#67547) failed", sResult == "OK" ); xDocSh->DoClose(); } @@ -102,7 +101,6 @@ void ScMacrosTest::testStarBasic() const OUString aFileNameBase("StarBasic.ods"); OUString aFileName; createFileURL(aFileNameBase, aFileName); - std::cout << "StarBasic test" << std::endl; uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument"); CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is()); @@ -124,7 +122,6 @@ void ScMacrosTest::testStarBasic() aParams, aRet, aOutParamIndex, aOutParam); double aValue; rDoc.GetValue(0,0,0,aValue); - std::cout << "returned value = " << aValue << std::endl; CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("script did not change the value of Sheet1.A1",2.0, aValue, 0.00001); xDocSh->DoClose(); } @@ -259,15 +256,15 @@ void ScMacrosTest::testVba() SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent); CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); - std::cout << "about to invoke vba test in " << OUStringToOString( aFileName, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl; + SAL_INFO("sc.qa", "about to invoke vba test in " << aFileName); SfxObjectShell::CallXScript( xComponent, testInfo[i].sMacroUrl, aParams, aRet, aOutParamIndex, aOutParam); OUString aStringRes; aRet >>= aStringRes; - std::cout << "value of Ret " << OUStringToOString( aStringRes, RTL_TEXTENCODING_UTF8 ).getStr() << std::endl; - CPPUNIT_ASSERT_MESSAGE( "script reported failure",aStringRes == "OK" ); + SAL_INFO("sc.qa", "value of Ret " << aStringRes); + CPPUNIT_ASSERT_MESSAGE( "script reported failure", aStringRes == "OK" ); pFoundShell->DoClose(); if ( bWorkbooksHandling ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits