sdext/source/pdfimport/wrapper/keyword_list |    1 
 sdext/source/pdfimport/wrapper/wrapper.cxx  |   33 ++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)

New commits:
commit ec0b9062dc8dba82509183eb865da55827bde4d5
Author:     Dr. David Alan Gilbert <[email protected]>
AuthorDate: Wed Jan 24 02:10:18 2024 +0000
Commit:     Noel Grandin <[email protected]>
CommitDate: Thu Feb 29 08:23:54 2024 +0100

    tdf#113050 sdext.pdfimport Tiling pattern fill parser
    
    Add a parser for the TilingPatternFill entry from the poppler wrapper.
    
    This doesn't get triggered yet until the wrapper enables the
    tilingPatternFill.
    
    Change-Id: I34ab84ba1ab9d6773f33d667b324bef5d6c6e409
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163564
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sdext/source/pdfimport/wrapper/keyword_list 
b/sdext/source/pdfimport/wrapper/keyword_list
index bf15ddb2460f..4d1e6d2d4013 100644
--- a/sdext/source/pdfimport/wrapper/keyword_list
+++ b/sdext/source/pdfimport/wrapper/keyword_list
@@ -38,6 +38,7 @@ setTextRenderMode,SETTEXTRENDERMODE
 setTransformation,SETTRANSFORMATION
 startPage,STARTPAGE
 strokePath,STROKEPATH
+tilingPatternFill,TILINGPATTERNFILL
 updateBlendMode,UPDATEBLENDMODE
 updateCtm,UPDATECTM
 updateFillColor,UPDATEFILLCOLOR
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx 
b/sdext/source/pdfimport/wrapper/wrapper.cxx
index ade4dc5edb6b..6094bfabcbbc 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -107,6 +107,7 @@ enum parseKey {
     SETTRANSFORMATION,
     STARTPAGE,
     STROKEPATH,
+    TILINGPATTERNFILL,
     UPDATEBLENDMODE,
     UPDATECTM,
     UPDATEFILLCOLOR,
@@ -195,6 +196,7 @@ public:
     void                 readLink();
     void                 readMaskedImage();
     void                 readSoftMaskedImage();
+    void                 readTilingPatternFill();
 };
 
 /** Unescapes line-ending characters in input string. These
@@ -813,6 +815,35 @@ void LineParser::readSoftMaskedImage()
     m_parser.m_pSink->drawAlphaMaskedImage( aImage, aMask );
 }
 
+void LineParser::readTilingPatternFill()
+{
+    sal_Int32 nX0, nY0, nX1, nY1, nPaintType;
+    double nXStep, nYStep;
+    geometry::AffineMatrix2D aMat;
+    readInt32(nX0);
+    readInt32(nY0);
+    readInt32(nX1);
+    readInt32(nY1);
+
+    readDouble(nXStep);
+    readDouble(nYStep);
+
+    readInt32(nPaintType);
+
+    readDouble(aMat.m00);
+    readDouble(aMat.m10);
+    readDouble(aMat.m01);
+    readDouble(aMat.m11);
+    readDouble(aMat.m02);
+    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
+}
+
 void Parser::parseLine( std::string_view aLine )
 {
     OSL_PRECOND( m_pSink,         "Invalid sink" );
@@ -865,6 +896,8 @@ void Parser::parseLine( std::string_view aLine )
         }
         case STROKEPATH:
             m_pSink->strokePath(lp.readPath()); break;
+        case TILINGPATTERNFILL:
+            lp.readTilingPatternFill(); break;
         case UPDATECTM:
             lp.readTransformation(); break;
         case UPDATEFILLCOLOR:

Reply via email to