Bug 104746 - Enhancement Suggestion - pass selected text to Web browser search
Summary: Enhancement Suggestion - pass selected text to Web browser search
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: ahmad_g
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillPython
Depends on:
Blocks:
 
Reported: 2016-12-18 00:28 UTC by larrybradley
Modified: 2020-03-11 21:55 UTC (History)
3 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 larrybradley 2016-12-18 00:28:06 UTC
First, sorry for using the bug function, unable to locate "Request for Enhancement," as the link on the web site does not take you there. Anyhow, being able to highlight a word or phrase and right click to launch the browser's search function would be way cool and as useful as anything I can think of that is not currently baked into LibreOffice.
Comment 1 Heiko Tietze 2016-12-18 09:03:57 UTC Comment hidden (no-value)
Comment 2 Heiko Tietze 2016-12-18 09:25:11 UTC
Sounds like an interesting feature. But I would rather implement it as an extension because a) browsing the Internet is out of scope, and b) the question what page is actually loaded (resp. which search engine) is a nightmare.

PS: You did it right with setting the enhancement flag, that's the supposed workflow.
Comment 3 Keith Curtis 2019-03-08 00:24:19 UTC
It would also be nice to send text to Wikipedia instead of a search engine. A plugin that implemented one could pretty easily implement that also.
Comment 4 ahmad_g 2020-03-01 09:31:12 UTC
I think the feature is cool to be implemented.

I have suggestion to add search button in the right click options for the selected text and then to run script which uses the default browser at the user's computer to search through it. 

Is it a good implementation to start working on it?
Comment 5 ahmad_g 2020-03-06 19:20:39 UTC
I've made the c++ extension needed for the selected text search function

github link:https://github.com/ganzourii/LibreOffice_Search_Extension

It's reviewed by @quikee and said "Looks good.." :D

Could someone help me publish it in the extensions site?
Comment 6 Heiko Tietze 2020-03-11 10:45:18 UTC
The extension adds a main menu entry Enable > Context Menu Search. I expect that it takes my selected text into a browser search but nothing happens on my system. So at least feedback is missing. Looking at the extension itself it seems to work only for Linux 64bit. The extension misses license, author, description... 

To share your work, you have to compile for the different platforms, I guess, provide the command per context menu instead of the main menu, and give it some better name like "Search for selection in default Internet browser" (which is too long). And you have to give feedback in case of errors.

If the extension is just to prove your C++ skills it might be enough and a good basis for others.
Comment 7 ahmad_g 2020-03-11 21:37:20 UTC
(In reply to Heiko Tietze from comment #6)
> The extension adds a main menu entry Enable > Context Menu Search. I expect
> that it takes my selected text into a browser search but nothing happens on
> my system. So at least feedback is missing. Looking at the extension itself
> it seems to work only for Linux 64bit. The extension misses license, author,
> description... 
I will updated the files it didn't come to my mind (license,author,description)

It's working in linux yes but i was using LO alreay existing functions for SystemShellExecution i thought it was handling it implicitly. i was adding to preprocessor if condition but i guess there's no need for it i removed it, maybe you could test it again now?

> 
> To share your work, you have to compile for the different platforms, I

I don't know how to test it on other platforms but i will search for it.

> guess, provide the command per context menu instead of the main menu, and
> give it some better name like "Search for selection in default Internet
> browser" (which is too long). And you have to give feedback in case of
> errors.
> 
> If the extension is just to prove your C++ skills it might be enough and a
> good basis for others.

I couldn't test the extension on other os
Comment 8 ahmad_g 2020-03-11 21:55:59 UTC
Oh Sorry! i made it specifically for writer at first i will try to generalize it