Bug 119364 - Embedded forms are displaying experimental Notebook UI in latest 6.2 Alpha build
Summary: Embedded forms are displaying experimental Notebook UI in latest 6.2 Alpha build
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0
Keywords:
Depends on:
Blocks: Notebookbar
  Show dependency treegraph
 
Reported: 2018-08-19 16:45 UTC by Drew Jensen
Modified: 2018-08-31 14:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen cast using 6.2/master (271.36 KB, image/gif)
2018-08-21 12:10 UTC, Heiko Tietze
Details
example firebird odb with one form (12.58 KB, application/vnd.oasis.opendocument.database)
2018-08-21 12:39 UTC, Drew Jensen
Details
Screenshot of opened form showing mis-inherited toolbar setting (153.41 KB, image/png)
2018-08-21 15:37 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Jensen 2018-08-19 16:45:43 UTC
Description:
Test system Ubuntu 18.04 and Version: 6.2.0.0.alpha0+
Build ID: f61af646c5c3fe7e50aea01ede6a9d7ea53380f2

Steps to Reproduce:
1. Make sure experimental features are enabled.
2. Open a Writer file (or create one) from the menu View->User Interface select any of the experimental options
3. Close the Writer file
4. Open an ODB file with an embedded form.
5. Open the embedded form

Actual Results:
The experimental UI is displayed instead of the Standard Toolbar UI.
Using the experimental notebook bar UI to switch back to Standard Toolbar does not work.
Using the Toolbar settings from the notebook bar UI does nothing.


Expected Results:
The embedded form continues to use the Standard Toolbar UI
or
The experimental UI controls are updated to work with an embedded form.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Julien Nabet 2018-08-19 18:46:30 UTC
For the moment, I'm just focusing about 1 point of this bugtracker to start.

Do you mean each time LO is closed, User interface should be reset to Standard Toolbar?

I mean, I gave a try just by using Writer:
1. Make sure experimental features are enabled.
2. Open a Writer file (or create one) from the menu View->User Interface select any of the experimental options
3. Close the Writer file
4. Open Writer
=> I still got the previous User Interface selected.
Isn't it what's expected?

