#!/usr/bin/env php slotId = $slotId; $allSlots[$slotName]->slotRID = $slotRID; $allSlots[$slotName]->mode = $mode; $allSlots[$slotName]->slotDescription = ""; } } $index++; } } function analyseXCU($fileName) { global $allSlots; $lines = file($fileName); $index = 0; $count = count($lines); while ($index < $count) { $aLine = $lines[$index]; if (strpos($aLine, '') === FALSE ) { $index++; $aLine = $lines[$index]; } $aLine = str_replace('', '', $aLine); $aLine = trim(str_replace('', '', $aLine)); if (array_key_exists($slotName, $allSlots)) $allSlots[$slotName]->slotDescription = str_replace('~', '', $aLine); } $index++; } } if (count($argv) != 2) { print "Syntax error: ids.php module\n\n"; print " Module is one of:\n"; print " basslots\n"; print " scslots\n"; print " sdgslots\n"; print " sdslots\n"; print " sfxslots\n"; print " smslots\n"; print " svxslots\n"; print " swslots\n"; exit(1); } $allSlots = array(); foreach (getFilesList("./workdir/SdiTarget", ".hxx") as $sdiFile) if (basename($sdiFile, ".hxx") === $argv[1]) analyseFile($sdiFile); foreach (getFilesList("officecfg/registry/data/org/openoffice/Office/UI", ".xcu") as $xcuFile) analyseXCU($xcuFile); ksort($allSlots); foreach ($allSlots as $name => $props) { printf("|-\n| %s\n| %s\n| %d\n| %s\n| %s\n", $name, $props->slotRID, $props->slotId, $props->mode, $props->slotDescription); } print ("|-\n"); ?>