You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2013/05/30 09:08:31 UTC

[Bug 122423] New: SearchStyles does not apply in createReplaceDescriptor

https://issues.apache.org/ooo/show_bug.cgi?id=122423

            Bug ID: 122423
        Issue Type: DEFECT
           Summary: SearchStyles does not apply in createReplaceDescriptor
           Product: App Dev
           Version: AOO 3.4.1
          Hardware: PC
                OS: Windows 7
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: scripting
          Assignee: issues@openoffice.apache.org
          Reporter: grzmiel@hotmail.com
                CC: issues@openoffice.apache.org

I had a macro which was working well until last update. It was making italic
text non-italic and wrap it around text I provide. However after last update of
OO it stopped working. I finds the italic text but does not find it's end and
goes to the end of paragraph. E.g.

test <italic> test <no-italic> test

previously was translated to:

test Italic test Normal test

however now it's:

test Italic test test Normal

Here is my macro:

Sub italicf
    Dim oDoc As Object
    Dim oReplace As Object
    Dim SrchAttributes(0) As New com.sun.star.beans.PropertyValue
    Dim ReplAttributes(0) As New com.sun.star.beans.PropertyValue

    oDoc = ThisComponent
    oReplace = oDoc.createReplaceDescriptor

    oReplace.SearchString = ".*"
    oReplace.ReplaceString = "Italic" + "&" + "Normal"
    oReplace.SearchRegularExpression=True 
    oReplace.searchStyles=True  
    oReplace.searchAll=True   

    SrchAttributes(0).Name = "CharPosture"
    SrchAttributes(0).Value =com.sun.star.awt.FontSlant.ITALIC

    ReplAttributes(0).Name = "CharPosture"
    ReplAttributes(0).Value =com.sun.star.awt.FontSlant.NONE 

    oReplace.SetSearchAttributes(SrchAttributes())
     oReplace.SetReplaceAttributes(ReplAttributes())


    oDoc.replaceAll(oReplace)
End sub

It repro as well for looking for a bold text.

Thanks,
Jakub

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

[Bug 122423] SearchStyles does not apply in createReplaceDescriptor

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122423

hanya <ha...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hanya.runo@gmail.com

--- Comment #1 from hanya <ha...@gmail.com> ---
The macro works on AOO400m2(Build:9701)  -  Rev. 1486438.
But not working on 3.4.1.

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

[Bug 122423] SearchStyles does not apply in createReplaceDescriptor

Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=122423

Jakub Grzmiel <gr...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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