msodumper/globals.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
New commits: commit 148347538c554f259a376fa1ef1fa41980e6ca7f Author: Jean-Francois Dockes <j...@dockes.org> Date: Thu Jan 9 21:46:50 2014 +0100 Fix function name for consistency + comment diff --git a/msodumper/globals.py b/msodumper/globals.py index 276a317..68d8254 100644 --- a/msodumper/globals.py +++ b/msodumper/globals.py @@ -178,12 +178,10 @@ class UnicodeRichExtText(object): self.baseText = unicode() self.phoneticBytes = [] -# Linear search for index of first element in sorted list strictly -# bigger than a given value. Might be converted to binary search, but our -# lists (CONTINUE record offsets) are small. If the returned index is -# the list size (last valid index+1), the input value is beyond the -# max list value -def find_first_bigger(ilist, value): +# Search sorted list for first element strictly bigger than input +# value. Should be binary search, but CONTINUE record offsets list are +# usually small. Return list size if value >= last list element +def findFirstBigger(ilist, value): i = 0 while i < len(ilist) and value >= ilist[i]: i +=1 @@ -236,7 +234,7 @@ def getUnicodeRichExtText (bytes, offset = 0, rofflist = []): bytesToRead = textLen * bytesPerChar # Truncate to next record boundary - ibound = find_first_bigger(rofflist, strm.getCurrentPos()) + ibound = findFirstBigger(rofflist, strm.getCurrentPos()) if ibound == len(rofflist): # Just try to read and let the stream raise an exception strm.readBytes(bytesToRead) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits