[Libreoffice-bugs] [Bug 117219] Switching read-only spreadsheet to edit mode switches to form design mode

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Mar 17 17:58:04 UTC 2021


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

--- Comment #4 from Justin L <jluth at mail.com> ---
Already at initial import, we have sc/source/ui/view/tabvwsh5.cxx
            case SfxHintId::ScDocSaved:
                {
                    //  "Save as" can make a write-protected document writable,
                    //  therefore the Layer-Locks anew (#39884#)
                    //  (Invalidate etc. is happening already from Sfx)
                    //  by SID_EDITDOC no SfxHintId::TitleChanged will occur,
                    //  that is why the own hint from DoSaveCompleted
                    //! what is with SfxHintId::SAVECOMPLETED ?

                    UpdateLayerLocks();

                    // Would be too much to change Design-Mode with every save
                    // (when saving under the name, it should remain unchanged)
                    // Therefore only by SfxHintId::ModeChanged (from
ViewFrame)
                }
                break;

            case SfxHintId::ModeChanged:
                //  Since you can no longer rely on it where this hint was
                //  coming from, always switch the design mode when the
ReadOnly
                //  state really was changed:

                if ( GetViewData().GetSfxDocShell()->IsReadOnly() != bReadOnly
)
                {
                    bReadOnly = GetViewData().GetSfxDocShell()->IsReadOnly();

                   SfxBoolItem aItem( SID_FM_DESIGN_MODE, !bReadOnly);
                  
GetViewData().GetDispatcher().ExecuteList(SID_FM_DESIGN_MODE,
                            SfxCallMode::ASYNCHRON, { &aItem });

                    UpdateInputContext();
                }
                break;

-- 
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/20210317/8e6435fb/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list