[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

2023-07-31 Thread Caolán McNamara (via logerrit)
 vcl/headless/CairoCommon.cxx|   10 ++
 vcl/headless/SvpGraphicsBackend.cxx |5 +--
 vcl/inc/headless/CairoCommon.hxx|2 -
 vcl/inc/headless/SvpGraphicsBackend.hxx |2 -
 vcl/inc/qt5/QtGraphics.hxx  |2 -
 vcl/inc/quartz/salgdi.h |2 -
 vcl/inc/salgdi.hxx  |8 ++---
 vcl/inc/salgdiimpl.hxx  |2 -
 vcl/inc/skia/gdiimpl.hxx|2 -
 vcl/inc/win/salgdi.h|2 -
 vcl/qt5/QtGraphics_GDI.cxx  |9 ++---
 vcl/quartz/AquaGraphicsBackend.cxx  |   12 +++
 vcl/skia/gdiimpl.cxx|7 +---
 vcl/source/gdi/salgdilayout.cxx |7 ++--
 vcl/source/outdev/line.cxx  |3 +
 vcl/source/outdev/polygon.cxx   |   22 +++---
 vcl/source/outdev/transparent.cxx   |   37 +++-
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx |5 +--
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx |2 -
 vcl/win/gdi/gdiimpl.cxx |6 +--
 vcl/win/gdi/gdiimpl.hxx |2 -
 vcl/win/gdi/salgdi_gdiplus.cxx  |4 +-
 22 files changed, 71 insertions(+), 82 deletions(-)

New commits:
commit 74963f654768d6f25ac1ea907736731d9a886853
Author: Caolán McNamara 
AuthorDate: Sun Jul 30 22:03:39 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Jul 31 09:58:28 2023 +0200

all drawPolyPolygon variants return true now

since:

commit 4998de76ed1da4039e30718941d50d6f1dfe4f82
Date:   Sun Jul 30 07:40:48 2023 +

tdf#156230: Drop freshly unused GenPspGfxBackend

Change-Id: I7fc2a068f80ed392c5d58772d130bf7f51c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155076
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 417fd633f87e..d1a20ec1624b 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -872,7 +872,7 @@ void CairoCommon::drawPolyPolygon(sal_uInt32 nPoly, const 
sal_uInt32* pPointCoun
 drawPolyPolygon(basegfx::B2DHomMatrix(), aPolyPoly, 0.0, bAntiAlias);
 }
 
-bool CairoCommon::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
+void CairoCommon::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
   const basegfx::B2DPolyPolygon& rPolyPolygon, 
double fTransparency,
   bool bAntiAlias)
 {
@@ -882,14 +882,14 @@ bool CairoCommon::drawPolyPolygon(const 
basegfx::B2DHomMatrix& rObjectToDevice,
 if (0 == rPolyPolygon.count() || !(bHasFill || bHasLine) || fTransparency 
< 0.0
 || fTransparency >= 1.0)
 {
-return true;
+return;
 }
 
 // don't bother trying to draw stuff which is effectively invisible
 basegfx::B2DRange aPolygonRange = rPolyPolygon.getB2DRange();
 aPolygonRange.transform(rObjectToDevice);
 if (aPolygonRange.getWidth() < 0.1 || aPolygonRange.getHeight() < 0.1)
-return true;
+return;
 
 cairo_t* cr = getCairoContext(true, bAntiAlias);
 if (cairo_status(cr) != CAIRO_STATUS_SUCCESS)
@@ -897,7 +897,7 @@ bool CairoCommon::drawPolyPolygon(const 
basegfx::B2DHomMatrix& rObjectToDevice,
 SAL_WARN("vcl.gdi",
  "cannot render to surface: " << 
cairo_status_to_string(cairo_status(cr)));
 releaseCairoContext(cr, true, basegfx::B2DRange());
-return true;
+return;
 }
 clipRegion(cr);
 
@@ -949,8 +949,6 @@ bool CairoCommon::drawPolyPolygon(const 
basegfx::B2DHomMatrix& rObjectToDevice,
 // of damage so they can be correctly redrawn
 extents.transform(rObjectToDevice);
 releaseCairoContext(cr, true, extents);
-
-return true;
 }
 
 void CairoCommon::drawPolyLine(sal_uInt32 nPoints, const Point* pPtAry, bool 
bAntiAlias)
diff --git a/vcl/headless/SvpGraphicsBackend.cxx 
b/vcl/headless/SvpGraphicsBackend.cxx
index dafbe75ff3ca..e8d582b98fcc 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -109,12 +109,11 @@ void SvpGraphicsBackend::drawPolyPolygon(sal_uInt32 
nPoly, const sal_uInt32* pPo
 m_rCairoCommon.drawPolyPolygon(nPoly, pPointCounts, pPtAry, 
getAntiAlias());
 }
 
-bool SvpGraphicsBackend::drawPolyPolygon(const basegfx::B2DHomMatrix& 
rObjectToDevice,
+void SvpGraphicsBackend::drawPolyPolygon(const basegfx::B2DHomMatrix& 
rObjectToDevice,
  const basegfx::B2DPolyPolygon& 
rPolyPolygon,
  double fTransparency)
 {
-return m_rCairoCommon.drawPolyPolygon(rObjectToDevice, rPolyPolygon, 
fTransparency,
-  getAntiAlias());
+

[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

2022-12-20 Thread Noel Grandin (via logerrit)
 vcl/headless/SvpGraphicsBackend.cxx |3 +--
 vcl/inc/headless/SvpGraphicsBackend.hxx |2 +-
 vcl/inc/qt5/QtGraphics.hxx  |2 +-
 vcl/inc/quartz/salgdi.h |2 +-
 vcl/inc/salgdi.hxx  |8 
 vcl/inc/salgdiimpl.hxx  |2 +-
 vcl/inc/skia/gdiimpl.hxx|2 +-
 vcl/inc/unx/GenPspGfxBackend.hxx|2 +-
 vcl/inc/win/salgdi.h|2 +-
 vcl/qt5/QtGraphics_GDI.cxx  |3 +--
 vcl/quartz/AquaGraphicsBackend.cxx  |4 +---
 vcl/skia/gdiimpl.cxx|5 ++---
 vcl/source/gdi/salgdilayout.cxx |6 +++---
 vcl/source/outdev/clipping.cxx  |5 ++---
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx |4 ++--
 vcl/unx/generic/gdi/gdiimpl.cxx |3 +--
 vcl/unx/generic/gdi/gdiimpl.hxx |2 +-
 vcl/unx/generic/print/GenPspGfxBackend.cxx  |4 +---
 vcl/win/gdi/gdiimpl.cxx |5 +
 vcl/win/gdi/gdiimpl.hxx |2 +-
 vcl/win/gdi/salgdi.cxx  |4 ++--
 21 files changed, 30 insertions(+), 42 deletions(-)

New commits:
commit 6f43f00279252265fe4892b46fe0b4686ff721ed
Author: Noel Grandin 
AuthorDate: Tue Dec 20 18:02:32 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 21 06:44:59 2022 +

No need for bool return value here

all of the implementations of this method return true.

Change-Id: I6dc02499af1809110edd482a48d9f6d5d42ead19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144620
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/headless/SvpGraphicsBackend.cxx 
b/vcl/headless/SvpGraphicsBackend.cxx
index cd5487031a63..10667e53e4dd 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -34,10 +34,9 @@ void SvpGraphicsBackend::Init() {}
 
 void SvpGraphicsBackend::freeResources() {}
 
-bool SvpGraphicsBackend::setClipRegion(const vcl::Region& i_rClip)
+void SvpGraphicsBackend::setClipRegion(const vcl::Region& i_rClip)
 {
 m_rCairoCommon.m_aClipRegion = i_rClip;
-return true;
 }
 
 void SvpGraphicsBackend::ResetClipRegion() { 
m_rCairoCommon.m_aClipRegion.SetNull(); }
diff --git a/vcl/inc/headless/SvpGraphicsBackend.hxx 
b/vcl/inc/headless/SvpGraphicsBackend.hxx
index 997f1bc84e9d..7bd78118f6f4 100644
--- a/vcl/inc/headless/SvpGraphicsBackend.hxx
+++ b/vcl/inc/headless/SvpGraphicsBackend.hxx
@@ -40,7 +40,7 @@ public:
 
 OUString getRenderBackendName() const override { return "svp"; }
 
-bool setClipRegion(vcl::Region const& rRegion) override;
+void setClipRegion(vcl::Region const& rRegion) override;
 void ResetClipRegion() override;
 
 sal_uInt16 GetBitCount() const override;
diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx
index b8a168d1a3cf..b87e6d80b648 100644
--- a/vcl/inc/qt5/QtGraphics.hxx
+++ b/vcl/inc/qt5/QtGraphics.hxx
@@ -68,7 +68,7 @@ public:
 
 OUString getRenderBackendName() const override { return "qt5"; }
 
-bool setClipRegion(vcl::Region const& rRegion) override;
+void setClipRegion(vcl::Region const& rRegion) override;
 void ResetClipRegion() override;
 
 sal_uInt16 GetBitCount() const override;
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 9e070c4215ce..8886d19700a7 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -340,7 +340,7 @@ public:
 return "aqua";
 }
 
-bool setClipRegion(vcl::Region const& rRegion) override;
+void setClipRegion(vcl::Region const& rRegion) override;
 void ResetClipRegion() override;
 
 sal_uInt16 GetBitCount() const override;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 0b8952b74123..a7fbe287fc48 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -183,7 +183,7 @@ public:
 
 // non virtual methods; these do possible coordinate mirroring and
 // then delegate to protected virtual methods
-boolSetClipRegion( const vcl::Region&, const 
OutputDevice& rOutDev );
+voidSetClipRegion( const vcl::Region&, const 
OutputDevice& rOutDev );
 
 // draw --> LineColor and FillColor and RasterOp and ClipRegion
 voidDrawPixel( tools::Long nX, tools::Long nY, 
const OutputDevice& rOutDev );
@@ -426,7 +426,7 @@ protected:
 
 friend class vcl::FileDefinitionWidgetDraw;
 
-virtual boolsetClipRegion( const vcl::Region& ) = 0;
+virtual voidsetClipRegion( const vcl::Region& ) = 0;
 
 // draw --> LineColor and FillColor and RasterOp and ClipRegion
 virtual voiddrawPixel( tools::Long nX, tools::Long nY ) = 
0;
@@ -661,9 +661,9 @@ public:
 

[Libreoffice-commits] core.git: vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

2021-05-01 Thread Caolán McNamara (via logerrit)
 vcl/headless/svpinst.cxx  |4 ++--
 vcl/inc/headless/svpinst.hxx  |2 +-
 vcl/inc/osx/salinst.h |2 +-
 vcl/inc/qt5/Qt5Instance.hxx   |2 +-
 vcl/inc/salinst.hxx   |2 +-
 vcl/inc/skia/x11/salvd.hxx|2 +-
 vcl/inc/unx/gtk/gtkinst.hxx   |2 +-
 vcl/inc/unx/salinst.h |4 ++--
 vcl/inc/unx/salvd.h   |2 +-
 vcl/inc/win/salinst.h |2 +-
 vcl/qt5/Qt5Instance.cxx   |4 ++--
 vcl/quartz/salvd.cxx  |6 +++---
 vcl/skia/x11/salvd.cxx|5 ++---
 vcl/source/gdi/virdev.cxx |4 ++--
 vcl/unx/generic/gdi/salvd.cxx |   18 --
 vcl/unx/gtk3/gtk3gtkinst.cxx  |4 ++--
 vcl/win/gdi/salvd.cxx |   10 +-
 17 files changed, 36 insertions(+), 39 deletions(-)

New commits:
commit 3d65c10f39e191b7e1ceb6fc94fed9e6196de0aa
Author: Caolán McNamara 
AuthorDate: Fri Apr 30 21:14:57 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat May 1 17:08:41 2021 +0200

Related: cid#1478001 CreateVirtualDevice never passed a null pGraphics arg

Change-Id: I0701b15a28ab3583586c0c8018c511e100b41a93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114948
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 422928f98d38..700c6b87f645 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -241,12 +241,12 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
 
 #ifndef IOS
 
-std::unique_ptr 
SvpSalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
+std::unique_ptr 
SvpSalInstance::CreateVirtualDevice(SalGraphics& rGraphics,
tools::Long , 
tools::Long ,
DeviceFormat 
/*eFormat*/,
const 
SystemGraphicsData* pGd)
 {
-SvpSalGraphics *pSvpSalGraphics = dynamic_cast(pGraphics);
+SvpSalGraphics *pSvpSalGraphics = 
dynamic_cast();
 assert(pSvpSalGraphics);
 #ifndef ANDROID
 // tdf#127529 normally pPreExistingTarget is null and we are a true 
virtualdevice drawing to a backing buffer.
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index e95353a0c227..2f48049b4839 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -134,7 +134,7 @@ public:
 // nBitCount: 0 == Default(=as window) / 1 == Mono
 // pData allows for using a system dependent graphics or device context
 virtual std::unique_ptr
-CreateVirtualDevice( SalGraphics* pGraphics,
+CreateVirtualDevice( SalGraphics& rGraphics,
  tools::Long , 
tools::Long ,
  DeviceFormat eFormat, 
const SystemGraphicsData *pData = nullptr ) override;
 
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 97cbe37e2038..e143f970db0d 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -101,7 +101,7 @@ public:
   bool bShow ) override;
 virtual voidDestroyObject( SalObject* pObject ) override;
 virtual std::unique_ptr
-CreateVirtualDevice( SalGraphics* pGraphics,
+CreateVirtualDevice( SalGraphics& rGraphics,
tools::Long , 
tools::Long ,
DeviceFormat eFormat,
const SystemGraphicsData 
*pData = nullptr ) override;
diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx
index 111e86f0878a..41b9aca894d0 100644
--- a/vcl/inc/qt5/Qt5Instance.hxx
+++ b/vcl/inc/qt5/Qt5Instance.hxx
@@ -111,7 +111,7 @@ public:
 virtual void DestroyObject(SalObject* pObject) override;
 
 virtual std::unique_ptr
-CreateVirtualDevice(SalGraphics* pGraphics, tools::Long& nDX, tools::Long& 
nDY,
+CreateVirtualDevice(SalGraphics& rGraphics, tools::Long& nDX, tools::Long& 
nDY,
 DeviceFormat eFormat, const SystemGraphicsData* pData 
= nullptr) override;
 
 virtual SalInfoPrinter* CreateInfoPrinter(SalPrinterQueueInfo* pQueueInfo,
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index 1a6ce96cf809..6ce6a3d2743d 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -105,7 +105,7 @@ public:
 // if a system context is passed in nDX and nDY are updated to reflect
 // its size; otherwise these remain unchanged.
 virtual std::unique_ptr
-CreateVirtualDevice( SalGraphics* pGraphics,
+CreateVirtualDevice( SalGraphics& rGraphics,
  tools::Long , tools::Long 
,
  DeviceFormat