diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 15:41:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-24 17:22:05 +0200 |
commit | 928b1b04adc1cd49cc5d00069084e03675a320f3 (patch) | |
tree | 8710687a4a66a628bd12c5482d7d93cc27f8996a /embedserv | |
parent | ec709a8d5e808b970a8930a389c0a5a6f61fe8c7 (diff) |
loplugin:external (clang-cl)
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>
Diffstat (limited to 'embedserv')
-rw-r--r-- | embedserv/source/embed/docholder.cxx | 2 | ||||
-rw-r--r-- | embedserv/source/embed/ed_ipersiststr.cxx | 4 | ||||
-rw-r--r-- | embedserv/source/embed/register.cxx | 6 | ||||
-rw-r--r-- | embedserv/source/embed/servprov.cxx | 2 | ||||
-rw-r--r-- | embedserv/source/embed/tracker.cxx | 6 | ||||
-rw-r--r-- | embedserv/source/inprocserv/dllentry.cxx | 2 |
6 files changed, 12 insertions, 10 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 03131f36896c..37255f8ed27b 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -499,7 +499,7 @@ void DocumentHolder::UIDeactivate() return; } -void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos) +static void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos) { HMENU subMenu(nullptr); wchar_t buffer[256]; diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 632297274451..44757a5eb35c 100644 --- a/embedserv/source/embed/ed_ipersiststr.cxx +++ b/embedserv/source/embed/ed_ipersiststr.cxx @@ -56,7 +56,7 @@ using namespace ::com::sun::star; const OUString aOfficeEmbedStreamName( "package_stream" ); const OUString aExtentStreamName( "properties_stream" ); -uno::Reference< io::XInputStream > createTempXInStreamFromIStream( +static uno::Reference< io::XInputStream > createTempXInStreamFromIStream( uno::Reference< lang::XMultiServiceFactory > const & xFactory, IStream *pStream ) { @@ -110,7 +110,7 @@ uno::Reference< io::XInputStream > createTempXInStreamFromIStream( return xResult; } -HRESULT copyXTempOutToIStream( uno::Reference< io::XOutputStream > const & xTempOut, IStream* pStream ) +static HRESULT copyXTempOutToIStream( uno::Reference< io::XOutputStream > const & xTempOut, IStream* pStream ) { if ( !xTempOut.is() || !pStream ) return E_FAIL; diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx index 25c25b7a5aa3..573aedd470f8 100644 --- a/embedserv/source/embed/register.cxx +++ b/embedserv/source/embed/register.cxx @@ -29,20 +29,20 @@ using namespace ::com::sun::star; /// @throws uno::Exception -uno::Reference<uno::XInterface> EmbedServer_createInstance( +static uno::Reference<uno::XInterface> EmbedServer_createInstance( const uno::Reference<lang::XMultiServiceFactory> & xSMgr) { uno::Reference<uno::XInterface > xService = *new EmbedServer_Impl( xSMgr ); return xService; } -OUString EmbedServer_getImplementationName() throw() +static OUString EmbedServer_getImplementationName() throw() { return OUString("com.sun.star.comp.ole.EmbedServer"); } -uno::Sequence< OUString > EmbedServer_getSupportedServiceNames() throw() +static uno::Sequence< OUString > EmbedServer_getSupportedServiceNames() throw() { uno::Sequence<OUString> aServiceNames { "com.sun.star.document.OleEmbeddedServerRegistration" }; return aServiceNames; diff --git a/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx index a78a7c9278fc..429c86e0dc89 100644 --- a/embedserv/source/embed/servprov.cxx +++ b/embedserv/source/embed/servprov.cxx @@ -78,7 +78,7 @@ void *CurThreadData::getData() return osl_getThreadKeyData(m_hKey); } -void o2u_attachCurrentThread() +static void o2u_attachCurrentThread() { static CurThreadData oleThreadData; diff --git a/embedserv/source/embed/tracker.cxx b/embedserv/source/embed/tracker.cxx index 823f25588ccd..99022f653db4 100644 --- a/embedserv/source/embed/tracker.cxx +++ b/embedserv/source/embed/tracker.cxx @@ -79,7 +79,7 @@ const AFX_RECTINFO afxRectInfo[] = }; -HBRUSH HalftoneBrush() +static HBRUSH HalftoneBrush() { if (afxHalftoneBrush == nullptr) { @@ -97,7 +97,7 @@ HBRUSH HalftoneBrush() } -void DrawDragRect( +static void DrawDragRect( HDC hDC,LPRECT lpRect,SIZE size, LPRECT lpRectLast,SIZE sizeLast, HBRUSH hBrush = nullptr,HBRUSH hBrushLast = nullptr) @@ -185,7 +185,7 @@ void winwrap::TransformRect(LPRECT rect,HWND pWnd,HWND pWndClipTo) } -void NormalizeRect(LPRECT rp) +static void NormalizeRect(LPRECT rp) { if(rp->left > rp->right) { UINT tmp = rp->left; diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index 65d8bc550a4b..963342c819f8 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.cxx @@ -23,6 +23,8 @@ #include "inprocembobj.h" #include <embservconst.h> +#include <olectl.h> // declarations of DllRegisterServer/DllUnregisterServer + static const GUID* guidList[ SUPPORTED_FACTORIES_NUM ] = { &OID_WriterTextServer, &OID_WriterOASISTextServer, |