Bug 61297 - UI - Forms incorrectly switching from print to web layout and back
Summary: UI - Forms incorrectly switching from print to web layout and back
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Database (show other bugs)
Version: 4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 45393 62514
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-22 17:59 UTC by Kurt
Modified: 2015-01-03 17:39 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Kurt 2013-02-22 17:59:50 UTC
Description:

Forms in "Print" layout are automatically switching to "Web" layout whenever they are edited.  Forms, even ones that are not being edited, in "Web" layout automatically switch to "Print" layout when you select print.


Reproduction:

Print -> Web 
1) Create or open a form for editing (right-click the form then select edit)
2) Ensure the form is in "Print Layout" by selecting View->Print Layout.
3) Save the form.
4) Edit the form.  The layout automatically changes to "Web", not honoring the layout it was in when it was last saved.

In this case the desired behaviour is for the form, when edited, to open in the last mode it was saved it.  This mode is obviously preserved, because when it's opened not for editing, it works correctly.

Web -> Print
1) Create or open a form for editing.
2) Ensure the form is in "Web Layout" by selecting View->Web Layout
3) Save the form.
4) Run the form (double-click on it rather than editing)
5) Select File->Print.  The layout automatically changes to "Print" layout and you cannot change it back without closing the form and reopening it.

In this case the desired behaviour for a form that is not opened for editing is to either have the layout not be changed, or for the layout to return to what it was prior to printing.


Discussion:

Sometime in the 3.6 series, the decision was made that "Web" layout was going to be the default layout for Base forms.  While in most cases this is probably appropriate, the way it was implemented was done without thinking through the consequences.

First of all, the implementation switches all forms from "Print" to "Web" layout any time they are edited.  This must be then manually reversed before the form is edited and saved. 

Secondly, when a form is being run and not edited, the layout options are disabled.  However you can still, of course, select File->Print.  When printing the form, the layout automatically changes to "Print".  This cannot be changed back because those options are disabled.  If changing the whole visual layout to "Print" is required before LO can actually print, then it should be reverted to what it was before it was printed after it's complete.
Comment 1 Joel Madero 2013-03-19 02:49:55 UTC
Lionel - thoughts? Sorry for bugging you on these UNCONFIRMED, I think we need a database QA expert also :-/
Comment 2 Lionel Elie Mamane 2013-03-19 10:41:09 UTC
Reproduced in my libreoffice-3-6 and libreoffice-4-0 development builds.

I didn't consider that print layout makes much sense for forms, since they are note designed to be printed, but used on screen. Web layout, which is more like 'screen layout' (that is, adjust to size of window dynamically instead of being fixed on a "paper size") makes more sense.

However, if someone finds use in a print layout for forms, I'm not opposed to allowing it.

As such, my opinions are:

 - The issue of the form switching to Print layout and being stuck there
   after "File / Print" is a genuine bug. However, it is not specific to
   forms; the same happens with a vanilla Writer document.

 - We need to be consistent on whether we allow print layout for forms or not.

   If we don't allow it, the "view / (web|print) layout" menu entries should
   be greyed out *both* in design mode (edit mode) *and* in normal mode.

   If we do allow it, then the "view / (web|print) layout" should be enabled
   *both* in design mode (edit mode) *and* in normal mode. The default when
   creating a new form should be Web layout.
Comment 3 Kurt 2013-03-19 11:14:08 UTC
For what it's worth, I find print layout quite handy for forms simply for the fact that many forms I design specifically to be able to be printed, and I like to lay them out on a page nicely.

In a shameless plug that is beyond the scope of this bug, I'll say that I would personally find it far more useful for forms, when they are "run", to have their editing toolbars removed in order to maximize screen real estate.  I can't emphasize enough how many times I've wished window size and toolbar layout could be specified on a per-form basis.
Comment 4 Julien Nabet 2014-08-02 08:37:23 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce the bug.

I noticed these logs:
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:legacy.osl:5151:1:xmloff/source/forms/propertyexport.cxx:595: OPropertyExport::implConvertAny: unsupported value type!
warn:xmloff:5151:1:xmloff/source/draw/shapeexport.cxx:558: com.sun.star.drawing.ControlShape
Comment 5 Alex Thurgood 2015-01-03 17:39:41 UTC
Adding self to CC if not already on


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.