diff options
Diffstat (limited to 'emfio/source')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 4 | ||||
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index e6a758175fb5..79ff9cf04200 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -1817,9 +1817,9 @@ namespace emfio mpInputStream->ReadInt32( nLeftRect ).ReadInt32( nTopRect ).ReadInt32( nRightRect ).ReadInt32( nBottomRect ); const tools::Rectangle aRect( nLeftRect, nTopRect, nRightRect, nBottomRect ); BkMode mnBkModeBackup = mnBkMode; - if ( nOptions & ETO_NO_RECT ) // Don't draw the background rectangle + if ( nOptions & ETO_NO_RECT ) // Don't draw the background rectangle and text background mnBkMode = BkMode::Transparent; - if ( nOptions & ETO_OPAQUE ) + else if ( nOptions & ETO_OPAQUE ) DrawRectWithBGColor( aRect ); mpInputStream->ReadUInt32( offDx ); diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 6bf0d98a3e76..866f6996d9e3 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1381,12 +1381,15 @@ namespace emfio { WinMtfFillStyle aFillStyleBackup = maFillStyle; bool aTransparentBackup = maLineStyle.bTransparent; + BkMode mnBkModeBackup = mnBkMode; const tools::Polygon aPoly( rRect ); maLineStyle.bTransparent = true; maFillStyle = maBkColor; + mnBkMode = BkMode::OPAQUE; ImplSetNonPersistentLineColorTransparenz(); DrawPolygon(aPoly, false); + mnBkMode = mnBkModeBackup; // The rectangle needs to be always drawned even if mode is transparent maFillStyle = aFillStyleBackup; maLineStyle.bTransparent = aTransparentBackup; } |