basic/source/runtime/dllmgr-x64.cxx | 8 ++--- canvas/source/directx/dx_canvashelper.cxx | 2 - canvas/source/directx/dx_canvashelper.hxx | 2 - canvas/source/directx/dx_canvashelper_texturefill.cxx | 8 ++--- canvas/source/directx/dx_impltools.cxx | 2 - compilerplugins/clang/constparams.cxx | 6 +++- connectivity/source/drivers/ado/APreparedStatement.cxx | 2 - connectivity/source/drivers/ado/Awrapado.cxx | 4 +- connectivity/source/inc/ado/APreparedStatement.hxx | 2 - connectivity/source/inc/ado/AViews.hxx | 2 - connectivity/source/inc/ado/Awrapado.hxx | 2 - connectivity/source/inc/ado/Awrapadox.hxx | 2 - dbaccess/source/ui/dlg/adodatalinks.cxx | 2 - dbaccess/source/ui/dlg/adodatalinks.hxx | 2 - dtrans/source/win32/dtobj/FmtFilter.cxx | 6 ++-- dtrans/source/win32/dtobj/FmtFilter.hxx | 6 ++-- dtrans/source/win32/dtobj/XTDataObject.cxx | 6 ++-- dtrans/source/win32/dtobj/XTDataObject.hxx | 6 ++-- dtrans/source/win32/misc/ImplHelper.cxx | 2 - dtrans/source/win32/misc/ImplHelper.hxx | 2 - embeddedobj/source/msole/olecomponent.cxx | 2 - embeddedobj/source/msole/olecomponent.hxx | 2 - embedserv/source/embed/guid.cxx | 6 ++-- embedserv/source/embed/guid.hxx | 6 ++-- extensions/source/activex/SOActiveX.cxx | 2 - extensions/source/activex/SOActiveX.h | 2 - extensions/source/ole/oleobjw.cxx | 2 - extensions/source/ole/oleobjw.hxx | 2 - extensions/source/ole/servprov.cxx | 10 +++---- extensions/source/ole/servprov.hxx | 8 ++--- extensions/source/ole/unoobjw.cxx | 4 +- extensions/source/ole/unoobjw.hxx | 4 +- odk/source/unoapploader/win/unoapploader.c | 4 +- setup_native/source/win32/customactions/regactivex/regactivex.cxx | 2 - shell/source/win32/shlxthandler/columninfo/columninfo.cxx | 2 - shell/source/win32/shlxthandler/infotips/infotips.cxx | 4 +- smoketest/libtest.cxx | 2 - svl/source/crypto/cryptosign.cxx | 2 - vcl/inc/opengl/win/gdiimpl.hxx | 4 +- vcl/inc/win/DWriteTextRenderer.hxx | 2 - vcl/inc/win/salgdi.h | 2 - vcl/inc/win/winlayout.hxx | 2 - vcl/opengl/win/gdiimpl.cxx | 4 +- vcl/win/gdi/DWriteTextRenderer.cxx | 2 - vcl/win/gdi/salfont.cxx | 2 - vcl/win/gdi/salprn.cxx | 14 +++++----- vcl/win/gdi/winlayout.cxx | 2 - winaccessibility/inc/AccObjectWinManager.hxx | 2 - winaccessibility/source/UAccCOM/MAccessible.cxx | 2 - winaccessibility/source/UAccCOM/MAccessible.h | 2 - winaccessibility/source/service/AccObjectWinManager.cxx | 2 - xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 2 - 52 files changed, 94 insertions(+), 90 deletions(-)
New commits: commit 6d57d6c40f15dfcf3c367687aaca5e144ba1e746 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:13:15 2017 +0200 Adapt lopluign:constparams to variadic CXXOperatorCallExpr Change-Id: I21c7a0fb447b5ba0a7aa0ddc690b969b156a91f3 diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx index 9c2263c87453..50e1c98bfc3c 100644 --- a/compilerplugins/clang/constparams.cxx +++ b/compilerplugins/clang/constparams.cxx @@ -7,6 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <algorithm> #include <string> #include <unordered_set> #include <unordered_map> @@ -328,7 +329,10 @@ bool ConstParams::checkIfCanBeConst(const Stmt* stmt, const ParmVarDecl* parmVar if (operatorCallExpr->getArg(0) == stmt) { return calleeMethodDecl->isConst(); } - for (unsigned i = 1; i < operatorCallExpr->getNumArgs(); ++i) + unsigned const n = std::min( + operatorCallExpr->getNumArgs(), + calleeMethodDecl->getNumParams()); + for (unsigned i = 1; i < n; ++i) if (operatorCallExpr->getArg(i) == stmt) { return isPointerOrReferenceToConst(calleeMethodDecl->getParamDecl(i - 1)->getType()); } commit 9a81c6933b829e511c3c61e2ae4205c04e577e4b Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:12:05 2017 +0200 loplugin:constparams: xmlsecurity (clang-cl) Change-Id: If79b5c1bfdecc8e40247e9f1b2ba314f06ebbe84 diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index 35b3835a2afe..7fcc699b8a25 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -492,7 +492,7 @@ X509Certificate_MSCryptImpl* X509Certificate_MSCryptImpl::getImplementation( con return nullptr ; } -OUString findOIDDescription(char *oid) +OUString findOIDDescription(char const *oid) { OUString ouOID = OUString::createFromAscii( oid ); for (int i=0; i<nOID; i++) commit 0829b992a22119eae9240d3a13ec2c05cc828ec5 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:11:39 2017 +0200 loplugin:constparams: winaccessibility (clang-cl) Change-Id: Ic668c1ee6c2dac70642480bc584f962921b428b2 diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx index c28083cf6f18..df90cc80b993 100644 --- a/winaccessibility/inc/AccObjectWinManager.hxx +++ b/winaccessibility/inc/AccObjectWinManager.hxx @@ -90,7 +90,7 @@ private: static void DeleteAccListener( AccObject* pAccObj ); static void InsertAccChildNode(AccObject* pCurObj,AccObject* pParentObj,HWND pWnd); static void DeleteAccChildNode(AccObject* pChild); - void DeleteFromHwndXAcc(css::accessibility::XAccessible* pXAcc ); + void DeleteFromHwndXAcc(css::accessibility::XAccessible const * pXAcc ); int UpdateAccSelection(css::accessibility::XAccessible* pXAcc); ::rtl::Reference<AccEventListener> CreateAccEventListener( diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index f6251afadf2c..f0a72faa2d15 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2660,7 +2660,7 @@ CMAccessible::get_IAccessibleFromXAccessible(XAccessible * pXAcc, IAccessible ** LEAVE_PROTECTED_BLOCK } -OUString CMAccessible::get_StringFromAny(Any& pAny) +OUString CMAccessible::get_StringFromAny(Any const & pAny) { switch(pAny.getValueTypeClass()) { diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h index 3c7ba3ee826e..87311e540f65 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.h +++ b/winaccessibility/source/UAccCOM/MAccessible.h @@ -242,7 +242,7 @@ public: return static_cast<CMAccessible*>(pv)->SmartQI(pv,iid,ppvObject); } - static OUString get_StringFromAny(css::uno::Any& pAny); + static OUString get_StringFromAny(css::uno::Any const & pAny); static OUString get_String4Numbering(const css::uno::Any& pAny, sal_Int16 numberingLevel, const OUString& numberingPrefix); diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index cc6a76de5cdc..07f273049922 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -473,7 +473,7 @@ void AccObjectWinManager::DeleteAccChildNode( AccObject* pObj ) * @param pXAcc XAccessible interface. * @return */ -void AccObjectWinManager::DeleteFromHwndXAcc(XAccessible* pXAcc ) +void AccObjectWinManager::DeleteFromHwndXAcc(XAccessible const * pXAcc ) { XHWNDToXAccHash::iterator iter = HwndXAcc.begin(); while(iter!=HwndXAcc.end()) commit 3f226429e3a63083f47e5cb33123dee7ba2d0728 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:11:20 2017 +0200 loplugin:constparams: vcl (clang-cl) Change-Id: Iabcbb6e09616a28c0d8927d11af3da47e48cbd90 diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx index 82a6e8c5b70e..ba92f571986c 100644 --- a/vcl/inc/opengl/win/gdiimpl.hxx +++ b/vcl/inc/opengl/win/gdiimpl.hxx @@ -36,14 +36,14 @@ public: protected: virtual rtl::Reference<OpenGLContext> CreateWinContext() override; - bool RenderTextureCombo(TextureCombo& rCombo, int nX, int nY); + bool RenderTextureCombo(TextureCombo const & rCombo, int nX, int nY); public: virtual void Init() override; virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) override; - bool TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, int nX, int nY); + bool TryRenderCachedNativeControl(ControlCacheKey const & rControlCacheKey, int nX, int nY); bool RenderAndCacheNativeControl(OpenGLCompatibleDC& rWhite, OpenGLCompatibleDC& rBlack, int nX, int nY , ControlCacheKey& aControlCacheKey); diff --git a/vcl/inc/win/DWriteTextRenderer.hxx b/vcl/inc/win/DWriteTextRenderer.hxx index e87ef5fe977b..c95fe47eab0e 100755 --- a/vcl/inc/win/DWriteTextRenderer.hxx +++ b/vcl/inc/win/DWriteTextRenderer.hxx @@ -61,7 +61,7 @@ public: bool BindFont(HDC hDC) /*override*/; bool ReleaseFont() /*override*/; - std::vector<tools::Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/; + std::vector<tools::Rectangle> GetGlyphInkBoxes(uint16_t const * pGid, uint16_t const * pGidEnd) const /*override*/; ID2D1RenderTarget * GetRenderTarget() const { return mpRT; } IDWriteFontFace * GetFontFace() const { return mpFontFace; } float GetEmHeight() const { return mlfEmHeight; } diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index a1076e0c7d1e..acc64e0ac17c 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -205,7 +205,7 @@ public: HWND gethWnd(); - HFONT ImplDoSetFont( FontSelectPattern* i_pFont, HFONT& o_rOldFont ); + HFONT ImplDoSetFont( FontSelectPattern const * i_pFont, HFONT& o_rOldFont ); public: explicit WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd, diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 9ab63fb311ee..343b5671fcad 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -146,7 +146,7 @@ public: class WinFontInstance : public LogicalFontInstance { public: - explicit WinFontInstance( FontSelectPattern& ); + explicit WinFontInstance( FontSelectPattern const & ); virtual ~WinFontInstance() override; private: diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx index 0836a3f27c4f..e173576480d8 100644 --- a/vcl/opengl/win/gdiimpl.cxx +++ b/vcl/opengl/win/gdiimpl.cxx @@ -739,7 +739,7 @@ ControlCacheType & TheTextureCache::get() { return data->m_pTextureCache->cache; } -bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rControlCacheKey, int nX, int nY) +bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey const & rControlCacheKey, int nX, int nY) { static bool gbCacheEnabled = !getenv("SAL_WITHOUT_WIDGET_CACHE"); @@ -765,7 +765,7 @@ bool WinOpenGLSalGraphicsImpl::TryRenderCachedNativeControl(ControlCacheKey& rCo return bRet; } -bool WinOpenGLSalGraphicsImpl::RenderTextureCombo(TextureCombo& rCombo, int nX, int nY) +bool WinOpenGLSalGraphicsImpl::RenderTextureCombo(TextureCombo const & rCombo, int nX, int nY) { OpenGLTexture& rTexture = *rCombo.mpTexture; diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 1bd413375f5f..e16381040e4a 100755 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -361,7 +361,7 @@ bool D2DWriteTextOutRenderer::ReleaseFont() // The inkboxes returned have their origin on the baseline, to a -ve value // of Top() means the glyph extends abs(Top()) many pixels above the // baseline, and +ve means the ink starts that many pixels below. -std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const +std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t const * pGid, uint16_t const * pGidEnd) const { ptrdiff_t nGlyphs = pGidEnd - pGid; if (nGlyphs < 0) diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 1eebd3b8f6f2..360de5368aaa 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -826,7 +826,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, } } -HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern* i_pFont, HFONT& o_rOldFont) +HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const * i_pFont, HFONT& o_rOldFont) { HFONT hNewFont = nullptr; diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 153ec5c54928..f9b11d46b39c 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -241,7 +241,7 @@ OUString WinSalInstance::GetDefaultPrinter() return OUString(); } -static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps, +static DWORD ImplDeviceCaps( WinSalInfoPrinter const * pPrinter, WORD nCaps, BYTE* pOutput, const ImplJobSetup* pSetupData ) { DEVMODEW const * pDevMode; @@ -255,7 +255,7 @@ static DWORD ImplDeviceCaps( WinSalInfoPrinter* pPrinter, WORD nCaps, nCaps, reinterpret_cast<LPWSTR>(pOutput), pDevMode ); } -static bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, +static bool ImplTestSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSetup* pSetupData, bool bDelete ) { if ( pSetupData && pSetupData->GetDriverData() ) @@ -338,7 +338,7 @@ static bool ImplTestSalJobSetup( WinSalInfoPrinter* pPrinter, return FALSE; } -static bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, +static bool ImplUpdateSalJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSetup* pSetupData, bool bIn, WinSalFrame* pVisibleDlgParent ) { HANDLE hPrn; @@ -430,7 +430,7 @@ static bool ImplUpdateSalJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS return TRUE; } -static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetupData, JobSetFlags nFlags ) +static void ImplDevModeToJobSetup( WinSalInfoPrinter const * pPrinter, ImplJobSetup* pSetupData, JobSetFlags nFlags ) { if ( !pSetupData || !pSetupData->GetDriverData() ) return; @@ -698,7 +698,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS } } -static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, const ImplJobSetup* pSetupData, JobSetFlags nFlags ) +static void ImplJobSetupToDevMode( WinSalInfoPrinter const * pPrinter, const ImplJobSetup* pSetupData, JobSetFlags nFlags ) { if ( !pSetupData || !pSetupData->GetDriverData() ) return; @@ -996,7 +996,7 @@ static HDC ImplCreateICW_WithCatch( LPWSTR pDriver, return hDC; } -static HDC ImplCreateSalPrnIC( WinSalInfoPrinter* pPrinter, const ImplJobSetup* pSetupData ) +static HDC ImplCreateSalPrnIC( WinSalInfoPrinter const * pPrinter, const ImplJobSetup* pSetupData ) { HDC hDC = nullptr; DEVMODEW const * pDevMode; @@ -1393,7 +1393,7 @@ void WinSalPrinter::markInvalid() // need wrappers for StarTocW/A to use structured exception handling // since SEH does not mix with standard exception handling's cleanup -static int lcl_StartDocW( HDC hDC, DOCINFOW* pInfo, WinSalPrinter* pPrt ) +static int lcl_StartDocW( HDC hDC, DOCINFOW const * pInfo, WinSalPrinter* pPrt ) { int nRet = 0; CATCH_DRIVER_EX_BEGIN; diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index df3db65362ab..dd32c80ae695 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -300,7 +300,7 @@ LogicalFontInstance * WinSalGraphics::GetWinFontEntry(int const nFallbackLevel) return mpWinFontEntry[nFallbackLevel]; } -WinFontInstance::WinFontInstance( FontSelectPattern& rFSD ) +WinFontInstance::WinFontInstance( FontSelectPattern const & rFSD ) : LogicalFontInstance( rFSD ) { } commit 237d62284f3d2d5a03b985623f6dc5c338367c9c Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:11:02 2017 +0200 loplugin:constparams: svl (clang-cl) Change-Id: Iddeb46c10046a83708ccff82e7125c36ed27c34d diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index 44175c53961c..91158e72b3c1 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -751,7 +751,7 @@ const unsigned nASN1_TAGGED_CONSTRUCTED = 0xa0; const unsigned nASN1_CONSTRUCTED = 0x20; /// Create payload for the 'signing-certificate' signed attribute. -bool CreateSigningCertificateAttribute(void* pDerEncoded, int nDerEncoded, PCCERT_CONTEXT pCertContext, SvStream& rEncodedCertificate) +bool CreateSigningCertificateAttribute(void const * pDerEncoded, int nDerEncoded, PCCERT_CONTEXT pCertContext, SvStream& rEncodedCertificate) { // CryptEncodeObjectEx() does not support encoding arbitrary ASN.1 // structures, like SigningCertificateV2 from RFC 5035, so let's build it commit 3fe9d25e32cf78b572fc6d99f2022f963cd3daae Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:10:46 2017 +0200 loplugin:constparams: smoketest (clang-cl) Change-Id: I24c79c1a66ce2dc4cbb1736993643a8f4c14120c diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx index c7e897083482..a7f72e4d158d 100644 --- a/smoketest/libtest.cxx +++ b/smoketest/libtest.cxx @@ -24,7 +24,7 @@ return GetTickCount(); } - bool IsAbsolutePath(char *pPath) + bool IsAbsolutePath(char const *pPath) { if (pPath[1] != ':') { commit b2d56c8b588f418ced180562edef6c83a641c3fc Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:10:27 2017 +0200 loplugin:constparams: shell (clang-cl) Change-Id: I7ffe60d53f4c4b7690efc8bec9d29a4959740d9a diff --git a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx index b51d00e8e8f9..7f91a1f01c6f 100644 --- a/shell/source/win32/shlxthandler/columninfo/columninfo.cxx +++ b/shell/source/win32/shlxthandler/columninfo/columninfo.cxx @@ -41,7 +41,7 @@ namespace /* private */ size_t ColumnInfoTableSize = SAL_N_ELEMENTS(ColumnInfoTable); -bool IsOOFileExtension(wchar_t* Extension) +bool IsOOFileExtension(wchar_t const * Extension) { for (size_t i = 0; i < OOFileExtensionTableSize; i++) { diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx index 9028b69ed55f..7985cb19bc25 100644 --- a/shell/source/win32/shlxthandler/infotips/infotips.cxx +++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx @@ -115,7 +115,7 @@ std::wstring getFileTypeInfo(const std::string& file_extension) /** get file size. */ -DWORD getSizeOfFile( char* FileName ) +DWORD getSizeOfFile( char const * FileName ) { HANDLE hFile = CreateFile(StringToWString(FileName).c_str(), // open file GENERIC_READ, // open for reading @@ -178,7 +178,7 @@ std::wstring formatSizeOfFile( DWORD dwSize ) /** get file size information. */ -std::wstring getFileSizeInfo(char* FileName) +std::wstring getFileSizeInfo(char const * FileName) { DWORD dwSize=getSizeOfFile(FileName); if (dwSize != INVALID_FILE_SIZE) commit 3c665f5dabbcf4fd8b42b5f97d653147a435d4d3 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:10:06 2017 +0200 loplugin:constparams: setup_native (clang-cl) Change-Id: I36331a6caf560c7622f72c2fafa968522f44f5e9 diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index db486d18e2b3..b0be045b7f25 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -58,7 +58,7 @@ BOOL UnicodeEquals( wchar_t const * pStr1, wchar_t const * pStr2 ) } -char* UnicodeToAnsiString( wchar_t* pUniString ) +char* UnicodeToAnsiString( wchar_t const * pUniString ) { int len = WideCharToMultiByte( CP_ACP, 0, pUniString, -1, nullptr, 0, nullptr, nullptr ); commit f27e98f9a73c44896aba8306cbaa645cf28a8950 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:09:48 2017 +0200 loplugin:constparams: odk (clang-cl) Change-Id: I2daf0b0868d4bdfb412575b25dbe644e76607342 diff --git a/odk/source/unoapploader/win/unoapploader.c b/odk/source/unoapploader/win/unoapploader.c index e010aef830bc..70530379be82 100644 --- a/odk/source/unoapploader/win/unoapploader.c +++ b/odk/source/unoapploader/win/unoapploader.c @@ -36,7 +36,7 @@ #define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1) char const* getPath(void); -char* createCommandLine( char* lpCmdLine ); +char* createCommandLine( char const * lpCmdLine ); FILE* getErrorFile( int create ); void writeError( const char* errstr ); void closeErrorFile(void); @@ -299,7 +299,7 @@ char const* getPath() * @return the command line for the application process or NULL, if an error * occurred */ -char* createCommandLine( char* appendix ) +char* createCommandLine( char const * appendix ) { const char* CMDPREFIX = "_"; const char* DQUOTE = "\""; commit 597191920ae8ba1f95ae7f6f916a7bef67a58990 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:09:20 2017 +0200 loplugin:constparams: extensions (clang-cl) Change-Id: I1665228a622b18757951b725467933699f9871ae diff --git a/extensions/source/activex/SOActiveX.cxx b/extensions/source/activex/SOActiveX.cxx index 9bcc32da5be4..436700851200 100644 --- a/extensions/source/activex/SOActiveX.cxx +++ b/extensions/source/activex/SOActiveX.cxx @@ -628,7 +628,7 @@ HRESULT CSOActiveX::CreateFrameOldWay( HWND hwnd, int width, int height ) return S_OK; } -HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal ) +HRESULT CSOActiveX::CallLoadComponentFromURL1PBool( OLECHAR const * sUrl, OLECHAR const * sArgName, BOOL sArgVal ) { SAFEARRAY FAR* pPropVals = SafeArrayCreateVector( VT_DISPATCH, 0, 1 ); long ix = 0; diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h index 04055eaf74df..14451fcdbf51 100644 --- a/extensions/source/activex/SOActiveX.h +++ b/extensions/source/activex/SOActiveX.h @@ -202,7 +202,7 @@ public: HRESULT GetUnoStruct( OLECHAR const * sStructName, CComPtr<IDispatch>& pdispResult ); HRESULT LoadURLToFrame(); HRESULT CallDispatchMethod( OLECHAR const * sUrl, CComVariant* sArgNames, CComVariant* sArgVal, unsigned int count ); - HRESULT CallLoadComponentFromURL1PBool( OLECHAR* sUrl, OLECHAR* sArgName, BOOL sArgVal ); + HRESULT CallLoadComponentFromURL1PBool( OLECHAR const * sUrl, OLECHAR const * sArgName, BOOL sArgVal ); HRESULT GetUrlStruct( OLECHAR const * sUrl, CComPtr<IDispatch>& pdispUrl ); HRESULT Cleanup(); HRESULT TerminateOffice(); diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 14d63e450784..197e635f1937 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -85,7 +85,7 @@ std::unordered_map<sal_uIntPtr, WeakReference<XInterface> > ComPtrToWrapperMap; *****************************************************************************/ -IUnknownWrapper_Impl::IUnknownWrapper_Impl( Reference<XMultiServiceFactory>& xFactory, +IUnknownWrapper_Impl::IUnknownWrapper_Impl( Reference<XMultiServiceFactory> const & xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass): UnoConversionUtilities<IUnknownWrapper_Impl>( xFactory, unoWrapperClass, comWrapperClass), m_pxIdlClass( nullptr), m_eJScript( JScriptUndefined), diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index 98bf9732fbcc..c46530290873 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -63,7 +63,7 @@ class IUnknownWrapper_Impl : public WeakImplHelper< XBridgeSupplier2, XInitializ { public: - IUnknownWrapper_Impl(Reference<XMultiServiceFactory> &xFactory, + IUnknownWrapper_Impl(Reference<XMultiServiceFactory> const &xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass); ~IUnknownWrapper_Impl() override; diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 86ecc75b0f45..76663c49ec28 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -53,7 +53,7 @@ DEFINE_GUID(OID_ServiceManager, 0x82154420, 0xfbf, 0x11d4, 0x83, 0x13, 0x0, 0x50 *****************************************************************************/ ProviderOleWrapper_Impl::ProviderOleWrapper_Impl(const Reference<XMultiServiceFactory>& smgr, - const Reference<XSingleServiceFactory>& xSFact, GUID* pGuid) + const Reference<XSingleServiceFactory>& xSFact, GUID const * pGuid) : m_xSingleServiceFactory(xSFact), m_smgr( smgr) { @@ -188,7 +188,7 @@ STDMETHODIMP ProviderOleWrapper_Impl::LockServer(int /*fLock*/) OneInstanceOleWrapper_Impl::OneInstanceOleWrapper_Impl( const Reference<XMultiServiceFactory>& smgr, const Reference<XInterface>& xInst, - GUID* pGuid ) + GUID const * pGuid ) : m_refCount(0) , m_xInst(xInst) , m_factoryHandle(0) @@ -623,7 +623,7 @@ OleServer_Impl::OleServer_Impl( const Reference<XMultiServiceFactory>& smgr): a >>= m_bridgeSupplier; } - (void) provideInstance( m_smgr, const_cast<GUID*>(&OID_ServiceManager) ); + (void) provideInstance( m_smgr, &OID_ServiceManager ); } OleServer_Impl::~OleServer_Impl() @@ -653,7 +653,7 @@ css::uno::Sequence<OUString> OleServer_Impl::getSupportedServiceNames() "com.sun.star.bridge.oleautomation.ApplicationRegistration"}; } -bool OleServer_Impl::provideService(const Reference<XSingleServiceFactory>& xSFact, GUID* guid) +bool OleServer_Impl::provideService(const Reference<XSingleServiceFactory>& xSFact, GUID const * guid) { IClassFactoryWrapper* pFac = new ProviderOleWrapper_Impl( m_smgr, xSFact, guid); @@ -664,7 +664,7 @@ bool OleServer_Impl::provideService(const Reference<XSingleServiceFactory>& xSFa return pFac->registerClass(); } -bool OleServer_Impl::provideInstance(const Reference<XInterface>& xInst, GUID* guid) +bool OleServer_Impl::provideInstance(const Reference<XInterface>& xInst, GUID const * guid) { IClassFactoryWrapper* pFac = new OneInstanceOleWrapper_Impl( m_smgr, xInst, guid ); diff --git a/extensions/source/ole/servprov.hxx b/extensions/source/ole/servprov.hxx index bff863b2f0c0..67dc9a71723d 100644 --- a/extensions/source/ole/servprov.hxx +++ b/extensions/source/ole/servprov.hxx @@ -81,7 +81,7 @@ class ProviderOleWrapper_Impl : public IClassFactoryWrapper public: ProviderOleWrapper_Impl( const Reference<XMultiServiceFactory>& smgr, - const Reference<XSingleServiceFactory>& xSFactory, GUID* pGuid); + const Reference<XSingleServiceFactory>& xSFactory, GUID const * pGuid); virtual ~ProviderOleWrapper_Impl(); bool registerClass() override; @@ -123,7 +123,7 @@ class OneInstanceOleWrapper_Impl : public IClassFactoryWrapper { public: - OneInstanceOleWrapper_Impl( const Reference<XMultiServiceFactory>& smgr, const Reference<XInterface>& xInst, GUID* pGuid ); + OneInstanceOleWrapper_Impl( const Reference<XMultiServiceFactory>& smgr, const Reference<XInterface>& xInst, GUID const * pGuid ); virtual ~OneInstanceOleWrapper_Impl(); bool registerClass() override; @@ -258,8 +258,8 @@ public: protected: - bool provideService(const Reference<XSingleServiceFactory>& xMulFact, GUID* guid); - bool provideInstance(const Reference<XInterface>& xInst, GUID* guid); + bool provideService(const Reference<XSingleServiceFactory>& xMulFact, GUID const * guid); + bool provideInstance(const Reference<XInterface>& xInst, GUID const * guid); list< IClassFactoryWrapper* > m_wrapperList; Reference< XBridgeSupplier2 > m_bridgeSupplier; diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 7fd2749eedc6..bd8f386a5b50 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -88,7 +88,7 @@ static void writeExcepinfo(EXCEPINFO * pInfo, const OUString& message) } } -InterfaceOleWrapper_Impl::InterfaceOleWrapper_Impl( Reference<XMultiServiceFactory>& xFactory, +InterfaceOleWrapper_Impl::InterfaceOleWrapper_Impl( Reference<XMultiServiceFactory> const & xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass): UnoConversionUtilities<InterfaceOleWrapper_Impl>( xFactory, unoWrapperClass, comWrapperClass), m_defaultValueType( 0) @@ -1214,7 +1214,7 @@ STDMETHODIMP InterfaceOleWrapper_Impl::GetNameSpaceParent( // UnoObjectWrapperRemoteOpt --------------------------------------------------- -UnoObjectWrapperRemoteOpt::UnoObjectWrapperRemoteOpt( Reference<XMultiServiceFactory>& aFactory, +UnoObjectWrapperRemoteOpt::UnoObjectWrapperRemoteOpt( Reference<XMultiServiceFactory> const & aFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass): InterfaceOleWrapper_Impl( aFactory, unoWrapperClass, comWrapperClass), m_currentId(1) diff --git a/extensions/source/ole/unoobjw.hxx b/extensions/source/ole/unoobjw.hxx index 155f503f51cd..a92cf97b2bfc 100644 --- a/extensions/source/ole/unoobjw.hxx +++ b/extensions/source/ole/unoobjw.hxx @@ -109,7 +109,7 @@ class InterfaceOleWrapper_Impl : public WeakImplHelper<XBridgeSupplier2, XInitia public: - InterfaceOleWrapper_Impl(Reference<XMultiServiceFactory>& xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass); + InterfaceOleWrapper_Impl(Reference<XMultiServiceFactory> const & xFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass); ~InterfaceOleWrapper_Impl() override; /* IUnknown methods */ @@ -237,7 +237,7 @@ protected: class UnoObjectWrapperRemoteOpt: public InterfaceOleWrapper_Impl { public: - UnoObjectWrapperRemoteOpt( Reference<XMultiServiceFactory>& aFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass); + UnoObjectWrapperRemoteOpt( Reference<XMultiServiceFactory> const & aFactory, sal_uInt8 unoWrapperClass, sal_uInt8 comWrapperClass); ~UnoObjectWrapperRemoteOpt() override; STDMETHOD( GetIDsOfNames )( REFIID riid, OLECHAR ** rgszNames, unsigned int cNames, commit 3e9619c747c1c4e50a6404313699643452b14a34 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:09:03 2017 +0200 loplugin:constparams: embedserv (clang-cl) Change-Id: I6faa8df32e57a846968423cfbe026ce96f6ca7e8 diff --git a/embedserv/source/embed/guid.cxx b/embedserv/source/embed/guid.cxx index 99d69bad0649..f5a55eb943fd 100644 --- a/embedserv/source/embed/guid.cxx +++ b/embedserv/source/embed/guid.cxx @@ -26,7 +26,7 @@ #include <guid.hxx> -wchar_t const * getStorageTypeFromGUID_Impl( GUID* guid ) +wchar_t const * getStorageTypeFromGUID_Impl( GUID const * guid ) { if ( *guid == OID_WriterTextServer ) return L"soffice.StarWriterDocument.6"; @@ -61,7 +61,7 @@ wchar_t const * getStorageTypeFromGUID_Impl( GUID* guid ) return L""; } -o3tl::u16string_view getServiceNameFromGUID_Impl( GUID* guid ) +o3tl::u16string_view getServiceNameFromGUID_Impl( GUID const * guid ) { if ( *guid == OID_WriterTextServer ) return u"com.sun.star.comp.Writer.TextDocument"; @@ -96,7 +96,7 @@ o3tl::u16string_view getServiceNameFromGUID_Impl( GUID* guid ) return u""; } -OUString getFilterNameFromGUID_Impl( GUID* guid ) +OUString getFilterNameFromGUID_Impl( GUID const * guid ) { if ( *guid == OID_WriterTextServer ) return OUString( "StarOffice XML (Writer)" ); diff --git a/embedserv/source/embed/guid.hxx b/embedserv/source/embed/guid.hxx index de919aa5ea7c..886004c663ef 100644 --- a/embedserv/source/embed/guid.hxx +++ b/embedserv/source/embed/guid.hxx @@ -27,11 +27,11 @@ #include <common.h> -OUString getFilterNameFromGUID_Impl( GUID* ); +OUString getFilterNameFromGUID_Impl( GUID const * ); -o3tl::u16string_view getServiceNameFromGUID_Impl( GUID* ); +o3tl::u16string_view getServiceNameFromGUID_Impl( GUID const * ); -wchar_t const * getStorageTypeFromGUID_Impl( GUID* guid ); +wchar_t const * getStorageTypeFromGUID_Impl( GUID const * guid ); #endif commit 287386df1f9277c8fbd22d48a8ff3dd9d183e1bc Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:08:45 2017 +0200 loplugin:constparams: embeddedobj (clang-cl) Change-Id: Ic6616f432178fe1f972c5f819302a4fb6b4154fd diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index 26a5d350e6ea..3ae151b01b21 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -872,7 +872,7 @@ void OleComponent::CreateLinkFromFile( const OUString& aFileURL ) } -void OleComponent::InitEmbeddedCopyOfLink( OleComponent* pOleLinkComponent ) +void OleComponent::InitEmbeddedCopyOfLink( OleComponent const * pOleLinkComponent ) { if ( !pOleLinkComponent || !pOleLinkComponent->m_pNativeImpl->m_pObj ) throw lang::IllegalArgumentException(); // TODO diff --git a/embeddedobj/source/msole/olecomponent.hxx b/embeddedobj/source/msole/olecomponent.hxx index 088c3108bbf9..f9d3c58cbf39 100644 --- a/embeddedobj/source/msole/olecomponent.hxx +++ b/embeddedobj/source/msole/olecomponent.hxx @@ -109,7 +109,7 @@ public: const css::uno::Reference< css::datatransfer::XTransferable >& xTransfer ); void CreateObjectFromFile( const OUString& aFileName ); void CreateLinkFromFile( const OUString& aFileName ); - void InitEmbeddedCopyOfLink( OleComponent* pOleLinkComponent ); + void InitEmbeddedCopyOfLink( OleComponent const * pOleLinkComponent ); void RunObject(); // switch OLE object to running state commit c74a70e07c959a675d7e10dd1cacbebebb8e2e0a Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:08:21 2017 +0200 loplugin:constparams: dtrans (clang-cl) Change-Id: I0a965f6957b74ff5db3aab54bef1fa05f3b594c7 diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 711dd8a68364..dd39d7956d15 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -147,7 +147,7 @@ Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile // convert a openoffice metafile picture to a windows metafile picture -HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePict ) +HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { HMETAFILEPICT hPict = nullptr; HMETAFILE hMtf = SetMetaFileBitsEx( aOOMetaFilePict.getLength(), reinterpret_cast<unsigned char const *>(aOOMetaFilePict.getConstArray()) ); @@ -169,7 +169,7 @@ HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( Sequence< sal_Int8 >& aOOMetaFilePic // convert a openoffice metafile picture to a windows enhanced metafile picture -HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 >& aOOMetaFilePict ) +HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { HENHMETAFILE hEnhMtf = SetEnhMetaFileBits( aOOMetaFilePict.getLength(), reinterpret_cast<unsigned char const *>(aOOMetaFilePict.getConstArray()) ); @@ -243,7 +243,7 @@ const std::string TAG_END_HTML = std::string("</html>"); const std::string TAG_BODY = std::string("<body"); const std::string TAG_END_BODY = std::string("</body"); -Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml) +Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8> const & aTextHtml) { OSL_ASSERT(aTextHtml.getLength() > 0); diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx index cbfa17de2b3d..f56dce98fec2 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.hxx +++ b/dtrans/source/win32/dtobj/FmtFilter.hxx @@ -44,8 +44,8 @@ css::uno::Sequence< sal_Int8 > SAL_CALL WinENHMFPictToOOMFPict( HENHMETAFILE hEn aByteStream - a sequence of bytes containing a openoffice metafile picture with a leading METAFILEHEADER ------------------------------------------------------------------------*/ -HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( css::uno::Sequence< sal_Int8 >& aOOMetaFilePict ); -HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( css::uno::Sequence< sal_Int8 >& aOOMetaFilePict ); +HMETAFILEPICT SAL_CALL OOMFPictToWinMFPict( css::uno::Sequence< sal_Int8 > const & aOOMetaFilePict ); +HENHMETAFILE SAL_CALL OOMFPictToWinENHMFPict( css::uno::Sequence< sal_Int8 > const & aOOMetaFilePict ); /*------------------------------------------------------------------------ input: @@ -75,7 +75,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( css::uno::Sequence< sal_I the Format is described in the MSDN Library under HTML Clipboard Format ------------------------------------------------------------------------*/ -css::uno::Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( css::uno::Sequence< sal_Int8 >& aTextHtml ); +css::uno::Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( css::uno::Sequence< sal_Int8 > const & aTextHtml ); /** Return a FileList in which Windows Shell Links (lnk) are resolved. diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index ed89eaf6dec4..c3299b6fc0d2 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -294,7 +294,7 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium //inline void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium( - FORMATETC& fetc, STGMEDIUM& stgmedium ) + FORMATETC const & fetc, STGMEDIUM& stgmedium ) { if ( m_FormatRegistrar.hasSynthesizedLocale( ) ) { @@ -311,7 +311,7 @@ void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium( } void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( - FORMATETC& fetc, STGMEDIUM& stgmedium ) + FORMATETC const & fetc, STGMEDIUM& stgmedium ) { DataFlavor aFlavor = formatEtcToDataFlavor( fetc ); @@ -449,7 +449,7 @@ HRESULT SAL_CALL CXTDataObject::renderSynthesizedFormatAndSetupStgMedium( FORMAT // the transferable must have only text, so we will synthesize unicode text -void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ) +void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC const & fetc, STGMEDIUM& stgmedium ) { OSL_ASSERT( CF_UNICODETEXT == fetc.cfFormat ); diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index 13e34b033eb4..5078c3fd74da 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -89,12 +89,12 @@ public: private: css::datatransfer::DataFlavor SAL_CALL formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) const; - void SAL_CALL renderLocaleAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); - void SAL_CALL renderUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); + void SAL_CALL renderLocaleAndSetupStgMedium( FORMATETC const & fetc, STGMEDIUM& stgmedium ); + void SAL_CALL renderUnicodeAndSetupStgMedium( FORMATETC const & fetc, STGMEDIUM& stgmedium ); void SAL_CALL renderAnyDataAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); HRESULT SAL_CALL renderSynthesizedFormatAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); - void SAL_CALL renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); + void SAL_CALL renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC const & fetc, STGMEDIUM& stgmedium ); void SAL_CALL renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); void SAL_CALL renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium ); diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index 58836ec6c601..c5ffcef57f60 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -326,7 +326,7 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC* return nMatch; } -bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight ) +bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE const * ptdRight ) { bool bRet = false; diff --git a/dtrans/source/win32/misc/ImplHelper.hxx b/dtrans/source/win32/misc/ImplHelper.hxx index a0c32b0ad712..0d0097fbcb5b 100644 --- a/dtrans/source/win32/misc/ImplHelper.hxx +++ b/dtrans/source/win32/misc/ImplHelper.hxx @@ -35,7 +35,7 @@ void SAL_CALL DeleteTargetDevice(DVTARGETDEVICE* ptd); bool SAL_CALL CopyFormatEtc(LPFORMATETC petcDest, LPFORMATETC petcSrc); sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLeft, const FORMATETC* pFetcRight); -bool SAL_CALL CompareTargetDevice(DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdRight); +bool SAL_CALL CompareTargetDevice(DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE const * ptdRight); DVTARGETDEVICE* SAL_CALL CopyTargetDevice(DVTARGETDEVICE* ptdSrc); // some codepage helper functions commit a422a1be7ec4d80fc0b53aa7b36dee8a72c8200e Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:07:58 2017 +0200 loplugin:constparams: dbaccess (clang-cl) Change-Id: If41080debabff46d849dbd6e7f29a941f294c6ad diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 2613364bc8ef..f2a18c8c8acc 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -185,7 +185,7 @@ OUString PromptEdit(long hWnd, OUString const & connstr) } -OUString getAdoDatalink(long hWnd,OUString& oldLink) +OUString getAdoDatalink(long hWnd,OUString const & oldLink) { OUString dataLink; if (!oldLink.isEmpty()) diff --git a/dbaccess/source/ui/dlg/adodatalinks.hxx b/dbaccess/source/ui/dlg/adodatalinks.hxx index 11a0da006e61..85182223d31e 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.hxx +++ b/dbaccess/source/ui/dlg/adodatalinks.hxx @@ -23,6 +23,6 @@ #include <osl/module.h> #include "commontypes.hxx" -OUString getAdoDatalink(long hWnd,OUString& oldLink); +OUString getAdoDatalink(long hWnd,OUString const & oldLink); #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit dc3fc59fbaf4bd7c903c076f81071ea071d1b19c Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:07:37 2017 +0200 loplugin:constparams: connectivity (clang-cl) Change-Id: I6dc7939f42aa1d1d62f8c71f5a5529becdffa704 diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 497a721de03d..00aa9b072519 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -436,7 +436,7 @@ void SAL_CALL OPreparedStatement::release() throw() OStatement_Base::release(); } -void OPreparedStatement::replaceParameterNodeName(OSQLParseNode* _pNode, +void OPreparedStatement::replaceParameterNodeName(OSQLParseNode const * _pNode, const OUString& _sDefaultName, sal_Int32& _rParameterCount) { diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index 53275c04a7a0..75d1b6a3ae11 100644 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx @@ -237,7 +237,7 @@ sal_Int32 WpADOConnection::get_State() const return nRet; } -bool WpADOConnection::OpenSchema(SchemaEnum eNum,OLEVariant& Restrictions,OLEVariant& SchemaID,ADORecordset**pprset) +bool WpADOConnection::OpenSchema(SchemaEnum eNum,OLEVariant const & Restrictions,OLEVariant const & SchemaID,ADORecordset**pprset) { assert(pInterface); return SUCCEEDED(pInterface->OpenSchema(eNum,Restrictions,SchemaID,pprset)); @@ -1424,7 +1424,7 @@ void WpADOView::get_Command(OLEVariant& _rVar) const pInterface->get_Command(&_rVar); } -void WpADOView::put_Command(OLEVariant& _rVar) +void WpADOView::put_Command(OLEVariant const & _rVar) { assert(pInterface); pInterface->put_Command(_rVar); diff --git a/connectivity/source/inc/ado/APreparedStatement.hxx b/connectivity/source/inc/ado/APreparedStatement.hxx index 792ba22fb964..818d149c1ad1 100644 --- a/connectivity/source/inc/ado/APreparedStatement.hxx +++ b/connectivity/source/inc/ado/APreparedStatement.hxx @@ -46,7 +46,7 @@ namespace connectivity /// @throws css::sdbc::SQLException /// @throws css::uno::RuntimeException void setParameter(sal_Int32 parameterIndex, const DataTypeEnum& _eType, sal_Int32 _nSize,const OLEVariant& Val); - void replaceParameterNodeName( OSQLParseNode* _pNode, + void replaceParameterNodeName( OSQLParseNode const * _pNode, const OUString& _sDefaultName, sal_Int32& _nParameterCount); protected: diff --git a/connectivity/source/inc/ado/AViews.hxx b/connectivity/source/inc/ado/AViews.hxx index d18b9df24e55..2e0b3379a308 100644 --- a/connectivity/source/inc/ado/AViews.hxx +++ b/connectivity/source/inc/ado/AViews.hxx @@ -43,7 +43,7 @@ namespace connectivity public: OViews(OCatalog* _pParent, ::osl::Mutex& _rMutex, const TStringVector &_rVector, - WpADOViews& _rCollection,bool _bCase) : sdbcx::OCollection(*_pParent,_bCase,_rMutex,_rVector) + WpADOViews const & _rCollection,bool _bCase) : sdbcx::OCollection(*_pParent,_bCase,_rMutex,_rVector) ,m_aCollection(_rCollection) ,m_pCatalog(_pParent) { diff --git a/connectivity/source/inc/ado/Awrapado.hxx b/connectivity/source/inc/ado/Awrapado.hxx index d1f8207d9fc8..b40ad4bd1be9 100644 --- a/connectivity/source/inc/ado/Awrapado.hxx +++ b/connectivity/source/inc/ado/Awrapado.hxx @@ -97,7 +97,7 @@ namespace connectivity sal_Int32 get_State() const; - bool OpenSchema(SchemaEnum eNum,OLEVariant& Restrictions,OLEVariant& SchemaID,ADORecordset**pprset); + bool OpenSchema(SchemaEnum eNum,OLEVariant const & Restrictions,OLEVariant const & SchemaID,ADORecordset**pprset); OUString get_Version() const; diff --git a/connectivity/source/inc/ado/Awrapadox.hxx b/connectivity/source/inc/ado/Awrapadox.hxx index 31e73a80fdc2..56acb92785f4 100644 --- a/connectivity/source/inc/ado/Awrapadox.hxx +++ b/connectivity/source/inc/ado/Awrapadox.hxx @@ -84,7 +84,7 @@ namespace connectivity OUString get_Name() const; void get_Command(OLEVariant& _rVar) const; - void put_Command(OLEVariant& _rVar); + void put_Command(OLEVariant const & _rVar); }; class WpADOGroup : public WpOLEBase<ADOGroup> commit 00b101bb6ce0e5eb56b4f9490849de15aeba6b63 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:07:18 2017 +0200 loplugin:constparams: canvas (clang-cl) Change-Id: I892498d323acd72757a05bac05d19c62f11f7cd3 diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index 72c63ffc2816..8dfae8ab5a1d 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -705,7 +705,7 @@ namespace dxcanvas return aRet; } - void CanvasHelper::setupGraphicsState( GraphicsSharedPtr& rGraphics, + void CanvasHelper::setupGraphicsState( GraphicsSharedPtr const & rGraphics, const rendering::ViewState& viewState, const rendering::RenderState& renderState ) { diff --git a/canvas/source/directx/dx_canvashelper.hxx b/canvas/source/directx/dx_canvashelper.hxx index 0696231aadb3..bf06e29bb474 100644 --- a/canvas/source/directx/dx_canvashelper.hxx +++ b/canvas/source/directx/dx_canvashelper.hxx @@ -239,7 +239,7 @@ namespace dxcanvas bool needOutput() const { return mpGraphicsProvider.get() != nullptr; }; // returns transparency of color - void setupGraphicsState( GraphicsSharedPtr& rGraphics, + void setupGraphicsState( GraphicsSharedPtr const & rGraphics, const css::rendering::ViewState& viewState, const css::rendering::RenderState& renderState ); diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index 4bebeb8c30f2..d4aa15996a9c 100644 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -50,7 +50,7 @@ namespace dxcanvas { typedef std::shared_ptr< Gdiplus::PathGradientBrush > PathGradientBrushSharedPtr; - bool fillLinearGradient( GraphicsSharedPtr& rGraphics, + bool fillLinearGradient( GraphicsSharedPtr const & rGraphics, const ::canvas::ParametricPolyPolygon::Values& /*rValues*/, const std::vector< Gdiplus::Color >& rColors, const std::vector< Gdiplus::REAL >& rStops, @@ -196,7 +196,7 @@ namespace dxcanvas bool fillPolygonalGradient( const ::canvas::ParametricPolyPolygon::Values& rValues, const std::vector< Gdiplus::Color >& rColors, const std::vector< Gdiplus::REAL >& rStops, - GraphicsSharedPtr& rGraphics, + GraphicsSharedPtr const & rGraphics, const GraphicsPathSharedPtr& rPath, const rendering::ViewState& viewState, const rendering::RenderState& renderState, @@ -422,7 +422,7 @@ namespace dxcanvas bool fillGradient( const ::canvas::ParametricPolyPolygon::Values& rValues, const std::vector< Gdiplus::Color >& rColors, const std::vector< Gdiplus::REAL >& rStops, - GraphicsSharedPtr& rGraphics, + GraphicsSharedPtr const & rGraphics, const GraphicsPathSharedPtr& rPath, const rendering::ViewState& viewState, const rendering::RenderState& renderState, @@ -461,7 +461,7 @@ namespace dxcanvas } void fillBitmap( const uno::Reference< rendering::XBitmap >& xBitmap, - GraphicsSharedPtr& rGraphics, + GraphicsSharedPtr const & rGraphics, const GraphicsPathSharedPtr& rPath, const rendering::Texture& rTexture ) { diff --git a/canvas/source/directx/dx_impltools.cxx b/canvas/source/directx/dx_impltools.cxx index 0a32b6d2d9f7..0ec1240019ea 100644 --- a/canvas/source/directx/dx_impltools.cxx +++ b/canvas/source/directx/dx_impltools.cxx @@ -172,7 +172,7 @@ namespace dxcanvas static_cast<Gdiplus::REAL>(rPoint.Y) ); } - void graphicsPathFromB2DPolygon( GraphicsPathSharedPtr& rOutput, + void graphicsPathFromB2DPolygon( GraphicsPathSharedPtr const & rOutput, std::vector< Gdiplus::PointF >& rPoints, const ::basegfx::B2DPolygon& rPoly, bool bNoLineJoin) commit f192302a57a7c49f711c87eef548f93a3364d9b9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Aug 31 12:06:56 2017 +0200 loplugin:constparams: basic (clang-cl) Change-Id: Ia84473360333cb4905692a4d9d0358c93acebff8 diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index ffc05ddfeb5a..fbd2d4948a32 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -142,7 +142,7 @@ template< typename T > void add( *reinterpret_cast< T * >(align(blob, alignment, offset, sizeof (T))) = data; } -std::size_t alignment(SbxVariable * variable) { +std::size_t alignment(SbxVariable const * variable) { OSL_ASSERT(variable != nullptr); if ((variable->GetType() & SbxARRAY) == 0) { switch (variable->GetType()) { @@ -204,7 +204,7 @@ ErrCode marshalString( } ErrCode marshalStruct( - SbxVariable * variable, std::vector< char > & blob, std::size_t offset, + SbxVariable const * variable, std::vector< char > & blob, std::size_t offset, MarshalData & data) { OSL_ASSERT(variable != nullptr); @@ -220,7 +220,7 @@ ErrCode marshalStruct( } ErrCode marshalArray( - SbxVariable * variable, std::vector< char > & blob, std::size_t offset, + SbxVariable const * variable, std::vector< char > & blob, std::size_t offset, MarshalData & data) { OSL_ASSERT(variable != nullptr); @@ -436,7 +436,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) { return data; } -ErrCode unmarshalString(StringData const & data, SbxVariable & result) { +ErrCode unmarshalString(StringData const & data, SbxVariable const & result) { OUString str; if (data.buffer != nullptr) { char const * p = static_cast< char const * >(data.buffer); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits