summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)Author
2017-04-13convert DateFormat to scoped enum and rename to DateOrderNoel Grandin
Change-Id: I71d7a7755a5c20d5146d1ad7e96ca22b7823173a Reviewed-on: https://gerrit.libreoffice.org/36517 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-04-13add VBA test casesZdeněk Crhonek
tests: ISARRAY, ISDATE, ISEMPTY, ISERROR, ISMISSING, ISNULL, ISNUMERIC, ISOBJECT, JOIN, LBOUND, LCASE Change-Id: I0b0dacd0d62bf00680f33866ce7ec0152eec27e0 Reviewed-on: https://gerrit.libreoffice.org/36509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-13VBA tests - INSTRREV, INT test caseZdeněk Crhonek
Change-Id: I220b8dd57927486b697b46777e20db7d2f53e487 Reviewed-on: https://gerrit.libreoffice.org/36486 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-12no need to use OUStringToOString in SAL_INFONoel Grandin
Change-Id: I707e0d72aba89b7e644def6f4c251e14f6599ad2 Reviewed-on: https://gerrit.libreoffice.org/36451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-10Clean up uses of SAL_U/SAL_W: basicStephan Bergmann
Change-Id: I755b3b781c42cc9af61c0b90621d2eb7f544df62
2017-04-09VBA tests - HEX, HOUR, IIF, INSTR test casesZdeněk Crhonek
Change-Id: Ib9e05dcfbd72f56cb3b5fb4e4760f868c008c7ac Reviewed-on: https://gerrit.libreoffice.org/36315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-09VBA tests - FORMATNUMBER functionZdeněk Crhonek
Change-Id: Ibfb00e5be9a32e3767ec4e73cdbf81f53f07b42e Reviewed-on: https://gerrit.libreoffice.org/36229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-04-07loplugin:redundantcast find cstyle arithmetic castsNoel Grandin
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577 Reviewed-on: https://gerrit.libreoffice.org/36253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06loplugin:singlevalfieldsNoel Grandin
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1 Reviewed-on: https://gerrit.libreoffice.org/36145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Fix typosAndrea Gelmini
Change-Id: I9e7f7fa6a8b89304883a843f9fb0b905f5e8a8a4 Reviewed-on: https://gerrit.libreoffice.org/36100 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-06loplugin:redundantcast find cstyle double castsNoel Grandin
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8 Reviewed-on: https://gerrit.libreoffice.org/36187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-05loplugin:constantparam part2Noel Grandin
Change-Id: I7ec4c946be52a6b56aee908426f95ecacc7b0746 Reviewed-on: https://gerrit.libreoffice.org/36072 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04Finally switch MSVC to sal_Unicode = char16_t, tooStephan Bergmann
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef Reviewed-on: https://gerrit.libreoffice.org/36065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-02add VBA tests- FIX,EXP,ERROR,DAY functionsZdeněk Crhonek
Change-Id: I339abf03f88a0b8135184a892f5200ad381310bd Reviewed-on: https://gerrit.libreoffice.org/36010 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-31tdf#106529: Revert "tdf#80731 Closing parenthesis is now detected"Katarina Behrens
This reverts commit 65e294e221e0ad1d37c6667eecb995817ace870d, which breaks several widely used Basic extensions and hundreds of anonymous macros that miss closing parenthesis here and there (cherry picked from commit 660e394b893a045a077ccded263f94a1be03fcf9) Change-Id: I5d27e6d4e7c8aea3f0762c41ede46e35a5a24aaa Reviewed-on: https://gerrit.libreoffice.org/35970 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-30remove type decorations on char literalsJochen Nitschke
they are only needed where type deduction fails. left them in defines for now. Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09 Reviewed-on: https://gerrit.libreoffice.org/35893 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30loplugin:unusedenumconstantsNoel Grandin
Change-Id: I628a0114e56ec25926bd08d159c61cfecb719a1c Reviewed-on: https://gerrit.libreoffice.org/35854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-29VBA tests - add DATEDIFF and DATEPART test caseZdeněk Crhonek
Change-Id: I3d0026e707369e435013be1d11e1366a77ff2d0b Reviewed-on: https://gerrit.libreoffice.org/35881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-28Fix typosAndrea Gelmini
Change-Id: Ibef75de246fb31884153437fe8c05e299fe5962f Reviewed-on: https://gerrit.libreoffice.org/35782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-28tdf#39468 Translate German commentsJens Carl
Translate German comments and terms in basic/ Change-Id: I8baf76ea866823a155dfa25c74149dac989c841c Reviewed-on: https://gerrit.libreoffice.org/35793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-26Fix typosAndrea Gelmini
Change-Id: Idbf0aa261b829e83d4c08a2e989a4ced871dc6de Reviewed-on: https://gerrit.libreoffice.org/35616 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-23Remove unused #include <ctype.h>Stephan Bergmann
Change-Id: I8bf3e30687e20151a9e1936e69362abfe9b3a99d
2017-03-23loplugins:redundantcast teach it about c-style typedef castsNoel Grandin
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c Reviewed-on: https://gerrit.libreoffice.org/35558 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-22Prevent calls to rtl/character.hxx functions with (signed) char argumentsStephan Bergmann
...that would implicitly be sign extended (for plain char only if it is signed), so non-ASCII char values would trigger the isUnicodeCodePoint assert. Change-Id: Iaf8024ad509e64525558e882fe3fd078cfb4ea91 Reviewed-on: https://gerrit.libreoffice.org/35523 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-22loplugin:redundantcast find redundant c-style enum castsNoel Grandin
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-20Fix CurDir on WindowsStephan Bergmann
* Allow lowercase argument. (And properly check the sal_Unicode value with rtl::isAsciiUpperCase instead of with isalpha, which would cause UB for values outside of unsigned char + EOF). * Use _wgetdcwd to get a UTF-16 path in the first place (instead of erroneously converting via createFromAscii and assuming the path only contains 7-bit ASCII characters). * At least with a MSVC 2015 Update 3 --enable-dbgutil build, a call like CurDir("A") for a non-existent drive A will cause a failure message box Microsoft Visual C++ Runtime Library Debug Assertion Failed! Program: ...\instdir\program\soffice.bin File: minkernel\crts\ucrt\src\desktopcrt\misc\getcwd.cpp Line: 225 Expression: ("Invalid Drive", 0) though, which appears it can't be intercepted---trying with a _set_thread_local_invalid_parameter_handler around the call to _wgetdcwd didn't have any effect. Change-Id: I666f84b0695152c0f2c25de3bae100e58929594a
2017-03-19Fix typos + some German translationsAndrea Gelmini
Change-Id: I1c5bb725ffdf72363279436ad9bbb88064228253 Reviewed-on: https://gerrit.libreoffice.org/35406 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-18VBA tests - add CVDATE,CVERR,DATEADD test caseZdeněk Crhonek
Change-Id: Ib6b79eb3a3daf22dd4f15427a3e8547300f8b8f9 Reviewed-on: https://gerrit.libreoffice.org/35403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-17VBA tests - add CSNG, CSTR test caseZdeněk Crhonek
Change-Id: I5e9bc24bb89cc634a3c01e8c8b23a19927e7010c Reviewed-on: https://gerrit.libreoffice.org/35341 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-03-17remove unused defines from HRC files in variousNoel Grandin
Change-Id: Ia1ba313d2438f04a84bcfcbbbcf6fffea5c1921d Reviewed-on: https://gerrit.libreoffice.org/35310 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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