sdext/qa/unit/pdfimport.cxx                   |    8 ++++++++
 sdext/source/pdfimport/inc/contentsink.hxx    |    5 +++++
 sdext/source/pdfimport/inc/pdfiprocessor.hxx  |    6 ++++++
 sdext/source/pdfimport/tree/pdfiprocessor.cxx |    9 +++++++++
 sdext/source/pdfimport/wrapper/wrapper.cxx    |   11 +++++++----
 5 files changed, 35 insertions(+), 4 deletions(-)

New commits:
commit 4a13e1890e8a0ed81e8fb17009185fa2b15ebff7
Author:     Dr. David Alan Gilbert <d...@treblig.org>
AuthorDate: Sun Feb 18 22:06:02 2024 +0000
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Feb 29 08:24:17 2024 +0100

    tdf#113050 sdext.pdfimport: Plumb tiling pattern fill to pdfiprocessor
    
    Change-Id: I68459834fd903d31c9b2e57d637265dd67da4f56
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163565
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sdext/qa/unit/pdfimport.cxx b/sdext/qa/unit/pdfimport.cxx
index 377d08d351f8..18988d6845de 100644
--- a/sdext/qa/unit/pdfimport.cxx
+++ b/sdext/qa/unit/pdfimport.cxx
@@ -428,6 +428,14 @@ namespace
         {
         }
 
+        virtual void tilingPatternFill(int, int, int, int,
+                                       double, double,
+                                       int,
+                                       css::geometry::AffineMatrix2D&,
+                                       const 
css::uno::Sequence<css::beans::PropertyValue>&) override
+        {
+        }
+
         typedef std::unordered_map<sal_Int32,FontAttributes> IdToFontMap;
         typedef std::unordered_map<FontAttributes,sal_Int32,FontAttrHash> 
FontToIdMap;
 
diff --git a/sdext/source/pdfimport/inc/contentsink.hxx 
b/sdext/source/pdfimport/inc/contentsink.hxx
index 44f609c3caaa..5354e4370f14 100644
--- a/sdext/source/pdfimport/inc/contentsink.hxx
+++ b/sdext/source/pdfimport/inc/contentsink.hxx
@@ -171,6 +171,11 @@ namespace pdfi
                                                 css::beans::PropertyValue>& 
xImage,
                                           const css::uno::Sequence<
                                                 css::beans::PropertyValue>& 
xMask) = 0;
+        virtual void tilingPatternFill(int nX0, int nY0, int nX1, int nY1,
+                                       double nxStep, double nyStep,
+                                       int nPaintType,
+                                       css::geometry::AffineMatrix2D& rMat,
+                                       const 
css::uno::Sequence<css::beans::PropertyValue>& xTile) = 0;
     };
 
     typedef std::shared_ptr<ContentSink> ContentSinkSharedPtr;
diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx 
b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
index 3fdc146716b3..40cdbfdd48c9 100644
--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
@@ -150,6 +150,12 @@ namespace pdfi
                                           const css::uno::Sequence<
                                                 css::beans::PropertyValue>& 
xMask) override;
 
+        virtual void tilingPatternFill(int nX0, int nY0, int nX1, int nY1,
+                                       double nxStep, double nyStep,
+                                       int nPaintType,
+                                       css::geometry::AffineMatrix2D& rMat,
+                                       const 
css::uno::Sequence<css::beans::PropertyValue>& xTile) override;
+
         void startIndicator( const OUString& rText );
         void endIndicator();
 
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx 
b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index 44485f4c2525..cf65223f167a 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -383,6 +383,15 @@ void PDFIProcessor::drawAlphaMaskedImage(const 
uno::Sequence<beans::PropertyValu
 
 }
 
+void PDFIProcessor::tilingPatternFill(int /*nX0*/, int /*nY0*/, int /*nX1*/, 
int /*nY1*/,
+                                      double /*nxStep*/, double /*nyStep*/,
+                                      int /* nPaintType */,
+                                      css::geometry::AffineMatrix2D& /*rMat*/,
+                                      const 
css::uno::Sequence<css::beans::PropertyValue>& /*xTile*/)
+{
+    // TODO
+}
+
 void PDFIProcessor::strokePath( const uno::Reference< 
rendering::XPolyPolygon2D >& rPath )
 {
     basegfx::B2DPolyPolygon 
aPoly=basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(rPath);
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 6094bfabcbbc..d99103b9867a 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -838,10 +838,13 @@ void LineParser::readTilingPatternFill()
     readDouble(aMat.m12);
 
     // The tile is an image with alpha
-    [[maybe_unused]]const uno::Sequence<beans::PropertyValue> aTile ( 
readImageImpl() );
-    (void)aTile; // Unused until later patch
-    // TODO
-    //   use the parsed data
+    const uno::Sequence<beans::PropertyValue> aTile ( readImageImpl() );
+
+    m_parser.m_pSink->tilingPatternFill( nX0, nY0, nX1, nY1,
+         nXStep, nYStep,
+         nPaintType,
+         aMat,
+         aTile );
 }
 
 void Parser::parseLine( std::string_view aLine )

Reply via email to