[Libreoffice-bugs] [Bug 133630] CRASH: Chart: Changing properties in different objects

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Sep 10 14:46:29 UTC 2020


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

--- Comment #15 from Michael Meeks <michael.meeks at collabora.com> ---
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200910/dda0854e/attachment.htm>


More information about the Libreoffice-bugs mailing list