diff options
author | Laurent Godard <lgodard.libre@laposte.net> | 2015-09-18 17:06:29 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 16:36:05 +0100 |
commit | ddb45261590939d884ac2bcb1fd258de7b2370da (patch) | |
tree | a3d3e5c7117c48355429dbf80b421a2df3ede2a5 /sc/qa/extras | |
parent | cb81ca35d4d4db27f8bd3322fc16aa73d9cf38bb (diff) |
tdf#94617 allow to store nStart information greater than sal_Int16 limit
- preserve backward compatibility
- nDebugFlag is stored but not used when loaded
- Flag nDebugFlag set the top bit to 1
- stores the multiplier of sal_Int16 limit to reach nStart
- in load, test this flag bit
- rebuild correct nStart
- new B_CURVERSION file format for binary storage macro
- unit test for big modules
Reviewed-on: https://gerrit.libreoffice.org/18926
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit db17079fcff6f9a068c499b17f2501cc4c82d10b)
Change-Id: Iaa037982d828fef7195615e6eda546b7199a4fe8
Diffstat (limited to 'sc/qa/extras')
-rw-r--r-- | sc/qa/extras/macros-test.cxx | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index 520b31f4144d..33faa9f95484 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -118,13 +118,37 @@ void ScMacrosTest::testPasswordProtectedStarBasic() ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell); ScDocument& rDoc = xDocSh->GetDocument(); + + // User defined types + SfxObjectShell::CallXScript( xComponent, "vnd.sun.Star.script:MyLibrary.Module1.Main?language=Basic&location=document", aParams, aRet, aOutParamIndex, aOutParam); OUString aValue = rDoc.GetString(0,0,0); - CPPUNIT_ASSERT_MESSAGE("script did not change the value of Sheet1.A1", aValue == "success"); + CPPUNIT_ASSERT_MESSAGE("User defined types script did not change the value of Sheet1.A1", aValue == "success"); + + // Big Module + + SfxObjectShell::CallXScript( + xComponent, + "vnd.sun.Star.script:MyLibrary.BigModule.bigMethod?language=Basic&location=document", + aParams, aRet, aOutParamIndex, aOutParam); + + aValue = rDoc.GetString(1,0,0); + CPPUNIT_ASSERT_MESSAGE("Big module script did not change the value of Sheet1.B1", aValue == "success"); + + // far big method tdf#94617 + + SfxObjectShell::CallXScript( + xComponent, + "vnd.sun.Star.script:MyLibrary.BigModule.farBigMethod?language=Basic&location=document", + aParams, aRet, aOutParamIndex, aOutParam); + + aValue = rDoc.GetString(2,0,0); + CPPUNIT_ASSERT_MESSAGE("Far Method script did not change the value of Sheet1.C1", aValue == "success"); + xDocSh->DoClose(); } |