summaryrefslogtreecommitdiff
path: root/solenv/lldb/libreoffice
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-28 12:11:20 +0300
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-28 15:23:39 +0200
commitdffa7b7d0b6553a5b37081cd164d3ffc0b215040 (patch)
tree3454e7fcbcd3be877c4ab691062b4bd159967954 /solenv/lldb/libreoffice
parent85511e27d259d6b19cc6c463fc06368c14511bb8 (diff)
sfx2, solenv, sw: fix issues found by Ruff linter
Change-Id: Iab375e8c8aa4c4915f3c70a9ef6aede268e4619f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171138 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'solenv/lldb/libreoffice')
-rw-r--r--solenv/lldb/libreoffice/LO.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/solenv/lldb/libreoffice/LO.py b/solenv/lldb/libreoffice/LO.py
index 3c1134ccadc4..22cb8c927184 100644
--- a/solenv/lldb/libreoffice/LO.py
+++ b/solenv/lldb/libreoffice/LO.py
@@ -18,7 +18,7 @@ def rtl_String_summary(valobj, dict):
length = valobj.GetChildMemberWithName('length').GetValueAsUnsigned(0)
buffer = valobj.GetChildMemberWithName('buffer')
- buffer_ptr = buffer.AddressOf();
+ buffer_ptr = buffer.AddressOf()
# return '"' + buffer_ptr.GetPointeeData(0, length).GetString(lldb.SBError(), 0) + '"'
return sal_ascii_string(buffer_ptr, length)
@@ -33,10 +33,14 @@ def sal_ascii_string(buffer_ptr, length):
i = 0
while i < length:
c = buffer_ptr.GetPointeeData(i, 1).GetUnsignedInt8(e, 0)
- if c == ord('"'): s = s + '\\"'
- elif c == ord('\\'): s = s + '\\\\'
- elif c == ord('\n'): s = s + '\\n'
- elif c == ord('\r'): s = s + '\\r'
+ if c == ord('"'):
+ s = s + '\\"'
+ elif c == ord('\\'):
+ s = s + '\\\\'
+ elif c == ord('\n'):
+ s = s + '\\n'
+ elif c == ord('\r'):
+ s = s + '\\r'
elif c == ord('\t'):
s = s + '\\t'
elif c < ord(' '):
@@ -61,7 +65,7 @@ def rtl_uString_summary(valobj, dict):
length = valobj.GetChildMemberWithName('length').GetValueAsUnsigned(0)
buffer = valobj.GetChildMemberWithName('buffer')
- buffer_ptr = buffer.AddressOf();
+ buffer_ptr = buffer.AddressOf()
return sal_unicode_string(buffer_ptr, length)