Bug 131641 - find toolbar: selected text not inserted into find combo box (different from writer)
Summary: find toolbar: selected text not inserted into find combo box (different from ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp
: 85838 (view as bug list)
Depends on:
Blocks: Find-Toolbar BASIC-IDE
  Show dependency treegraph
 
Reported: 2020-03-28 09:22 UTC by Oliver Brinzing
Modified: 2022-01-17 12:40 UTC (History)
6 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 Oliver Brinzing 2020-03-28 09:22:35 UTC
steps to reproduce:

- open basic editor
- edit a macro
- select some text, e.g. "sub"
- press Ctrl+F

expected: "sub" should be inserted into find text combo box

it works in writer:
Bug 37791 - Insert selected word in the Find bar by Ctrl F 

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

Version: 7.0.0.0.alpha0+ (x64)
Build ID: 54d3760f7dbd759cc8de6c777c6a2154d2382f16
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 1 Buovjaga 2020-06-20 10:55:06 UTC
Yep, let's say this is an enhancement.
Comment 2 Andreas Heinisch 2021-01-17 18:24:59 UTC
This bug could be classified as difficutlyInteresting, since the interfaces for the text selection have to be implemented in order to get this working.
Comment 4 himajin100000 2021-01-20 04:04:22 UTC
at least in calc, the text was not inserted too.
Comment 5 Vikram Shishupalsingh Bais 2021-03-19 02:41:43 UTC
need little direction for this, I read the codes but not getting why this working only in writer ?
Comment 6 Buovjaga 2021-03-19 06:57:51 UTC
(In reply to Vikram Shishupalsingh Bais from comment #5)
> need little direction for this, I read the codes but not getting why this
> working only in writer ?

Please explain your findings so far and then we can ask Andreas and Tomoyuki
Comment 7 Vikram Shishupalsingh Bais 2021-04-02 15:54:54 UTC
(In reply to Buovjaga from comment #6)
> (In reply to Vikram Shishupalsingh Bais from comment #5)
> > need little direction for this, I read the codes but not getting why this
> > working only in writer ?
> 
> Please explain your findings so far and then we can ask Andreas and Tomoyuki

css::uno::Reference<css::container::XIndexAccess> xIndexAccess(xModel->getCurrentSelection(), css::uno::UNO_QUERY_THROW);

this function is throwing an exception for Impress and calc, and working correctly in writer


https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbunosearchcontrollers.cxx?r=a0656ec6#241
Comment 8 Buovjaga 2021-04-02 19:12:46 UTC
(In reply to Vikram Shishupalsingh Bais from comment #7)
> (In reply to Buovjaga from comment #6)
> > (In reply to Vikram Shishupalsingh Bais from comment #5)
> > > need little direction for this, I read the codes but not getting why this
> > > working only in writer ?
> > 
> > Please explain your findings so far and then we can ask Andreas and Tomoyuki
> 
> css::uno::Reference<css::container::XIndexAccess>
> xIndexAccess(xModel->getCurrentSelection(), css::uno::UNO_QUERY_THROW);
> 
> this function is throwing an exception for Impress and calc, and working
> correctly in writer
> 
> 
> https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/
> tbunosearchcontrollers.cxx?r=a0656ec6#241

Ok, let's bring your doubt into their view
Comment 9 Andreas Heinisch 2021-04-02 20:03:37 UTC
As far as I understand this problem, is that the basic dialog does not implement the interface method getCurrentSelection like in https://opengrok.libreoffice.org/xref/core/sw/source/uibase/uno/unotxdoc.cxx?r=5480d923#536 for Writer or https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/sfxbasemodel.cxx?r=a0656ec6#1286 for Calc/Impress.

So in order to get this working, the getCurrentSelection has to be implemented for the BasicIDE in https://opengrok.libreoffice.org/xref/core/basctl/source/basicide/unomodel.cxx?r=a2d844ca.

Happy Hacking!
Comment 10 Andreas Heinisch 2021-07-09 17:38:08 UTC
*** Bug 85838 has been marked as a duplicate of this bug. ***
Comment 11 Thorsten Behrens (allotropia) 2022-01-17 12:32:18 UTC
Vikram, you're still working on this? Otherwise, I'd unassign for the moment (you can always return to it!)