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

            Bug ID: 101652
           Summary: Allow to disable readonly infobar via configuration
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: UI
          Assignee: [email protected]
          Reporter: [email protected]

When opening a read-only document the systems shows a yellow bar at the top
with the caption "This document is open in read-only mode."
In addition there's a button "Edit Document" which will allow editing of the
document. 

In our UNO extension we don't want to allow the user to edit the document no
matter the circumstances. 

It should therefore be possible to configure LO in a way, either by
configuration item or via UNO API to disable the default behavior.

The code in question is in viewfrm.cxx:

SfxInfoBarWindow* pInfoBar =
AppendInfoBar("readonly",SfxResId(STR_READONLY_DOCUMENT));
if (pInfoBar)
{
    VclPtrInstance<PushButton> pBtn( &GetWindow(), SfxResId(BT_READONLY_EDIT));
                     pBtn->SetClickHdl(LINK(this, SfxViewFrame,
    SwitchReadOnlyHandler));
                    pInfoBar->addButton(pBtn);

}

-- 
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