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 /embeddedobj | |
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 'embeddedobj')
-rw-r--r-- | embeddedobj/source/msole/olecomponent.cxx | 10 | ||||
-rw-r--r-- | embeddedobj/source/msole/olepersist.cxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index 03e49fc83115..bcf2600236c1 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -224,7 +224,7 @@ struct OleComponentNative_Impl { }; -DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) +static DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) { if ( aFlavor.MimeType.indexOf( ";Aspect=THUMBNAIL" ) != -1 ) return DVASPECT_THUMBNAIL; @@ -237,7 +237,7 @@ DWORD GetAspectFromFlavor( const datatransfer::DataFlavor& aFlavor ) } -OUString GetFlavorSuffixFromAspect( DWORD nAsp ) +static OUString GetFlavorSuffixFromAspect( DWORD nAsp ) { OUString aResult; @@ -254,7 +254,7 @@ OUString GetFlavorSuffixFromAspect( DWORD nAsp ) } -HRESULT OpenIStorageFromURL_Impl( const OUString& aURL, IStorage** ppIStorage ) +static HRESULT OpenIStorageFromURL_Impl( const OUString& aURL, IStorage** ppIStorage ) { OSL_ENSURE( ppIStorage, "The pointer must not be empty!" ); @@ -375,7 +375,7 @@ bool OleComponentNative_Impl::GraphicalFlavor( const datatransfer::DataFlavor& a } -bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > const & aSeq, CLSID& aResult ) +static bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > const & aSeq, CLSID& aResult ) { if ( aSeq.getLength() == 16 ) { @@ -392,7 +392,7 @@ bool GetClassIDFromSequence_Impl( uno::Sequence< sal_Int8 > const & aSeq, CLSID& } -OUString WinAccToVcl_Impl( const sal_Unicode* pStr ) +static OUString WinAccToVcl_Impl( const sal_Unicode* pStr ) { OUString aResult; diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 8965c478caf1..286f24b709fc 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -155,7 +155,7 @@ OUString GetNewFilledTempFile_Impl( const uno::Reference< io::XInputStream >& xI #ifdef _WIN32 /// @throws io::IOException /// @throws uno::RuntimeException -OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStorage >& xParentStorage, const OUString& aEntryName, const uno::Reference< lang::XMultiServiceFactory >& xFactory ) +static OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStorage >& xParentStorage, const OUString& aEntryName, const uno::Reference< lang::XMultiServiceFactory >& xFactory ) { OUString aResult; @@ -187,7 +187,7 @@ OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStora } -void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStream, const OUString& aMediaType ) +static void SetStreamMediaType_Impl( const uno::Reference< io::XStream >& xStream, const OUString& aMediaType ) { uno::Reference< beans::XPropertySet > xPropSet( xStream, uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue("MediaType", uno::makeAny( aMediaType ) ); diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 44141b5101f8..f94020a65a8f 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -69,7 +69,7 @@ typedef UINT STDAPICALLTYPE OleUIInsertObjectA_Type(LPOLEUIINSERTOBJECTA); using namespace ::com::sun::star; using namespace ::comphelper; -uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_Int8 >& aClassID ) +static uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_Int8 >& aClassID ) { // Writer if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SW_OLE_EMBED_CLASSID_60 ) ) |