summaryrefslogtreecommitdiff
path: root/include/sal
AgeCommit message (Collapse)Author
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>
2017-10-27Remove some old KDE3 and TDE stuffJan-Marek Glogowski
Both VCL plugins are long gone. We currently just keep the desktop detection. Generally fall back to gtk in VCL detection. Change-Id: I35830868cb75d16ae7b90b20df699929cefa4636 Reviewed-on: https://gerrit.libreoffice.org/43940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-26tdf#111486 Fix description of SAL_ macros after EMF+ refactorBartosz Kosiorek
Change-Id: If235956228d7f807817d9ffff3da652bd6485ffa Reviewed-on: https://gerrit.libreoffice.org/43834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-10-25kde5: rename classes and other relevant data: KDE[4]->KDE5Katarina Behrens
add log area too Change-Id: I187c04c8646ec9c9264d84938e1ccf3a1cbd62f1
2017-10-23loplugin:includeform: UNO API include filesStephan Bergmann
Change these back to consistently use the "..." form to include other UNO API include files, for the benefit of external users of this API. Change-Id: I9c9188e895eb3495e20a71ad44abfa2f6061fa94
2017-10-13sw dbg_lay: make it easer to match log entries with code locationsMiklos Vajna
Also warn when logging stops due to a limit, not because the layout finished. Change-Id: Ifd44901602edec001839ab4ee88f459b45e36da6 Reviewed-on: https://gerrit.libreoffice.org/43362 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski
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-02lok - sc: row/column headers are updated fasterMarco Cecchetti
Now the computation of the row/column headers data exploits the cached row/col positions in HeightHelper/WidthHelper. That makes updating row/column headers at the bottom of the document as fast as at the top even for very big spreadsheets. Change-Id: I27381b520aaed68662e4d07c5879046d182c70e6 Reviewed-on: https://gerrit.libreoffice.org/40451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-10-02lok - sc: document size as sum of row heights/col widths in pixelMarco Cecchetti
Grid lines, cursor overlay, row/col headers are all computed by summing up row heights / col widths converted to pixels. On the contrary the document size was converted to pixel only at the end after having summed up heights/widths in twips. All that lead to have a document height/width greater than the position of the last row/col, with the scrolling in online going unplesantly far beyond the last row/column. This patch change the way the document size is computed, so that the spreadsheet height/width matches the position of the last row/column. Moreover it exploits the cache-like structure for row/col positions introduced in a previous commit. Change-Id: Ibb2cc6a7b592e359a0b1202dc9bea1dd4c421354 Reviewed-on: https://gerrit.libreoffice.org/40448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-10-02lok - sc: a cache-like structure for row/col positions in the documentMarco Cecchetti
ScPositionHelper provides the ability to insert (and remove) row- position pairs where the position is in pixel and related to the spreadsheet top. In this way one can compute a new row position by starting from the nearest row presents in this cache-like data structure. It offers also the ability to invalidate the cache by removing all cached data below a given row or position. This data structure can be used for columns, too. Change-Id: Ifd66a003680ef9a3babf46ae952221c04451be9a Reviewed-on: https://gerrit.libreoffice.org/40447 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-10-02lokdialog: Better dialog rendering APIPranav Kant
After painting the dialog, also write width and height of the rendered dialog. The dialog is rendered always on the top left of the given canvas, so client can crop the canvas accordingly. Change-Id: If052058a6db8a85d4e28ec88cffcca05564b17f0
2017-09-19sal: fix numerous doxygen warningsMichael Stahl
Change-Id: I2fd3fb7b67a62d349ff917466b08c75c19dcbff6
2017-09-19Assert active Tasks on scheduler de-initJan-Marek Glogowski
This shuts down the VCL scheduler later in the DeInitVCL call and asserts active pending tasks, as these will never be processed after shutdown. There is currently a TODO whitelist, so the unit tests still pass but probably most of these should be fixed. No task in the list looks critical - all seem to do some idle / cleanup work. This also processes all the Idles before shutdown. All seem to be of type sfx::SfxItemDisruptor_Impl. Change-Id: I9cc484a525cc2bacd54c4f271f86997517393e92 Reviewed-on: https://gerrit.libreoffice.org/40533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-19PDF signing: don't fail unittest on invalid certificatesMike Kaganski
Without this, expired/not yet valid certificates, as well as certificates without private key, make test needlessly fail. Change-Id: Ic8ff85db54f1f1b1fb49fde82424f597f1555c96 Reviewed-on: https://gerrit.libreoffice.org/42434 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-13sax: allow some debug logging in FastParserMichael Stahl
Multi-threading makes this difficult; have it print synchronously where it is in the input when setting: SAL_LOG="+INFO.sax.fastparser+WARN" SAX_DISABLE_THREADS=1 Change-Id: I8c77974acb2b4d4e273fc9c0f273c345d8feb2ff
2017-09-06Clean up sal/backtrace.hxxStephan Bergmann
Change-Id: Id78e9c0ca29ff2e52591f3d446431ac23c20ab7a Reviewed-on: https://gerrit.libreoffice.org/41926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-03Fix leak BacktraceState (enable-dbgutil)Julien Nabet
buffer is created from sal/osl/unx/backtraceapi.cxx with: 70 auto b1 = new void *[maxDepth]; 71 int n = backtrace(b1, static_cast<int>(maxDepth)); 72 return std::unique_ptr<BacktraceState>(new BacktraceState{ b1, n }); and from sal/osl/w32/backtrace.cxx with: 79 auto pStack = new void *[maxDepth]; 80 // https://msdn.microsoft.com/en-us/library/windows/desktop/bb204633.aspx 81 // "CaptureStackBackTrace function" claims that you "can capture up to 82 // MAXUSHORT frames", and on Windows Server 2003 and Windows XP it even 83 // "must be less than 63", but assume that a too large input value is 84 // clamped internally, instead of resulting in an error: 85 int nFrames = CaptureStackBackTrace( 0, static_cast<ULONG>(maxDepth), pStack, nullptr ); 86 87 return std::unique_ptr<BacktraceState>(new BacktraceState{ pStack, nFrames }); Introduced with: https://cgit.freedesktop.org/libreoffice/core/commit/?id=bc9a2ba677ce3fcd46c2bbef6e8faeacb14292c1 Change-Id: Iea0528f5d2b38ff1f3dc4bd50ff035bb100ab981 Reviewed-on: https://gerrit.libreoffice.org/41854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-01Fix typosAndrea Gelmini
Change-Id: I4496faa9ce7cad393bf06ca789099b045aea2741 Reviewed-on: https://gerrit.libreoffice.org/41785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-16assert on duplicate listener in SfxListenerNoel Grandin
To enable finding the source of the duplicate calls, I add new SAL API (only for internal use) to retrieve and symbolise stack backtraces. The theory is that it relatively cheap to just store a backtrace, but quite expense to symbolise it to strings. Note that the backtrace() library we use on Linux does not do a particularly good job, but it gives enough information that developers can use the addr2line tool to get more precise info. Explanation of fixes in the code that triggered the assert: In SwFrameHolder, we need to only call StartListening() if the pFrame member is actually changing. We also need to call EndListening() on the old values when pFrame changes. In SwNavigationPI, there is already a StartListening() call in the only place we assign to m_pCreateView. In ImpEditEngine, we need to ignore duplicates, because it is doing a ref-counting thing. By storing duplicates on the listener list, it doesn't need to keep track of which stylesheets its child nodes are using. Given that it therefore will see duplicate events, there is probably some performance optimisation opportunities here. In MasterPageObserver::Implementation::RegisterDocument, we seem to be getting called multiple times with the same SdDrawDocument, so just check if we've been registered already before calling StartListening() In SvxShape::impl_initFromSdrObject, do the same thing we do elsewhere in this class, i.e. only call StartListening() if the model has changed. Change-Id: I7eae5c774e1e8d56f0ad7bec80e4df0017b287ac Reviewed-on: https://gerrit.libreoffice.org/41045 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-10xmlsecurity: Log unknown xml elements for ooxmlSamuel Mehrbrodt
Change-Id: I0daf81ac91da1d6206282e486298d059b937bb21 Reviewed-on: https://gerrit.libreoffice.org/40819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-08-10Sort list lexicographicallyStephan Bergmann
Change-Id: Ib52b66544cd3f0bed1742369404eced28b8b5904
2017-08-10Remove excess SAL_INFOsStephan Bergmann
Change-Id: I21aa7c7878c4ec1371cec4738d2482cc101020a1
2017-08-09SAL_RETURNS_NONNULL: handle old clang not understanding returns_nonnull attrMiklos Vajna
Seen on the macOS baseline. Change-Id: Ibfd4a848b2f31bb782a83c523c72ccf7de4e0e6d Reviewed-on: https://gerrit.libreoffice.org/40902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-17cppu: remove unnecessary LOG_LIFECYCLE_* macrosChris Sherlock
Change-Id: I0f19cf7045e6ff2906404a73ce710e42800c0a72 Reviewed-on: https://gerrit.libreoffice.org/39994 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>