summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2017-03-11add VBA test CINT,CLNG functions testsZdeněk Crhonek
Change-Id: I69f0144006e4ed226e8b158c0cc9f60dda0a9184 Reviewed-on: https://gerrit.libreoffice.org/35060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-11replace macros and use scoped enumJochen Nitschke
use OUStringLiteral to store format names. just create ResMgr, no need to check if its gone. Change-Id: Ie3e33bc70b975d8ee49f47dcf23737ca56652f1a Reviewed-on: https://gerrit.libreoffice.org/35007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-10add VBA COS function test caseZdeněk Crhonek
Change-Id: I9014e068576d68613da6a70526dcb5b8e278e3f1 Reviewed-on: https://gerrit.libreoffice.org/35027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-06VBA test CHOOSE functionZdeněk Crhonek
Change-Id: Ieb76595199ea1f6c23924d4860228fe5f4d30df1 Reviewed-on: https://gerrit.libreoffice.org/34909 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-04VBA test CDATE, CDBL functionZdeněk Crhonek
Change-Id: Id45930e6d329a0b1142bfde612c1a089390e4817 Reviewed-on: https://gerrit.libreoffice.org/34868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-03Remove redundant 'inline' keywordStephan Bergmann
...from function definitions occurring within class definitions. Done with a rewriting Clang plugin (to be pushed later). Change-Id: I9c6f2818a57ccdb361548895a7743107cbacdff8 Reviewed-on: https://gerrit.libreoffice.org/34874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-03Fix typosAndrea Gelmini
Change-Id: Iaefa094c82006346897f5563ac3ddcdc60ab68a3 Reviewed-on: https://gerrit.libreoffice.org/34809 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01typesafe wrappers for css::i18nutil::TransliterationModulesNoel Grandin
and related css::util::SearchOptions2 The TransliterationModules enum has it's constants spread over multiple UNO enum/constant-collections - TransliterationModules and TransliterationModulesExtra, which means that most code simply uses sal_Int32. Wrap them up into a better bundle so that only the lowest layer needs to deal directly with the UNO constants. Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b Reviewed-on: https://gerrit.libreoffice.org/34582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01add VBA functions tests - ABS,ARRAY, ASC, ATN, CBOOLZdeněk Crhonek
Change-Id: I8a0b8b833ba32b9d27773748b3bbd8bbc07d1959 Reviewed-on: https://gerrit.libreoffice.org/34696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-02-28new loplugin unoanyNoel Grandin
Change-Id: I5d6c4a67cb2a09e7cd5bd620c6b262d188701b89 Reviewed-on: https://gerrit.libreoffice.org/34714 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28VBA: unit test for PtrSafe and compiler directivesJustin Luth
#If Vba7 Declare PtrSafe Function xx #Else Declare Function xx #End if Change-Id: I807efb9fa68b5ac50f2bd59ba7cfa45c499af189 Reviewed-on: https://gerrit.libreoffice.org/34522 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-28VBA: allow and ignore compiler directivesJustin Luth
Instead of erroring out on this: #If Win64 Then Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll" #Else Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" #End If just treat the # commands as remarks and continue on. This type of coding will become more common as 64bit versions of Office require such constructs. Change-Id: I63bfb8cbe9ad3ef35bab4c041d9d94daa7fbba18 Reviewed-on: https://gerrit.libreoffice.org/34518 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-02-27add VBA CHR() test caseZdeněk Crhonek
Change-Id: I9e7aefdd0309fd4f209fba6fb4f698b098856d01 Reviewed-on: https://gerrit.libreoffice.org/34133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-02-27VBA: accept the PtrSafe keywordJustin Luth
64bit MSOffice VBA7 requires the PtrSafe Declare attribute #If Win64 Then Declare PtrSafe Function aht_apiGetOpenFileName Lib "comdlg32.dll" #Else Declare Function aht_apiGetOpenFileName Lib "comdlg32.dll" #End If Accept this new keyword to enable compatibility with macros adjusted to work in a 64bit MSOffice environment. Change-Id: I9e64cb5339075cdda2ec91e8128fd0a35d458432 Reviewed-on: https://gerrit.libreoffice.org/34519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
2017-02-21Fix typos/translations, following 04644956e53dAndrea Gelmini
No automatic tools Change-Id: I3a6d18760f90c4ee02b9380758f97f6fca6c4428 Reviewed-on: https://gerrit.libreoffice.org/30874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-02-21loplugin:subtlezeroinit: basicStephan Bergmann
Change-Id: I3d5f157db315fce3492ff6ce88e8ded763af944e
2017-02-17fix windows buildNoel Grandin
after commit dc21a49ea3a5a655e6bf70860b1b99c20e5b7473 "convert SbxDecimal::CmpResult to scoped enum" Change-Id: I874976a30a57589cabd37f659a48a81933d867a7
2017-02-17convert SbxDecimal::CmpResult to scoped enumNoel Grandin
Change-Id: Id2d887c3ce4316a223497ef6790ca326983c4817
2017-02-17convert INVOKETYPE to scoped enumNoel Grandin
and drop unused SetProp enumerator Change-Id: Ic8a71991f6a4e08d0189d2eb93580b0c33204d1b
2017-02-17convert SbxNameType to scoped enumNoel Grandin
and drop unused enumerators Change-Id: I2b47828b2146fcda335f1dc1c1f61a1139abbe19
2017-02-15Drop :: prefix from std in [a-b]*/Tor Lillqvist
Change-Id: I0422aaf39bbce889c95ed9a81a0784cb03a1badd Reviewed-on: https://gerrit.libreoffice.org/34320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann
Change-Id: Ie7b5bb82868f517d056907567dd8e53a34d8a0b0 Reviewed-on: https://gerrit.libreoffice.org/34273 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-15Support MSVC 15.0David Ostrovsky
New compiler changes quite some stuff: * Compiler detection done based on different registry key * .NET SDK detection done based on different registry key * Msbuild installation directory changed * Merge modules installation directory changed * SDK number in registry doesn't match the directory name: (registry key: 10.0.14393, directory name: 10.0.14393.0) * Compiler, include and library location directories changed * Architecture specific directory changed: x64 instead of amd64 * Compiler own include directory must be added with -I option * To force usage of SDK 10 (8.1 is selected per default) new switch WindowsTargetPlatformVersion is passed to msbuild, to avoid patching VC project files with this line: <WindowsTargetPlatformVersion><SDK>/WindowsTargetPlatformVersion> Known issues: * Firebird is broken: http://paste.openstack.org/show/594333 Change-Id: I148d7932aff43bbbd07bd493504df974726234c2 Reviewed-on: https://gerrit.libreoffice.org/31279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2017-02-13tdf#42982 Make UNO error reporting more descriptiveSaurav Sachidanand
Change-Id: I0fae43ca1ab23f35e75fd6b88215940596aae09f Reviewed-on: https://gerrit.libreoffice.org/33227 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-11Misplaced #endifStephan Bergmann
...ever since 79d3bc479950127ecfd40f73978c0fc84c1e7908 "INTEGRATION: CWS visibility03: #i45006# Moved from svtools/source/sbx/", at least Change-Id: If39462e5907817d6a77c98b212d5031610716a7c
2017-02-10Remove MinGW supportStephan Bergmann
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-02-09loplugin:staticmethodsTor Lillqvist
Change-Id: I46d24d74e48806368f1726688747f0872100c438
2017-02-09split getApplicationBasicManager into get and getOrCreateCaolán McNamara
Change-Id: I8e35594104ba85470eda387bc227e88bf77ccffd
2017-02-09Reapply "create ErrorHandlerFlags scoped enum for error handling flags""Noel Grandin
This effectively reverts commit 32cae6a2eaa41568888df9c8fc5605debd8d704a. Change-Id: I15bb0a5c4acaeee6d47dd93a71601d9687d701bc Reviewed-on: https://gerrit.libreoffice.org/34028 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-08replace localresource of strings and keys with StringArrayCaolán McNamara
Change-Id: I402f5485af0c1e60677b8291c879bc7ca14633d3
2017-02-08basic: another SOLARIS check here converted to __sunMichael Stahl
Change-Id: Iec76b096cfcab4bd45b77bdb1438776bf5de69ca
2017-02-07Revert "remove ugly operator* in DynamicErrorInfo"Michael Stahl
This reverts commit b5e3f8a5fa98a249ecd50021c33cf2a5c7a3b4fc. The problem is this: ==24217== Conditional jump or move depends on uninitialised value(s) ==24217== at 0x29A25FCE: SfxObjectShell::SetError(unsigned int, rtl::OUString const&) (objmisc.cxx:220) ==24217== by 0x29A35E6E: SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (objstor.cxx:2300) ==24217== by 0x29A3705C: SfxObjectShell::DoLoad(SfxMedium*) (objstor.cxx:765) ==24217== by 0x29A6BC48: SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (sfxbasemodel.cxx:1802) The commit is bogus because it introduces a DynamicErrorInfo::GetErrorCode(), which overloads ErrorInfo::GetErrorCode(), which is used at least in DynamicErrorInfo_Impl::RegisterEDcr() and used to return a constructor argument of DynamicErrorInfo but now returns pImpl->lErrId, which is what this statement is trying to initialize. Ultimately this causes my clang+ASAN build to fail because the uninitialized error code happens to be detected as a mere Warning: Test name: testMathMalformedXml::Import assertion failed - Expression: !xComponent.is() - loading succeeded: sw/qa/extras/ooxmlimport/data/math-malformed_xml.docx Change-Id: I9141144e0bc356ee54279948f2fce036d1831a86
2017-02-07Revert "create ErrorHandlerFlags scoped enum for error handling flags"Michael Stahl
This reverts commit 05e78bde26d8b8b257ed22a0ce20c5b386a629d1. Depends on the other commit that needs reverting
2017-02-07create ErrorHandlerFlags scoped enum for error handling flagsNoel Grandin
Change-Id: I30c80979c87bad7bc98f36a158c31c88d80d1caf Reviewed-on: https://gerrit.libreoffice.org/33991 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07Our GetSystemTicks can now again return negative 32-bit values on WindowsTor Lillqvist
See 93bde3156284df4419c49447cbf455de9d74f00a . Change-Id: Ib41c2d525faab2bedab10f91c3a4f62f94870e10
2017-02-07remove ugly operator* in DynamicErrorInfoNoel Grandin
I can see why you'd want to hide this horrible tunnelling of information with objects registering themselves in a global list. Urrgh. Change-Id: Ib151a0d2d5a4508dc456e52883e488ce56d9a095 Reviewed-on: https://gerrit.libreoffice.org/33984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-07Revert "[API CHANGE] return sal_uInt64 from GetSystemTicks in basic"Noel Grandin
This reverts commit fce604c8ae11b462113305aba080d77f8193cfea, and fixes tdf#105735 - xray ThisComponent no longer works in the process. It turns out Basic doesn't support sal_uInt64 very well, so lets rather have a small possibility of bad timestamps instead of broken scripts. Change-Id: Ic00485bd517a4fc61e05632001c9a5f92e05ddd6 Reviewed-on: https://gerrit.libreoffice.org/33972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-06Add missing #includesStephan Bergmann
...and remove some unncessary using directives/declarations, in preparation of removing now-unnecessary #includes from cppumaker-generated files, post e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception specifications". Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
2017-02-05Related tdf#105473: Crash in: ScRangeList::operator[]Julien Nabet
fixes this bt: 3 0x00002aaaab314ef2 in __GI___assert_fail (assertion=assertion@entry=0x2aaaaf8dc448 "index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())", file=file@entry=0x2aaaaf8ac488 "/home/julien/lo/libreoffice/include/rtl/ustring.hxx", line=line@entry=678, function=function@entry=0x2aaaaf8dc800 <rtl::OUString::operator[](int) const::__PRETTY_FUNCTION__> "sal_Unicode rtl::OUString::operator[](sal_Int32) const") at assert.c:101 4 0x00002aaaaf810383 in rtl::OUString::operator[] (this=this@entry=0x55555d39c9f8, index=index@entry=0) at /home/julien/lo/libreoffice/include/rtl/ustring.hxx:678 5 0x00002aaaaf822f4e in SbiScanner::NextSym (this=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/scanner.cxx:572 6 0x00002aaaaf82771e in SbiTokenizer::Next (this=this@entry=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/token.cxx:339 7 0x00002aaaaf827d23 in SbiTokenizer::Peek (this=0x55555d39c9d0) at /home/julien/lo/libreoffice/basic/source/comp/token.cxx:266 8 0x00002aaaaf8175d0 in SbiExpression::Unary (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:581 9 0x00002aaaaf8178a4 in SbiExpression::Exp (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:633 10 0x00002aaaaf81792c in SbiExpression::MulDiv (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:647 11 0x00002aaaaf8179b6 in SbiExpression::IntDiv (this=this@entry=0x55555d43cea0) at /home/julien/lo/libreoffice/basic/source/comp/exprtree.cxx:666 Change-Id: Ib56063b3106bd077cda215e34ab763bae1f33c33 Reviewed-on: https://gerrit.libreoffice.org/33933 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-03makeAny->Any in basctl..chart2Noel Grandin
Change-Id: Ief1cdffbfc59ab4e35ac945d020772ff84c50d61 Reviewed-on: https://gerrit.libreoffice.org/33867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-02loplugin:useuniqueptrStephan Bergmann
Change-Id: I3a246a22baaac8195dc1b94c42994de7d80e8336
2017-02-02convert method names in tools::SvRef to be more like our other..Noel Grandin
reference classes, uno::Reference and rtl::Reference. Specifically rename Is()->is() and Clear()->clear(). Change-Id: Icb7e05e2d09cb9977121508b837ba0961dabb4ae Reviewed-on: https://gerrit.libreoffice.org/33576 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-31teach lolugin:stringconstant about calling constructorsNoel Grandin
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27Just pass in OUString directlyStephan Bergmann
Change-Id: Idf7d63672e8b330499e53c1395dedb92d25bb76a
2017-01-27Just pass in OUString directlyStephan Bergmann
Change-Id: Id9bd288080fdd5ed4dfaee77b697954ad7bc2458
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-24loplugin: unnecessary destructor: basctl..codemakerNoel Grandin
Change-Id: Iadcfa9bc4fe9efb8d24d6d6afaf2b9b3def0bc3c Reviewed-on: https://gerrit.libreoffice.org/33452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, basicStephan Bergmann
Change-Id: Ic3e265e05c69942c5c1c7d1b83f65f2cbe35ca1f
2017-01-19clear ARRAY_VS_SINGLETON coverity warningsCaolán McNamara
experiment to see if this clears them Change-Id: I91a74e06f621d3012b564cad87586ba74b0367ca
2017-01-16new loplugin: useuniqueptr: basicNoel Grandin
Change-Id: I5a9806e8dd79431f14d6861c8f4d65f828398f07 Reviewed-on: https://gerrit.libreoffice.org/33145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>