diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-06-11 13:50:29 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-06-11 18:41:02 +0200 |
commit | 8d3e7b2f5836106eac5172d8f4868bb540d652e6 (patch) | |
tree | 5e477514f0382aa655ecc1ef180eeb55f81ff591 /emfio | |
parent | a73e8f1111f4baa8073c998ad84783dd5fc6b7bb (diff) |
EMF tdf#59814 tdf#142567 Align RestoreDC record with MSO implementation
Some of WMF and EMF behaviours are undocumented.
In that case, we are implementing the behaviour, observed in MS Office
or MS Paint.
With this commit the behaviour of import EMF RestoreDC records,
will be the same as for MS Paint and MS Office.
Change-Id: I73b65d14018f2667ffd59daf16ecc6d7ce9c1870
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117052
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index ac56c64db026..04f591a7eb9a 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -1101,8 +1101,10 @@ namespace emfio sal_Int32 nSavedDC; mpInputStream->ReadInt32( nSavedDC ); SAL_INFO( "emfio", "\t\t SavedDC Index: " << nSavedDC ); - if ( nSavedDC < 0 ) // For EMF values above -1 is ignored + if ( nSavedDC < 0 ) Pop( nSavedDC ); + else + Pop( -1 ); // For RestoreDC values above -1, treat as get last element } break; |