diff options
author | László Németh <nemeth@numbertext.org> | 2018-10-10 12:31:59 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-10-10 14:46:29 +0200 |
commit | 3a81c0d402d70b00351d1b236939976d589856b8 (patch) | |
tree | 4f7888e32d00c0998af70469856307b7fb46dbcc /librelogo | |
parent | 0d4abd0a5ae687e0503fd4185406fc02079951fd (diff) |
tdf#120422 LibreLogo: fix page and line formatting of "magic wand"
Format program lines as paragraphs, instead of a single paragraph
with line breaks:
- basic debug feature "jump to the bad line" works after formatting
- fix 2-page editing area: page break before the LibreLogo program
Now formatting of program lines doesn't depend on the actual regular
expression setting of Search & Replace functionality of Writer,
so this is the intended fix for tdf#100941 "LibreLogo: 'magic wand'
icon inserts incorrect '\n' characters instead of paragraph breaks".
NOTE: setting also AlgorithmType, not only AlgorithmType2 prevents
crashing of LibreOffice at opening Search & Replace dialog after
usage of the "magic wand" icon.
partial revert of the commit b1a6d157683b8182089ed5854179c8da8c416304
Resolves: tdf#100941 LibreLogo: replace literal '\n' with newline
Change-Id: I34f581278fdae8d41967800d05662e37b731b59d
Reviewed-on: https://gerrit.libreoffice.org/61610
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'librelogo')
-rw-r--r-- | librelogo/source/LibreLogo/LibreLogo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py index eb97fe1e1943..356ed97f551a 100644 --- a/librelogo/source/LibreLogo/LibreLogo.py +++ b/librelogo/source/LibreLogo/LibreLogo.py @@ -450,9 +450,9 @@ def __translate__(arg = None): pagebreak = False selection.setString(text) # convert to paragraphs - __dispatcher__(".uno:ExecuteSearch", (__getprop__("SearchItem.SearchString", r"\n"), __getprop__("SearchItem.ReplaceString", "\n"), \ + __dispatcher__(".uno:ExecuteSearch", (__getprop__("SearchItem.SearchString", r"\n"), __getprop__("SearchItem.ReplaceString", r"\n"), \ __getprop__("Quiet", True), __getprop__("SearchItem.Command", 3), __getprop__("SearchItem.StyleFamily", 2), \ - __getprop__("SearchItem.AlgorithmType2", 1), __getprop__("SearchItem.SearchFlags", 0))) + __getprop__("SearchItem.AlgorithmType", 1), __getprop__("SearchItem.AlgorithmType2", 2), __getprop__("SearchItem.SearchFlags", 0))) # set 2-page layout if pagebreak: selection.getStart().BreakType = 4 |