vcl/inc/quartz/salgdi.h |   15 +++++++++++++++
 vcl/quartz/salgdi.cxx   |   29 +++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)

New commits:
commit 857a760f317ad6540a6f03169ef8dda97d2c1de7
Author:     Jan Holesovsky <[email protected]>
AuthorDate: Mon Nov 18 17:04:12 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Sat Nov 29 01:10:45 2025 +0100

    Make vcl build on macOS with --enable-headless
    
    Change-Id: I210767a9918b6a672a5227e6c40873bad90f7188
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194794
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index 8ef5f4dbd807..f02631bd9df5 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -466,6 +466,21 @@ public:
 
     virtual SystemGraphicsData
                             GetGraphicsData() const override;
+
+#if ENABLE_CAIRO_CANVAS
+
+    /// Check whether cairo will work
+    virtual bool                SupportsCairo() const override;
+    /// Create Surface from given cairo surface
+    virtual cairo::SurfaceSharedPtr CreateSurface(const 
cairo::CairoSurfaceSharedPtr& rSurface) const override;
+    /// Create surface with given dimensions
+    virtual cairo::SurfaceSharedPtr CreateSurface(const OutputDevice& 
rRefDevice, int x, int y, int width, int height) const override;
+    /// Create Surface for given bitmap data
+    virtual cairo::SurfaceSharedPtr CreateBitmapSurface(const OutputDevice& 
rRefDevice, const BitmapSystemData& rData, const Size& rSize) const override;
+    virtual css::uno::Any       
GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& rSurface, const 
basegfx::B2ISize& rSize) const override;
+
+#endif // ENABLE_CAIRO_CANVAS
+
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index a08d17ab5942..af5a620484c8 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -557,4 +557,33 @@ bool AquaSharedAttributes::checkContext()
 
 #endif
 
+#if ENABLE_CAIRO_CANVAS
+
+bool AquaSalGraphics::SupportsCairo() const
+{
+    return false;
+}
+
+cairo::SurfaceSharedPtr AquaSalGraphics::CreateSurface(const 
cairo::CairoSurfaceSharedPtr& /*rSurface*/) const
+{
+    return cairo::SurfaceSharedPtr();
+}
+
+cairo::SurfaceSharedPtr AquaSalGraphics::CreateSurface(const OutputDevice& 
/*rRefDevice*/, int /*x*/, int /*y*/, int /*width*/, int /*height*/) const
+{
+    return cairo::SurfaceSharedPtr();
+}
+
+cairo::SurfaceSharedPtr AquaSalGraphics::CreateBitmapSurface(const 
OutputDevice& /*rRefDevice*/, const BitmapSystemData& /*rData*/, const Size& 
/*rSize*/) const
+{
+    return cairo::SurfaceSharedPtr();
+}
+
+css::uno::Any AquaSalGraphics::GetNativeSurfaceHandle(cairo::SurfaceSharedPtr& 
/*rSurface*/, const basegfx::B2ISize& /*rSize*/) const
+{
+    return css::uno::Any();
+}
+
+#endif // ENABLE_CAIRO_CANVAS
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to