I'm try to use this regex
Code: Select all
^$
Yes, a table must be contained in a paragraph, and every paragraph requires a paragraph properties marker (the ¶) at the end. If the table is the last element in the paragraph, the marker must be placed after the table because it is not possible to place content left or right of a table. However one can prevent the paragraph marker after the table from being displayed on the page. Several suggestions are in the replies above.
To avoid space between tables:
The best method in the end IMHO. Because you can display again those lines very easily by accessing that custom paragraph style from the Stylist, no need to play with the display options to make the hidden characters visible.JeJe wrote: ↑Wed Feb 14, 2024 12:18 pm A slight variation on Hagar Delest's method would be to create a paragraph style with the hidden font effect property then that style can be applied to the line without any text being needed. And it can be reversed easily to put the lines back by removing the hidden font effect from the style.
Edit: Moved from Writer forum to Macros and UNO API because Mr.Dandy wants a macro. -- MrProgrammer, forum moderator |
Actually, that would have been useful in the first post.
Code: Select all
Sub RemoveLines
for i = 0 to thiscomponent.texttables.getcount -1
t = thiscomponent.texttables.getbyindex(i)
tc= t.getanchor.text.createtextcursorbyrange( t.getanchor.end)
tc.goright 1,false
if isempty(tc.texttable ) then
with tc.createenumeration.nextelement
if .string = "" then .dispose
end with
end if
next
End Sub