Bug 116815 - Remove "Master Elements" from Draw
Summary: Remove "Master Elements" from Draw
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords:
: 136843 (view as bug list)
Depends on:
Blocks: Main-Menu ODF-export-invalid
  Show dependency treegraph
 
Reported: 2018-04-05 09:13 UTC by Regina Henschel
Modified: 2020-12-03 07:41 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Bug 2: page field not visible until reopening file (8.75 KB, image/png)
2018-04-08 10:04 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2018-04-05 09:13:58 UTC
Open Draw and switch to Master view.
Goto menu Page, item Master Elements and check all three check boxes.
Enable Line or Area, so you can better see the elements.

Problem 1: There exists no item to enter the footer text. The part Insert > Header/Footer, which you have in Impress, does not exist here.

Close Master view, save and reload.

Problem 2: You see a page number, but no date/time.

If you examine the <style:master-page> element in styles.xml in the file, you find the reason. Enabling Master Elements inserts the placeholders presentation:date-time, presentation:footer and text:page-number. The placeholders in namespace 'presentation' do not work in Draw but only in Impress. See http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-presentation_date-time and http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-presentation_footer

The placeholder text:page-number works, because it is an ordinary field. But for getting the page number no 'Master Elements' are needed, because the user can insert the page-number field via Insert > Field.
Comment 1 Thomas Lendo 2018-04-08 10:03:34 UTC
I talked to Regina face to face to understand this bug report. :) There are several bugs within this report which can be resolved with a single solution.

I could do the steps that Regina mentioned in 6.1, 6.0 and 5.4.
Note: Command 'Master Elements...' is available in 6.1.0.0.alpha0+ via Page menu, but due to Draw menu changes for 6.1 it isn't there in older versions (tested 6.0, 5.4, 5.1). It's available via Customize dialog in section "Modify" but that only works in 6.0 and 5.4. I couldn't see the manually inserted command in 5.1.

Bug 1:
'Master Elements...' is simulating the 'Insert Header/Footer' item of Impress. I don't know if this is necessary for Draw anyway. As this isn't intended by the ODF specification as Regina said, 'Master Elements...' is either a suboptimal naming or completely false regarding ODF specification and should be removed from Draw.

Bug 2:
After inserting all 3 master elements and giving them a border color or area color to emphasize them visually, go to the normal view and you see that the page number field/frame isn't visible. (I'll attach a screenshot.)
It's only visible after saving and reopening the file.

Bug 3:
After that all and going back to the 'Master Elements...' dialog, the checkboxes aren't activated anymore although they exist in the opened file.


Proposed solution:
Get rid of the complete dialog from the UI and from the code to get conform with the ODF spec.
Page number can be inserted over menu Insert > Field > Page number. Maybe this needs a more prominent place in the menu or toolbar.
Comment 2 Thomas Lendo 2018-04-08 10:04:46 UTC
Created attachment 141206 [details]
Bug 2: page field not visible until reopening file
Comment 3 Heiko Tietze 2018-04-09 08:49:09 UTC
+1 to remove the Impress stuff from Draw. This is a potential regression for a few users, however.
Comment 4 Heiko Tietze 2018-10-28 12:05:13 UTC
No further input, so let's kill the master. Perhaps in two steps, first by removing access and if no user complains the actual code.
Comment 5 QA Administrators 2019-10-29 03:29:42 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2019-10-29 14:25:56 UTC
The "Master Elements" still exist in Draw.
Tested in Version: 6.4.0.0.alpha1+ (x64)
Build ID: 7c6226bee72805db7f0e567ca9f06c786a7d0da2
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 7 Justin L 2020-12-01 13:07:44 UTC
*** Bug 136843 has been marked as a duplicate of this bug. ***
Comment 8 Justin L 2020-12-01 18:42:52 UTC
Proposed patch http://gerrit.libreoffice.org/c/core/+/107002
    These items are not saved or imported into Draw,
    so remove them from the UI interface.
    They are just inherited from Impress.
    
    Specifically:
    -Display Master Background
    -Display Master Objects
    -Master Elements
    
    This patch removes these 3 elements in Draw from:
    -sidebar page properties
    -main traditional Page menu
    -Tabbed Notebook bar's layout tab,
        and the tab's Layout menu,
        and when viewing master - context tab
    -Compact Notebook bar's layout tab,
        and the tab's Layout menu,
        and when viewing master - context tab
    -Single Notebook bar's master context view
    
    I couldn't figure out where the reference
    in grouped-compact was used, so I left it.
    (In Impress it is in a slide menu, but there
     is no corresponding Page menu in Draw
     - probably a bug.)
Comment 9 Commit Notification 2020-12-03 05:12:42 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/78ec4f4cbd5b7cc5b7eeb465fe7950fc72ce2847

tdf#116815 Draw UI: remove presentation-only stuff

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Justin L 2020-12-03 05:35:51 UTC
(In reply to Justin L from comment #8)
>     I couldn't figure out where the reference
>     in grouped-compact was used, so I left it.
In the end, I removed that too. In Impress, it is in the "Slide" menu, but the corresponding "Page" menu is missing in Draw.

I will let others determine whether this fixes the bug report, or whether there is more that still needs to be done.