Bug 94215 - XHP files added to recent document list but wont use tool when opened
Summary: XHP files added to recent document list but wont use tool when opened
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-14 18:30 UTC by Yousuf Philips (jay) (retired)
Modified: 2015-09-17 14:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Modified extension (111.77 KB, application/vnd.openofficeorg.extension)
2015-09-16 13:01 UTC, Maxim Monastirsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2015-09-14 18:30:08 UTC
When a xhp help file is opened, it is added to the recent documents list in the start center and File > Recent Document and in the Open split button in the standard toolbar. But when you open any of these files from these locations, it opens the xhp file as a text file rather than sending it to be processed by the authoring tool.

It would be nice if there was a means to rectify this or alternatively disable them from appear in the recent documents list.
Comment 1 Maxim Monastirsky 2015-09-16 08:41:57 UTC
The extension is missing type detection code. Hopefully it's possible to reuse our generic XML detection, by changing Type.xcu file as follows:

1) Replace the empty "DetectService" property with:

<prop oor:name="DetectService"><value>com.sun.star.comp.filters.XMLFilterDetect</value></prop>

2) And "ClipboardFormat" property with:

<prop oor:name="ClipboardFormat"><value>doctype:&lt;helpdocument version="1.0"&gt;</value></prop>

Let me know if it won't work.
Comment 2 Yousuf Philips (jay) (retired) 2015-09-16 10:42:36 UTC
Hi Maxim,

I tried it but unfortunately that didnt fix it. :D
Comment 3 Maxim Monastirsky 2015-09-16 13:01:51 UTC
Created attachment 118772 [details]
Modified extension

Hi Jay,

I tried it myself now, and it does seem to work for me. Just to make sure we're testing the same thing, I uploaded the version that I used.

What I did:
1) Ver. 5.0.1.2 with a clean profile
2) Installed the extension.
3) Set the help root.
4) Closed LO completely and reopened.

After this I'm able to open *.xhp files from the start center or the recent list, as well as using the File->Open... dialog.

Maybe there is a problem with a specific file? Can you state which file didn't work for you?
Comment 4 Yousuf Philips (jay) (retired) 2015-09-17 03:14:19 UTC
Hi Maxim,

Yes it works fine now. It seems there was problem with what i copied of bugzilla and pasted in the file as i compared the file between what i added and what was in your modified version. Please push the patch. Thanks.