[Libreoffice-commits] core.git: vcl/inc vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 30 19:40:22 UTC 2020


 vcl/inc/salgdi.hxx                          |    4 ++++
 vcl/source/gdi/FileDefinitionWidgetDraw.cxx |   11 +++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit d9c17727acd6d43efe107f6a6f938863e8e49654
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Nov 30 12:04:18 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Nov 30 20:39:31 2020 +0100

    FileDefinitionWidgetDraw never provides OutputDevice*s for RTL mirroring
    
    I'm not certain if the lack of an OutputDevice* to allow mirroring the
    drawing in a RTL environment is deliberate or not, but it seems
    plausible that is what we want here and that we are already mirrored by
    the time we get here, so let FileDefinitionWidgetDraw call the
    underlying post-mirror stage drawing functions directly
    
    Change-Id: Ia80a5c0438ed28ab3f9bd91b19494a19875bcab3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106858
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index af2173b80daf..e0cd3e53a2ac 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -57,6 +57,7 @@ namespace basegfx {
 namespace vcl
 {
 class AbstractTrueTypeFont;
+class FileDefinitionWidgetDraw;
 typedef struct TTGlobalFontInfo_ TTGlobalFontInfo;
 }
 
@@ -446,6 +447,9 @@ public:
 #endif // ENABLE_CAIRO_CANVAS
 
 protected:
+
+    friend class vcl::FileDefinitionWidgetDraw;
+
     virtual bool                setClipRegion( const vcl::Region& ) = 0;
 
     // draw --> LineColor and FillColor and RasterOp and ClipRegion
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index e82980d83ea8..16a8fe52efbe 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -211,7 +211,7 @@ void FileDefinitionWidgetDraw::drawPolyPolygon(SalGraphics& rGraphics,
                                                const basegfx::B2DPolyPolygon& i_rPolyPolygon,
                                                double i_fTransparency)
 {
-    rGraphics.DrawPolyPolygon(rObjectToDevice, i_rPolyPolygon, i_fTransparency, nullptr);
+    rGraphics.drawPolyPolygon(rObjectToDevice, i_rPolyPolygon, i_fTransparency);
 }
 
 void FileDefinitionWidgetDraw::drawPolyLine(
@@ -220,22 +220,21 @@ void FileDefinitionWidgetDraw::drawPolyLine(
     const std::vector<double>* i_pStroke, basegfx::B2DLineJoin i_eLineJoin,
     css::drawing::LineCap i_eLineCap, double i_fMiterMinimumAngle, bool bPixelSnapHairline)
 {
-    rGraphics.DrawPolyLine(rObjectToDevice, i_rPolygon, i_fTransparency, i_fLineWidth, i_pStroke,
-                           i_eLineJoin, i_eLineCap, i_fMiterMinimumAngle, bPixelSnapHairline,
-                           nullptr);
+    rGraphics.drawPolyLine(rObjectToDevice, i_rPolygon, i_fTransparency, i_fLineWidth, i_pStroke,
+                           i_eLineJoin, i_eLineCap, i_fMiterMinimumAngle, bPixelSnapHairline);
 }
 
 void FileDefinitionWidgetDraw::drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
                                           const SalBitmap& rSalBitmap)
 {
-    rGraphics.DrawBitmap(rPosAry, rSalBitmap, nullptr);
+    rGraphics.drawBitmap(rPosAry, rSalBitmap);
 }
 
 void FileDefinitionWidgetDraw::drawBitmap(SalGraphics& rGraphics, const SalTwoRect& rPosAry,
                                           const SalBitmap& rSalBitmap,
                                           const SalBitmap& rTransparentBitmap)
 {
-    rGraphics.DrawBitmap(rPosAry, rSalBitmap, rTransparentBitmap, nullptr);
+    rGraphics.drawBitmap(rPosAry, rSalBitmap, rTransparentBitmap);
 }
 
 namespace


More information about the Libreoffice-commits mailing list