summaryrefslogtreecommitdiff
path: root/shell
AgeCommit message (Collapse)AuthorFilesLines
2018-03-26tdf#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>
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
2017-06-29loplugin:oncevarStephan Bergmann1-2/+1
Change-Id: Id5309e2d06551da6df05d06e436678b570740f78
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke2-2/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-13remove TDE integration (vclplug, address book, config backend)Michael Stahl6-581/+0
It has ~no users, can't even be built on modern Linuxes, and it annoys folks who want to refactor VCL. Per ESC decision from 2017-06-08, remove --enable-tde and --enable-tdeab. Change-Id: I51ce4786f29f8fcac2e2bb2a654c41fbfbbd8afd Reviewed-on: https://gerrit.libreoffice.org/38718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-02loplugin:redundantcast (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I465469471dc95e5dd61ecafd8ee8c9424b1b8030
2017-05-30Revert those quotes that look brokenStephan Bergmann1-3/+3
...from 2b916da6cdcf3f7abe7e10f83321576ae2695954 "tdf#105204 fix shellcheck warning in shell/source/unix/misc/senddoc.sh" Change-Id: Iad55c5f4ff97f39ba117e525f2e660b537b00367
2017-05-21tdf#105204 fix shellcheck warning in shell/source/unix/misc/senddoc.shYeliz Taneroğlu1-33/+33
Change-Id: I2e402186c4a8177031a8bf80f051ef0ca70063b0 SC2006: Use $(STATEMENT) instead of legacy `STATEMENT` SC2086: Double quote to prevent globbing and word splitting. Reviewed-on: https://gerrit.libreoffice.org/37824 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-20cleanup unused css/uri/ includesJochen Nitschke1-1/+0
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9 Reviewed-on: https://gerrit.libreoffice.org/37860 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-11cid#1403658: Try harder to make Coverity Scan happyStephan Bergmann1-0/+2
Change-Id: I109f95a55875b7795fc366825b3a6bb2e897d676
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke10-10/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09loplugin:nullptr (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I6462f3e7667951ff9306ae1f8882de747148a741
2017-05-09loplugin:cppunitassertequals (clang-cl)Stephan Bergmann1-1/+1
Change-Id: Ie1dfd0791abe86ed2fd91155c129d6431392445d
2017-05-09Don't use uninitialized ProxyEntry::Port valuesStephan Bergmann1-69/+27
...and get rid of the useless ProxyEntry struct altogether Change-Id: I846f126c96343da17518686e666a7d44c6b1bef1
2017-05-04tdf#107587 Opening Hyperlink opens Browser in Background.Thomas Beck1-0/+22
Added neccessary WinAPI calls to bring called window into the Foreground. Change-Id: I080968f655e2230d1a514b3ef91bf916d904d844 Reviewed-on: https://gerrit.libreoffice.org/37196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-03remove empty commentsNoel Grandin4-48/+0
found with: git ls-files | xargs grep -Pzl '/\*\* (\*|\s| )*\*/' Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597 Reviewed-on: https://gerrit.libreoffice.org/37159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26loplugin:useuniqueptr (clang-cl)Stephan Bergmann1-5/+4
Change-Id: Ie541ecc3ec8d7032666b09aaec7d216a43ae44f1
2017-04-26loplugin:redundantcast (clang-cl)Stephan Bergmann2-2/+2
Change-Id: I4370a16ae9652d4f1e5aa3ed472cd88ad6d210c7
2017-04-26use strong_int for LanguageTypeNoel Grandin1-4/+4
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448 Reviewed-on: https://gerrit.libreoffice.org/36629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>