Bug 36181

Summary: EasyHack: Replace with "Notes" option doesn't work with text selected
Product: LibreOffice Reporter: Laurent BP <jumbo4444>
Component: WriterAssignee: benoit.dolives
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 3.3.2 release   
Hardware: Other   
OS: All   
Whiteboard: EasyHack
i915 platform: i915 features:
Attachments: Patch

Description Laurent BP 2011-04-12 13:18:35 UTC
Hello,

As mentioned in bug 36158
https://bugs.freedesktop.org/show_bug.cgi?id=36158
in dialog box Find & Replace, "Notes" should be replaced by "Comments", but I will use "Notes" in this report.

To reproduce:
- create a new document
- insert some text, at least one character
- select some text (all or not)
- menu Edit > Find & Replace
- in "Search for", insert some text that does not exist in your document
- in "Replace with", type whatever you want (or nothing)
- open "More options" and select "Notes" (other options may be or not checked)
- click Replace
=> every word, whatever was selected and whatever was asked for "Search for", is replaced

However, no text is found when click on Find

Same bug with OOo 3.3.0
Comment 1 benoit.dolives 2011-06-25 03:15:01 UTC
Hello,

I have reproduced it on LibO 3.5 under Ubuntu. However the option "Notes" does not even need to be checked.

I will have a look into it before the end of the week,


Best Regards,


Benoit
Comment 2 tatung 2011-06-30 00:16:04 UTC
Hi,

We are group of 3 students from Vietnam. This is our first time working with LibreOffice. Therefore, we are trying to do easy hacks in order to get familiar with source code. We will try to work on this bug from now till July 20th.

Best regards,
tatung
Comment 3 benoit.dolives 2011-06-30 15:40:31 UTC
Hi,

I have forgotten to change the status of this bug to assign. As I mentionned into my previous comment : "I will have a look into it before the end of the week".

We are at the end of the week, and I have resolved it and will submit my first patch (that is why I was looking for easy hacks).

I really hope you will get this message before going any further.

Best Regards,

Benoit.


(In reply to comment #2)
> Hi,
> 
> We are group of 3 students from Vietnam. This is our first time working with
> LibreOffice. Therefore, we are trying to do easy hacks in order to get familiar
> with source code. We will try to work on this bug from now till July 20th.
> 
> Best regards,
> tatung
Comment 4 benoit.dolives 2011-06-30 16:10:35 UTC
Created attachment 48624 [details] [review]
Patch

Hi,

Please find in attachment the patch for the bug 36181.

Bug:
While using "Replace" in the "Find&Replace" dialog of writer, the selected text was always replaced even if it does not match the searched string.

Correction:
Check that the selected text is the search string, otherwise select the first occurence if any.

This is my first contribution to LibreOffice, therefore please feel confortable to give me advices, remarks, ...


Best Regards,
Comment 5 benoit.dolives 2011-06-30 16:14:56 UTC
oups ... I have forgotten to indicate it as resolved in my previous comments...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.