summaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)AuthorFilesLines
2019-05-18SharePoint: Add dialog to choose opening in read-only or edit mode.Mike Kaganski9-10/+153
ViewDocument3 method takes OpenType parameter, which allows to decide if user can choose opening the document read-only or to edit. This backport of commit f60cc89ec35f8b1bf56e9f69ef15143fd002c409 does not include l10n stuff and dedicated helper executable, using dialog resource strings. Change-Id: I0ad53ba64272fb84728d2221e3dc85d3eefdda68 Reviewed-on: https://gerrit.libreoffice.org/72355 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72518
2019-05-18Make spsupp_x64 independent of shell/CustomTarget_x64Mike Kaganski6-13/+58
... in preparation for further changes. Thanks to Noel Grandin for the hint! Change-Id: I2b223322d1d42099b56a74a92e3c39631d6b581c Reviewed-on: https://gerrit.libreoffice.org/72470 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/72501 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-17Add license statementMike Kaganski1-1/+12
Change-Id: Ib7ed7b3d94c04c09debe910a76cd720802f1a6f6 Reviewed-on: https://gerrit.libreoffice.org/72475 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit fa7412039f7d89a9b15aeabb99b0f5380b690cfa) Reviewed-on: https://gerrit.libreoffice.org/72484
2019-05-16Drop obsolete commented out debug outputMike Kaganski1-1/+0
Change-Id: I60f7bbb2921b242396b4620077ca30e12a0d3b4b Reviewed-on: https://gerrit.libreoffice.org/72393 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 04b055f111be7044bdd97865a8f0b11215b25191) Reviewed-on: https://gerrit.libreoffice.org/72397 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-15Reimplement IObjectSafety from aggregate object into ancestorMike Kaganski3-142/+67
Also simplify it, don't issue warnings for now, until we understand clearly what each its option implies. Change-Id: I0d74a42b878991ad84c5c3bba36c8978d920b9be Reviewed-on: https://gerrit.libreoffice.org/72337 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit efca409b9917f290102bc0134f09fd037f705d2f) Reviewed-on: https://gerrit.libreoffice.org/72348
2019-05-15Use lambdas to initialize staticsMike Kaganski1-16/+14
Change-Id: Ib03bfd795967ba70333d71d9e5eeec97be90be79 Reviewed-on: https://gerrit.libreoffice.org/72334 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit a11536d5ea695826844581c8c8f883970e0c8294) Reviewed-on: https://gerrit.libreoffice.org/72341 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-15Check passed pointersMike Kaganski1-0/+6
Change-Id: Idf5e77e4122ad4b5b91f25c50fdaaf25e34a76ae Reviewed-on: https://gerrit.libreoffice.org/72336 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit bb62eff4b4202ac85f3366d21fb1cbef52958b6d) Reviewed-on: https://gerrit.libreoffice.org/72342 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-15Use proper VARIANT_BOOL values: VARIANT_TRUE is actually -1Mike Kaganski1-3/+10
Who was that idiot who initially used wrong values??? Hmm... oh damn, that was me :-( Change-Id: I3bfde7511bcf8adfa38ae68372f21511f21efca1 Reviewed-on: https://gerrit.libreoffice.org/72308 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 31cc28ca7c02f28b64e9d757c9fc17e2a81ba352) Reviewed-on: https://gerrit.libreoffice.org/72332
2019-05-14Implement OpenDocuments::PromptedOnLastOpenMike Kaganski1-3/+16
This prevents SharePoint from trying to download documents in browser after they were already opened by LibreOffice SharePoint integration ActiveX control. The implementation just returns true, to avoid instant refresh of the site in browser. TODO: fine-tune when understood when and why it makes sense to return false. Change-Id: I1ceae82db16ca8e418850fafd8c171ee6a2e039b Reviewed-on: https://gerrit.libreoffice.org/72266 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 430c352139b96c7f26b95d730dc19123869520ee) Reviewed-on: https://gerrit.libreoffice.org/72274 Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-04Filter out problematic file URLsStephan Bergmann2-0/+151
Change-Id: I87fd37e56326bef4888354b923407530c6f70760 Reviewed-on: https://gerrit.libreoffice.org/70177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-04tdf#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-04-03tdf#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> (cherry picked from commit 3837901ef422d432f709dd95352796a54b58aae6) Reviewed-on: https://gerrit.libreoffice.org/51633 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 873814828f8db91cf622e900a59ec1009dcc03a2)
2018-03-26Don'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> (cherry picked from commit 01c71fba5f525b035f8a723215669d499bc27a3f)
2018-03-26tdf#116074: Don't block on sending email interactivelyMike Kaganski5-25/+283
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. Reviewed-on: https://gerrit.libreoffice.org/50826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 2f061dad7f875f704e3744fc5780c1d145b22e9f) Change-Id: I4a517bd7a797e76e4c0b7ea48bb1a7b652741a81
2018-03-25Remove 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> (cherry picked from commit 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0)
2018-03-25tdf#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> (cherry picked from commit 5874c76371562c3e2d8564b1fb04df1997091d27)
2018-03-25Use Unicode for senddocMike Kaganski9-292/+79
Also removes unused code and unnecessary dependencies from it. Reviewed-on: https://gerrit.libreoffice.org/50444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit c2f7759e85f3e5cc9f56aaf03eefa0f1ba834734) Change-Id: Ib6de29358098846ca5e7330b10e67a88cfff8a6a
2018-03-19LOK: fix URL launching, so that Help buttons work.Michael Meeks2-0/+8
Change-Id: I9efe0173c35341043c3402042d9aa364a03e4fc5 Reviewed-on: https://gerrit.libreoffice.org/46419 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 2ccf578372cd77060abb6db520985165e779de3f) (cherry picked from commit 7978eb8f6efa64fb0d5fba993f029793672a78ba)
2017-12-07Handle conversion from glibc locale to BCP 47 language tagEike Rathke2-7/+28
The backend's ImplGetLocale() didn't handle variants, so ca_ES@valencia ended up as ca-ES instead of ca-ES-valencia, which made a difference with for example the UI language being set to Default resulting in only ca instead of ca-valencia, which then is also written to /org.openoffice.Setup/L10N/ooLocale during startup and obtained later. This only for the *iX branch, no idea if and what could be adjusted for Windows or MacOSX. Change-Id: I050f6f643571ccdc669fb91b06f3bb516f96e8d5 Reviewed-on: https://gerrit.libreoffice.org/45946 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c2bd06120b932bf3757f19bdf8c8d9ee8a31f557) Reviewed-on: https://gerrit.libreoffice.org/45980
2017-11-13Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-04Make Windows error reporting more robustMike Kaganski1-2/+2
https://msdn.microsoft.com/en-us/library/ms679351 describes that "it is unsafe to take an arbitrary system error code returned from an API and use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS" Previously in case when an error string would contain inserts, function returned error, so the error message wasn't shown (at least it didn't crash, thanks to nullptr as the function's last argument). As the function may fail, we now pre-nullify the buffer pointer to avoid dereferencing uninitialized pointer later (though at least for some Windows versions, the function nullifies the pointer in case of FORMAT_MESSAGE_ALLOCATE_BUFFER, but there's no explicit guarantee of this). Also release of allocated buffer is changed to recommended use of HeapFree. The code that doesn't make use of OUString is left directly calling FormatMessage, to avoid introducing new dependencies. Where it makes sense, we now use WindowsErrorString from <comphelper/windowserrorstring.hxx> Change-Id: I834c08eb6d92987e7d3d01e2c36ec55e42aea848 Reviewed-on: https://gerrit.libreoffice.org/44206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-27loplugin:includeform: shell (Windows)Stephan Bergmann44-131/+131
Change-Id: I80109e4e60b0f72efee53509d5539918cec789bd
2017-10-24loplugin:finalclasses in sfx2..svlNoel Grandin1-4/+4
Change-Id: I71b78135b3d0259657438c4401340bb35ab5c6e0 Reviewed-on: https://gerrit.libreoffice.org/43742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-24loplugin:includeform: shell (macOS)Stephan Bergmann1-3/+3
Change-Id: I2a254633124caa03d48ec9e6d21751b0b8750c0b
2017-10-23loplugin:includeform: shellStephan Bergmann11-86/+86
Change-Id: I73be2f09a4b27509b62936daa414efb51977277f
2017-10-05Rename and move SAL_U/W to o3tl::toU/WMike Kaganski3-4/+7
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-04add << operator for css::uno::ExceptionNoel Grandin2-2/+2
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-30Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*Mike Kaganski1-1/+1
This is type-safe, and allows to catch cases where a source type is changed for some reason, but reinterpret_cast masks that Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1 Reviewed-on: https://gerrit.libreoffice.org/42961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29Drop check for Windows versions we don't supportMike Kaganski6-190/+14
Since we dropped support of Vista and below in master toward 6.0, those checks are needless. Removing the code that only worked in older versions, and streamlining the resulting code. Also, use kernel32.dll version for Windows version, instead of deprecated GetVersionEx, and inconvenient VersionHelpers. Since both GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are subject to manifest-based behavior since Windows 8.1, this move will hopefully result in more reliable OS version detection. Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c Reviewed-on: https://gerrit.libreoffice.org/42905 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-28shell: use Unicode on WindowsMike Kaganski35-264/+300
Change-Id: I9f7962db320f8832879ba327108425a7592b4b77 Reviewed-on: https://gerrit.libreoffice.org/42885 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-27loplugin:redundantcast (clang-cl)Stephan Bergmann1-3/+3
Change-Id: I37e7e217d89fb51cdfe28ec37be901e20068c309
2017-09-26loplugin:cstylecast (clang-cl)Stephan Bergmann1-3/+3
Change-Id: Ic61a2d58e260e11f3698524891201e8b761c97fc
2017-09-23loplugin:flatten in sdext..stocNoel Grandin1-27/+25
Change-Id: I460e813e20a691c53738373376d3363f553bbab2 Reviewed-on: https://gerrit.libreoffice.org/42636 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-23Fix typoAndrea Gelmini1-1/+1
Change-Id: I970201eb99c56db3ac5fefb9e113c0bb3b8c754b Reviewed-on: https://gerrit.libreoffice.org/42678 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-22Windows: avoid dependence on UNICODE define; prefer W functionsMike Kaganski4-18/+28
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1 Reviewed-on: https://gerrit.libreoffice.org/42560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18Some more WIN32_LEAN_AND_MEANMike Kaganski1-0/+3
Change-Id: Iadb0ebb66809c192fb817b8c7cf2f8cdb4d0b874 Reviewed-on: https://gerrit.libreoffice.org/42419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski10-0/+28
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-16Use more WIN32_LEAN_AND_MEANMike Kaganski3-0/+7
https://msdn.microsoft.com/en-us/aa383745 Change-Id: I83528dc8e6a5e119e7aa816219d35f1ea3723b96 Reviewed-on: https://gerrit.libreoffice.org/42338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-08-31loplugin:constparams: shell (clang-cl)Stephan Bergmann2-3/+3
Change-Id: I7ffe60d53f4c4b7690efc8bec9d29a4959740d9a
2017-08-17remove unnecessary use of OUString::getStrNoel Grandin1-1/+1
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17remove UL/L suffixes from integer constants on the RHS of expressionsNoel Grandin1-2/+2
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-1/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17loplugin:useuniqueptr: shell (clang-cl)Stephan Bergmann1-4/+4
Change-Id: Icf6cd85f9e4792ad09dd1a97a8802da13da942c2
2017-07-17loplugin:unnecessaryparen: shell (clang-cl)Stephan Bergmann2-4/+4
Change-Id: If038a119b0b01bff9f452bb66e855e35c10d06eb
2017-07-17loplugin:constparams in basegfx,sax,shellNoel Grandin1-1/+1
Change-Id: I90a9d105a6db146ae64cff56983def94b9472a95 Reviewed-on: https://gerrit.libreoffice.org/40043 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05tdf#108287 replace std::bind2nd with lambdaJochen Nitschke1-14/+5
in preparation of removal of deprecated std::binary_function Change-Id: Iabb02b100975f67665be9d6d562b7206ef846107 Reviewed-on: https://gerrit.libreoffice.org/39513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03Revert "Workaround to call /app/bin/xdg-open when run under flatpak"Stephan Bergmann1-6/+1
This reverts commit 28a03248b1d1649e157b788e43dfe8326f165379 (and removes a stry empty line). There is no more need for our own /app/bin/xdg-open, as xdg-open in the freedesktop.org (and thus also GNOME) runtime (see <https://github.com/flatpak/flatpak-xdg-utils/blob/master/src/xdg-open.c>) by now knows to ask the Desktop portal, too. Change-Id: Ie4141d02ba5f43c0264afcfae9edfc2d3a8cdb16
2017-07-03loplugin:oncevar (clang-cl): shellStephan Bergmann2-4/+2
Change-Id: I594596f27aa6f223d2294586357b11595377e1fe
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke1-2/+1
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-29loplugin:oncevarStephan Bergmann1-2/+1
Change-Id: I62fbef4959390161509e20a41f687a967db6c2fe