summaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)Author
2021-04-20tdf#128538: Open filesystem directories in Finder after allStephan Bergmann
Where option "-R" means, according to the open(1) man page: "Reveals the file(s) in the Finder instead of opening them." This appears to always reveal in Finder, even for *.app "application directories", so should not affect CVE-2019-9847.) Change-Id: I775db7bf71c09adc6570931a977b82dfee8dc95a Reviewed-on: https://gerrit.libreoffice.org/82749 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 1ff1466b055890b2ca0ff3a47262bc048ad78542) Reviewed-on: https://gerrit.libreoffice.org/82756 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114213 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2021-04-20Improve checkExtensionStephan Bergmann
Change-Id: Iff416a9c5930ad5903f7ee51a2abbc94d5f40800 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110970 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins (cherry picked from commit f456c4dacf700e064e112ef068ff7edb04239754) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110922 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-20Better handling of Java filesStephan Bergmann
Change-Id: Ifa662be39ac7d35241ee31956e2556b7ba3b5a02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106558 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 696739056f37430154d6333b8f7228d1c44d09b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106520 Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit ec5adc39cbea6d754ef68ab3d03fb16066b27e40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107060 Tested-by: Michael Stahl <michael.stahl@cib.de>
2021-04-20tdf#130216: normalize paths with .. segmentsMike Kaganski
... which obviously are rejected by SHGetFileInfoW and SHParseDisplayName that it calls internally. Change-Id: I2f5f3c675ea6aa1c2d92eef30be4399a8d600255 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87565 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87737 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-06tdf#126641: don't fail on file URLs with fragmentMike Kaganski
This only fixes part that the URL refuses to open the target file. Honoring fragment isn't fixed here, since it's the system call to ShellExecuteExW that in this case internally converts the file URL into a system path, and strips the fragment from it. Regression from commit d59ec4cd1660410fa1b18c50d2d83b1417a82ddc. Change-Id: I6c9ed27e9a5bd7f2780dd3be96f816a6e825e043 Reviewed-on: https://gerrit.libreoffice.org/76778 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 2207269a84c7c9920af3385b837ce67978c720b4) Reviewed-on: https://gerrit.libreoffice.org/76848 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit dd2b7919058fc0e23a7117d39110d3ecaaad1fb2) Reviewed-on: https://gerrit.libreoffice.org/76881 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-08-02tdf#126597 don't use modeless dialog for senddoc.exeJan-Marek Glogowski
There is already a large comment in initAttachmentList about problems with MAPI_DIALOG_MODELESS. Using MAPI_DIALOG_MODELESS with Outlook 2016 and multiple attachments sometimes produces a MAPI_E_FAILURE, but most times it crashes for me. And it's not a problem with the removed temporary files, as uncommenting that shows the same problem. And there seems to be many more problems: https://social.msdn.microsoft.com/Forums/en-US/5d8fece6-9d93-490c-9331-625c17e3291d/mapisendmailhelper-and-mapidialogmodeless But actually I don't see any blocking of LO, if I switch to using MAPI_DIALOG, as senddoc.exe already runs in the background. So this switches MAPI_DIALOG_MODELESS to MAPI_DIALOG. This reverts commit 5874c76371562c3e2d8564b1fb04df1997091d27 ("tdf#116074: Use modeless dialogs with supporting mailers"). Change-Id: Ie0f8f22196d1a174dfeada2bc4aabb1717ee16a7 Reviewed-on: https://gerrit.libreoffice.org/76155 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit e79f61340405dcc75f3fe41f727dea4ba4202c2e) Reviewed-on: https://gerrit.libreoffice.org/76611 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-24qt5: Fix buildMichael Weghorn
The utility constructor using 'StockImage::Yes' was only introduced in master commit 0f104bf33530467380044b9eb4cd3f8bd9c283f1 and is therefore not available in libreoffice-6-2 branch. Build was therefore broken by commit f10c1c648e698b48dfaa679a4909b3d9de6ed868 ("tdf#123549 Qt5 implement Qt5Menu::ShowCloseButton"), which first went unnoticed since qt5/kde5 wasn't enabled for CI builds on branch libreoffice-6-2. (This will be changed by https://gerrit.libreoffice.org/#/c/72741/ .) Also, add a missing include that lead to kde5-enabled CI builds failing [1], which I couldn't reproduce locally ("shell/source/backends/kde5be/kde5backend.cxx:190:5: error: ‘unique_ptr’ is not a member of ‘std’"). And fix more issues showing up in [2] and follow-up builds of the change that enables kde5 on the 6.2 branch [3]. [1] https://ci.libreoffice.org/job/gerrit_62/1535/ [2] https://ci.libreoffice.org/job/gerrit_62/1540/ [3] https://gerrit.libreoffice.org/#/c/72741/ Change-Id: I6a39a99114d15808b790242c96d0204916a0cc40 Reviewed-on: https://gerrit.libreoffice.org/72779 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-04-18Stop qt event loop after KDE settings have been readKatarina Behrens
Two use-cases here in kde5backend 1) kde or qt vclplug has already started qt event loop => just use this loop to read KDE settings 2) no qt event loop runs (we're most likely in gtk3_kde5 vclplug) => start a new event loop, read the settings and stop it In case 2) letting qt event loop run means subsequently all UI ops need to happen in main thread. This is problematic to enforce in non-qt-based vclplugs In both cases, cache those settings for future use - the assumption is, most of them are static during a session anyway. Change-Id: Ifa203f4cdb9a753db808f945762fb131ee83393c Reviewed-on: https://gerrit.libreoffice.org/70808 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 5a64bc2b1214e6ad8424f57576aa5752a09815d4) Reviewed-on: https://gerrit.libreoffice.org/70895 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-04-13tdf#119890 followup: Forbid HOME to be the default dirTakeshi Abe
... of user templates This is kludgy yet better than making innocent users waiting for the template dialog ~forever as pointed out in the comments in <https://gerrit.libreoffice.org/#/c/67741/>. Change-Id: I6dfdc0408effb06cc9175cd976ea6687e52a7136 Reviewed-on: https://gerrit.libreoffice.org/70709 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-04Filter out problematic file URLsStephan Bergmann
Change-Id: I87fd37e56326bef4888354b923407530c6f70760 Reviewed-on: https://gerrit.libreoffice.org/70186 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-13tdf#119890 Lookup XDG_(DOCUMENTS|TEMPLATES)_DIR correctlyTakeshi Abe
... for My Documents and My Templates. It seems customary to name XDG_*_DIR in all uppercase. This also fixes buffer overrun IIUC, as osl_readLine() does not return the newline delimiter. Change-Id: If85ca7e6abe663e29d36b65a08d358d3d7d27c4b Reviewed-on: https://gerrit.libreoffice.org/67757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-05tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski
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 Kaganski
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 Kelemen
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 Grandin
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 McNamara
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 McNamara
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 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-09loplugin:constfields in shellNoel Grandin
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 Grandin
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 Gelmini
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 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-20Don't try to load VCL conflicting config backendsJan-Marek Glogowski
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 Bergmann
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 Weghorn
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 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-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-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
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 Kelemen
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 Kelemen
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 Kelemen
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 Illarionov
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 Grandin
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 Gelmini
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 Illarionov
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 Grandin
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 Bergmann
Change-Id: I2ce9f8bcf4631ea93407eeaa49ca27eed3eb8e23
2018-04-14Fix typosAndrea Gelmini
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 Grandin
regression from commit 49eb02f07a5af44da59008a238e828b4a9532bef new loplugin:unusedvariablemore Change-Id: If92be219368a0dc33f40cd425efc6028c28c5e53
2018-04-11new loplugin:unusedvariablemoreNoel Grandin
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 Gelmini
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 Kaganski
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 Kaganski
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 Kaganski
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 Kaganski
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 Kaganski
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 Kaganski
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 Kaganski
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 Bergmann
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 Kaganski
Change-Id: Ie2391b1feed31fe9cee7dc097c57ebebab698705 Reviewed-on: https://gerrit.libreoffice.org/49049 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>