https://bugs.freedesktop.org/show_bug.cgi?id=75806

          Priority: medium
            Bug ID: 75806
          Assignee: [email protected]
           Summary: SearchWords in ReplaceDescriptor
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: unspecified
         Component: BASIC
           Product: LibreOffice

Let say, we have text and we need to replace all words "he" with "his". Also,
we keep in mind that "he" may be beginning with capital - "He". 

Dim oDocument As Object
Dim oReplace As Object

oDocument = ThisComponent

oReplace = oDocument.createReplaceDescriptor
oReplace.searchAll=True

oReplace.SearchString = "(h)e"
oReplace.ReplaceString = "$1is"
oReplace.SearchRegularExpression = true
oReplace.SearchCaseSensitive = false
oReplace.SearchWords = true
oDocument.replaceAll(oReplace)

This macro replaces all "he/He" with "his/His", but all "she" will be replaced
with "shis" as well.

"oReplace.SearchWords = true" does not work.

This bug is relevant to all versions of LibreOffice and OpenOffice.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to