Download it now!
Bug 59397 - UI: Use more precise wording at 'Find & Replace - More Options - Styles'
Summary: UI: Use more precise wording at 'Find & Replace - More Options - Styles'
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Vishv
URL:
Whiteboard: target:4.1.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks:
 
Reported: 2013-01-15 08:01 UTC by Rainer Bielefeld Retired
Modified: 2015-12-15 22:49 UTC (History)
5 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 Rainer Bielefeld Retired 2013-01-15 08:01:21 UTC
Current wording might worry users, see "Bug 34390 - Add to 'Find & Replace' capability to find frame, page, list, and character styles"!

WRITER
-------
Currently in Writer menu 'Edit -> find and Replace -> More options' there is an option 'Search for styles', what seems to imply that it is possible to find Page Styles or Character Styles. But the function is limited to find Paragraph Styles. So text at checkbox should be changed from 
"Search for Styles"
to
"Search for Paragraph Styles"

CALC
----
Similar situation as in WRITER
text at checkbox should be changed from 
"Search for Styles"
to
"Search for Cell Styles"

DRAW / IMPRESS
--------------
No search for styles possible

Related work
-------------
Help texts will have to be amended, contact persons have to be added to CC.
Documentation (Manuals) will have to be amended, contact persons have to be added to CC.
Comment 1 Vishv 2013-01-16 16:58:02 UTC
Hi,I am interested in solving this hack,Can I have a shot at it?
Comment 2 Rainer Bielefeld Retired 2013-01-16 17:23:41 UTC
(In reply to comment #1)
Hi, you are welcome in the team. Please 
* add yourself to “Assigned to” and change Status to “Assigned”, so that we know 
  that you want to fix this one
* subscribe <libreoffice@lists.freedesktop.org> at
  <libreoffice@lists.freedesktop.org>,
  on that list you can get assistance. 
* If not already done
** add yourself at <https://wiki.documentfoundation.org/Development/Developers> 
** post a license statement (for details please ask on 
   <libreoffice@lists.freedesktop.org>

Joel Madero or Ivan Timofeev migt be willing to be your mentor for UI
Comment 3 Vishv 2013-01-16 18:41:46 UTC
(In reply to comment #2)
Hi,
Can someone help me with starting point/code pointers for this hack?Any help is appreciated.
Comment 4 Rainer Bielefeld Retired 2013-01-16 19:04:46 UTC
(In reply to comment #3)
Please follow my advice precisely and ask on mailing list: 
("Need help for "Bug 59397 - UI: Use more precise wording at 'Find & Replace - More Options - Styles'")
 <https://bugs.freedesktop.org/show_bug.cgi?id=59397>" or similar.

Here nobody will hear you asking.
Comment 5 Jorendc 2013-01-17 18:59:01 UTC
See reply I send via mailinglist.

You can also look at following script: http://opengrok.libreoffice.org/xref/core/svx/source/dialog/srchdlg.cxx#282

as you see:
aLayoutBtn      ( this, SVX_RES( CB_LAYOUTS ) ),                          \

aLayoutBtn is used to handle it further. And this is also handled to deactivate it for draw. You need 2 strings (the one right now you can use for WRITER only, another one you need to create by yourself for Calc only). So, copy/paste the existing string. String1 for example for Writer, and make sure it's deactivated when Calc is used; and String2 for calc (and deactivate that string when Writer is used)...

I hope this will help :-).
Comment 6 Jorendc 2013-01-17 19:13:00 UTC
(In reply to comment #5)
> You need 2 strings (the one right now you can use
> for WRITER only, another one you need to create by yourself for Calc only).
> So, copy/paste the existing string. String1 for example for Writer, and make
> sure it's deactivated when Calc is used; and String2 for calc (and
> deactivate that string when Writer is used)...

Although I'm not sure of this one, because both strings has the same function ... 
When you do this, you need to make sure calling both strings leads to the same function.
Comment 7 Janit Anjaria 2013-01-27 07:19:22 UTC
I just studied the code for "srchdlg.cxx" but i dont find any way out we can change the format there.Please guide me,i would be grateful.
Comment 8 Markus Mohrhard 2013-01-27 11:37:16 UTC
@Rainer, Joren: Please only mark a Bug as an EasyHack if you have someone who can mentor it. I'll take it now.
Comment 9 Markus Mohrhard 2013-01-27 16:58:53 UTC
So let me add the necessary details how to solve the bug.

In http://opengrok.libreoffice.org/xref/core/svx/source/dialog/srchdlg.cxx#705 you have some code to detect which application called the dialog.

Now we need to specialise and change the string for writer and calc. For that we need to new Strings in the src file and 2 the corresponding defines in the hrc file. These should just be two entries like:

String STR_TEXT_CALC
{
    Text [ en-US ] = "nice special text for calc";
};

and then merge the code together and change the label with SetText if it is called by writer/calc.

I hope that makes it clear how to solve the bug report. If you need more code pointer please ask.
Comment 10 Vishv 2013-01-27 18:29:02 UTC
(In reply to comment #9)
Hi Markus,
Thanks for your help.I have solved this bug & I have tested it on my build(Hopefully it is correct).I will submit my patch to gerrit in few hours.I thought to share it with you ,as you are the mentor of this bug.
Comment 11 Not Assigned 2013-01-28 23:25:26 UTC
Vishv Brahmbhatt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0b7aef113cefd7a7fecc81910660d0cdc95add3e

 fdo#59397 Use more precise wording at 'Find & Replace - More Options - Styles'



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Jorendc 2013-01-28 23:34:31 UTC
I did a 'git pull -r' and 'make svx' and I can confirm this is fixed. Thank you very much :)!
Comment 13 Vishv 2013-01-29 07:37:42 UTC
Welcome!I am very much thankful to all the mentors who guided me in this bug.Thanks to @Rainer,@Jorendc,@Caolan,@dtardon and @jmadero.
(In reply to comment #12)
Comment 14 Robinson Tryon (qubit) 2015-12-15 22:49:22 UTC Comment hidden (obsolete)