Brute force method: I recorded a macro to find the next paragraph mark, then press shift-enter. I assigned it to a keystroke. Not pretty, but it works. Here's the macro:
sub para2row
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(18) as new com.sun.star.beans.PropertyValue
args1(0).Name = "SearchItem.StyleFamily"
args1(0).Value = 2
args1(1).Name = "SearchItem.CellType"
args1(1).Value = 0
args1(2).Name = "SearchItem.RowDirection"
args1(2).Value = true
args1(3).Name = "SearchItem.AllTables"
args1(3).Value = false
args1(4).Name = "SearchItem.Backward"
args1(4).Value = false
args1(5).Name = "SearchItem.Pattern"
args1(5).Value = false
args1(6).Name = "SearchItem.Content"
args1(6).Value = false
args1(7).Name = "SearchItem.AsianOptions"
args1(7).Value = false
args1(8).Name = "SearchItem.AlgorithmType"
args1(8).Value = 1
args1(9).Name = "SearchItem.SearchFlags"
args1(9).Value = 65536
args1(10).Name = "SearchItem.SearchString"
args1(10).Value = "$"
args1(11).Name = "SearchItem.ReplaceString"
args1(11).Value = ""
args1(12).Name = "SearchItem.Locale"
args1(12).Value = 255
args1(13).Name = "SearchItem.ChangedChars"
args1(13).Value = 2
args1(14).Name = "SearchItem.DeletedChars"
args1(14).Value = 2
args1(15).Name = "SearchItem.InsertedChars"
args1(15).Value = 2
args1(16).Name = "SearchItem.TransliterateFlags"
args1(16).Value = 1280
args1(17).Name = "SearchItem.Command"
args1(17).Value = 0
args1(18).Name = "Quiet"
args1(18).Value = true
dispatcher.executeDispatch(document, ".uno:ExecuteSearch", "", 0, args1())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertLinebreak", "", 0, Array())
end sub
tc
David Welton wrote:
On Thu, 17 Feb 2005 10:40:17 -0500, Anthony Chilco <[EMAIL PROTECTED]> wrote:
Hi David, Very weird. You can search for row breaks (shift-enter), but you can't replace with them. This is from the regular expressions help page:
Yeah I had read that, but hoped that there was some way to get around it:-( I guess I could fiddle with the XML, but that doesn't strike me as being a particularly pleasant approach.
\n Finds a hard row break that was inserted with Shift+Enter. To change row breaks into paragraph breaks, enter \n in the Search for and Replace with boxes, and then click the Replace all button.
From this I infer that \n means row break when used in the search box and it means paragraph break when used in the replace box. You can search for paragraph breaks using regular expressions with $ in the search box, but you don't have the option to replace with a row break because the \n expression means paragraph break when replacing. It seems to be deliberate when you read the help, but doesn't look right to me.
Yes, to me it seems there ought to be one way to specify a character, visible or not, in both fields.
Thanks for your help in any case,
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
