[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2012-07-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

--- Comment #1 from ulf  2012-07-27 20:24:39 UTC ---
I can confirm it with LibOffice 3.5.5 on WINXP and the example file.

But it could be that this function is not supported in the database component?

Normally if you create a Form, Base will open it "write protected" and you can
insert data. You have to open it different "to edit"

But in my opinon if you can protcect the Form it must be possible to undo the
protection.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2014-07-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

Julien Nabet  changed:

   What|Removed |Added

 CC||caol...@redhat.com,
   ||lio...@mamane.lu,
   ||serval2...@yahoo.fr

--- Comment #2 from Julien Nabet  ---
I gave a try with master sources updated yesterday, indeed I can't uncheck
"Read-only" since the checkbox is disabled.
I also tried from File/properties in Edit Form in from Base (instead of from
Writer).

Trying in gdb session, it seems the problem might be here:
http://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/securitypage.cxx#241
SfxSecurityPage_Impl::Reset_Impl
May there be some confusion between:
- pCurDocShell->IsReadOnly()
- pCurDocShell->HasSecurityOptOpenReadOnly()
- pCurDocShell->IsSecurityOptOpenReadOnly()

I don't find the way the checkboxes could be enabled with readonly checkbox
checked.

Lionel/Caolan: any idea?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2014-08-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

--- Comment #3 from Lionel Elie Mamane  ---
In a Writer file, when opening a read-only file, one can right-click on the
document and the pop-up menu has "edit". A Base form does not have this in the
pop-up menu.

My guess is that the "edit" entry in the contextual (pop-up) menu has been
removed in Base forms to avoid the user working around the fact that a Base
form is opened (as a Writer document) 'read-only' normally (not in design
mode), and that one needs to use "edit" (not "open") to change it (in other
words, open it in design mode).

My suggested fix would be to suppress this "edit" entry only in non-design
mode, and leave it alone (leave it in the menu) in design mode.

Julien, if you feel like it, you could:

1) Track down where the "edit" in the menu is suppressed from Base forms
compared to Writer documents.

2) Make this suppression conditional on "not design mode". See
http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1XVclWindowPeer.html#a5231c997c902a2c7dbf745d1e6d4731b
http://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1XControl.html#a5231c997c902a2c7dbf745d1e6d4731b
for APIs to ask a window / a control whether it is in design mode.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2014-08-26 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

--- Comment #4 from Julien Nabet  ---
Thank you Lionel for the hints.

Since keyId Language Id gaves no link (no keyid for all the entries of the
popup menu), I searched "Image Off" and found this:
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/docvw.src#170

Some lines above, Edit is here:
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/docvw.src#40

Searching "MN_READONLY_EDITDOC" gave 3 results (see
http://opengrok.libreoffice.org/search?q=MN_READONLY_EDITDOC&project=core&defs=&refs=&path=&hist=)
Best candidate seemed this one:
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/romenu.cxx#216

210 eState = pVFrame->GetBindings().QueryState( SID_EDITDOC, pState );
211 if (
212 eState < SFX_ITEM_DEFAULT ||
213 (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI())
214)
215 {
216 EnableItem( MN_READONLY_EDITDOC, false );
217 }

With Writer eState = SFX_ITEM_DEFAULT whereas with Base eState =
SFX_ITEM_DISABLED

I must recognize I hardly understand all this. Should we try to link "not
design mode" with eState? More clearly, should eState be equal to
SFX_ITEM_DEFAULT when not in design mode?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2014-08-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

--- Comment #5 from Lionel Elie Mamane  ---
I found the code ultimately responsible for the disabled SID_EDITDOC:

http://opengrok.libreoffice.org/xref/core/sfx2/source/view/viewfrm.cxx#860

   if ( !pSh || !pSh->HasName() || !( pSh->Get_Impl()->nLoadedFlags & 
SFX_LOADED_MAINDOCUMENT )
   || pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
 rSet.DisableItem( SID_EDITDOC );

specifically the "|| pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED". I would
like to change that to:
 || (pSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED &&
!opened_in_design_mode)

but at this point I'm not sure how to do the "opened_in_design_mode"

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 44081] EDITING - A form set to open in read-only mode can never be switched back

2014-08-27 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=44081

Lionel Elie Mamane  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|libreoffice-b...@lists.free |lio...@mamane.lu
   |desktop.org |

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs