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 /dtrans | |
parent | -Werror,-Wunused-variable (clang-cl) (diff) | |
download | core-928b1b04adc1cd49cc5d00069084e03675a320f3.tar.gz core-928b1b04adc1cd49cc5d00069084e03675a320f3.zip |
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 'dtrans')
-rw-r--r-- | dtrans/source/win32/clipb/MtaOleClipb.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/win32/dnd/dndentry.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/win32/dnd/source.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FmtFilter.cxx | 12 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/TxtCnvtHlp.cxx | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 36afcbe99a49..4d7ee04bfa30 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -157,7 +157,7 @@ CMtaOleClipboard* CMtaOleClipboard::s_theMtaOleClipboardInst = nullptr; // marshal an IDataObject //inline -HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStream ) +static HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStream ) { OSL_ASSERT( nullptr != pIDataObject ); OSL_ASSERT( nullptr != ppStream ); @@ -173,7 +173,7 @@ HRESULT MarshalIDataObjectInStream( IDataObject* pIDataObject, LPSTREAM* ppStrea // unmarshal an IDataObject //inline -HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM lpStream, IDataObject** ppIDataObject ) +static HRESULT UnmarshalIDataObjectAndReleaseStream( LPSTREAM lpStream, IDataObject** ppIDataObject ) { OSL_ASSERT( nullptr != lpStream ); OSL_ASSERT( nullptr != ppIDataObject ); diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx index 9a06cbc6f3b9..58ec08f45858 100644 --- a/dtrans/source/win32/dnd/dndentry.cxx +++ b/dtrans/source/win32/dnd/dndentry.cxx @@ -30,13 +30,13 @@ using namespace ::com::sun::star::registry ; using namespace ::cppu ; using namespace ::com::sun::star::lang; -Reference< XInterface > createDragSource( const Reference< XMultiServiceFactory >& rServiceManager ) +static Reference< XInterface > createDragSource( const Reference< XMultiServiceFactory >& rServiceManager ) { DragSource* pSource= new DragSource( comphelper::getComponentContext(rServiceManager) ); return Reference<XInterface>( static_cast<XInitialization*>(pSource), UNO_QUERY); } -Reference< XInterface > createDropTarget( const Reference< XMultiServiceFactory >& rServiceManager ) +static Reference< XInterface > createDropTarget( const Reference< XMultiServiceFactory >& rServiceManager ) { DropTarget* pTarget= new DropTarget( comphelper::getComponentContext(rServiceManager) ); return Reference<XInterface>( static_cast<XInitialization*>(pTarget), UNO_QUERY); diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index 5b1bc1d3d1b3..45337ec764c4 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.cxx @@ -46,7 +46,7 @@ using namespace com::sun::star::awt::MouseButton; using namespace com::sun::star::awt; using namespace com::sun::star::lang; -unsigned __stdcall DndOleSTAFunc(LPVOID pParams); +static unsigned __stdcall DndOleSTAFunc(LPVOID pParams); DragSource::DragSource( const Reference<XComponentContext>& rxContext): WeakComponentImplHelper< XDragSource, XInitialization, XServiceInfo >(m_mutex), diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 3397b46e964a..29569230bc8a 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -214,7 +214,7 @@ Sequence< sal_Int8 > OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp ) return winDIBStream; } -std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFragment, size_t endFragment) +static std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFragment, size_t endFragment) { std::ostringstream htmlHeader; htmlHeader << "Version:1.0" << '\r' << '\n'; @@ -272,7 +272,7 @@ Sequence<sal_Int8> TextHtmlToHTMLFormat(Sequence<sal_Int8> const & aTextHtml) return byteSequence; } -std::wstring getFileExtension(const std::wstring& aFilename) +static std::wstring getFileExtension(const std::wstring& aFilename) { std::wstring::size_type idx = aFilename.rfind(L"."); if (idx != std::wstring::npos) @@ -284,7 +284,7 @@ std::wstring getFileExtension(const std::wstring& aFilename) const std::wstring SHELL_LINK_FILE_EXTENSION = L".lnk"; -bool isShellLink(const std::wstring& aFilename) +static bool isShellLink(const std::wstring& aFilename) { std::wstring ext = getFileExtension(aFilename); return (_wcsicmp(ext.c_str(), SHELL_LINK_FILE_EXTENSION.c_str()) == 0); @@ -293,7 +293,7 @@ bool isShellLink(const std::wstring& aFilename) /** Resolve a Windows Shell Link (lnk) file. If a resolution is not possible simply return the provided name of the lnk file. */ -std::wstring getShellLinkTarget(const std::wstring& aLnkFile) +static std::wstring getShellLinkTarget(const std::wstring& aLnkFile) { OSL_ASSERT(isShellLink(aLnkFile)); @@ -339,7 +339,7 @@ typedef Sequence<sal_Int8> ByteSequence_t; /* Calculate the size required for turning a string list into a double '\0' terminated string buffer */ -size_t CalcSizeForStringListBuffer(const std::vector<std::wstring>& fileList) +static size_t CalcSizeForStringListBuffer(const std::vector<std::wstring>& fileList) { if ( fileList.empty() ) return 0; @@ -352,7 +352,7 @@ size_t CalcSizeForStringListBuffer(const std::vector<std::wstring>& fileList) return (size * sizeof(std::vector<std::wstring>::value_type::value_type)); } -ByteSequence_t FileListToByteSequence(const std::vector<std::wstring>& fileList) +static ByteSequence_t FileListToByteSequence(const std::vector<std::wstring>& fileList) { ByteSequence_t bseq; size_t size = CalcSizeForStringListBuffer(fileList); diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx index 529a0b49969f..b4fa6c012e60 100644 --- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx +++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx @@ -27,7 +27,7 @@ using namespace ::com::sun::star::uno; // assuming a '\0' terminated string if no length specified -int CalcBuffSizeForTextConversion( UINT code_page, LPCSTR lpMultiByteString, int nLen = -1 ) +static int CalcBuffSizeForTextConversion( UINT code_page, LPCSTR lpMultiByteString, int nLen = -1 ) { return ( MultiByteToWideChar( code_page, 0, @@ -39,7 +39,7 @@ int CalcBuffSizeForTextConversion( UINT code_page, LPCSTR lpMultiByteString, int // assuming a '\0' terminated string if no length specified -int CalcBuffSizeForTextConversion( UINT code_page, LPCWSTR lpWideCharString, int nLen = -1 ) +static int CalcBuffSizeForTextConversion( UINT code_page, LPCWSTR lpWideCharString, int nLen = -1 ) { return WideCharToMultiByte( code_page, 0, |