vcl/inc/qt5/QtVirtualDevice.hxx | 2 -- vcl/qt5/QtVirtualDevice.cxx | 27 --------------------------- 2 files changed, 29 deletions(-)
New commits: commit 8c70c58c28fbaf004ef8fb3f157be0e719951669 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Jan 18 14:15:46 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jan 18 20:08:16 2025 +0100 QtVirtualDevice::SetSizeUsingBuffer is unnecessary this method is only used by LOK and LOK only renders to the SVP backend Change-Id: I33b47e549e4762c61cb921ebbe4e60f97b0c28cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180439 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/vcl/inc/qt5/QtVirtualDevice.hxx b/vcl/inc/qt5/QtVirtualDevice.hxx index 0673c03268cf..f20b937d5488 100644 --- a/vcl/inc/qt5/QtVirtualDevice.hxx +++ b/vcl/inc/qt5/QtVirtualDevice.hxx @@ -45,8 +45,6 @@ public: virtual void ReleaseGraphics(SalGraphics* pGraphics) override; virtual bool SetSize(tools::Long nNewDX, tools::Long nNewDY) override; - virtual bool SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY, - sal_uInt8* pBuffer) override; // SalGeometryProvider virtual tools::Long GetWidth() const override; diff --git a/vcl/qt5/QtVirtualDevice.cxx b/vcl/qt5/QtVirtualDevice.cxx index 68c7c4a5add2..c52316eeb7c5 100644 --- a/vcl/qt5/QtVirtualDevice.cxx +++ b/vcl/qt5/QtVirtualDevice.cxx @@ -70,33 +70,6 @@ bool QtVirtualDevice::SetSize(tools::Long nNewDX, tools::Long nNewDY) return true; } -bool QtVirtualDevice::SetSizeUsingBuffer(tools::Long nNewDX, tools::Long nNewDY, sal_uInt8* pBuffer) -{ - if (nNewDX == 0) - nNewDX = 1; - if (nNewDY == 0) - nNewDY = 1; - - if (m_pImage && m_aFrameSize.width() == nNewDX && m_aFrameSize.height() == nNewDY) - return true; - - m_aFrameSize = QSize(nNewDX, nNewDY); - - nNewDX *= m_fScale; - nNewDY *= m_fScale; - - m_pImage.reset(new QImage(pBuffer, nNewDX, nNewDY, Qt_DefaultFormat32)); - - m_pImage->fill(Qt::transparent); - m_pImage->setDevicePixelRatio(m_fScale); - - // update device in existing graphics - for (auto pQtGraph : m_aGraphics) - pQtGraph->ChangeQImage(m_pImage.get()); - - return true; -} - tools::Long QtVirtualDevice::GetWidth() const { return m_pImage ? m_aFrameSize.width() : 0; } tools::Long QtVirtualDevice::GetHeight() const { return m_pImage ? m_aFrameSize.height() : 0; }