summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-18 10:54:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-18 10:54:09 +0100
commitd7ae4dfdf0c254361d012aefed203a59638c3e3c (patch)
treed33c778e3e8eae51429e28b55a93552647590ebf /bin
parentfa8e3464c8760dcbd774a9fc8d79e9489a7c1bdf (diff)
map the modules and special names back manually
Change-Id: Ie80e2ef74932b9dd46b2f709e181c00aac4d4f9c
Diffstat (limited to 'bin')
-rwxr-xr-xbin/test-hid-vs-ui.py32
1 files changed, 28 insertions, 4 deletions
diff --git a/bin/test-hid-vs-ui.py b/bin/test-hid-vs-ui.py
index 232d9786f82a..72fa5030f44e 100755
--- a/bin/test-hid-vs-ui.py
+++ b/bin/test-hid-vs-ui.py
@@ -58,7 +58,7 @@ def init_core_files():
elif not args['git_static']:
subprocess.call(['git','fetch','origin'])
allfiles = subprocess.check_output(['git','ls-tree','--name-only','--full-name','-r','master'])
- return '\n'.join(re.findall('.*\.ui',allfiles))
+ return re.findall('.*\.ui',allfiles)
if __name__ == "__main__":
@@ -83,7 +83,31 @@ if __name__ == "__main__":
hid = rawtext.split('hid="')[1].split('"')[0]
if hid.startswith('.uno'): continue
uifileraw, compname = hid.rsplit('/',1)
- uifile = uifileraw.split('/',1)[1] + ".ui" # remove modules/ which exist only in install
+ uifile = uifileraw + ".ui"
+ # map modules/ etc, which exist only in install
+ # back to their source location
+ if uifile.startswith("modules/scalc"):
+ uifile = "sc/scalc" + uifile[13:]
+ elif uifile.startswith("modules/swriter"):
+ uifile = "sw/swriter" + uifile[15:]
+ elif uifile.startswith("modules/schart"):
+ uifile = "chart2" + uifile[14:]
+ elif uifile.startswith("modules/smath"):
+ uifile = "starmath/smath" + uifile[13:]
+ elif uifile.startswith("modules/sdraw"):
+ uifile = "sd/sdraw" + uifile[13:]
+ elif uifile.startswith("modules/simpress"):
+ uifile = "sd/simpress" + uifile[16:]
+ elif uifile.startswith("modules/BasicIDE"):
+ uifile = "basctl/basicide" + uifile[16:]
+ elif uifile.startswith("modules/spropctrlr"):
+ uifile = "extensions/spropctrlr" + uifile[18:]
+ elif uifile.startswith("sfx"):
+ uifile = "sfx2" + uifile[3:]
+ elif uifile.startswith("svt"):
+ uifile = "svtools" + uifile[3:]
+ components = uifile.split('/',1);
+ uifile = components[0] + '/uiconfig/' + components[1]
targets[uifile].add(compname.split(':')[0])
origin[uifile].add(fname) # help file(s)
@@ -96,10 +120,10 @@ if __name__ == "__main__":
errors += '\nFrom ' + origin[uikey].pop()
else:
errors += '\nFrom one of ' + str(origin[uikey]).replace('set(','').replace(')','')
- errors += ', we did not found file '+ uikey+'.'
+ errors += ', we did not find file '+ uikey+'.'
continue
- full_path = os.path.join(core_repo_dir,re.search('(.*'+uikey+')',uifileslist).group(1))
+ full_path = os.path.join(core_repo_dir,uikey)
# print full_path
root = ET.parse(full_path).getroot()
ids = [element.attrib['id'].split(':')[0] for element in root.findall('.//object[@id]')]