diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-11 10:40:19 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-12 11:49:58 +0000 |
commit | c3712f26582e5b89eb73866686d4ee857531ea4f (patch) | |
tree | 0c1e593518c29c3a135bac2a1866c09fbc9d07a2 /vcl | |
parent | d19c1a92317a962d9ff0d682ef99284a8afe9179 (diff) |
mpClipRegion is newly unused
Change-Id: I52d1848faf7821385bb0d87f9bb512e51365c4f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145327
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/unx/salgdi.h | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 46 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.hxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 7 |
5 files changed, 1 insertions, 66 deletions
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index ebe0a3c4147b..ec2fe34628c2 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -154,8 +154,6 @@ private: SalX11Screen m_nXScreen; - Region mpClipRegion; - bool bWindow_ : 1; // is Window bool bVirDev_ : 1; // is VirDev diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx index ce6b01a97fe0..0ef7e8cf5f8f 100644 --- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx +++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx @@ -36,16 +36,11 @@ public: virtual OUString getRenderBackendName() const override { return "gen"; } - void ResetClipRegion() override - { - mrCairoCommon.m_aClipRegion.SetNull(); - X11SalGraphicsImpl::ResetClipRegion(); - } + void ResetClipRegion() override { mrCairoCommon.m_aClipRegion.SetNull(); } void setClipRegion(const vcl::Region& i_rClip) override { mrCairoCommon.m_aClipRegion = i_rClip; - X11SalGraphicsImpl::setClipRegion(i_rClip); } void SetLineColor() override { mrCairoCommon.m_oLineColor = std::nullopt; } diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 625fc9d77909..677185809c2a 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -59,52 +59,6 @@ X11SalGraphicsImpl::~X11SalGraphicsImpl() { } -void X11SalGraphicsImpl::ResetClipRegion() -{ - if( !mrParent.mpClipRegion ) - return; - - XDestroyRegion( mrParent.mpClipRegion ); - mrParent.mpClipRegion = nullptr; -} - -void X11SalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip ) -{ - if( mrParent.mpClipRegion ) - XDestroyRegion( mrParent.mpClipRegion ); - mrParent.mpClipRegion = XCreateRegion(); - - RectangleVector aRectangles; - i_rClip.GetRegionRectangles(aRectangles); - - for (auto const& rectangle : aRectangles) - { - const tools::Long nW(rectangle.GetWidth()); - - if(nW) - { - const tools::Long nH(rectangle.GetHeight()); - - if(nH) - { - XRectangle aRect; - - aRect.x = static_cast<short>(rectangle.Left()); - aRect.y = static_cast<short>(rectangle.Top()); - aRect.width = static_cast<unsigned short>(nW); - aRect.height = static_cast<unsigned short>(nH); - XUnionRectWithRegion(&aRect, mrParent.mpClipRegion, mrParent.mpClipRegion); - } - } - } - - if( XEmptyRegion( mrParent.mpClipRegion ) ) - { - XDestroyRegion( mrParent.mpClipRegion ); - mrParent.mpClipRegion= nullptr; - } -} - tools::Long X11SalGraphicsImpl::GetGraphicsHeight() const { if( mrParent.m_pFrame ) diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 5af5491c3bc0..4173bab6e84d 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -52,16 +52,11 @@ public: virtual ~X11SalGraphicsImpl() override; - virtual void setClipRegion( const vcl::Region& ) override; - // // get the depth of the device virtual sal_uInt16 GetBitCount() const override; // get the width of the device virtual tools::Long GetGraphicsWidth() const override; - - // set the clip region to empty - virtual void ResetClipRegion() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 087bfc8eb6e2..f2dada01c3a0 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -83,7 +83,6 @@ X11SalGraphics::X11SalGraphics(): m_pFrame(nullptr), m_pVDev(nullptr), m_nXScreen( 0 ), - mpClipRegion(nullptr), bWindow_(false), bVirDev_(false) { @@ -110,12 +109,6 @@ X11SalGraphics::~X11SalGraphics() COVERITY_NOEXCEPT_FALSE void X11SalGraphics::freeResources() { - if( mpClipRegion ) - { - XDestroyRegion( mpClipRegion ); - mpClipRegion = nullptr; - } - mxImpl->freeResources(); if( m_pDeleteColormap ) |