[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - emfio/source

Bartosz Kosiorek (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 4 12:49:54 UTC 2021


 emfio/source/reader/emfreader.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 642501ecb94cef11592ecc49b7a13ba5bdbb8d62
Author:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
AuthorDate: Thu Apr 1 16:42:34 2021 +0200
Commit:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
CommitDate: Sun Apr 4 14:49:22 2021 +0200

    tdf#55058 EMF: Implement PAINTRGN record
    
    The EMR_PAINTRGN record paints the specified region by using the brush
    currently selected into the playback device context.
    
    After implement support for PAINTRGN record, the reference image
    is displayed correctly:
    https://sourceforge.net/projects/libuemf/
    
    Change-Id: I761779713d1200e6079ff798e9c3c9aaba57ad4f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113461
    Tested-by: Jenkins
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113561

diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 1d1adc2f49aa..24fcf9095e3e 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -1924,6 +1924,18 @@ namespace emfio
                     }
                     break;
 
+                    case EMR_PAINTRGN :
+                    {
+                        sal_uInt32 nRgnDataSize;
+                        tools::PolyPolygon aPolyPoly;
+                        mpInputStream->SeekRel( 0x10 ); // Skipping RectL bounds
+                        mpInputStream->ReadUInt32( nRgnDataSize );
+
+                        if ( ImplReadRegion( aPolyPoly, *mpInputStream, nRecSize ) )
+                            DrawPolyPolygon( aPolyPoly );
+                    }
+                    break;
+
                     case EMR_CREATEDIBPATTERNBRUSHPT :
                     {
                         sal_uInt32  nStart = mpInputStream->Tell() - 8;
@@ -1977,7 +1989,6 @@ namespace emfio
                     case EMR_SETDIBITSTODEVICE :        SAL_WARN("emfio", "not implemented 'SetDIBitsToDevice'");         break;
                     case EMR_FRAMERGN :                 SAL_WARN("emfio", "not implemented 'FrameRgn'");                  break;
                     case EMR_INVERTRGN :                SAL_WARN("emfio", "not implemented 'InvertRgn'");                 break;
-                    case EMR_PAINTRGN :                 SAL_WARN("emfio", "not implemented 'PaintRgn'");                  break;
                     case EMR_FLATTENPATH :              SAL_WARN("emfio", "not implemented 'FlattenPath'");               break;
                     case EMR_WIDENPATH :                SAL_WARN("emfio", "not implemented 'WidenPath'");                 break;
                     case EMR_POLYDRAW :                 SAL_WARN("emfio", "not implemented 'Polydraw'");                  break;


More information about the Libreoffice-commits mailing list