summaryrefslogtreecommitdiff
path: root/embedserv/source/inprocserv
AgeCommit message (Collapse)AuthorFilesLines
2024-06-16Simplify a bitMike Kaganski1-15/+15
Change-Id: Ibb0165d0ce1ec1159a7d5446f746c4cdfcd0d748 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168916 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-16Remove some unneeded castsMike Kaganski1-1/+1
This also changes the API used in WriteLibraryToRegistry. Change-Id: Iba4c20567275a64684be8695c771e4c5535956ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168912 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-15tdf#161585: fix DllRegisterServer implementationMike Kaganski1-59/+18
The buffer was prepared with a wrong length (one too few spaces); thus, the resulting registry key path was wrong, and opening it failed. While at it, use a normal WinAPI to stringify GUIDs, and simplify code. Change-Id: I9a51a5aa70791106055c615fd15a32e5e07847a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168903 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-02tdf#143148 Use of #pragma once instead of include guards.sahilbutoal081-4/+1
Change-Id: I975ad0a41dbcf39121b266e99b466193386d6b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142046 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2022-10-29tdf#147021: SAL_N_ELEMENTS changed to std::sizeinsanetree1-2/+2
Change-Id: I5633e4bb3658864abde49df1c65b93a2b4592631 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141437 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
2022-01-05Use GetModuleHandleExW instead of GetModuleHandleWMike Kaganski1-1/+4
... following commit d75bf2c7703d6a741f04e4a3fc5a6180428f53b2 Date: Wed Jan 05 13:20:09 2022 +0300 tdf#146554: use GetModuleHandleExW instead of GetModuleHandleW Change-Id: I37c989de37c28123ca692145a429b6ba03202f99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128002 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Value is never nullptr - no need to use pointer and checkMike Kaganski1-79/+73
Change-Id: Ia3eac25536a16a756486fffe75735d94e2987177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127088 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Drop ComSmart and use sal::systools::COMReferenceMike Kaganski5-419/+188
Change-Id: Ib4f5d160b66c01caa507f536fb487bc5ee527815 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127045 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Drop unused CSGuardMike Kaganski1-19/+0
Change-Id: Ic822345127569a5e08b3dfe80f8e80f2ea49d613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126985 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Move ULONGGuard where it's usedMike Kaganski2-19/+19
Change-Id: I2b440da8cb9b8cc48904f94af0e7468f620dfb21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127047 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18Drop unused WriteDebugInfo declarationMike Kaganski1-2/+0
Change-Id: I53a6b51fdb1c1d801974da56813b8842384a1c2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126986 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-01Drop FAR/NEAR from 16-bit WinAPI timesMike Kaganski2-6/+6
Change-Id: Idf71c662138c281333a83cc76a9d75cbf086f362 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110236 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-13tdf#123936 Formatting files in module embedserv with clang-formatPhilipp Hofer1-14/+15
Change-Id: I475628cbec4c22a4b5ec535991d4f68154e3919e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105665 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2019-12-05loplugin:external (clang-cl)Stephan Bergmann1-0/+5
...plus loplugin:consttobool and loplugin:fakebool fallout Change-Id: Ie3d8121815c080b13bea6d9deca1eb138ca56138 Reviewed-on: https://gerrit.libreoffice.org/84515 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-26loplugin:consttobool (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I81fea38cd737a8be74e6ece333ca37cc434a1c33 Reviewed-on: https://gerrit.libreoffice.org/83765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-19loplugin:fakebool (clang-cl)Stephan Bergmann2-2/+2
...plus follow-up loplugin:implicitboolconversion and loplugin:redundantcast Change-Id: I9fc9c5cb46fbb50da87ff80af64cb0dfda3e5f90 Reviewed-on: https://gerrit.libreoffice.org/83207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-08Avoid C++20 comparison operator overloading ambiguities (clang-cl -std=c++2a)Stephan Bergmann2-13/+18
The main problem was the non-explicit inprocserv::ComSmart<T>::operator T*() that caused ambiguities between inprocserv::ComSmart<T>::operator ==(const T*) and the built-in operator == taking two (cv-qualified) T*. Many uses of that non-explicit conversion operator could be covered by an explicit bool conversion operator, but some needed the introduction of a get() function. Also, one of the operator == was used by the C++20 overload resolution in a way that it now needs to return bool. (And the other functions returning BOOL could be cleaned up, too.) Change-Id: I8065f0955a60207c2bd6d8e583d13bc15f324f38 Reviewed-on: https://gerrit.libreoffice.org/82273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-02-Werror,-Wmicrosoft-exception-spec (clang-cl)Stephan Bergmann2-80/+80
No idea why that started to show up now, but C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/um/combaseapi.h contains > #define STDMETHOD(method) virtual COM_DECLSPEC_NOTHROW HRESULT STDMETHODCALLTYPE method while C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/um/winnt.h contains > #define STDMETHODIMP HRESULT STDMETHODCALLTYPE which caused failures like > [build CXX] embedserv/source/inprocserv/dllentry.cxx > embedserv/source/inprocserv/dllentry.cxx(261,40): error: 'QueryInterface' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmicrosoft-exception-spec] > STDMETHODIMP InprocEmbedProvider_Impl::QueryInterface( REFIID riid, void ** ppv ) > ^ > embedserv/source/inprocserv/dllentry.cxx(143,15): note: previous declaration is here > STDMETHOD(QueryInterface)(REFIID riid, void ** ppvObj) override; > ^ Change-Id: I0fe3554c2da4089bf0f883e1132d6f2ee95ae2c3 Reviewed-on: https://gerrit.libreoffice.org/79970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-10clang-tidy: Fix suspicious catches of WIP unhandled-self-assignment checkTamás Zolnai1-0/+3
Change-Id: I1cb16b180f4cc5bf4d65485f03c44a06414d3580 Reviewed-on: https://gerrit.libreoffice.org/70481 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-03-27loplugin:typedefparam (clang-cl)Stephan Bergmann4-10/+10
Change-Id: I07604028845c49cc084927e21db7f21c5d053bab Reviewed-on: https://gerrit.libreoffice.org/69796 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-26loplugin:indentation (clang-cl)Stephan Bergmann1-2/+2
Change-Id: I94689e4eed290b4505d2caba2d9802ef7fb6cffd Reviewed-on: https://gerrit.libreoffice.org/68378 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-21o3tl::make_unique -> std::make_unique in dbaccess...frameworkGabor Kelemen1-3/+1
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Iad5a422bc5a7da43d905edc91d1c46793332ec5e Reviewed-on: https://gerrit.libreoffice.org/66545 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-18tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-1/+1
Change-Id: I60bb778a88dd5619efd4858eb74d56d28616c777 Reviewed-on: https://gerrit.libreoffice.org/63520 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-22pvs-studio: V716 Suspicious type conversion in return statementCaolán McNamara1-5/+2
https://docs.microsoft.com/en-us/windows/desktop/api/objidl/nf-objidl-irunnableobject-isrunning has IRunnableObject::IsRunning as returning BOOL unlike ::Run which returns HRESULT Change-Id: I992d8ba33502eff56b582e1cb9b73f6227c383b8 Reviewed-on: https://gerrit.libreoffice.org/62169 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann1-0/+2
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-02-01embedserv: MSVC: pragma warning: make more specific, remove obsoleteMike Kaganski2-8/+0
Change-Id: I0abd5662648b09f31164d919688e17a651bf78c8 Reviewed-on: https://gerrit.libreoffice.org/48976 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-24loplugin:emptyif (clang-cl)Stephan Bergmann2-7/+0
Change-Id: I8ddf764f9e155c037e25855b7d6efc49eb494179 Reviewed-on: https://gerrit.libreoffice.org/48483 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-27loplugin:includeform: embedserv (Windows)Stephan Bergmann3-4/+4
Change-Id: I98bd95a46e645cf61f81d66faa1f700675e538bd
2017-10-05loplugin:blockblock (clang-cl)Stephan Bergmann1-27/+25
Change-Id: I210c322ab44057e45e2b75b3ce3d13529fb62d13
2017-09-30Use explicit function names for fooA/fooW WinAPI; prefer fooWMike Kaganski1-20/+20
We should only use generic foo function name when it takes params that are also dependent on UNICODE define, like LoadCursor( nullptr, IDC_ARROW ) where IDC_ARROW is defined in MSVC headers synchronised with LoadCursor definition. We should always use Unicode API for any file paths operations, because otherwise we will get "?" for any character in path that is not in current non-unicode codepage, which will result in failed file operations. Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633 Reviewed-on: https://gerrit.libreoffice.org/42935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18Some more WIN32_LEAN_AND_MEANMike Kaganski2-0/+7
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-14loplugin:redundantpointerops (clang-cl)Stephan Bergmann1-1/+1
Change-Id: I5d4a1c3746b0eec02e022e5ffefd1a30a01948cd
2017-02-10Remove MinGW supportStephan Bergmann1-11/+5
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-23loplugin:useuniqueptrStephan Bergmann2-10/+12
Change-Id: I510731d7364a9fb670782a743cdefc4582e8c593
2016-10-16clang-cl loplugin: embedservStephan Bergmann6-306/+271
Change-Id: I9901dac882a74453015881ded2355ff0a51b50d5 Reviewed-on: https://gerrit.libreoffice.org/29868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-04Silence -Werror,-Wnon-virtual-dtorStephan Bergmann1-1/+3
Change-Id: I46f7b68aded50abc0015b458507adbf84d0ffe76
2016-02-09Remove excess newlinesChris Sherlock2-6/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-07cppcheck: noExplicitConstructorCaolán McNamara5-9/+11
Change-Id: Ifdcb1cc12645d6cdba81d16f94f0268696187cde Reviewed-on: https://gerrit.libreoffice.org/21201 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-12-08Resolve Linker Warning LNK4104Mike Kaganski1-0/+5
See https://msdn.microsoft.com/en-us/library/e821azx1.aspx Some export symbols should be PRIVATE Also, don't export DLLMain. It is internal function used by CRT, and not intended to be exported. Change-Id: I48139b985aa2ee499c2005d8b0d966a2cc6dcd0c Reviewed-on: https://gerrit.libreoffice.org/20419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2015-11-18-Werror,-Wduplicate-decl-specifier (extern "C" already in STDAPI)Stephan Bergmann1-2/+2
Change-Id: I634debc05a24e0d519200fc91a77d50f36b9af38
2015-09-05cppcheck: fix some redundantCondition warningsJulien Nabet1-1/+1
Change-Id: If53d33fb4d9ca9dc1babb9043bd07c5d29fe74c2 Reviewed-on: https://gerrit.libreoffice.org/18353 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin1-2/+1
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-04-15remove unnecessary use of void in function declarationsNoel Grandin4-11/+11
ie. void f(void); becomes void f(); I used the following command to make the changes: git grep -lP '\(\s*void\s*\)' -- *.cxx \ | xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;' and ran it for both .cxx and .hxx files. Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2014-05-30fdo#68849: Add header guards to all include filesJens Carl1-0/+5
Added header guards to files in directories desktop/*, and embedserv/* Change-Id: Idaffcc0539b84962ed7c132cb20078512799d433 Reviewed-on: https://gerrit.libreoffice.org/9556 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-15Resolves fdo#70681: fixincludeguards.pl: all that's leftThomas Arnhold2-4/+4
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5 Reviewed-on: https://gerrit.libreoffice.org/9360 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-02-26Remove visual noise from embedservAlexander Wilms3-16/+16
Change-Id: I4914fd2f3e067fcc10fc110f172d3e33daa0977b Reviewed-on: https://gerrit.libreoffice.org/8257 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23Remove unneccessary commentsAlexander Wilms2-96/+96
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-09-04WaE: C4723: potential divide by 0Tor Lillqvist1-1/+1
Fix crack that formats an int into eight hex digits. Why the simple sprintf() that originally was used here was not good enough, but had to be replaced (in 2009) by broken and hard to understand code I have no idea. Found during link-time code generation (!). Change-Id: I05b33ca0fcb6a47a846ec2ff294243c5639a5b49
2013-01-08Logic (only update ret if it does not indicate an error yet)Stephan Bergmann1-1/+1
Change-Id: I717ff4de7cf406b01383f8f181b81695242a2ca8
2013-01-08test on the return of pOleObject->CloseJulien Nabet1-1/+6
Change-Id: Iee64f6f369e2312d479fa81e7a59fb962ed8d90e Reviewed-on: https://gerrit.libreoffice.org/1567 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>