#!/usr/bin/python # Produce a dump of name->constant of the poolitem values, to make interpreting things in the debugger easier # import subprocess import sys macroNameToValue = dict() macroNameToOriginalLine = dict() def extractMacroValue(macroValue): if isinstance(macroValue, int): return macroValue elif macroValue.isdigit(): return int(macroValue) elif macroValue[0:2] == "0x": return int(macroValue, 16) elif macroValue.find("+") != -1: tokens = macroValue.split("+") tokens1 = tokens[0].strip() tokens2 = tokens[1].strip() return extractMacroValue(tokens1) + extractMacroValue(tokens2) elif macroValue.find("-") != -1: tokens = macroValue.split("-") tokens1 = tokens[0].strip() tokens2 = tokens[1].strip() return extractMacroValue(tokens1) - extractMacroValue(tokens2) rv = extractMacroValue(macroNameToValue[macroValue]) macroNameToValue[macroValue] = rv return rv a = subprocess.Popen("cpp -E -dD -Iinclude/ include/editeng/eeitem.hxx", stdout=subprocess.PIPE, shell=True) with a.stdout as txt: for line in txt: line = line.strip() originalLine = line if not line.startswith("#define "): continue # strip the '#define' off the front idx1 = line.find(" ") line = line[idx1 : len(line)].strip() # extract the name idx1 = line.find(" ") if (idx1 == -1): continue macroName = line[0 : idx1].strip() line = line[idx1 : len(line)].strip() # ignore internal stuff if macroName.startswith("_"): continue # strip any trailing comments idx1 = line.find("//") if (idx1 != -1): line = line[0 : idx1].strip() idx1 = line.find("/*") if (idx1 != -1): line = line[0 : idx1].strip() if len(line) == 0: continue # strip brackets if line[0] == "(": line = line[1:] if line[len(line)-1] == ")": line = line[0:len(line)-1] macroValue = line.strip() # ignore macros that #define strings, not interested in those if (macroValue.find("\"") != -1): continue # ignore the multiline macros if (macroValue.find("\\") != -1): continue # check for redefinitions if macroNameToValue.has_key(macroName): print "Redefinition:\n\t", macroNameToOriginalLine[macroName], "\n\t" , originalLine else: macroNameToValue[macroName] = macroValue macroNameToOriginalLine[macroName] = originalLine # decode the constants into their numeric values recursively macroValueToName = dict() for macroName in macroNameToValue: macroValue = macroNameToValue[macroName] try: macroValue = extractMacroValue(macroName) macroValueToName[macroValue] = macroName except KeyError: print "warning: could not decode macro ", macroName for macroValue in sorted(macroValueToName): macroName = macroValueToName[macroValue] print repr(macroNameToValue[macroName]).rjust(5), " ", macroName /co-24.04.6 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/vcl/inc/fontattributes.hxx
AgeCommit message (Expand)Author
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
2018-07-27vcl: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)Stephan Bergmann
2017-11-06KF5 add FontFace implementationJan-Marek Glogowski
2017-05-19remove unused languagetag.hxx includesJochen Nitschke
2016-11-29Drop a bunch of font metrics flagsKhaled Hosny
2016-06-27loplugin:singlevalfields in vcl(part2)Noel Grandin
2016-06-01loplugin:unusedmethodsNoel Grandin
2016-04-14loplugin:passstuffbyref in vclNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2016-01-29vcl: inline FontAttributes::AddMapNameChris Sherlock
2016-01-29vcl: changes to included vcl headersChris Sherlock
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock
2016-01-28vcl: add in copy constructor for FontAttributesChris Sherlock
2016-01-21vcl: tabify fontattributes.hxxChris Sherlock
2016-01-20vcl: add more property functions to FontChris Sherlock
2016-01-19vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()Chris Sherlock
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud
2016-01-16vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()Chris Sherlock
2016-01-15loplugin:simplifyboolNoel Grandin
2016-01-15vcl: add symbol and charset accessors and mutators to FontChris Sherlock
2016-01-15vcl: add the meCharSet attribute into FontAttributesChris Sherlock
2016-01-15vcl: create a default FontAttributes constructorChris Sherlock
2016-01-14vcl: cleanup - remove unnecessary includes and fwd declsChris Sherlock
2016-01-12vcl: resplit FontAttributes from ImplFontMetricDataChris Sherlock
2016-01-10vcl: promote ImplFontAttributes to FontAttributesChris Sherlock
2016-01-10vcl: add missing mutator operations to ImplFontAttributesChris Sherlock
2016-01-07vcl: tabify fontattributes.hxxChris Sherlock
2016-01-07vcl: cleanup headers - remove unnecessary includes and fwd declsChris Sherlock
2016-01-07vcl: split more font classes from outfont.hxxChris Sherlock
2016-01-07vcl: remove unnecessary includes in font headersChris Sherlock
2016-01-06vcl: init font metric variables in ImplFontAttributes constructorsChris Sherlock
2016-01-03vcl: split out ImplFontAttributes into own headerChris Sherlock