summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2018-10-23clang-tidy performance-unnecessary-copy-init in dbaccess..drawinglayerNoel Grandin
Change-Id: I49a152b2aea93d30b16192260f4f659c7e5fcaee Reviewed-on: https://gerrit.libreoffice.org/62215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22Put quotes around a URL in a message to make it more obvious if it is emptyTor Lillqvist
Change-Id: I03fe3f70ee97066d9c2083d4ef091c501f241392
2018-10-22If we have encountered a "FATAL ERROR" we can afford writing a line to stderrTor Lillqvist
There is no guarantee that if something is wrong, the Application::ShowNativeErrorBox() will manage to show anything, is there? And this code might be invoked in a program that doesn't even have any GUI. So at least try to show the message on stderr, too. Change-Id: Ieb11a6f490c26c773af646ed7e9c3cf6ccb4a669
2018-10-22tdf#120249: fix escaping to handle quotes and multiple trailing backslshesMike Kaganski
Follow-up of commit f4103a42d58535e21c48ff94ab000ab0305c62e3 Change-Id: I4562386d3151875dff8e9eddf31c4af3333cefb7 Reviewed-on: https://gerrit.libreoffice.org/61245 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-22Sync extension registration on startupSamuel Mehrbrodt
There are cases where the extension registration becomes invalid (empty rdb files) which leads to extensions not starting up, although installed and active. Syncing extension repos on startup fixes that. The performance impact is negligible (1ms in my measurements). Change-Id: I10475ce6a054b43c4591b17a8486648ca6a30068 Reviewed-on: https://gerrit.libreoffice.org/61943 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-10-21tdf#120703 (PVS): handle failed (re)allocationsMike Kaganski
V769 The 'readBuf' pointer in the 'readBuf + readAll' expression could be nullptr. In such case, resulting value will be senseless and it should not be used. Check lines: 171, 166. V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'readBuf' is lost. Consider assigning realloc() to a temporary pointer. Change-Id: I2e15a1abb79516dd42d64256463333bb54eab5b8 Reviewed-on: https://gerrit.libreoffice.org/62117 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-19clang-tidy readability-container-size-emptyNoel Grandin
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422 Reviewed-on: https://gerrit.libreoffice.org/61967 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18clang-tidy readability-simplify-boolean-exprNoel Grandin
Change-Id: I78fa01a6c803dec782488490b730af3a11814d64 Reviewed-on: https://gerrit.libreoffice.org/61902 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-18Need <rtl/strbuf.hxx> for the !HAVE_FEATURE_EXTENSIONS case, apparentlyTor Lillqvist
Change-Id: I3d3c31f785ae2969660c95425419ef9fe5b893c3
2018-10-17loplugin:staticvar in cppuhelper..desktopNoel Grandin
Change-Id: I21cf6bafab6e865b90b29caa73183a8e00b538d1 Reviewed-on: https://gerrit.libreoffice.org/61865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12tdf#119739 split ConfigManager::getLocale(), getUILocale(), getWorkLocale()Eike Rathke
To prevent further confusion which is which, dbaccess UserInformation already got that wrong since ever. /org.openoffice.Setup/L10N/ooLocale is the UI locale. /org.openoffice.Setup/L10N/ooSetupSystemLocale is the work locale. Confusingly due to legacy when the setup program was a separate binary that picked the UI ooLocale and later set up the default (system) work locale as well. Change-Id: I9a05ad39f5fb65c54076ff5789ba7a2cc06ad23a Reviewed-on: https://gerrit.libreoffice.org/61725 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-10-12Conditional formatting: Allow to set the icon set CF via .uno: command.Jan Holesovsky
When .uno:IconSetFormatDialog gets a parameter, it directly creates the icon set conditional formatting with pre-selected values. Change-Id: I75dda90e5ea9c191254acc24c564cda7b27243a5 Reviewed-on: https://gerrit.libreoffice.org/56429 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/61669 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-10-12Make sure the UserInstallation/user directory exists on iOS (and Android)Tor Lillqvist
If it doesn't exist lots of things go very badly. Took a while for me to understand the mechanism, sigh. Change-Id: I40300587a5f422876cbda68c5aa98a23ed707135
2018-10-10Move the iOS CGBitmapContextCreate() call do doc_paintTile()Tor Lillqvist
Thus it now actually takes a buffer pointer also on iOS, like on Linux and Android. Less confusing, more uniform. Add a separate iOS-specific paintTileToCGContext() method to LibreOfficeKitDocumentClass that takes a CGContextRef. Adapt callers correspondingly. (The LibreOfficeLight code in particular needs the paintTileToCGContext().) Change-Id: I81084806d37b9aac9f2b2bc03d0c262e991eec81
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09Fix typosAndrea Gelmini
Change-Id: Ia2aca4e87054d2f5cc0462e07ac0717278d3c98c Reviewed-on: https://gerrit.libreoffice.org/61577 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-08desktop: move font initialization into preloadDataAshod Nakashian
Reviewed-on: https://gerrit.libreoffice.org/57160 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit bbba0902fc1f1c6bb2a7f1e6ff2b682e2fbd3cc9) Change-Id: I66840512b45e987cc7b08b07b65bdb24f2023a41
2018-10-08desktop: move dictionary preload before font initAron Budea
spell-checker is initialized during font init since e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4 Change-Id: Ia5b5223aa8cc00d0e80451142ae18a7046ad00d4 Reviewed-on: https://gerrit.libreoffice.org/57064 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-10-08desktop: initialize fonts in pre-initAshod Nakashian
Reviewed-on: https://gerrit.libreoffice.org/56573 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit e7f65920b12517b31f0c5cbfd0dcb8df96d20ba4) Change-Id: I5a3acc41196c7e0672514fa2dae00e5fc0f76a1f Reviewed-on: https://gerrit.libreoffice.org/61492 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-10-05We should call pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)) also on iOSTor Lillqvist
Change-Id: Id42d3b84ab97ec1efd9551e4d9cc5fd16ab77c80
2018-10-05Call SetOutputSizePixel() in the iOS case, tooTor Lillqvist
Change-Id: I844901f38ec1d93f4183e0678741fecdc7636139
2018-10-01tdf#120249: escape trailing backslash in argument passed to soffice.binMike Kaganski
... to avoid treating \" as in-argument " instead of end of argument See https://docs.microsoft.com/en-us/windows/desktop/api/shellapi/nf-shellapi-commandlinetoargvw Change-Id: Ie283ba04117e13bc06c5b92412a945f945e67ff3 Reviewed-on: https://gerrit.libreoffice.org/61214 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-01Change all font-based tests to depend on ooo_fontsJan-Marek Glogowski
Instead of depending on individual font packages. Most didn't depend on fonts at all. Change-Id: I190295bbecb1b44aa34aaf0874afadd35b5daeb4 Reviewed-on: https://gerrit.libreoffice.org/61159 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-09-27Draw rendered tile border here in the normally ifdeffed out snippetTor Lillqvist
Not just some stuff in one corner. When using this test code, I want to see the borders of the actual (combined) tiles that we attempt to render. Change-Id: I270d5a6b16ec717f8613def57d710b97fbd33672
2018-09-24tdf#42949 Fix IWYU warnings in include/comphelper/[a-l]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I22ba2c8aec235e34cd7835b8a0a716bf3057db7a Reviewed-on: https://gerrit.libreoffice.org/60837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-21Add some temporary test code (ifdeffed out)Tor Lillqvist
Change-Id: If5428e93bafeb97c8f8d39bf3407f34a2b0cfe20
2018-09-20Replace SAL_OVERRIDE with override in internal codeStephan Bergmann
Change-Id: Ifa446647b11fd1f1b0dc6a991b752480545634db Reviewed-on: https://gerrit.libreoffice.org/60788 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-18make sure testOpenCLCompute() doesn't fail because of a stale lockfileLuboš Luňák
If the lockfile for the testing .ods stays around, e.g. because of a crash, the next loading will fail (because no UI interaction is allowed at that point) and so the whole openCL test will fail. Change-Id: Ic193003f52e407e47cd634773b6eb4cdefcc2753 Reviewed-on: https://gerrit.libreoffice.org/60497 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-09-17loplugin:staticconstfield improvementsNoel Grandin
Change-Id: Ia0a19736dfd4500bb17b04c072710f8ee8744031 Reviewed-on: https://gerrit.libreoffice.org/60526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-15Re-think cppu::throwException() and the C++/UNO bridge on iOSTor Lillqvist
It seems that on iOS, where we don't have any Java, Python, BASIC, or other scripting, the only thing that would use the C++/UNO bridge functionality that invokes codeSnippet() was cppu::throwException(). codeSnippet() is part of what corresponds to the code that uses run-time-generated machine code on other platforms. We can't generate code at run-time on iOS, that has been known forever. Instead we have used some manually written assembler to handle it instead. We used to have a Perl script to generate a set of code snippets for different cases, different numbers of parameters of the called function and whatnot, but that went away at some stage some year ago. (It is unclear whether that broke the C++/UNO bridge on iOS, or whether the stuff continued to work even after that.) Anyway, this handwritten assembly, or the manual construction of internal data structures for exceptions, or something else, seemed to have bit-rotten. Exceptions thrown with cppu::throwException() were not catchable properly any longer. Instead of digging in and trying to understand what is wrong, I chose another solution. It turns out that the number of types of exception objects thrown by cppu::throwException() is fairly small. During startup of the LibreOffice code, and loading of an .odt document, only one kind of exception is thrown this way... (The lovely css::ucb:InteractiveAugmentedIOException.) So we can simply have code that checks what the type of object being thrown is, and explicitgly throws such an object then with a normal C++ throw statement. Seems to work. Sadly the cppu::getCaughtException() API still needs some inline assembly in the C++/UNO brige. That seems to work though, knock on wood. This commit also adds a small "unit test" for iOS, copied from cppuhelperm to ImplSVMain(). Ideally we should not copy code around of course, but have a separate unit test app for iOS that would somehow include relevant unit tests from source files all over the place. Later. Change-Id: Ib6d9d5b6fb8cc684ec15c97a312ca2f720e87069 Reviewed-on: https://gerrit.libreoffice.org/60506 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-10Generate UNO exception classes as SAL_WARN_UNUSEDStephan Bergmann
...to find more places like 09978dd1fc18ce1ae707bc9e4ea1d2745ff07b61 "clang-tidy bugprone-unused-return-value" Change-Id: Ibe8b6790c701dc8270295dd1e2cbc9023b5ce018 Reviewed-on: https://gerrit.libreoffice.org/60234 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-08clang-tidy bugprone-unused-raii in RequestHandlerNoel Grandin
The message from clang-tidy is: warning: object destroyed immediately after creation; did you mean to name the object? The guard in RequestHandler::ExecuteCmdLineRequests comes from commit cf333a878ceed18d0343520a2c65be69fc433b1f Date: Sun Jan 21 22:10:09 2018 +0300 tdf#38915: set cProcessed condition on any process outcome and I'm sure it's intention was to set the flag on exit from the function, not immediately. Change-Id: Ibf874a5774770df00b9db7f673554e7ffda55072 Reviewed-on: https://gerrit.libreoffice.org/60183 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2018-09-06loplugin:simplifyconstruct in dbaccess..drawinglayerNoel Grandin
Change-Id: I83624d8bc787aaaaf6071171c882a6e5bde70a0d Reviewed-on: https://gerrit.libreoffice.org/60075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-05Re-introduce code to use the ICU data file in the iOS app bundleTor Lillqvist
We used to have this code snippet in the TiledLibreOffice app back in the days. Then in LibreOfficeLight it was lost and forgotten (?). Clearly we need to tell ICU abouyt the data that we include as a separate file in iOS apps, and presumably any iOS app will be a LibreOffficeKit-based one, so let's do the initialistion here. Change-Id: Ib08dc9d7386789d10e8c53114e79d0b5beab7232
2018-09-05Handle passing a null pAppPath to lo_initialize() on iOSTor Lillqvist
Change-Id: I293ede0dbac4b36a1b91b86100bc11593b402d06
2018-09-05gbuild: allow recording of CppunitTests and PythonTests tooMichael Stahl
Since these don't use soffice they need to be tweaked to use RR variable. A rr git master build from some weeks ago can record all tests, except CppunitTest_dbaccess_firebird_test which fails. smoketest is a bit tricky because it spawns soffice which checks RR variable again and starts a nested rr, but fortunately there's a flag to prevent it from aborting in this situation. For UITests currently only the soffice.bin is recorded, not the python test process. The size of all the recording is about 35G per run in a --enable-dbgutil build. Change-Id: I2143618fa2181e36b6aaeded43637cb3481f5e47 Reviewed-on: https://gerrit.libreoffice.org/60032 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2018-09-05clang-tidy performance-inefficient-vector-operationNoel Grandin
Change-Id: Iebcaea7b08c5284946d83b6b6b9ed26b218025d4 Reviewed-on: https://gerrit.libreoffice.org/59992 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-31tdf#42949 Fix IWYU warnings: boost/optional in include/Gabor Kelemen
Found with bin/find-unneeded-includes a few low hanging boost/optional headers. This gets us about 75M includebloat reduction; still much to go Change-Id: I5c737631767970f9145609aad298a5d11e3fed65 Reviewed-on: https://gerrit.libreoffice.org/59840 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-08-29desktop: improve help blurb for various casesThorsten Behrens
- tdf#109202 fix was missing --convert-images-to example - its not the mimetype, but the filter name that's needed - also add backslash line continuation where example cmd line overflows Change-Id: I80a461eb4a6ae5c9268bc0f888abd43a179c7a68 Reviewed-on: https://gerrit.libreoffice.org/59722 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-28Fix typo in codeAndrea Gelmini
To complete commit: e9fa088735bfbd34bc81f1925438691f746db070 It passed "make check" on Linux Change-Id: I2772b1ac5d4024bb11f3e09e24afc566b7091fb8 Reviewed-on: https://gerrit.libreoffice.org/59693 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-27rename ENABLE_HEADLESS option to DISABLE_GUINoel Grandin
since it has nothing to do with the headless command line option, so use the name it has in the configure.ac file Change-Id: Ibf0615ed02695d6e48a797f5632e4f417c010c70 Reviewed-on: https://gerrit.libreoffice.org/59611 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16Fix typo: s/an other/another/gAndrea Gelmini
Change-Id: I203c546cfca841e7853282267190e20b60919add Reviewed-on: https://gerrit.libreoffice.org/59098 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-15Revert broken part of cd66852f6dd08631a25d15a1527a647e69ab8ce3Stephan Bergmann
"create appendCopy method in OUStringBuffer"; response_body is a std::string Change-Id: I58ab982c87fa568fdac8e3c72fbcb0e071d73228