summaryrefslogtreecommitdiff
path: root/include/sal
AgeCommit message (Collapse)Author
2019-05-07tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)Jens Carl
Replace OSL_VERIFY with if-statement and SAL_WARN and add some unit tests to ensure the implementation works and the replacements don't introduce some side effects. Change-Id: I4ed50eee53e4dba4d392ed2486186d48f919ce1d Reviewed-on: https://gerrit.libreoffice.org/71712 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-18tdf#43157 Clean up OSL_TRACE (replace with SAL_INFO)Jens Carl
Change-Id: Ifa196dec38d1b84ef14e9bb3a6b45d5ead72064a Reviewed-on: https://gerrit.libreoffice.org/70904 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-03-01Some more WIN32 -> _WIN32Stephan Bergmann
...at least some of which have presumably been missing from ce43d0ae9279edbf1ad108fe0d8325327a038d49 "use consistent #define checks for the Windows platform" by accident (and some just clean up comments) Change-Id: I5532685c7df96ae3c8a25b73d8064d7433964a9b Reviewed-on: https://gerrit.libreoffice.org/68580 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-19tdf#121247, tdf#121266 KDE5: Add basic support for OpenGLAleksei Nikiforov
Change-Id: Id3a5879f661a6fa51b9f9dc40af73687a8f624df Reviewed-on: https://gerrit.libreoffice.org/65310 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Jenkins
2018-12-17kde5: remove older kde/tde plugins, and references to thatThorsten Behrens
KDE4 is out of maintenance upstream since Nov. 2014, and binaries provided by TDF have switched to KDE5 as the official backend. Change-Id: I165465b56d3ba3a18912b203c06ae8fc6111c0c9 Reviewed-on: https://gerrit.libreoffice.org/60014 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-12-11Add some logging to sw calcSamuel Mehrbrodt
Change-Id: I4cadbb928ab0fbb407e9d569e77e6c20229e1810 Reviewed-on: https://gerrit.libreoffice.org/64940 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-12-08HAVE_CPP_ATTRIBUTE_NODISCARD is always true nowStephan Bergmann
...but for safety, leave the configure.ac check in for some longer. Also, save removing now-redundant SAL_WARN_UNUSED_RESULT in internal code for a follow-up commit. Change-Id: Ibe30b51c5cc4abc270f955c7c40b59f268986672 Reviewed-on: https://gerrit.libreoffice.org/64771 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07HAVE_CPP_INLINE_VARIABLES is always true nowStephan Bergmann
...but for safety, leave the configure.ac check in for some longer. Also remove now-redundant SAL_INLINE_VARIABLE again (which was LIBO_INTERNAL_ONLY). Change-Id: Id049e0cb84b4f97f5859f1b16b867b39b448dec0 Reviewed-on: https://gerrit.libreoffice.org/64772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-07HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true nowStephan Bergmann
...but for safety, leave the configure.ac check in for some longer. Also, save removing now-redundant SAL_FALLTHROUGH for a follow-up commit. Change-Id: I9bf42d237aea4c09459f28275568cf340e588607 Reviewed-on: https://gerrit.libreoffice.org/64770 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-06Remove obsolete GCC version checksStephan Bergmann
...after <https://gerrit.libreoffice.org/63951> "Bump (Linux) GCC baseline to 7.0.0". (In some cases, those checks now need to check for __clang__, which was implicitly covered in the past by Clang consistently reporting to be GCC 4.2.1.) Change-Id: I860fef8c4ca41c22a7541f0fb2d34b37d1d69bed Reviewed-on: https://gerrit.libreoffice.org/63952 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-12Add a SAL_INFO() when changing the global "lok" language tagTor Lillqvist
Change-Id: I229bb2cce38c3f67724802e31edff73e313b7457
2018-11-11[API CHANGE] Remove SAL_BOUND againStephan Bergmann
...that had been added to the stable URE interface, apparently by mistake, with 7474699aa372296da7494d1d0bec1f7dafbaae79 "contains some slightly changed macros from vos/macros.hxx", then removed with 2f0803e5869dd2d45c8d4b407017f053e83ed601 "remove unused macros, and add SAL_N_ELEMENTS", then re-introduced with d441fa1f8cc0a17a2bc166bf2f2a44f76b83a773 "remvove vos/macros.h usage". The last internal uses have now been removed with <https://gerrit.libreoffice.org/63264> "Replace uses of SAL_BOUND with o3tl::clamp". Change-Id: I0dd842533d97fa878606cbf62efb9fa46c029088 Reviewed-on: https://gerrit.libreoffice.org/63265 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-11Change {read,write}FileAt() SAL_INFO calls to use a separate log areaTor Lillqvist
Keep sal.file for the SAL_INFO logging of file system calls (open, close, rename, etc), and use sal.fileio for the (very verbose) file I/O. Change-Id: I0e166d83e20921696a8a0880f9fcbbdec55053dd
2018-09-20[API CHANGE] Remove unused SAL_FINALStephan Bergmann
...which was never meant to be used by !LIBO_INTERNAL_ONLY code, anyway Change-Id: I90225efa91c9fa047a23e2a9b73cea0b87c20594 Reviewed-on: https://gerrit.libreoffice.org/60803 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-19Make compilers combine sUNO_* vars across TUsStephan Bergmann
...by changing them from internal linkage to being inline (where available). The net effect is that compilers (that HAVE_CPP_INLINE_VARIABLES) are required to combine all uses of a given sUNO_* var across a Library, where before that was only possible if the compiler could prove that placing multiple such vars across TUs at the same address didn't change the program's behavior. (And > $ diff <(nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d ' ' -f 3 | LC_ALL=C sort) <(nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d ' ' -f 3 | LC_ALL=C sort | uniq) > 2d1 > < _ZL16sUNO_View_ViewId > 8d6 > < _ZL18sUNO_View_PageKind > 23d20 > < _ZL22sUNO_View_LockedLayers > 30d26 > < _ZL23sUNO_View_VisibleLayers > 39d34 > < _ZL25sUNO_View_PrintableLayers showed that there were duplicates, while > $ nm --def instdir/program/libsdlo.so | grep sUNO_ | cut -d ' ' -f 3 | LC_ALL=C sort | uniq | wc -l > 71 shows that only 71 of the 117 sUNO_* vars are actually used at all---there's still room for clean up.) Introduces LIBO_INTERNAL_ONLY SAL_INLINE_VARIABLE. Change-Id: Icf92116de9ea4019d298e325d2a83009317f7a4c Reviewed-on: https://gerrit.libreoffice.org/60743 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11Use [[fallthrough]] also with MSVCStephan Bergmann
Change-Id: I840de9460c164b86dcbd96b4c0f382e1a1b609a2 Reviewed-on: https://gerrit.libreoffice.org/60330 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-11Use [[nodiscard]] in SAL_WARN_UNUSED_RESULT where availableStephan Bergmann
...which required some lax placements of SAL_WARN_UNUSED_RESULT to be fixed. Also, Clang unfortunately is rather picky about the relative order of SAL_WARN_UNUSED_RESULT expanding to [[nodiscard]] and uses of the DLLPUBLIC macros (expanding to __attribute__(...) resp. __declspec(..) for clang-cl). Change-Id: Iae6ca36bef97f1864873aefdb5f05c7f5e045ad3 Reviewed-on: https://gerrit.libreoffice.org/60274 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-07Cppcheck: WNT -> _WIN32Mike Kaganski
Change-Id: Iaf26d9f3b32fd2c60bd94517e1dc12589ecab766 Reviewed-on: https://gerrit.libreoffice.org/60122 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-31At least MSVC 19.15.26726 (VS 2017 15.8.1) needs the SAL_STREAM fix tooStephan Bergmann
...that was originally introduced for libc++ in 691b6ea8e100fc55f0ff70a82511722733113a07 "Make the SAL_STREAM thing compile with clang++ -std=c++11 -stdlib=libc++". MSVC and clang-cl builds now started to fail like > [build CXX] sfx2/source/control/bindings.cxx > C:/lo-clang/core/sfx2/source/control/bindings.cxx(1333,19): error: dynamic_cast from rvalue to reference type '::std::ostringstream &' (aka 'basic_ostringstream<char, char_traits<char>, allocator<char> > &') > ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(169,6): note: expanded from macro 'SAL_STREAM' > (dynamic_cast< ::std::ostringstream & >(::std::ostringstream() << stream).str()) > ^ > C:/lo-clang/core/include\sal/log.hxx(306,20): note: expanded from macro 'SAL_INFO' > SAL_WHERE, stream) > ~~~~~~~~~~~^~~~~~~ > C:/lo-clang/core/include\sal/log.hxx(120,53): note: expanded from macro 'SAL_DETAIL_LOG_STREAM' > ::sal::detail::StreamStart() << stream) == 1) \ > ^~~~~~ [...] Change-Id: Icb311c8a61cd7e7f450a45fc7f07327e94b5d186 Reviewed-on: https://gerrit.libreoffice.org/59833 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-30Combine mysqlc and connectivity.mysqlc log areasStephan Bergmann
Change-Id: I2d13401dc21548018235bab715d54eb3ae81b51b Reviewed-on: https://gerrit.libreoffice.org/59807 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-29mysqlc: Add library to log areas and put someTamas Bunth
warnings into databasemetadata Change-Id: I4c2841e9174e738fff6b8627f8860588c7838c49 Reviewed-on: https://gerrit.libreoffice.org/59755 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-06-22tdf#42949 Fix IWYU warnings in include/sal/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I62758fd7c9d932c5a390739774b112356006a937 Reviewed-on: https://gerrit.libreoffice.org/56062 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-22db04be037b611e296ef9f2542322c52ed82d7a2b follow-up: no new log areaMike Kaganski
Change-Id: Ib0dc0240db4840d3e93f1816d4288644d9e308f0 Reviewed-on: https://gerrit.libreoffice.org/54660 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-05-22Turn debug fprint in vcl/unx/generic/fontmanager/ into SAL_INFOStephan Bergmann
...mapping OSL_DEBUG_LEVEL > 1 ones to "vcl.fonts" and OSL_DEBUG_LEVEL > 2 ones to new "vcl.fonts.detail" Change-Id: I750b4915083c4a0f9d0310a667987ff33d7fcc2a Reviewed-on: https://gerrit.libreoffice.org/54526 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-20tdf#35798: Hide empty Database fields' paragraphs (+ compat option)Mike Kaganski
With this change, Database fields that expand to empty values behave as if they are "Hidden Paragraph" fields. A compatibility option to enable this behaviour is added. The option is enabled by default, and for any non-native documents (for compatibility with other office suites). For existing (F)ODT documents, the option is disabled for those documents that don't have this setting set, to keep the layout of legacy documents. Change-Id: Ic5e8cb15a3a7d1a765a984eef4b0d97666df7dfd Reviewed-on: https://gerrit.libreoffice.org/54552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-05-04logging: add some strategic places around vcl messagesThorsten Behrens
Change-Id: I3eb1076a0dd697ceb3b4310444542f324848b358 Reviewed-on: https://gerrit.libreoffice.org/53777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-04-12Revert "Remove dead HSQLDB driver"Sophia Schröder
We cannot silently convert user data or their used file formats and then await them to accept it or reinstall an older version. Let us make a soft change instead of an hard (heart) break and avoid us to been attacked with fire and forks from our users. This reverts commit 8d381ae8d6c742a7e15bf7ad9e07b65f81728ef6. Change-Id: Ia153640935e355771acb85cf652f8fe4c21fafbb Reviewed-on: https://gerrit.libreoffice.org/52731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-10Remove dead HSQLDB driverTamas Bunth
Change-Id: Id4cfb69079f0150c9cca2626c16df7fab441d916 Reviewed-on: https://gerrit.libreoffice.org/52611 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05Make LibreOffice buildable on Haiku.Kacper Kasper
* Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-14ofz#6324 Out-of-memoryCaolán McNamara
Change-Id: I3dae862da134ef32ec16a230bc40befffff06ec2 Reviewed-on: https://gerrit.libreoffice.org/49734 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-13ofz#6287 limit palette indexCaolán McNamara
Change-Id: I0bd71d7c471d6b7f9342118dfcaa321b78df3bc2 Reviewed-on: https://gerrit.libreoffice.org/49652 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-05sal: remove unnecessary comments in types.hChris Sherlock
Change-Id: I17a42951d2fbb02d1d2bc5d7c01574051a3ac30c Reviewed-on: https://gerrit.libreoffice.org/47735 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-01Use more specific tag in SAL_INFO and SAL_WARN hereTor Lillqvist
Surely we shouldn't be using the very generic "sw" for such a feature-specific part of the Writer code. Change-Id: Id8913b9121a419f5da1f46a552fab95c903a3b13
2018-01-25Remove stdlib.h from sal/config.hStephan Bergmann
This reverts 5da3337c007e0572028283d70bad43e9a29d45c1 "readded include stdlib.h, because of missing NULL definition in many headers, #100000, #101685", which is no longer relevant. Change-Id: I544ed9a7afbf7b611bc481b8d50acca3193d93de Reviewed-on: https://gerrit.libreoffice.org/48131 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19Remove include of config_global.h from sal/config.hStephan Bergmann
(where it is not actually needed), and instead include it where needed Change-Id: I107f8d4002d3001393b89834dd30a30b0c53a792 Reviewed-on: https://gerrit.libreoffice.org/48152 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19SAL_W32 is just an alias for _WIN32Stephan Bergmann
...so consistently use the latter instead of the former Change-Id: I144d5e7c472632f93b2258461510346bc85892d9 Reviewed-on: https://gerrit.libreoffice.org/48135 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18Include android/compatibility.hxx from ubiquitous sal/config.hStephan Bergmann
...instead of having to add it to more and more individual .cxx files, as the need arises. Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94 Reviewed-on: https://gerrit.libreoffice.org/48108 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-16sal: document more logging optionsThorsten Behrens
Change-Id: I19630ddf3ee6ece9b7571d971c6cff1e86884256
2017-12-13[API CHANGE] Remove SAL_CALL_ELLIPSEStephan Bergmann
At least internally it was unused at least ever since 9399c662f36c385b0c705eb34e636a9aec450282 "initial import", it is unlikely that it ever was used for anything useful, and it is highly unlikely that it is used by 3rd-party code. Change-Id: I8b1e7e18e041164580acbb0bdba205ec1dca71d2 Reviewed-on: https://gerrit.libreoffice.org/46364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-07gpg4libre: permit multi-select encrypt certThorsten Behrens
And pass down all necessary parameters everywhere Change-Id: I152b9d84c0e35be9e5193a9a6f67de9fb86133b0
2017-11-21Various loplugin warnings in --enable-online-update=marStephan Bergmann
Change-Id: I5dabd5b65420d30b8d5b631de4d755ecf385b762 Reviewed-on: https://gerrit.libreoffice.org/45027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-21First steps for Calc parallelismTor Lillqvist
For now, formula group calculations are done in parallel threads when 1) OpenCL is not used, and 2) the environment variable CPU_THREADED_CALCULATION is set. This commit is a surely broken first step and does not actually work that well at all. Change-Id: Ia7e5019703ba89bff0695faef0f7504765061149
2017-11-08Remove obsolete "lo_warn_unused" workaroundStephan Bergmann
Per README.md, Clang 3.4 is the baseline for --enable-compiler-plugins, which is the sole consumer of the "lo_warn_unused" attribute, but Clang 3.4 already supports HAVE_GCC_ATTRIBUTE_WARN_UNUSED. Change-Id: I9654028e24852335e463c73bcb5ece5e5b54d53c
2017-11-06QT5 rename from KF5Jan-Marek Glogowski
Move out of unx, as this will eventually compile on other OS platforms. At least currently it doesn't contain platform dependant code. Change-Id: Iea0bebf574201881ea158381fe7ba8af2a9a6488
2017-11-06KF5 initial VCL pluginJan-Marek Glogowski
Something that compiles, basically just interface stubs. All used Svp classes don't use any cairo. Change-Id: I9a8858c930989438cc2a3f3346c01a7abc579d62
2017-11-03[API CHANGE] tdf#65393 Import signature line images from ooxmlSamuel Mehrbrodt
showing whether the signature behind the signature line is valid or not. Change-Id: Ia6cca62812019f26d55d234cac767a9b4b7c8175 Reviewed-on: https://gerrit.libreoffice.org/40980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-10-27tdf#111486 Fix description of SAL_ macro after EMF refactorBartosz Kosiorek
Change-Id: Ia4530d987e8555a5c09d49492e09079a3710b53b Reviewed-on: https://gerrit.libreoffice.org/43838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>