#!/usr/bin/python # # Find potentially unused UNO command entries in SDI files. # # Note that this is not foolproof, some extra checking is required because some command names might be # constructed at runtime. # import subprocess # search for entries in .sdi files that declare UNO/SID commands a = subprocess.Popen(r"git grep -P '^\s*\w+Item\s+\w+\s+SID_\w+$' -- *.sdi", stdout=subprocess.PIPE, shell=True) # parse out the UNO command names commandSet = list() with a.stdout as txt: for line in txt: line = line.strip() idx1 = line.find(" ") idx2 = line.find(" ", idx1 + 1) commandName = line[idx1+1 : idx2].strip() sidName = line[idx2+1:].strip() commandSet.append((commandName,sidName)) # now check to see if that UNO command is called anywhere in the codebase. for pair in commandSet: commandName = pair[0] sidName = pair[1] # check to see if that UNO command is called anywhere in the codebase. a = subprocess.Popen("git grep -wFn '.uno:" + commandName + "'", stdout=subprocess.PIPE, shell=True) cnt = 0 with a.stdout as txt2: for line2 in txt2: cnt = cnt + 1 if cnt > 0: continue # check to see if the SID is used programmatically foundLines = "" a = subprocess.Popen("git grep -wn " + sidName, stdout=subprocess.PIPE, shell=True) with a.stdout as txt2: for line2 in txt2: foundLines = foundLines + line2 if foundLines.find("ExecuteList") != -1: continue if foundLines.find("GetDispatcher()->Execute") != -1: continue if foundLines.find("ExecuteScenarioSlot") != -1: continue # TODO not sure about this, but let's tackle the easy ones first if foundLines.find("Invalidate(") != -1: continue # dump any lines that contain the SID, so we can eyeball the results print("remove: " + commandName) print(foundLines) print("----------------------------------------------------------------------------") libreoffice-6-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/scaddins/inc
tion'>
AgeCommit message (Expand)Author
2020-01-08Make OPT_ functions string more meaningful.Olivier Hallot
2019-11-29tdf#129098: parameters mixed in OPT_PROB_INMONEY (scaddins)Julien Nabet
2018-11-17Adapt to C++2a char_tStephan Bergmann
2017-07-21migrate to boost::gettextCaolán McNamara
Vincent LE GARREC
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
2020-03-12Revert "loplugin:constfields in sd"Noel Grandin
2019-11-30sd: fix typo maEffectDiscriptorMap -> maEffectDescriptorMap;Mark Hung
2019-07-25sd: LOK: avoid caching pointers and leakingAshod Nakashian
2019-07-24sd: LOK: support per-user localization of CustomAnimationPresetAshod Nakashian
2018-10-09loplugin:constfields in sdNoel Grandin
2018-06-07tdf#96099 Remove std::vector typedefsAbhyudaya Sharma
2018-05-24tdf#42949 Fix IWYU warnings in sd/inc/*Gabor Kelemen
2017-10-23loplugin:includeform: sdStephan Bergmann
2017-10-23overload std::hash for OUString and OStringNoel Grandin
2017-06-22loplugin:unusedfields in sd part3Noel Grandin
2017-06-05clang-tidy performance-unnecessary-value-paramNoel Grandin
2017-05-21cleanup unused css/animations/ and css/presentation/ includesJochen Nitschke
2016-11-07loplugin:unnecessaryvirtual in sd..sdextNoel Grandin
2016-10-20loplugin:expandablemethodds in scaddins..sdextNoel Grandin
2016-10-07loplugin:staticmethods: sdStephan Bergmann
2016-04-12clang-tidy performance-unnecessary-value-param in sdNoel Grandin
2015-10-29com::sun::star->css in sdNoel Grandin
2015-09-23boost::shared_ptr->std::shared_ptrCaolán McNamara
2015-09-17revert for mac and win unit case crashes after boost->stdCaolán McNamara
2015-09-17boost->stdCaolán McNamara
2015-07-21loplugin:unusedmethods sdNoel Grandin
2015-01-28remove unused typedefsNoel Grandin
2015-01-04boost::unordered_map->std::unordered_mapCaolán McNamara
2014-08-18Generally better to have DLLPUBLIC class with some DLLPRIVATE membersStephan Bergmann
2014-07-11new loplugin: externalandnotdefinedNoel Grandin