[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - helpcontent2

Caolán McNamara caolanm at redhat.com
Thu Jun 16 15:12:44 UTC 2016


 helpcontent2 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe4dbade94c1170da402348aa8ade9885c5f4e3f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jun 16 15:41:33 2016 +0100

    Updated core
    Project: help  8ff2c5f505ed1f29901313692b8e3ca5d100d225
    
    Resolves: tdf#99861 Recover lost basic in help indentation
    
    regression from...
    
    commit 6614bedceadcc07ec082c5e926107f27903bda5c
    Date:   Mon Jan 25 20:07:10 2016 +0100
    
        fix validation errors by round-trip through helpauthoring extension
    
    with git show 6614bedceadcc07ec082c5e926107f27903bda5c | ~/recoverindent.py
    
    import fileinput
    import re
    import sys
    
    added = []
    removed = []
    filename = ""
    
    def processlastfile(filename, added, removed):
        if len(added) != len(removed):
            print "BROKEN"
            sys.exit(-2)
        if len(removed):
            f = open(filename, "rw")
            linestring = open(filename, "r").read()
            start = 0
            for x in range(0, len(added)):
                if added[x] == removed[x]:
                    continue
                if added[x].strip() != removed[x].strip():
                    print "BROKEN"
                    sys.exit(-2)
                if filename == "source/text/sbasic/shared/03080301.xhp" and x == 6:
                    print "skipping special hunk", removed[x], "in source/text/sbasic/shared/03080301.xhp"
                else:
                    start = linestring.find(added[x], start)
                    if start == -1:
                        print "BROKEN"
                        sys.exit(-2)
                    linestring = linestring[0:start] + removed[x] + linestring[start + len(added[x]):]
                start = start + len(removed[x])
            open(filename, "w").write(linestring)
    
    for line in fileinput.input():
        if line.startswith("--- a/"):
            if filename is not "":
                processlastfile(filename, added, removed)
            added = []
            removed = []
            filename = line[6:-1]
        elif "role=\"bascode\"" in line:
            m = re.search('>(.+?)<', line)
            code = m.group(1)
            if line.startswith("-"):
                removed.append(code)
            else:
                added.append(code)
    
    processlastfile(filename, added, removed)
    
    which puts the code back the way it was, except for one string
    which had changed and was fixed manually afterwards
    
    (cherry picked from commit 5f7e3ad041ddf022f6b0feb11fac1debbcf835b2)
    
    Change-Id: Ic67abf36bb5d27be58a51ebbf5022830f56dcb37

diff --git a/helpcontent2 b/helpcontent2
index 091a51e..8ff2c5f 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 091a51e1c78946aa4f2e7b13c31e5b08cec3c230
+Subproject commit 8ff2c5f505ed1f29901313692b8e3ca5d100d225


More information about the Libreoffice-commits mailing list