summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/opengl/win/gdiimpl.cxx8
-rw-r--r--vcl/win/app/salinst.cxx4
-rw-r--r--vcl/win/gdi/gdiimpl.cxx4
-rw-r--r--vcl/win/gdi/salbmp.cxx4
-rw-r--r--vcl/win/gdi/salfont.cxx16
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx10
-rw-r--r--vcl/win/gdi/winlayout.cxx10
-rw-r--r--vcl/win/window/keynames.cxx4
8 files changed, 57 insertions, 3 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index c47de25b19f3..d736cfc08972 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -25,6 +25,8 @@
static std::vector<HGLRC> g_vShareList;
static bool g_bAnyCurrent;
+namespace {
+
class GLWinWindow : public GLWindow
{
public:
@@ -34,6 +36,8 @@ public:
GLWinWindow();
};
+}
+
GLWinWindow::GLWinWindow()
: hWnd(nullptr)
, hDC(nullptr)
@@ -41,6 +45,8 @@ GLWinWindow::GLWinWindow()
{
}
+namespace {
+
class WinOpenGLContext : public OpenGLContext
{
public:
@@ -59,6 +65,8 @@ private:
virtual void swapBuffers() override;
};
+}
+
void WinOpenGLContext::swapBuffers()
{
OpenGLZone aZone;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 1915fb6f6b97..43cc8e8e6a85 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -665,12 +665,16 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
return nRet;
}
+namespace {
+
struct MsgRange
{
UINT nStart;
UINT nEnd;
};
+}
+
static std::vector<MsgRange> GetOtherRanges( VclInputFlags nType )
{
assert( nType != VCL_INPUT_ANY );
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 9b7c8bdaebd4..05c1037bcbe1 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -1972,6 +1972,8 @@ static void impAddB2DPolygonToGDIPlusGraphicsPathReal(
}
}
+namespace {
+
class SystemDependentData_GraphicsPath : public basegfx::SystemDependentData
{
private:
@@ -1997,6 +1999,8 @@ public:
virtual sal_Int64 estimateUsageInBytes() const override;
};
+}
+
SystemDependentData_GraphicsPath::SystemDependentData_GraphicsPath(
basegfx::SystemDependentDataManager& rSystemDependentDataManager,
std::shared_ptr<Gdiplus::GraphicsPath>& rpGraphicsPath,
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 128f786381e0..d891965e57ee 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -95,6 +95,8 @@ void WinSalBitmap::Destroy()
mnBitCount = 0;
}
+namespace {
+
class SystemDependentData_GdiPlusBitmap : public basegfx::SystemDependentData
{
private:
@@ -113,6 +115,8 @@ public:
virtual sal_Int64 estimateUsageInBytes() const override;
};
+}
+
SystemDependentData_GdiPlusBitmap::SystemDependentData_GdiPlusBitmap(
basegfx::SystemDependentDataManager& rSystemDependentDataManager,
const std::shared_ptr<Gdiplus::Bitmap>& rGdiPlusBitmap,
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index ec122f48e41a..323b6af952e9 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -79,6 +79,8 @@ static int IntTimes256FromFixed(FIXED f)
return nFixedTimes256;
}
+namespace {
+
// raw font data with a scoped lifetime
class RawFontData
{
@@ -93,6 +95,8 @@ private:
unsigned mnByteCount;
};
+}
+
RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
: mnByteCount( 0 )
{
@@ -145,6 +149,8 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
// platform specific font substitution hooks for glyph fallback enhancement
+namespace {
+
class WinPreMatchFontSubstititution
: public ImplPreMatchFontSubstitution
{
@@ -172,6 +178,8 @@ private:
bool HasMissingChars(PhysicalFontFace*, OUString& rMissingChars) const;
};
+}
+
// does a font face hold the given missing characters?
bool WinGlyphFallbackSubstititution::HasMissingChars(PhysicalFontFace* pFace, OUString& rMissingChars) const
{
@@ -338,6 +346,8 @@ bool WinGlyphFallbackSubstititution::FindFontSubstitute(FontSelectPattern& rFont
return bFound;
}
+namespace {
+
struct ImplEnumInfo
{
HDC mhDC;
@@ -348,6 +358,8 @@ struct ImplEnumInfo
int mnFontCount;
};
+}
+
static rtl_TextEncoding ImplCharSetToSal( BYTE nCharSet )
{
rtl_TextEncoding eTextEncoding;
@@ -1513,6 +1525,8 @@ ScopedFont::~ScopedFont()
}
}
+namespace {
+
class ScopedTrueTypeFont
{
public:
@@ -1528,6 +1542,8 @@ private:
TrueTypeFont * m_pFont;
};
+}
+
ScopedTrueTypeFont::~ScopedTrueTypeFont()
{
if (m_pFont != nullptr)
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index d0d0a07b8105..4b4cd9cf3cd6 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -64,6 +64,8 @@ static ThemeMap aThemeMap;
it is not available on all Windows platforms
*****************************************************/
+namespace {
+
class VisualStylesAPI
{
private:
@@ -95,9 +97,11 @@ public:
HRESULT DrawThemeBackground( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect );
HRESULT DrawThemeText( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect );
HRESULT GetThemePartSize( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz );
- BOOL IsThemeActive();
+ bool IsThemeActive();
};
+}
+
static VisualStylesAPI vsAPI;
VisualStylesAPI::VisualStylesAPI()
@@ -178,12 +182,12 @@ HRESULT VisualStylesAPI::GetThemePartSize( HTHEME hTheme, HDC hdc, int iPartId,
return S_FALSE;
}
-BOOL VisualStylesAPI::IsThemeActive()
+bool VisualStylesAPI::IsThemeActive()
{
if(lpfnIsThemeActive)
return (*lpfnIsThemeActive) ();
else
- return FALSE;
+ return false;
}
/*********************************************************
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 7b8f5df30180..935aeb84d2a4 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -345,6 +345,8 @@ float WinFontInstance::getHScale() const
return nWidth / nHeight;
}
+namespace {
+
struct BlobReference
{
hb_blob_t* mpBlob;
@@ -359,7 +361,13 @@ struct BlobReference
}
~BlobReference() { hb_blob_destroy(mpBlob); }
};
+
+}
+
using BlobCacheKey = std::pair<rtl::Reference<PhysicalFontFace>, hb_tag_t>;
+
+namespace {
+
struct BlobCacheKeyHash
{
std::size_t operator()(BlobCacheKey const& rKey) const
@@ -371,6 +379,8 @@ struct BlobCacheKeyHash
}
};
+}
+
static hb_blob_t* getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pUserData)
{
static o3tl::lru_map<BlobCacheKey, BlobReference, BlobCacheKeyHash> gCache(50);
diff --git a/vcl/win/window/keynames.cxx b/vcl/win/window/keynames.cxx
index 6ca192ba7d5c..0d4f12f82cb8 100644
--- a/vcl/win/window/keynames.cxx
+++ b/vcl/win/window/keynames.cxx
@@ -51,6 +51,8 @@
namespace vcl_sal {
+ namespace {
+
struct KeysNameReplacement
{
LONG aSymbol;
@@ -64,6 +66,8 @@ namespace vcl_sal {
int nReplacements;
};
+ }
+
// CAUTION CAUTION CAUTION
// Every string value in the replacements tables must be in UTF-8
// but with the UTF-8 bytes encoded, not as such! Be careful!