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 /vcl/win/gdi | |
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 'vcl/win/gdi')
-rw-r--r-- | vcl/win/gdi/gdiimpl.cxx | 10 | ||||
-rw-r--r-- | vcl/win/gdi/salbmp.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 14 | ||||
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 8 | ||||
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 017431ed7107..d446ec877a98 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -335,7 +335,7 @@ void WinSalGraphicsImpl::copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcG } } -void ImplCalcOutSideRgn( const RECT& rSrcRect, +static void ImplCalcOutSideRgn( const RECT& rSrcRect, int nLeft, int nTop, int nRight, int nBottom, HRGN& rhInvalidateRgn ) { @@ -1824,7 +1824,7 @@ bool WinSalGraphicsImpl::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt return bRet; } -basegfx::B2DPoint impPixelSnap( +static basegfx::B2DPoint impPixelSnap( const basegfx::B2DPolygon& rPolygon, const basegfx::B2DHomMatrix& rObjectToDevice, basegfx::B2DHomMatrix& rObjectToDeviceInv, @@ -1866,7 +1866,7 @@ basegfx::B2DPoint impPixelSnap( return rPolygon.getB2DPoint(nIndex); } -void impAddB2DPolygonToGDIPlusGraphicsPathReal( +static void impAddB2DPolygonToGDIPlusGraphicsPathReal( Gdiplus::GraphicsPath& rGraphicsPath, const basegfx::B2DPolygon& rPolygon, const basegfx::B2DHomMatrix& rObjectToDevice, @@ -2274,7 +2274,7 @@ bool WinSalGraphicsImpl::drawPolyLine( return true; } -void paintToGdiPlus( +static void paintToGdiPlus( Gdiplus::Graphics& rGraphics, const SalTwoRect& rTR, Gdiplus::Bitmap& rBitmap) @@ -2305,7 +2305,7 @@ void paintToGdiPlus( &aAttributes); } -void setInterpolationMode( +static void setInterpolationMode( Gdiplus::Graphics& rGraphics, long rSrcWidth, long rDestWidth, diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index 664eedb6d269..4d21fde79da9 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -48,7 +48,7 @@ #undef max #endif -inline void ImplSetPixel4( sal_uInt8* pScanline, long nX, const BYTE cIndex ) +static inline void ImplSetPixel4( sal_uInt8* pScanline, long nX, const BYTE cIndex ) { BYTE& rByte = pScanline[ nX >> 1 ]; diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index d49040201cd7..ba205d1c8d74 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -67,13 +67,13 @@ static o3tl::lru_map<sal_GlyphId, tools::Rectangle> g_BoundRectCache(3000); static const int MAXFONTHEIGHT = 2048; -inline FIXED FixedFromDouble( double d ) +static inline FIXED FixedFromDouble( double d ) { const long l = static_cast<long>( d * 65536. ); return *reinterpret_cast<FIXED const *>(&l); } -inline int IntTimes256FromFixed(FIXED f) +static inline int IntTimes256FromFixed(FIXED f) { int nFixedTimes256 = (f.value << 8) + ((f.fract+0x80) >> 8); return nFixedTimes256; @@ -493,7 +493,7 @@ static int ImplWeightToWin( FontWeight eWeight ) return 0; } -inline FontPitch ImplLogPitchToSal( BYTE nPitch ) +static inline FontPitch ImplLogPitchToSal( BYTE nPitch ) { if ( nPitch & FIXED_PITCH ) return PITCH_FIXED; @@ -501,7 +501,7 @@ inline FontPitch ImplLogPitchToSal( BYTE nPitch ) return PITCH_VARIABLE; } -inline FontPitch ImplMetricPitchToSal( BYTE nPitch ) +static inline FontPitch ImplMetricPitchToSal( BYTE nPitch ) { // Grrrr! See NT help if ( !(nPitch & TMPF_FIXED_PITCH) ) @@ -510,7 +510,7 @@ inline FontPitch ImplMetricPitchToSal( BYTE nPitch ) return PITCH_VARIABLE; } -inline BYTE ImplPitchToWin( FontPitch ePitch ) +static inline BYTE ImplPitchToWin( FontPitch ePitch ) { if ( ePitch == PITCH_FIXED ) return FIXED_PITCH; @@ -750,7 +750,7 @@ void WinSalGraphics::SetTextColor( Color nColor ) ::SetTextColor( getHDC(), aCol ); } -int CALLBACK SalEnumQueryFontProcExW( const LOGFONTW*, +static int CALLBACK SalEnumQueryFontProcExW( const LOGFONTW*, const TEXTMETRICW*, DWORD, LPARAM lParam ) { @@ -1013,7 +1013,7 @@ bool WinSalGraphics::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilitie return mpWinFontEntry[0]->GetFontFace()->GetFontCapabilities(rFontCapabilities); } -int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, +static int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, const TEXTMETRICW* lpntme, DWORD nFontType, LPARAM lParam ) { diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index e295264a9890..7db333117402 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -343,7 +343,7 @@ bool WinSalGraphics::hitTestNativeControl( ControlType, return FALSE; } -bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr) +static bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, const OUString& aStr) { HRESULT hr = vsAPI.DrawThemeBackground( hTheme, hDC, iPart, iState, &rc, nullptr); @@ -359,7 +359,7 @@ bool ImplDrawTheme( HTHEME hTheme, HDC hDC, int iPart, int iState, RECT rc, cons return (hr == S_OK); } -tools::Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const tools::Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE ) +static tools::Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState, const tools::Rectangle& /* aRect */, THEMESIZE eTS = TS_TRUE ) { SIZE aSz; HRESULT hr = vsAPI.GetThemePartSize( hTheme, hDC, iPart, iState, nullptr, eTS, &aSz ); // TS_TRUE returns optimal size @@ -371,7 +371,7 @@ tools::Rectangle ImplGetThemeRect( HTHEME hTheme, HDC hDC, int iPart, int iState // Helper functions -void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const tools::Rectangle& rRect, +static void ImplConvertSpinbuttonValues( ControlPart nControlPart, const ControlState& rState, const tools::Rectangle& rRect, int* pLunaPart, int *pLunaState, RECT *pRect ) { if( nControlPart == ControlPart::ButtonDown ) @@ -523,7 +523,7 @@ static tools::Rectangle GetMenuPopupMarkRegion(const ImplControlValue& rValue) return aRet; } -bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, +static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, ControlType nType, ControlPart nPart, ControlState nState, diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 4e2b7788ce05..a2b78b990920 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -1283,7 +1283,7 @@ std::unique_ptr<SalPrinter> WinSalInstance::CreatePrinter( SalInfoPrinter* pInfo return std::unique_ptr<SalPrinter>(pPrinter); } -BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) +static BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) { SalData* pSalData = GetSalData(); WinSalPrinter* pPrinter; |