• Miklos Vajna's avatar
    tdf#119947 vcl opengl win: fix fontwork popup menu · 5f2b67e7
    Miklos Vajna yazdı
    Regression from commit b160db92
    (tdf#96947 vcl opengl win: fix background of menu items w/ check/radio
    marks, 2018-05-14), the problem was that GetMenuPopupMarkRegion() did an
    unconditional downcast from ImplControlValue to MenupopupValue.  This
    looked safe, but when the extracted function was used in
    WinSalGraphics::drawNativeControl(), then that argument was not safe to
    downcast.
    
    Fix the problem by switching to safe downcast, and returning an empty
    rectangle (instead of a bogus one) on error.
    
    This way the old bug stays fixed but fontwork popup menu works again as
    well.
    
    Change-Id: I2b69b9f2e6823850892ac73df78dac5c2f04ec03
    Reviewed-on: https://gerrit.libreoffice.org/68883Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
    Tested-by: Jenkins
    5f2b67e7