diff options
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 1698eec4a37a..d02dd6b902b5 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -609,20 +609,19 @@ namespace emfio if ( pGDIObj ) { - const auto pen = dynamic_cast<WinMtfLineStyle*>(pGDIObj); - if (pen) + if (const auto pen = dynamic_cast<WinMtfLineStyle*>(pGDIObj)) maLineStyle = *pen; - - const auto brush = dynamic_cast<WinMtfFillStyle*>(pGDIObj); - if (brush) + else if (const auto brush = dynamic_cast<WinMtfFillStyle*>( + pGDIObj)) { maFillStyle = *brush; mbFillStyleSelected = true; } - - const auto font = dynamic_cast<WinMtfFontStyle*>(pGDIObj); - if (font) + else if (const auto font = dynamic_cast<WinMtfFontStyle*>( + pGDIObj)) maFont = font->aFont; + else + assert(false); } } } |