To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=87092
Issue #|87092
Summary|replace all broken with formatting
Component|Word processor
Version|OOo 2.4 RC5
Platform|All
URL|
OS/Version|Windows XP
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|code
Assigned to|mru
Reported by|andrewb
------- Additional comments from [EMAIL PROTECTED] Sun Mar 16 15:25:15 +0000
2008 -------
I think this is a regression; I have certainly noticed it only in the last
couple of months.
If I use a macro to replace all italic formatted text in a document with plain
text surrounded by the equivalent html markup, a spurious "x" is added at the
end of the replacement string.
Steps to repeat:
(1) write a document containing two or more stretches of italicised text.
(2) run the following macro
Expected result: the italic text ranges are converted to plain text and given
tags at each end that say "<em> and "</em>"
Actual result: the italic text ranges are converted to plain text and given tags
at each end that say "<em> and "x</em>"
Note the extra, spurious "x"
The macro that does this:
Sub ital_to_HTML_Tags
dim oDoc,oRD,numfound
dim italicargs(0)as new com.sun.star.beans.PropertyValue
dim normalargs(0)as new com.sun.star.beans.PropertyValue
oDoc=thiscomponent
oRD=oDoc.createReplaceDescriptor()
italicargs(0).Name="CharPosture"
italicargs(0).Value=com.sun.star.awt.FontSlant.ITALIC
oRD.ValueSearch=True
oRD.SearchWords=True
normalargs(0).Name="CharPosture"
normalargs(0).Value=com.sun.star.awt.FontSlant.NONE
oRD.setSearchAttributes(italicargs())
oRD.setReplaceAttributes(normalargs())
oRD.setSearchString(".+")
oRD.setReplaceString("<em>&</em>")
oRD.SearchRegularExpression=True
oRD.SearchStyles=False
numfound=oDoc.ReplaceAll(oRD)
' msgbox(numfound)
end Sub
An equivalent macro to replace bold formatting with <b> tags has the same bug.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]