[Libreoffice-bugs] [Bug 109425] Libreoffice Notebookbar is not exposing accessible events needed for screen reader users.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Nov 29 02:58:40 UTC 2019


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

--- Comment #21 from Jim Raykowski <raykowj at gmail.com> ---
Hi Andreas, I should have jumped in earlier to let you know I was testing the
patches.

Here are some concerns I've found with Notebookbar_single.ui

1) I think Default-Grow and Default-Shrink buttons need to be visible.

2) Draw-FormatArea button does the same action as Draw-FormatArea2 button.
There is differences in visible when horizontal/vertical and icon. Are both
required?

3) Similar to 2, Grapic-GraphicDialog1 button does the same action as
Graphic-GraphicDialog button in the GraphicContainer

4) Print preview only shows undo and paste buttons. To show all the buttons in
the print container the visible property needs to be set to True. I haven't
investigated why it is required in the .ui file to be set visible for the
PrintContainer and not for the other containers. 
<object class="sfxlo-PriorityMergedHBox" id="PrintContainer">
                    <property name="visible">True</property>

5) Crash occurs in print preview when Close Preview button is pressed - can be
reproduced in previous versions.

I don't know much about XContextChangeEventMultiplexer
addContextChangeEventListener which seems to be the cause of the crash.
cssl::IllegalArgumentException("listener added twice",
static_cast<XWeak*>(this), 0) get thrown. To work around this one or the other
places illustrated below can be commented out. Hopefully someone with knowledge
about this will find the following helpful.


sfx2/source/notebookbar/SfxNotebookBar.cxx
bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
                                 const Reference<css::frame::XFrame>& xFrame,
                                 const OUString& rUIFile, bool
bReloadNotebookbar)
{
...
            SfxViewFrame* pView = SfxViewFrame::Current();

            if(pView)
            {
                Reference<XContextChangeEventMultiplexer> xMultiplexer
                            = ContextChangeEventMultiplexer::get( xContext );

                if(xFrame.is())
                {
--->                xMultiplexer->addContextChangeEventListener(
                                       
pNotebookBar->getContextChangeEventListener(),
                                        xFrame->getController());
                }
            }
        }

        return true;
    }

vcl/source/control/notebookbar.cxx
void NotebookBar::ControlListener(bool bListen)
{
    if(bListen)
    {
        // remove listeners
        css::uno::Reference<css::ui::XContextChangeEventMultiplexer>
xMultiplexer (css::ui::ContextChangeEventMultiplexer::get(
                ::comphelper::getProcessComponentContext()));
       
xMultiplexer->removeContextChangeEventListener(getContextChangeEventListener(),mxFrame->getController());
    }
// remove this else block or comment out below in the SwPagePreview destructor
and crash doesn't happen
    else
    {
        // add listeners
        css::uno::Reference<css::ui::XContextChangeEventMultiplexer>
xMultiplexer (css::ui::ContextChangeEventMultiplexer::get(
                ::comphelper::getProcessComponentContext()));
--->   
xMultiplexer->addContextChangeEventListener(getContextChangeEventListener(),mxFrame->getController());
    }
}

sw/source/uibase/uiview/pview.cxx
SwPagePreview::~SwPagePreview()
{
    SetWindow( nullptr );
    SwViewShell* pVShell =  m_pViewWin->GetViewShell();
    pVShell->SetWin(nullptr);
    delete pVShell;

    m_pViewWin.disposeAndClear();
//    if (SfxViewFrame* pCurrent = SfxViewFrame::Current())
//        if (auto& pBar =
pCurrent->GetWindow().GetSystemWindow()->GetNotebookBar())
//--->        pBar->ControlListener(false);
    m_pScrollFill.disposeAndClear();
    m_pHScrollbar.disposeAndClear();
    m_pVScrollbar.disposeAndClear();
}

framework/source/services/ContextChangeEventMultiplexer.cxx
// XContextChangeEventMultiplexer
void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener (
    const cssu::Reference<css::ui::XContextChangeEventListener>& rxListener,
    const cssu::Reference<cssu::XInterface>& rxEventFocus)
{
    if ( ! rxListener.is())
        throw css::lang::IllegalArgumentException(
            "can not add an empty reference",
            static_cast<XWeak*>(this),
            0);

    FocusDescriptor* pFocusDescriptor = GetFocusDescriptor(rxEventFocus, true);
    if (pFocusDescriptor != nullptr)
    {
        ListenerContainer& rContainer (pFocusDescriptor->maListeners);
        if (::std::find(rContainer.begin(), rContainer.end(), rxListener) !=
rContainer.end())
        {
            // The listener was added for the same event focus
            // previously.  That is an error.
--->        throw cssl::IllegalArgumentException("listener added twice",
static_cast<XWeak*>(this), 0);
        }
        rContainer.push_back(rxListener);
    }

-- 
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/20191129/1f6affeb/attachment.html>


More information about the Libreoffice-bugs mailing list