Bug 120378 - Menu option "html source" not displayed in writer
Summary: Menu option "html source" not displayed in writer
Status: RESOLVED DUPLICATE of bug 65017
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-07 13:03 UTC by Bernard TREMBLAY
Modified: 2018-10-07 23:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard TREMBLAY 2018-10-07 13:03:32 UTC
Description:
When an HTML file is opened directly with writer the menu option "view : html source" is not displayed. (target : "C:\Program Files\LibreOffice\program\swriter.exe")

When the same file is opened from libreoffice manager the option is displayed into writer:view (target : "C:\Program Files\LibreOffice\program\soffice.exe")



Steps to Reproduce:
A- Writer
1.Launch writer ("C:\Program Files\LibreOffice\program\swriter.exe" from windows10 panel launcher)
2.Open an HTML file from "last opened file"
you don't get the menu option view : html source" 

B- LibreOffice
1.Launch LibreOffice ("C:\Program Files\LibreOffice\program\soffice.exe" from windows10 panel launcher)
2.Open an HTML file (the same) from soffice panel which shows last opened files

you get the menu option view : html source" 
if you open a new existing html file you keep the option into the new write/web window



Actual Results:
Wrong menu when an html file is opened from writer (not writer/web)

Expected Results:
Get menu option view html always if an html file is opened and writer is switched to writer/web


Reproducible: Always


User Profile Reset: No



Additional Info:
Probable bug localisation :

when writer is opened it is not writer/web and when html file is opened even "writer/web" is displayed the menu interface is not updated to writer/web menu (may be other html context not set).

note : when libreoffice is opened and an html file is chosen swriter/web is launched directly
Comment 1 V Stuart Foote 2018-10-07 21:16:51 UTC
No, IIUC this is correct behavior.

Writer/Web is a different module than Writer.

An open Writer module session with focus--and so WRITER_DOCSERVICE--will open an HTML document into a writer canvas, rather than the WEB_HTML_FILTER which would open to Writer/Web.

If you want to open HTML/XHTML into Writer, run Writer. And if you want to open with the default WEB_HTML_FILTER handler, open from the Start Center or the LibreOffice File manager or the system DE file manager to have Writer/Web open the markup.

This is expected handling (defaulting to the active document service of an open module) to assure user can override defaults.  Exactly the issue of bug 89683 for handling delimited text with Writer when needed.

=-ref-=

[1] https://opengrok.libreoffice.org/xref/core/filter/source/textfilterdetect/filterdetect.cxx#138


@Maxim, Miklos -- am I reading the textfilterdetect and impact of an active WRITER_DOCSERVICE correctly here?
Comment 2 Maxim Monastirsky 2018-10-07 23:15:54 UTC
(In reply to V Stuart Foote from comment #1)
> This is expected handling (defaulting to the active document service of an
> open module) to assure user can override defaults.  Exactly the issue of bug
> 89683 for handling delimited text with Writer when needed.
Yes, that's indeed the expected behavior when we talk about the "Open..." toolbar and menu commands (and users can override this behavior by customizing the UI and replacing .uno:OpenFromWriter with a plain .uno:Open).

But I'm not sure whether it's the expected behavior also for the "recent documents" list (which is what this bug report is about). Because the whole point of "recent documents" is to reopen documents in the same way they were shown previously. So I would say it's a duplicate of Bug 65017.

*** This bug has been marked as a duplicate of bug 65017 ***