summaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)AuthorFilesLines
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin1-1/+1
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-17kde5: remove older kde/tde plugins, and references to thatThorsten Behrens7-594/+4
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-01Simplify containers iterations in sfx2, shellArkadiy Illarionov2-21/+12
Use range-based loop or replace with STL functions Change-Id: I42361d6a73d201db8eb6dca09d79768e2d62051d Reviewed-on: https://gerrit.libreoffice.org/64389 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek1-2/+2
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-19Fix typosAndrea Gelmini2-2/+2
Change-Id: I6d51e4eb4a49a30193b904b2c7d62df1e16ea3d9 Reviewed-on: https://gerrit.libreoffice.org/63475 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-11-05tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski2-17/+12
Change-Id: I8217b1a0b6ccc29052257d54ba7844c0970ad9a4 Reviewed-on: https://gerrit.libreoffice.org/62859 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-28tdf#120703 PVS: V547 Fix activation of launched process' windowMike Kaganski1-14/+35
V547 Expression 'procHandle != nullptr' is always false. The code was nonsensical overall. First, the launched process handle was never returned by ShellExecuteExW, because SEE_MASK_NOCLOSEPROCESS wasn't used, so GetProcessId couldn't succeed. Then, nullptr window handle was passed to GetWindowThreadProcessId, thus never returning a meaningful result. This reimplements this to find the launched process' main window by first waiting for process idle (up to 1-second delay is possible), then enumerating all the top-level windows and checking their process. Change-Id: I5fb4c04147b3f9414e27650a023f7844523c18bd Reviewed-on: https://gerrit.libreoffice.org/62478 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen2-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin4-25/+25
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22pvs-studio: V794 The assignment operator should be protectedCaolán McNamara1-3/+8
Change-Id: Ia443a0e61a091d877c8da26bf7d45bf4261f8669 Reviewed-on: https://gerrit.libreoffice.org/62166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-19new throws on failureCaolán McNamara1-1/+1
Change-Id: Ida6250fc01e0bf156a81030c2f393838ced423fe Reviewed-on: https://gerrit.libreoffice.org/61998 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann4-5/+5
...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-09loplugin:constfields in shellNoel Grandin4-5/+5
Change-Id: Ib30c45bddcc58fcd0fec8b160eb925349e801df7 Reviewed-on: https://gerrit.libreoffice.org/61551 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-01loplugin:useuniqueptr in shell::SubstitutorNoel Grandin1-35/+8
Change-Id: Iee1be29bb4f6a90ccc38d2da8372046350ada438 Reviewed-on: https://gerrit.libreoffice.org/61111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-25Fix typoAndrea Gelmini1-1/+1
Change-Id: Id6f7bf29ff957455bfb2e1687a285a45529b77a0 Reviewed-on: https://gerrit.libreoffice.org/60966 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann10-23/+28
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-20Don't try to load VCL conflicting config backendsJan-Marek Glogowski2-11/+13
Since we can't load Qt4 and Qt5 based libraries in one process prevent loading the conflicting config backends based on the VCL backend. Also removes the reference to the long gone KDE3 backend. Change-Id: I7a9bc449ebf825b47882f8bd207496a2a9597608 Reviewed-on: https://gerrit.libreoffice.org/60764 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-09-18loplugin:external (macOS)Stephan Bergmann1-2/+2
Change-Id: Ib06572a844d2999e9ecd91e26abd98ecec06a0ae Reviewed-on: https://gerrit.libreoffice.org/60665 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-14kde5backend.cxx: Fix inverted logic leading to invalid writeMichael Weghorn1-1/+1
Only write to 'pFakeArgv[2]' when 'aDisplay' is NON-empty. Otherwise, the 'pFakeArgv' array only has size 2 and the write is invalid. (Found by valgrind while looking at another issue.) Change-Id: I58aff6d25c8647bc6ef346af8ac09b0b0fc030b8 Reviewed-on: https://gerrit.libreoffice.org/60476 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen4-0/+5
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-08-29Replace find_if with proper quantifier algorithmsArkadiy Illarionov2-6/+2
Change-Id: Icc820a47ac891c358883f9c01224f676c58fdd11 Reviewed-on: https://gerrit.libreoffice.org/59744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov2-10/+4
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-06Add missing sal/log.hxx headersGabor Kelemen1-0/+1
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') in files formerly omitted for oversight or non-cxx extension Change-Id: I327c573f44076c6ccfecf737eafccba2da72e1bd Reviewed-on: https://gerrit.libreoffice.org/58600 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-31Add missing sal/log.hxx headersGabor Kelemen7-0/+7
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from sfx2 to starmath Change-Id: I40ee7bfae6efdadd862319b7b693ad22c648e1c4 Reviewed-on: https://gerrit.libreoffice.org/58222 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-10tdf#42949 Fix IWYU warnings in include/osl/*hxxGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7b19938246ca8498fa300f781589bf17b3d486aa Reviewed-on: https://gerrit.libreoffice.org/56723 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-06-23tdf#96099 Remove trivial std::vector typedefs in sd, sfx2, shellArkadiy Illarionov6-25/+18
Change-Id: Ib3708c9650f273de4a2f549d2ce9f2465bd37d6c Reviewed-on: https://gerrit.libreoffice.org/56206 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-06-22teach useuniqueptr loplugin about calling delete on a paramNoel Grandin1-30/+12
which is often a useful indicator that the callers can be made to use std::unique_ptr Change-Id: Idb1745d1f58dbcf389c9f60f1a5728d7d092ade5 Reviewed-on: https://gerrit.libreoffice.org/56238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-27Fix typosAndrea Gelmini1-1/+1
Change-Id: I907e5dbcd7c62344c2c76fe2fdaf1b18ecfecee1 Reviewed-on: https://gerrit.libreoffice.org/54838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2018-05-21tdf#96099 Remove unused typedef from shell/source/tools/lngconvexArkadiy Illarionov2-34/+2
Also remove empty defs.hxx Change-Id: I35f70cc13f0198623d99cfd1e294808ac90f5f02 Reviewed-on: https://gerrit.libreoffice.org/54600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-05-18loplugin:unusedfields in sfx2Noel Grandin2-16/+0
and fix leak of HelpListener_Impl in SfxHelpWindow_Impl Change-Id: I7450be10c8deaf63b7c7f1f4359b4eaf0083bdd4 Reviewed-on: https://gerrit.libreoffice.org/54451 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-20loplugin:redundantfcast (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I2ce9f8bcf4631ea93407eeaa49ca27eed3eb8e23
2018-04-14Fix typosAndrea Gelmini2-5/+5
Change-Id: I28d9591517c324e995691139582c77b5cfdc9d77 Reviewed-on: https://gerrit.libreoffice.org/52211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-12Keep strings alive again as necessaryNoel Grandin1-0/+3
regression from commit 49eb02f07a5af44da59008a238e828b4a9532bef new loplugin:unusedvariablemore Change-Id: If92be219368a0dc33f40cd425efc6028c28c5e53
2018-04-11new loplugin:unusedvariablemoreNoel Grandin1-2/+0
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-21Fix typoAndrea Gelmini1-1/+1
Change-Id: Ib9aac2a629352a25d80061c2d4ca420e8144a94b Reviewed-on: https://gerrit.libreoffice.org/51683 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-20tdf#116516: INTERNET_PROXY_INFO always contains char* dataMike Kaganski1-4/+8
Regression from e80aef4e032f08ef0c4cfbb028bf83b81002f112 The InternetQueryOption has two variants: ANSI (A) and Unicode (W) (see https://msdn.microsoft.com/en-us/library/aa385101). INTERNET_PROXY_INFO struct we are using is defined to contain two LPCTSTR members (see https://msdn.microsoft.com/en-us/library/aa385148). When UNICODE is defined, InternetQueryOption expands to W variant, and at the same time, all MS-specific generic string types (like TCHAR or LPCTSTR) are expanded to wchar_t-based types. So, the expectation is that InternetQueryOptionW fills the struct with pointers to widechar strings. But actually this is not true: InternetQueryOptionW still returns char-based strings in the struct; so just revert partially commit above. Change-Id: I0facb1baf2a191f7bafdf185e684bfe741ca677a Reviewed-on: https://gerrit.libreoffice.org/51629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-20Fix commentMike Kaganski1-2/+2
Change-Id: I73ec0af22c19674c4b120a68c63710a1b46928ae Reviewed-on: https://gerrit.libreoffice.org/51623 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-07Don't return local variable addressMike Kaganski1-2/+2
Oversight in 2f061dad7f875f704e3744fc5780c1d145b22e9f Change-Id: I4cd4fcab7f5fa87f49ecc193a3f481fb9ac33932 Reviewed-on: https://gerrit.libreoffice.org/50857 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-03-07tdf#116074: Don't block on sending email interactivelyMike Kaganski5-20/+284
When sending e-mail using a MAPI mail client that doesn't recognize MAPI_DIALOG_MODELESS flag, and doesn't return from MAPISendMail until message compose dialog is closed (like MS Outlook 2010 and older), waiting for the senddoc process blocks UI, which is unexpected and prevents users from copying stuff from documents to the mail body. Waiting for senddoc process completion is used for two things: 1. To serialize sending multiple mails (e.g., using mailmerge); 2. To show error in case when it failed. This patch allows to avoid blocking the UI in case when compose UI is requested - i.e., user interaction with the mail client is expected, and serialization is not required. In this case, the senddoc process will show the error message itself -> no need for main application to wait for its return. The error message now includes actual error code. To avoid cases when closing main program would remove temporary attachment files before they were used by mail client, they are copied to base temporary directory (instead of default session temporary directory that gets deleted upon program shutdown). senddoc cleans up its temporaries itself. The temporary attachment files are copied to files with ASCII-only filenames, and their original filenames are passed to mail clients using MAPI. This allows to avoid cases when the filenames contain characters outside of current Windows codepage, and the mail client does not support Unicode MAPI, thus receiving wrong filename and erroring out from the send. Change-Id: I4a517bd7a797e76e4c0b7ea48bb1a7b652741a81 Reviewed-on: https://gerrit.libreoffice.org/50826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-28Remove obsolete commentMike Kaganski1-6/+0
Obsoleted by commit 7ce1e0e1ecbb1b3ec5e3cc15306a9df7e786c564 Change-Id: I479455ba704c7e2bf1df2308950e7a9b682762b6 Reviewed-on: https://gerrit.libreoffice.org/50433 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-28tdf#116074: Use modeless dialogs with supporting mailersMike Kaganski1-1/+5
When sending mail using MS Outlook, our UI gets locked until user closes the Outlook's compose message window. This patch uses Outlook 2013+ option to show modeless window. Change-Id: Ib99b4440cd20a8bff0c7cd96838b31a2d14bd804 Reviewed-on: https://gerrit.libreoffice.org/50476 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-28Use Unicode for senddocMike Kaganski9-286/+79
Also removes unused code and unnecessary dependencies from it. Change-Id: Ib6de29358098846ca5e7330b10e67a88cfff8a6a Reviewed-on: https://gerrit.libreoffice.org/50444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-02-21New loplugin:nestedunnamedStephan Bergmann1-4/+0
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-02shell: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski30-183/+6
Change-Id: Ie2391b1feed31fe9cee7dc097c57ebebab698705 Reviewed-on: https://gerrit.libreoffice.org/49049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann2-11/+10
Change-Id: I5d5bb6b57a9e9ed2c66d304c18fe7ef233aae072
2018-01-23Add KDE5 desktop backendMilian Wolff7-0/+683
This is mostly a copy of the KDE4 backend ported to Qt5/KF5. One difference is that this code will initialize the QApplication on-demand, when it's not yet available. This will allow us to use this desktop backend also within a vclplug that does not use Qt itself, such as the upcoming Gtk3/KDE5 hybrid. Change-Id: I5cf96ac5729608c82a58eead6723a38f014ba875 Reviewed-on: https://gerrit.libreoffice.org/47716 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23chmod -xTor Lillqvist1-0/+0
Change-Id: I05021e1d86412c3a0703e71f43fe2238bb094762
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann8-19/+19
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22loplugin:cstylecast (clang-cl)Stephan Bergmann1-3/+3
manual fix in macro code too difficult for current rewriting plugin Change-Id: I4a2221d0cfb64dc0a0c6619cd9bc776e283da499 Reviewed-on: https://gerrit.libreoffice.org/48316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20More loplugin:cstylecast on macOSStephan Bergmann1-2/+2
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870 Reviewed-on: https://gerrit.libreoffice.org/48216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>