[Libreoffice-commits] core.git: include/sfx2 include/vcl mysqlc/source sfx2/source vcl/generic vcl/headless vcl/inc vcl/source vcl/unx vcl/win
Noel Grandin
noel at peralex.com
Thu Dec 24 12:58:10 PST 2015
include/sfx2/titledockwin.hxx | 3 ---
include/vcl/combobox.hxx | 2 +-
mysqlc/source/mysqlc_connection.hxx | 2 +-
sfx2/source/dialog/titledockwin.cxx | 8 --------
vcl/generic/glyphs/glyphcache.cxx | 12 ++++--------
vcl/headless/svpgdi.cxx | 1 -
vcl/headless/svpglyphcache.cxx | 11 +----------
vcl/inc/generic/glyphcache.hxx | 19 ++-----------------
vcl/inc/salgdi.hxx | 2 --
vcl/inc/salgdiimpl.hxx | 2 --
vcl/inc/textrender.hxx | 2 --
vcl/inc/unx/salgdi.h | 2 --
vcl/inc/unx/salinst.h | 2 +-
vcl/inc/win/salgdi.h | 2 --
vcl/source/opengl/OpenGLHelper.cxx | 8 --------
vcl/unx/generic/gdi/gcach_xpeer.cxx | 15 +++------------
vcl/unx/generic/gdi/gcach_xpeer.hxx | 10 ++--------
vcl/unx/generic/gdi/salgdi.cxx | 5 -----
vcl/win/gdi/salgdi.cxx | 5 -----
19 files changed, 15 insertions(+), 98 deletions(-)
New commits:
commit 33fac4828038bc38ab4a0c4b891d762a5ae73e5e
Author: Noel Grandin <noel at peralex.com>
Date: Thu Dec 24 09:21:23 2015 +0200
loplugin:unnecessaryvirtual
and unwind some apparently now unused VCL OpenGL and GlyphCachePeer
stuff.
Change-Id: Ic85302d4e1ad4056dabc49c97a608891052e3167
Reviewed-on: https://gerrit.libreoffice.org/20920
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/sfx2/titledockwin.hxx b/include/sfx2/titledockwin.hxx
index ebae674..5118184 100644
--- a/include/sfx2/titledockwin.hxx
+++ b/include/sfx2/titledockwin.hxx
@@ -66,9 +66,6 @@ namespace sfx2
// DockingWindow overridables
void EndDocking(const Rectangle& rRect, bool bFloatMode) override;
- // own overridables
- virtual void onLayoutDone();
-
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
protected:
/** internal version of ResetToolBox
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 7bb281e..8396156 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -67,7 +67,7 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
virtual void Select();
- virtual void DoubleClick();
+ void DoubleClick();
virtual void Modify() override;
diff --git a/mysqlc/source/mysqlc_connection.hxx b/mysqlc/source/mysqlc_connection.hxx
index a41f349..50ac3c5 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -114,7 +114,7 @@ namespace connectivity
sal_Int32 getMysqlVersion()
throw(SQLException, RuntimeException);
- virtual void construct(const rtl::OUString& url,const css::uno::Sequence< css::beans::PropertyValue >& info)
+ void construct(const rtl::OUString& url,const css::uno::Sequence< css::beans::PropertyValue >& info)
throw(SQLException);
OConnection(MysqlCDriver& _rDriver, sql::Driver * cppDriver);
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index 0a8ac0d..154e406 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -92,12 +92,6 @@ namespace sfx2
}
- void TitledDockingWindow::onLayoutDone()
- {
- // not interested in
- }
-
-
void TitledDockingWindow::impl_scheduleLayout()
{
m_bLayoutPending = true;
@@ -136,8 +130,6 @@ namespace sfx2
aWindowSize.Height() - m_aBorder.Top() - m_aBorder.Bottom()
)
);
-
- onLayoutDone();
}
void TitledDockingWindow::ApplySettings(vcl::RenderContext& rRenderContext)
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 79c8279..8a2c955 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -36,9 +36,8 @@
static GlyphCache* pInstance = nullptr;
-GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
-: mrPeer( rPeer ),
- mnMaxSize( 1500000 ),
+GlyphCache::GlyphCache()
+: mnMaxSize( 1500000 ),
mnBytesUsed(sizeof(GlyphCache)),
mnLruIndex(0),
mnGlyphCount(0),
@@ -62,7 +61,6 @@ void GlyphCache::InvalidateAllGlyphs()
ServerFont* pServerFont = it->second;
// free all pServerFont related data
pServerFont->GarbageCollect( mnLruIndex+0x10000000 );
- mrPeer.RemovingFont(*pServerFont);
delete pServerFont;
}
@@ -262,7 +260,6 @@ void GlyphCache::GarbageCollect()
mpCurrentGCFont = nullptr;
const FontSelectPattern& rIFSD = pServerFont->GetFontSelData();
maFontList.erase( rIFSD );
- mrPeer.RemovingFont( *pServerFont );
mnBytesUsed -= pServerFont->GetByteCount();
// remove font from list of garbage collected fonts
@@ -296,9 +293,8 @@ void GlyphCache::GrowNotify()
GarbageCollect();
}
-inline void GlyphCache::RemovingGlyph( GlyphData& rGD )
+inline void GlyphCache::RemovingGlyph()
{
- mrPeer.RemovingGlyph( rGD );
mnBytesUsed -= sizeof( GlyphData );
--mnGlyphCount;
}
@@ -348,7 +344,7 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
{
OSL_ASSERT( mnBytesUsed >= sizeof(GlyphData) );
mnBytesUsed -= sizeof( GlyphData );
- GlyphCache::GetInstance().RemovingGlyph( rGD );
+ GlyphCache::GetInstance().RemovingGlyph();
it = maGlyphList.erase( it );
}
else
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index a7e401b..45bad1e 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -404,7 +404,6 @@ void SvpSalGraphics::setDevice( basebmp::BitmapDeviceSharedPtr& rDevice )
{
m_aOrigDevice = rDevice;
ResetClipRegion();
- m_aTextRenderImpl.setDevice(rDevice);
}
void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
diff --git a/vcl/headless/svpglyphcache.cxx b/vcl/headless/svpglyphcache.cxx
index 833e750..a94ea85 100644
--- a/vcl/headless/svpglyphcache.cxx
+++ b/vcl/headless/svpglyphcache.cxx
@@ -28,24 +28,16 @@
#include "generic/glyphcache.hxx"
#include "headless/svpgdi.hxx"
-class SvpGlyphPeer : public GlyphCachePeer
-{
-public:
- SvpGlyphPeer() {}
-};
-
namespace
{
struct GlyphCacheHolder
{
private:
- SvpGlyphPeer* m_pSvpGlyphPeer;
GlyphCache* m_pSvpGlyphCache;
public:
GlyphCacheHolder()
{
- m_pSvpGlyphPeer = new SvpGlyphPeer();
- m_pSvpGlyphCache = new GlyphCache( *m_pSvpGlyphPeer );
+ m_pSvpGlyphCache = new GlyphCache;
}
GlyphCache& getGlyphCache()
{
@@ -54,7 +46,6 @@ namespace
~GlyphCacheHolder()
{
delete m_pSvpGlyphCache;
- delete m_pSvpGlyphPeer;
}
};
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index cff39bef..2ac31c4 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -39,7 +39,6 @@
class FreetypeManager;
class FtFontInfo;
-class GlyphCachePeer;
class GlyphData;
class GraphiteFaceWrapper;
class FontConfigFontOptions;
@@ -55,7 +54,7 @@ namespace vcl { struct FontCapabilities; }
class VCL_DLLPUBLIC GlyphCache
{
public:
- explicit GlyphCache( GlyphCachePeer& );
+ explicit GlyphCache();
~GlyphCache();
static GlyphCache& GetInstance();
@@ -72,14 +71,11 @@ public:
void ClearFontCache();
void InvalidateAllGlyphs();
-protected:
- GlyphCachePeer& mrPeer;
-
private:
friend class ServerFont;
// used by ServerFont class only
void AddedGlyph( ServerFont&, GlyphData& );
- void RemovingGlyph( GlyphData& );
+ void RemovingGlyph();
void UsingGlyph( ServerFont&, GlyphData& );
void GrowNotify();
@@ -298,17 +294,6 @@ public:
virtual bool Layout(ServerFontLayout&, ImplLayoutArgs&) = 0;
};
-class GlyphCachePeer
-{
-protected:
- GlyphCachePeer() {}
- virtual ~GlyphCachePeer() {}
-
-public:
- virtual void RemovingFont( ServerFont& ) {}
- virtual void RemovingGlyph( GlyphData& ) {}
-};
-
#endif // INCLUDED_VCL_INC_GENERIC_GLYPHCACHE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 0397fcd..9fd3979 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -438,8 +438,6 @@ public:
sal_uInt8 nTransparency,
const OutputDevice *pOutDev );
- virtual OpenGLContext *BeginPaint() { return nullptr; }
-
virtual SystemGraphicsData GetGraphicsData() const = 0;
#if ENABLE_CAIRO_CANVAS
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index dd391b1..f0e58d2 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -211,8 +211,6 @@ public:
sal_uInt8 nTransparency ) = 0;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) = 0;
-
- virtual OpenGLContext *beginPaint() { return nullptr; }
};
#endif
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index f726255..32795fb 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -43,8 +43,6 @@ class TextRenderImpl
public:
virtual ~TextRenderImpl() {}
- virtual void setDevice(basebmp::BitmapDeviceSharedPtr& /*rDevice*/) {}
-
virtual void SetTextColor( SalColor nSalColor ) = 0;
virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ) = 0;
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ) = 0;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 9f744c8..ffe0918 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -263,8 +263,6 @@ public:
virtual css::uno::Any GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const basegfx::B2ISize& rSize) const override;
virtual SystemFontData GetSysFontData( int nFallbackLevel ) const override;
- virtual OpenGLContext *BeginPaint() override;
-
bool TryRenderCachedNativeControl(ControlCacheKey& aControlCacheKey,
int nX, int nY);
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
index 54119d4..b650ea0 100644
--- a/vcl/inc/unx/salinst.h
+++ b/vcl/inc/unx/salinst.h
@@ -56,7 +56,7 @@ public:
virtual void DestroyObject( SalObject* pObject ) override;
/// Gtk vclplug needs to pass GtkSalGraphics to X11SalVirtualDevice, so create it, and pass as pNewGraphics.
- virtual SalVirtualDevice* CreateX11VirtualDevice(SalGraphics* pGraphics, long &nDX, long &nDY,
+ SalVirtualDevice* CreateX11VirtualDevice(SalGraphics* pGraphics, long &nDX, long &nDY,
DeviceFormat eFormat, const SystemGraphicsData* pData, X11SalGraphics* pNewGraphics);
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 8c233a8..e15d8aa 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -436,8 +436,6 @@ public:
virtual SystemGraphicsData GetGraphicsData() const override;
- virtual OpenGLContext *BeginPaint() override;
-
/// Update settings based on the platform values
static void updateSettingsNative( AllSettings& rSettings );
};
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index f1e1660..bfd8110 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -1144,14 +1144,6 @@ OutputDevice::PaintScope::PaintScope(OutputDevice *pDev)
{
if( pDev->mpGraphics || pDev->AcquireGraphics() )
{
- OpenGLContext *pContext = pDev->mpGraphics->BeginPaint();
- if( pContext )
- {
- assert( pContext->mnPainting >= 0 );
- pContext->mnPainting++;
- pContext->acquire();
- pHandle = static_cast<void *>( pContext );
- }
}
}
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 486f3c1..d98fe3f 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -28,11 +28,7 @@
#include "gcach_xpeer.hxx"
#include "xrender_peer.hxx"
-X11GlyphPeer::X11GlyphPeer()
-{
-}
-
-X11GlyphPeer::~X11GlyphPeer()
+X11GlyphCache::~X11GlyphCache()
{
if( !ImplGetSVData() )
return;
@@ -57,8 +53,7 @@ X11GlyphPeer::~X11GlyphPeer()
}
}
-X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer )
-: GlyphCache( rPeer )
+X11GlyphCache::X11GlyphCache()
{
}
@@ -67,20 +62,16 @@ namespace
struct GlyphCacheHolder
{
private:
- X11GlyphPeer* m_pX11GlyphPeer;
X11GlyphCache* m_pX11GlyphCache;
public:
GlyphCacheHolder()
{
- m_pX11GlyphPeer = new X11GlyphPeer();
- m_pX11GlyphCache = new X11GlyphCache( *m_pX11GlyphPeer );
+ m_pX11GlyphCache = new X11GlyphCache;
}
void release()
{
delete m_pX11GlyphCache;
- delete m_pX11GlyphPeer;
m_pX11GlyphCache = nullptr;
- m_pX11GlyphPeer = nullptr;
}
X11GlyphCache& getGlyphCache()
{
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx
index ecd21a7..5d3b89f 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.hxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx
@@ -22,17 +22,11 @@
#include "generic/glyphcache.hxx"
-class X11GlyphPeer : public GlyphCachePeer
-{
-public:
- X11GlyphPeer();
- virtual ~X11GlyphPeer();
-};
-
class X11GlyphCache : public GlyphCache
{
public:
- explicit X11GlyphCache( X11GlyphPeer& );
+ explicit X11GlyphCache();
+ virtual ~X11GlyphCache();
static X11GlyphCache& GetInstance();
static void KillInstance();
};
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 09ca082..650bd83 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -556,11 +556,6 @@ bool X11SalGraphics::drawGradient(const tools::PolyPolygon& rPoly, const Gradien
return mxImpl->drawGradient(rPoly, rGradient);
}
-OpenGLContext *X11SalGraphics::BeginPaint()
-{
- return mxImpl->beginPaint();
-}
-
SalGeometryProvider *X11SalGraphics::GetGeometryProvider() const
{
if (m_pFrame)
diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx
index 366b81c..36ff322 100644
--- a/vcl/win/gdi/salgdi.cxx
+++ b/vcl/win/gdi/salgdi.cxx
@@ -1046,9 +1046,4 @@ SystemGraphicsData WinSalGraphics::GetGraphicsData() const
return aRes;
}
-OpenGLContext *WinSalGraphics::BeginPaint()
-{
- return mpImpl->beginPaint();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list