https://bugs.documentfoundation.org/show_bug.cgi?id=133630

--- Comment #15 from Michael Meeks <[email protected]> ---
Hi Leyan, I'm interested in your sanity-check as a patch. It's curious that the
chart sidebars are particularly problematic in this regard - then again - if
there is no chart selected they should behave quiescently (I would hope):

OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
{
    css::uno::Reference<css::frame::XController>
xController(xModel->getCurrentController());
    css::uno::Reference<css::view::XSelectionSupplier>
xSelectionSupplier(xController, css::uno::UNO_QUERY);
    if (!xSelectionSupplier.is())
        return OUString();

    uno::Any aAny = xSelectionSupplier->getSelection();
    assert(aAny.hasValue());
    OUString aCID;
    aAny >>= aCID;
#if defined DBG_UTIL && !defined NDEBUG
    ObjectType eType = ObjectIdentifier::getObjectType(aCID);
    assert(eType == OBJECTTYPE_AXIS);
#endif

    return aCID;
}

could happily return an empty string instead of asserting in dbgutil mode - or
(perhaps more helpfully) logging a warning instead of asserting.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to