https://bugs.documentfoundation.org/show_bug.cgi?id=149491

            Bug ID: 149491
           Summary: Find & Replace replaces too many characters
           Product: LibreOffice
           Version: Inherited From OOo
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: libreoff...@bielefeldundbuss.de

Created attachment 180641
  --> https://bugs.documentfoundation.org/attachment.cgi?id=180641&action=edit
Sample Document

Steps how to reproduce with Server Installation of Version: 7.4.0.0.alpha0+
(x64)  Build ID b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE  |  Calc: CL  |  Auto Colibre Theme  |  Newly
created User Profile:

0. Open attached sample document
1. Menu ˋFind → Replaceˊ
   » Dialog opens
3. Check "Reglar Expressions"
4. Type serch string "^r" (without Quotations Marks), leave Replace string 
    empty
5. [Find all]
   » all first "r" of a paragraph will be highlighted
6. [Replace all]
   » Expected: only leading "r" of paragraph will be deleted
   » Actual: all "r" will be deleted
     and it does not matter whether you replace forward or backward

10. Close without saving and reopen

0. Open attached sample document
11. Menu ˋFind → Replaceˊ
   » Dialog opens
13. Check "Regular Expressions"
14. Type search string "r$" (without Quotations Marks), leave Replace string 
    empty
15. [Find all]
   » all first "r" of a paragraph will be highlighted
16. [Replace all]
   » Expected: only "r" at end of paragraph (= end of line) will be deleted
   » Actual: as expected
     and it does not matter whether you replace forward or backward

Additional info:
-----------------
a) That's a strange difference between 'delete all first "r"' and  
   'delete all last "r"'. I think it's a bug, not a feature.
b) Additional research shows a possible reason:
   If you replace one by one you see that the highlighting will stay at the 
   old place as long as there is a paragraph leading "r". Only when there is 
   nor more "r" in the line (and so also no leading "r" highlighting jumps 
   to next line
b1) You might argue that that is intended. I can follow with some tummy ache
b2) 'Replace Backwards' changes the behavior, after having replaced 
     highlighting jumps to line before. but continuing highlighting will 
     go around and around as long as no more "r" has survived

But:

c) Proceeding as (b) for r$ paragraph terminating "r" shows a different
behavior in details, but the result will be the same no "r" will survive if you
press
   [Replace] often enough.

d) I did not test all details, but difference between (6) and (16) has been
   inherited from OOo

My concern: 
-----------
Different behavior in 
 6: deletes all "r"                  and
16: only deletes all LAST "r"

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to