summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-09-24 15:41:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-09-24 17:22:05 +0200
commit928b1b04adc1cd49cc5d00069084e03675a320f3 (patch)
tree8710687a4a66a628bd12c5482d7d93cc27f8996a /vcl/win
parentec709a8d5e808b970a8930a389c0a5a6f61fe8c7 (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')
-rw-r--r--vcl/win/app/salinst.cxx2
-rw-r--r--vcl/win/gdi/gdiimpl.cxx10
-rw-r--r--vcl/win/gdi/salbmp.cxx2
-rw-r--r--vcl/win/gdi/salfont.cxx14
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx8
-rw-r--r--vcl/win/gdi/salprn.cxx2
-rw-r--r--vcl/win/window/salframe.cxx6
-rw-r--r--vcl/win/window/salmenu.cxx2
-rw-r--r--vcl/win/window/salobj.cxx12
9 files changed, 29 insertions, 29 deletions
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index d7f8da7471f9..1c67113322dc 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -85,7 +85,7 @@ void SalAbort( const OUString& rErrorText, bool )
}
}
-LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
+static LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
class SalYieldMutex : public comphelper::SolarMutex
{
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;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 8b815f42c008..35da3a0b5f04 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -1100,7 +1100,7 @@ void WinSalFrame::DrawMenuBar()
::DrawMenuBar( mhWnd );
}
-HWND ImplGetParentHwnd( HWND hWnd )
+static HWND ImplGetParentHwnd( HWND hWnd )
{
WinSalFrame* pFrame = GetWindowPtr( hWnd );
if( !pFrame || !pFrame->GetWindow())
@@ -2500,7 +2500,7 @@ OUString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
return OUString( aKeyBuf, sal::static_int_cast< sal_uInt16 >(nKeyBufLen) );
}
-inline Color ImplWinColorToSal( COLORREF nColor )
+static inline Color ImplWinColorToSal( COLORREF nColor )
{
return Color( GetRValue( nColor ), GetGValue( nColor ), GetBValue( nColor ) );
}
@@ -5427,7 +5427,7 @@ static bool ImplSalWheelMousePos( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
return true;
}
-LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, bool& rDef )
+static LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, bool& rDef )
{
LRESULT nRet = 0;
static bool bInWheelMsg = false;
diff --git a/vcl/win/window/salmenu.cxx b/vcl/win/window/salmenu.cxx
index 0b14967bdc61..8caaf1227b9f 100644
--- a/vcl/win/window/salmenu.cxx
+++ b/vcl/win/window/salmenu.cxx
@@ -199,7 +199,7 @@ void WinSalMenu::RemoveItem( unsigned nPos )
}
}
-void ImplRemoveItemById( WinSalMenu *pSalMenu, unsigned nItemId )
+static void ImplRemoveItemById( WinSalMenu *pSalMenu, unsigned nItemId )
{
if( !pSalMenu )
return;
diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx
index fcc2cd043f92..f03d2b71afce 100644
--- a/vcl/win/window/salobj.cxx
+++ b/vcl/win/window/salobj.cxx
@@ -66,7 +66,7 @@ WinSalObject* ImplFindSalObject( HWND hWndChild )
return nullptr;
}
-WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
+static WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
{
WinSalFrame* pFrame = nullptr;
WinSalObject* pObject = ImplFindSalObject( hWnd );
@@ -87,7 +87,7 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd )
return pFrame;
}
-LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
+static LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
{
// Used for Unicode and none Unicode
SalData* pSalData = GetSalData();
@@ -258,7 +258,7 @@ void ImplSalPostDispatchMsg( const MSG* pMsg )
pSalData->mnSalObjWantKeyEvt = 0;
}
-LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
+static LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
{
WinSalObject* pSysObj;
LRESULT nRet = 0;
@@ -375,7 +375,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
return nRet;
}
-LRESULT CALLBACK SalSysObjWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
+static LRESULT CALLBACK SalSysObjWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
{
int bDef = TRUE;
LRESULT nRet = SalSysObjWndProc( hWnd, nMsg, wParam, lParam, bDef );
@@ -384,7 +384,7 @@ LRESULT CALLBACK SalSysObjWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM
return nRet;
}
-LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
+static LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
{
LRESULT nRet = 0;
@@ -446,7 +446,7 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA
return nRet;
}
-LRESULT CALLBACK SalSysObjChildWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
+static LRESULT CALLBACK SalSysObjChildWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
{
int bDef = TRUE;
LRESULT nRet = SalSysObjChildWndProc( hWnd, nMsg, wParam, lParam, bDef );