Heiko/Xisco: put you in cc since it might interest you.
Comment 2 Drew Jensen 2018-08-19 18:56:00 UTC
(In reply to Julien Nabet from comment #1)
> For the moment, I'm just focusing about 1 point of this bugtracker to start.
> 
> Do you mean each time LO is closed, User interface should be reset to
> Standard Toolbar?
> 
What I am saying is that prior to very recently (recent builds) embedded forms disregarded the experimental UI changes.

So if the change was not planned it is a bug, right, if it was then it still needs some work to make it work.
Comment 3 Alex Thurgood 2018-08-20 07:31:26 UTC
If I try repeating this with

Version: 6.2.0.0.alpha0+
Build ID: d99af1a67cbe4e23661467843e7d72194b45b313
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: threaded

I get an instant repeatable crash when attempting to load an embedded form.
Comment 4 Julien Nabet 2018-08-20 07:42:44 UTC
Alex: the crash you encounter must correspond to tdf#119330 fixed 2 days ago.
Comment 5 Alex Thurgood 2018-08-20 09:39:49 UTC
(In reply to Julien Nabet from comment #4)
> Alex: the crash you encounter must correspond to tdf#119330 fixed 2 days ago.

Oh thanks Julien, I'll rebuild a fresh master and try again to reproduce Drew's problem.
Comment 6 Alex Thurgood 2018-08-20 09:43:57 UTC
The issue here, as I understand it, is that it is possible to set one of the notebookbar options and that this choice is correspondingly shown in an embedded form when it is loaded - so far, so good, as that is how it is supposed to function, at least from what I understand.

However, at least some of the menu entries for resetting back to standard toolbar from within the loaded form do not appear to be active. This behaviour, if confirmed, would indeed be an issue.
Comment 7 Heiko Tietze 2018-08-20 11:06:13 UTC
The type of user interface is set per module, meaning you can have a standard UI in Writer and Tabbed in Calc. So the first issue is that Base is not working as expected (not tested so keeping the status).
Second issue is the missing option to switch back. And in fact the work has been started, IIRC, but is not finished.
Comment 8 Drew Jensen 2018-08-20 11:45:09 UTC
(In reply to Heiko Tietze from comment #7)
> The type of user interface is set per module, meaning you can have a
> standard UI in Writer and Tabbed in Calc. So the first issue is that Base is
> not working as expected (not tested so keeping the status).
> Second issue is the missing option to switch back. And in fact the work has
> been started, IIRC, but is not finished.

As a general statement, IMO, the amount of influence changes made to the Writer UI have to Base forms is already a problem and this makes it worse again. (form size, placement, zoom factor, toolbars opened or closed - should not affect base forms but they do)

Reports on the other hand have used the notebook UI and there it makes perfect sense and there it makes sense to reflect any change made in Writer, because a user might very well change something on the report and at that moment it is in fact a stand alone Writer file.

Base forms are not stand alone and the user (the real end user) is not going to be editing form contents, they are editing data contents via the form. The notebook UI has, from I can see, no support for those functions. 

Editing Base forms on the other hand (by the database developer) is just the opposite, you are editing the contents of the file and the notebook UI would work just fine there.
Comment 9 Heiko Tietze 2018-08-21 08:03:45 UTC
It would be great if you can attach an example. The NB designer are not necessarily experts in Base.
Comment 10 Julien Nabet 2018-08-21 08:11:44 UTC
(In reply to Heiko Tietze from comment #9)
> It would be great if you can attach an example. The NB designer are not
> necessarily experts in Base.

An example can be found here:
https://bugs.documentfoundation.org/attachment.cgi?id=144254 from tdf#119330 (put in See Also)
Comment 11 Heiko Tietze 2018-08-21 08:35:50 UTC
1. Experimental features = enabled.
2. Open a Writer (master, local build); View->User Interface = Contextual sections
3. Open example ODB

Shows Base with the standard UI.
Comment 12 Drew Jensen 2018-08-21 10:58:24 UTC
(In reply to Heiko Tietze from comment #11)
> 1. Experimental features = enabled.
> 2. Open a Writer (master, local build); View->User Interface = Contextual
> sections
> 3. Open example ODB
> 
> Shows Base with the standard UI.

Are you opening a Form in that ODB?
Comment 13 Heiko Tietze 2018-08-21 12:00:26 UTC
(In reply to Drew Jensen from comment #12)
> Are you opening a Form in that ODB?

In the open Writer instance I just open the file.
Comment 14 Drew Jensen 2018-08-21 12:01:18 UTC
(In reply to Heiko Tietze from comment #13)
> (In reply to Drew Jensen from comment #12)
> > Are you opening a Form in that ODB?
> 
> In the open Writer instance I just open the file.

I really am sorry but I have no idea what that means.
Comment 15 Heiko Tietze 2018-08-21 12:10:35 UTC
Created attachment 144344 [details]
Screen cast using 6.2/master

After the first start (make clean) I enable advanced features, change the UI in Writer, and finally get the standard UI in Base when opening the example file.
Comment 16 Drew Jensen 2018-08-21 12:17:30 UTC
(In reply to Heiko Tietze from comment #15)
> Created attachment 144344 [details]
> Screen cast using 6.2/master
> 
> After the first start (make clean) I enable advanced features, change the UI
> in Writer, and finally get the standard UI in Base when opening the example
> file.

The issue is about Forms in an ODB file, not the main ODB window.

Open one of the forms - if LibreOffice crashes at that moment you don't have the latest 6.2 files. Which could be the problem here, the very latest builds do not crash any more when you open a form and without that latest build you won't wee the change in the embedded forms UI.
Comment 17 Heiko Tietze 2018-08-21 12:20:21 UTC Comment hidden (off-topic)
Comment 18 Drew Jensen 2018-08-21 12:27:37 UTC Comment hidden (off-topic)
Comment 19 Julien Nabet 2018-08-21 12:33:07 UTC Comment hidden (off-topic)
Comment 20 Drew Jensen 2018-08-21 12:39:51 UTC
Created attachment 144345 [details]
example firebird odb with one form

An example using firbird backend and a single form.

(The issue is actually agnostic with regards to the data engine)
Comment 21 Heiko Tietze 2018-08-21 13:45:25 UTC Comment hidden (off-topic)
Comment 22 Julien Nabet 2018-08-21 13:49:58 UTC Comment hidden (off-topic)
Comment 23 Heiko Tietze 2018-08-21 14:05:23 UTC Comment hidden (off-topic)
Comment 24 Julien Nabet 2018-08-21 14:15:37 UTC
(In reply to Heiko Tietze from comment #23)
> (In reply to Julien Nabet from comment #22)
> > Any reasons about why disabling these (perhaps build failures?)? Indeed, it
> > prevents you from testing lots of bugs related to Base.
> 
> IIRC it was build issues but also I don't want to install Java jdk/sdk on my
> system.

At least, if you want to stay away from Java, you may remove "disable firebird" related options since Drew provided a Firebird odb file.
If you've got building pbs, don't hesitate to ping dev mailing list.
Comment 25 Alex Thurgood 2018-08-21 15:33:54 UTC
Tested with :

Version: 6.2.0.0.alpha0+
Build ID: b4ef23955e11a90b54bce189c3300406e9cf15b0
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: threaded

Confirming.
Comment 26 Alex Thurgood 2018-08-21 15:37:17 UTC
Created attachment 144352 [details]
Screenshot of opened form showing mis-inherited toolbar setting
Comment 27 Julien Nabet 2018-08-21 21:31:43 UTC
Drew: I submitted a patch on gerrit about this
https://gerrit.libreoffice.org/#/c/59417/

Quoting my patch's comment:
"
tdf#119364: fix by reverting some previous commits about notebookbar

Revert:
- dcbb65f2a4a3ee70ccd4896d7a5e975dbd9e6509
which was to avoid Avoid com.sun.star.container.NoSuchElementException "Active" when opening embedded form 

- 6c89f41b02fcd8918e535460994daac4ecd5d37e
which was to fix previous commit and fix tdf#119330

Just fix "Avoid com.sun.star.container.NoSuchElementException "Active"" by testing if OUString returned by lcl_getAppName is empty or not. If empty, just return false
"

I hope it'll restore back the initial behavior and fix the console log.

I tested with the attachment of tdf#119330 and had no crash.

Could you give it a try (obviously if you build sources)?
Comment 28 Commit Notification 2018-08-24 07:31:22 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2bc3bda3a9d0abc7435e5dc9004c74304330a121

tdf#119364: fix by reverting some previous commits about notebookbar

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Julien Nabet 2018-08-24 07:32:34 UTC
I submitted a patch so it'll be easier to test it in a next daily build instead of retrieving sources, cherry-picking the patch and building.

Of course, if there's something with the patch, I'll revert it.
Comment 30 Julien Nabet 2018-08-31 14:05:07 UTC
Any update here with a recent daily build which includes quoted patch?
Comment 31 Drew Jensen 2018-08-31 14:42:18 UTC
(In reply to Julien Nabet from comment #30)
> Any update here with a recent daily build which includes quoted patch?

Verified with Ubuntu 18.04 and
Version: 6.2.0.0.alpha0+
Build ID: 76be5c31b97a37d15a3009995f4e60e4cee011ee
Dated: 2018-08-31_02:44:17