[Solved Elsewhere] A Specific Macro with Find-Replace?
Re: A Specific Macro with Find-Replace?
So there is no duplication of effort, this same question is asked on the Ask LibO site under a different username.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Re: A Specific Macro with Find-Replace?
Roblyed took all the troubles to post the above info post to ask.libreoffice also.
As an aside, the contribution of Librebel was acknowledged in the very first post here: A Specific Macro with Find-Replace? None has yet solved the case. So duplication doesn't yet occur. Everyone has been duly informed, as far as possible, that Zizi was also working on it.
As an aside, the contribution of Librebel was acknowledged in the very first post here: A Specific Macro with Find-Replace? None has yet solved the case. So duplication doesn't yet occur. Everyone has been duly informed, as far as possible, that Zizi was also working on it.
LibreOffice 4.0.3.3 (Build ID: 400m0(Build:3)) in Knoppix 7.2.0
Re: A Specific Macro with Find-Replace?
I found that I can catch the "↲¶" combination with the normal Find-Replace (Ctrl+H) using the string "\n$". But when I use the same string in the macro, like "\n" + "$", or "\n$" and try to replace it with `ch(10)` I can't.
Why?
Why?
LibreOffice 4.0.3.3 (Build ID: 400m0(Build:3)) in Knoppix 7.2.0
-
- Posts: 145
- Joined: Mon Jun 13, 2016 10:50 am
Re: A Specific Macro with Find-Replace?
Hello,
Perhaps something like this would do the trick:
On linux amend this way:
Perhaps something like this would do the trick:
Code: Select all
sub main
doc = thiscomponent
rajibando_find_and_remplace(doc.Text)
end sub
sub rajibando_find_and_remplace(T)
do
for each para in T
if T.compareRegionEnds(T, para) = 0 then
exit sub
end if
c = T.createTextCursorByRange(para.End)
c.goRight(2, True)
firstchar = mid(c.String, 3, 1)
if not isnumeric(firstchar) then
c.String = chr(10) & firstchar
exit for
end if
next para
loop
end sub
Code: Select all
firstchar = mid(c.String, 2, 1)
Edit: More simple, to stay plateform independant: Code: Select all
|
- Attachments
-
- rajibando (linux).odt
- (16.26 KiB) Downloaded 199 times
-
- rajibando.odt
- (16.28 KiB) Downloaded 206 times
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
[Solved]Re: A Specific Macro with Find-Replace?
This problem was totally solved here: A Specific Macro with Find-Replace? by Hubert Lambert.
LibreOffice 4.0.3.3 (Build ID: 400m0(Build:3)) in Knoppix 7.2.0