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
Yep, let's say this is an enhancement.
This bug could be classified as difficutlyInteresting, since the interfaces for the text selection have to be implemented in order to get this working.
writer: https://opengrok.libreoffice.org/xref/core/sw/uiconfig/swriter/menubar/menubar.xml?r=65b3a5cb#123 https://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu?r=65b3a5cb#59 https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbunosearchcontrollers.cxx?r=ac396f2f#1573 basic: https://opengrok.libreoffice.org/xref/core/basctl/uiconfig/basicide/menubar/menubar.xml?r=97bcd0e4#59 there is the same one? so the issue may be related to pFindTextFieldControl or SetTextToSelected_Impl, I guess https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbunosearchcontrollers.cxx?r=ac396f2f#233
at least in calc, the text was not inserted too.
need little direction for this, I read the codes but not getting why this working only in writer ?
(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
(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
(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
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!
*** Bug 85838 has been marked as a duplicate of this bug. ***
Vikram, you're still working on this? Otherwise, I'd unassign for the moment (you can always return to it!)
Proposed patch here: https://gerrit.libreoffice.org/c/core/+/162548
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7bcce4180d11f6f49a71f681eeefc556fc2302ba tdf#131641 Enter selected text in the search bar (Basic IDE) It will be available in 24.8.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.