summaryrefslogtreecommitdiff
path: root/basic
AgeCommit message (Collapse)AuthorFilesLines
2017-11-17inline SbxMAXSALUINT64 and friendsNoel Grandin2-21/+21
which don't offer any value Change-Id: Ie8082abc80ffd0e7719f4fa9a0d5f93203628ee5 Reviewed-on: https://gerrit.libreoffice.org/44798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-15Fix typosAndrea Gelmini1-1/+1
Change-Id: I8bdced3fa572074aedabdcfce841adf525ae8b81 Reviewed-on: https://gerrit.libreoffice.org/44710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-10loplugin:finalclasses in basic,basegfxNoel Grandin3-12/+7
Change-Id: Iff223782fa0ded0fe46b8b7af35bfd21f331015f Reviewed-on: https://gerrit.libreoffice.org/44535 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04loplugin:constparams in various(1)Noel Grandin5-6/+6
Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b Reviewed-on: https://gerrit.libreoffice.org/44261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01loplugin:constantparam in basic,basctlNoel Grandin16-38/+32
Change-Id: If918c42d4b82d78c07786cfa47c74d0dfb7493d6 Reviewed-on: https://gerrit.libreoffice.org/44131 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27Another ImpGetIntntlSep() fix, tdf#81671 follow-upEike Rathke2-2/+3
Change-Id: I9c056a137ab873f677e374d75c4e2f06bf370f21
2017-10-27Fix build of Windows-only code, tdf#81671 follow-upEike Rathke1-1/+2
Change-Id: I68a468857c529e8cab80d4453832dc9f4b3657d8
2017-10-27Handle decimalSeparatorAlternative in BASIC ImpScan,..., tdf#81671Eike Rathke1-12/+22
Change-Id: I73ff2bf624ba7c8d88c9419a109c340806bd31f5
2017-10-26vcl: make MapMode constructor explicitMichael Stahl1-1/+1
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: basicStephan Bergmann10-15/+15
Change-Id: I6fbba5c4619eec7ae03fed65a18974faa0f190af
2017-10-23overload std::hash for OUString and OStringNoel Grandin5-7/+6
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-21loplugin:redundantcast handle dynamic_castNoel Grandin3-5/+5
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb Reviewed-on: https://gerrit.libreoffice.org/43621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-17Seems that testMiscOLEStuff() works only as 64-bit on a current Windows 10Tor Lillqvist2-29/+5
Change-Id: Ib43f8c185d2a2e9e93f34d918d6f9461586cf6a6
2017-10-10basic: consistently use "" and <> in include directivesMike Kaganski57-151/+151
Change-Id: I147c0e9b9b1e09af593f54799e45e1348cd40716 Reviewed-on: https://gerrit.libreoffice.org/43298 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski5-43/+40
Previosly (since commit 9ac98e6e3488e434bf4864ecfb13a121784f640b) it was expected to gradually remove SAL_U/W usage in Windows code by replacing with reinterpret_cast or changing to some bettertypes. But as it's useful to make use of fact that LibreOffice and Windows use compatible representation of strings, this commit puts these functions to a better-suited o3tl, and recommends that the functions be consistently used throughout Windows-specific code to reflect the compatibility and keep the casts safe. Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6 Reviewed-on: https://gerrit.libreoffice.org/43150 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin3-8/+9
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03Replace more reinterpret_cast with SAL_W/SAL_UMike Kaganski2-2/+2
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*Mike Kaganski3-11/+5
This is type-safe, and allows to catch cases where a source type is changed for some reason, but reinterpret_cast masks that Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1 Reviewed-on: https://gerrit.libreoffice.org/42961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski1-2/+1
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski1-9/+9
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-20Bin some noise comments and ASCII graphicsTor Lillqvist7-92/+2
Change-Id: Ib0e786b0e8401da3e3c93bf254727411774e8f43
2017-09-19iOS, solved code never reached (sbxvalue.cxx)jan Iversen1-0/+2
used #ifndef to avoid "code never reached" Change-Id: I3f3d6f9aa31a263b783528e2921133ed526146c9
2017-09-19Clean up a couple of overly verbose SAL_INFOsTor Lillqvist1-12/+1
Change-Id: I2b17bfb95f687617967d4e43356d39aa3bb6e041
2017-09-18Some more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874 Reviewed-on: https://gerrit.libreoffice.org/42419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-17use more default copy ctorsJochen Nitschke1-6/+0
if ctor should be private or protected explicitly default them. boost::optional has copy ctors, so use them. Change-Id: If1855626b297e739afef0dc5ad57958f7ad199bc Reviewed-on: https://gerrit.libreoffice.org/42363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13Enable -Wunreachable-codeStephan Bergmann1-48/+55
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-08clang-tidy modernize-use-emplace in b*Noel Grandin4-16/+16
Change-Id: I51e0369ba2e1fe0b7c934531f71d3bda95ba09ec Reviewed-on: https://gerrit.libreoffice.org/42109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08oovbaapi: create XOval and XLine shape typesTamas Bunth1-1/+1
This is needed in order to make "TypeOf myLine Is Line" or similar expressions return the expected "true" value. The implementation of the basic interpreter of TypeOf uses XTypeProvider to determine the type of an object by getting the last part of the type name. E.g. "ooo:vba::msforms::XLine" is determined as a "Line". That's why I created the XLine and XOval blank classes. TypeOf doc: https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/typeof-operator Change-Id: Ia49cc92d672e30d0126f02d61a55a956ac1425f0 Reviewed-on: https://gerrit.libreoffice.org/42083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-09-01Replace list by vector in dllmgr-x86-x64 (basic)Julien Nabet2-8/+6
Change-Id: I169590700474100e88f2e287f205ce7cbadedabe Reviewed-on: https://gerrit.libreoffice.org/41797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-01Replace list by vector in methods.cxx (basic)Julien Nabet1-8/+8
Change-Id: I75ad4d22dd6ff95e244fbffc1fc20ae208b2ecd1 Reviewed-on: https://gerrit.libreoffice.org/41796 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-31loplugin:constparams: basic (clang-cl)Stephan Bergmann1-4/+4
Change-Id: Ia84473360333cb4905692a4d9d0358c93acebff8
2017-08-29rename SBX errorcodes to BASICNoel Grandin22-398/+398
Change-Id: Ia6c2d2379a2f6e9b1109e2c04edd5cdd9dcf242f Reviewed-on: https://gerrit.libreoffice.org/41706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29move all the basic errcodes to one fileNoel Grandin16-1/+17
Change-Id: Ic3353c80ac9fdbd17f17503b1c973c9a7cef0c7f Reviewed-on: https://gerrit.libreoffice.org/41617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-27convert code-class in ErrCode to scoped enumNoel Grandin1-1/+1
Change-Id: I9aa8703921308d6fee8bae9ee2d7b29e19181cc7 Reviewed-on: https://gerrit.libreoffice.org/41601 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-25Allow non-modal Dialogs during FileImport/LoadArmin Le Grand2-4/+4
When opening a file that triggers Dialogs (e.g. cannot read/repair/FileType) the Frame from which it was initialized gets blocked. This irritates quite some people. Changed this to a non-modal Dialog so that the user can continue to work with all opened docs, open new ones, close and print/PDF/export these. Change-Id: I048d3de3369527cec20d26396b87439254764b8a Reviewed-on: https://gerrit.libreoffice.org/41534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2017-08-25no need to use ERRCODE_RES_MASK hereNoel Grandin1-128/+128
the relevant usage sites already call GetRest() before comparing Change-Id: I5e8ce3a3c2b6972810aa527356f6350c61b8bd63 Reviewed-on: https://gerrit.libreoffice.org/41470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-24VBA tests-add VAL,VARTYPE,WEEKDAY,WEEKDAYNAME,YEAR testsZdeněk Crhonek6-0/+420
Change-Id: I3f1803617a2bdeaab9922ebb375ec4fd67318d20 Reviewed-on: https://gerrit.libreoffice.org/41499 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-23convert message box style bits to scoped enumNoel Grandin2-20/+19
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since commit 6456f1d81090dd5fe44455c09ae3ede7ec6ac38a Date: Fri Feb 4 14:52:54 2011 +0100 ka102: added/removed files for SVG import and module cleanup Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962 Reviewed-on: https://gerrit.libreoffice.org/41412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17Fix typosAndrea Gelmini1-1/+1
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3 Reviewed-on: https://gerrit.libreoffice.org/41194 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin2-10/+7
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin2-2/+2
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-16tdf#39468 Translate German comments/termsJens Carl1-1/+1
Change-Id: I3c8d8ba10de007429b1cdf26f5e8b207f7cc5eea Reviewed-on: https://gerrit.libreoffice.org/41201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-11new loplugin:deadclassNoel Grandin1-56/+0
look for classes which only have copy/move constructors, and so are effectively dead Change-Id: I0b844f301e2200c2b40031856bfdb0b0e2c8f77d Reviewed-on: https://gerrit.libreoffice.org/41039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11convert std::map::insert to std::map::emplaceNoel Grandin4-9/+9
which is considerably less verbose Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b Reviewed-on: https://gerrit.libreoffice.org/40978 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08VBA functions tests-SYD, TIMESERIAL, TIMEVALUE, TRIM, TYPENAME, UBOUND,UCASEZdeněk Crhonek8-0/+486
Change-Id: I7ea7757291d996375584ef05d822701737020b1c Reviewed-on: https://gerrit.libreoffice.org/40894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-05Fix typosAndrea Gelmini1-3/+3
Change-Id: Ib7f43bf17ab8b9fb9d961a908d7620b50826a975 Reviewed-on: https://gerrit.libreoffice.org/40688 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-03VBA tests- add functions STRING,STRREVERSE,SWITCHZdeněk Crhonek4-0/+216
Change-Id: Ibba3b5cabee31af44f0e8dda5a11f152ab0cfe01 Reviewed-on: https://gerrit.libreoffice.org/40730 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-02VBA tests - STR and STRCOMP functionsZdeněk Crhonek3-0/+173
Change-Id: I09daaa8be3687bf838f569849542d47c85907d1e Reviewed-on: https://gerrit.libreoffice.org/40687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2017-08-02remove unnecessary use of 'this->'Noel Grandin1-1/+1
Change-Id: I5c115389af7d24c18ddaf5fbec8c00f35017a5b4 Reviewed-on: https://gerrit.libreoffice.org/40671 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>