diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-05 10:54:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-06 07:41:36 +0100 |
commit | 0c1ca08318bd370280e124ea05d9bf0d2535d3e1 (patch) | |
tree | be8a131324a78b1c6459838a2cd691e182bfc6cf | |
parent | 30b18e9c1ce5578ce22cb75e38f489eb25c4b7c7 (diff) |
remove unused defines
In particular, the STR_SVT_MIMETYPE defines are dead
since
commit 1b694dad643334ec1bab3f823dcd68f44a05ebe3
Date: Thu Aug 24 22:14:27 2017 +0200
loplugin:unusedmethods
Change-Id: I641ec0a14efedc55c9d6a4de4a28784c273602e9
Reviewed-on: https://gerrit.libreoffice.org/47464
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rwxr-xr-x | bin/find-unused-defines.py | 8 | ||||
-rw-r--r-- | chart2/source/inc/chartview/ChartSfxItemIds.hxx | 1 | ||||
-rw-r--r-- | include/editeng/editids.hrc | 2 | ||||
-rw-r--r-- | include/editeng/editrids.hrc | 1 | ||||
-rw-r--r-- | include/svl/svl.hrc | 70 | ||||
-rw-r--r-- | include/svx/svxids.hrc | 3 | ||||
-rw-r--r-- | include/svx/svxitems.hrc | 1 | ||||
-rw-r--r-- | sd/inc/app.hrc | 2 |
8 files changed, 8 insertions, 80 deletions
diff --git a/bin/find-unused-defines.py b/bin/find-unused-defines.py index 2c08cc6cd342..ad96c0c24118 100755 --- a/bin/find-unused-defines.py +++ b/bin/find-unused-defines.py @@ -119,6 +119,12 @@ with a.stdout as txt: cnt = 0 for line2 in txt2: line2 = line2.strip() # otherwise the comparisons below will not work + # ignore if/undef magic, does not indicate an actual use (most of the time) + if "ifdef" in line2: continue + if "undef" in line2: continue + # ignore commented out code + if line2.startswith("//"): continue + if line2.startswith("/*"): continue # check if we found one in actual code if idName.startswith("SID_"): if not ".hrc:" in line2 and not ".src:" in line2 and not ".sdi:" in line2: found_reason_to_exclude = True @@ -143,8 +149,6 @@ with a.stdout as txt: if "sw/source/uibase/inc/ribbar.hrc:" in line2 and "STR_IMGBTN_" in idName: found_reason_to_exclude = True if "sw/source/core/undo/undo.hrc:" in line2: found_reason_to_exclude = True if "sw/inc/poolfmt.hrc:" in line2: found_reason_to_exclude = True - # not sure about these, looks suspicious - if "sd/source/ui/app/strings.src:" in line2 and idName.endswith("_TOOLBOX"): found_reason_to_exclude = True # used via a macro that hides them from search if "dbaccess/" in line2 and idName.startswith("PROPERTY_ID_"): found_reason_to_exclude = True if "reportdesign/" in line2 and idName.startswith("HID_RPT_PROP_"): found_reason_to_exclude = True diff --git a/chart2/source/inc/chartview/ChartSfxItemIds.hxx b/chart2/source/inc/chartview/ChartSfxItemIds.hxx index df7a72890fe4..81ab1aa77ef6 100644 --- a/chart2/source/inc/chartview/ChartSfxItemIds.hxx +++ b/chart2/source/inc/chartview/ChartSfxItemIds.hxx @@ -191,7 +191,6 @@ // values for SCHATTR_STYLE_SHAPE items #define CHART_SHAPE3D_IGNORE -2 //internal! (GetChartShapeStyle()!) -#define CHART_SHAPE3D_ANY -1 //undefined type (GetChartShapeStyle()!) #define CHART_SHAPE3D_SQUARE 0 #define CHART_SHAPE3D_CYLINDER 1 #define CHART_SHAPE3D_CONE 2 diff --git a/include/editeng/editids.hrc b/include/editeng/editids.hrc index 5921eff49866..69a34cfc7804 100644 --- a/include/editeng/editids.hrc +++ b/include/editeng/editids.hrc @@ -51,7 +51,7 @@ #define SID_ATTR_CHAR_FONTLIST ( SID_SVX_START + 22 ) #define SID_ATTR_BORDER_OUTER ( SID_SVX_START + 24 ) #define SID_ATTR_BORDER_SHADOW ( SID_SVX_START + 25 ) -#define SID_ATTR_PARA ( SID_SVX_START + 26 ) + // free #define SID_ATTR_PARA_ADJUST ( SID_SVX_START + 27 ) #define SID_ATTR_PARA_ADJUST_LEFT ( SID_SVX_START + 28 ) #define SID_ATTR_PARA_ADJUST_RIGHT ( SID_SVX_START + 29 ) diff --git a/include/editeng/editrids.hrc b/include/editeng/editrids.hrc index 096d119aa002..5cbb2d24d46b 100644 --- a/include/editeng/editrids.hrc +++ b/include/editeng/editrids.hrc @@ -39,7 +39,6 @@ #define RID_SVXITEMS_SHADOW_BOTTOMRIGHT NC_("RID_SVXITEMS_SHADOW_BOTTOMRIGHT", "Shadow bottom right") // enum ColorName ----------------------------------------------------------- -#define RID_SVXITEMS_COLOR NC_("RID_SVXITEMS_COLOR", "Color ") #define RID_SVXITEMS_COLOR_BLACK NC_("RID_SVXITEMS_COLOR_BLACK", "Black") #define RID_SVXITEMS_COLOR_BLUE NC_("RID_SVXITEMS_COLOR_BLUE", "Blue") #define RID_SVXITEMS_COLOR_GREEN NC_("RID_SVXITEMS_COLOR_GREEN", "Green") diff --git a/include/svl/svl.hrc b/include/svl/svl.hrc index f066331992df..d9869d05aeb1 100644 --- a/include/svl/svl.hrc +++ b/include/svl/svl.hrc @@ -23,77 +23,7 @@ // Internet Media Type Presentations -#define STR_SVT_MIMETYPE_APP_OCTSTREAM NC_("STR_SVT_MIMETYPE_APP_OCTSTREAM", "Binary file") -#define STR_SVT_MIMETYPE_APP_PDF NC_("STR_SVT_MIMETYPE_APP_PDF", "PDF file") -#define STR_SVT_MIMETYPE_APP_RTF NC_("STR_SVT_MIMETYPE_APP_RTF", "RTF File") -#define STR_SVT_MIMETYPE_APP_MSWORD NC_("STR_SVT_MIMETYPE_APP_MSWORD", "MS-Word document") -#define STR_SVT_MIMETYPE_APP_STARCALC NC_("STR_SVT_MIMETYPE_APP_STARCALC", "%PRODUCTNAME Spreadsheet") -#define STR_SVT_MIMETYPE_APP_STARCHART NC_("STR_SVT_MIMETYPE_APP_STARCHART", "%PRODUCTNAME Chart") -#define STR_SVT_MIMETYPE_APP_STARDRAW NC_("STR_SVT_MIMETYPE_APP_STARDRAW", "%PRODUCTNAME Drawing") -#define STR_SVT_MIMETYPE_APP_STARIMAGE NC_("STR_SVT_MIMETYPE_APP_STARIMAGE", "%PRODUCTNAME Image") -#define STR_SVT_MIMETYPE_APP_STARMATH NC_("STR_SVT_MIMETYPE_APP_STARMATH", "%PRODUCTNAME Formula") -#define STR_SVT_MIMETYPE_APP_STARWRITER NC_("STR_SVT_MIMETYPE_APP_STARWRITER", "%PRODUCTNAME Text") -#define STR_SVT_MIMETYPE_APP_ZIP NC_("STR_SVT_MIMETYPE_APP_ZIP", "ZIP file") -#define STR_SVT_MIMETYPE_APP_JAR NC_("STR_SVT_MIMETYPE_APP_JAR", "JAR file") -#define STR_SVT_MIMETYPE_AUDIO_AIFF NC_("STR_SVT_MIMETYPE_AUDIO_AIFF", "Audio file") -#define STR_SVT_MIMETYPE_AUDIO_BASIC NC_("STR_SVT_MIMETYPE_AUDIO_BASIC", "Audio file") -#define STR_SVT_MIMETYPE_AUDIO_MIDI NC_("STR_SVT_MIMETYPE_AUDIO_MIDI", "Audio file") -#define STR_SVT_MIMETYPE_AUDIO_VORBIS NC_("STR_SVT_MIMETYPE_AUDIO_VORBIS", "Audio file") -#define STR_SVT_MIMETYPE_AUDIO_WAV NC_("STR_SVT_MIMETYPE_AUDIO_WAV", "Audio file") -#define STR_SVT_MIMETYPE_AUDIO_WEBM NC_("STR_SVT_MIMETYPE_AUDIO_WEBM", "Audio file") -#define STR_SVT_MIMETYPE_IMAGE_GIF NC_("STR_SVT_MIMETYPE_IMAGE_GIF", "Image") -#define STR_SVT_MIMETYPE_IMAGE_PNG NC_("STR_SVT_MIMETYPE_IMAGE_PNG", "Image") -#define STR_SVT_MIMETYPE_IMAGE_TIFF NC_("STR_SVT_MIMETYPE_IMAGE_TIFF", "Image") -#define STR_SVT_MIMETYPE_IMAGE_JPEG NC_("STR_SVT_MIMETYPE_IMAGE_JPEG", "Image") -#define STR_SVT_MIMETYPE_IMAGE_PCX NC_("STR_SVT_MIMETYPE_IMAGE_PCX", "Image") -#define STR_SVT_MIMETYPE_IMAGE_BMP NC_("STR_SVT_MIMETYPE_IMAGE_BMP", "Bitmap") -#define STR_SVT_MIMETYPE_TEXT_HTML NC_("STR_SVT_MIMETYPE_TEXT_HTML", "HTML document") -#define STR_SVT_MIMETYPE_TEXT_PLAIN NC_("STR_SVT_MIMETYPE_TEXT_PLAIN", "Text file") -#define STR_SVT_MIMETYPE_TEXT_URL NC_("STR_SVT_MIMETYPE_TEXT_URL", "Bookmark") -#define STR_SVT_MIMETYPE_TEXT_VCARD NC_("STR_SVT_MIMETYPE_TEXT_VCARD", "vCard file") -#define STR_SVT_MIMETYPE_VIDEO_MSVIDEO NC_("STR_SVT_MIMETYPE_VIDEO_MSVIDEO", "Video file") -#define STR_SVT_MIMETYPE_VIDEO_THEORA NC_("STR_SVT_MIMETYPE_VIDEO_THEORA", "Video file") -#define STR_SVT_MIMETYPE_VIDEO_VDO NC_("STR_SVT_MIMETYPE_VIDEO_VDO", "Video file") -#define STR_SVT_MIMETYPE_VIDEO_WEBM NC_("STR_SVT_MIMETYPE_VIDEO_WEBM", "Video file") -#define STR_SVT_MIMETYPE_X_STARMAIL NC_("STR_SVT_MIMETYPE_X_STARMAIL", "Message") -#define STR_SVT_MIMETYPE_X_VRML NC_("STR_SVT_MIMETYPE_X_VRML", "VRML file") -#define STR_SVT_MIMETYPE_APP_STARIMPRESS NC_("STR_SVT_MIMETYPE_APP_STARIMPRESS", "%PRODUCTNAME Presentation") -#define STR_SVT_MIMETYPE_APP_IMPRESSPACKED NC_("STR_SVT_MIMETYPE_APP_IMPRESSPACKED", "%PRODUCTNAME Presentation (packed)") -#define STR_SVT_MIMETYPE_APP_STARHELP NC_("STR_SVT_MIMETYPE_APP_STARHELP", "%PRODUCTNAME Help") #define STR_SVT_MIMETYPE_CNT_FSYSBOX NC_("STR_SVT_MIMETYPE_CNT_FSYSBOX", "Workplace") -#define STR_SVT_MIMETYPE_CNT_FSYSFLD NC_("STR_SVT_MIMETYPE_CNT_FSYSFLD", "Folder") -#define STR_SVT_MIMETYPE_APP_GAL NC_("STR_SVT_MIMETYPE_APP_GAL", "Gallery") -#define STR_SVT_MIMETYPE_APP_GAL_THEME NC_("STR_SVT_MIMETYPE_APP_GAL_THEME", "Gallery theme") -#define STR_SVT_MIMETYPE_APP_STARW_GLOB NC_("STR_SVT_MIMETYPE_APP_STARW_GLOB", "%PRODUCTNAME Master Document") -#define STR_SVT_MIMETYPE_APP_SDM NC_("STR_SVT_MIMETYPE_APP_SDM", "Message") -#define STR_SVT_MIMETYPE_APP_SMD NC_("STR_SVT_MIMETYPE_APP_SMD", "Message") -#define STR_SVT_MIMETYPE_APP_STARW_WEB NC_("STR_SVT_MIMETYPE_APP_STARW_WEB", "%PRODUCTNAME Writer/Web") -#define STR_SVT_MIMETYPE_FRAMESET NC_("STR_SVT_MIMETYPE_FRAMESET", "Frameset Document") -#define STR_SVT_MIMETYPE_MACRO NC_("STR_SVT_MIMETYPE_MACRO", "Macro file") -#define STR_SVT_MIMETYPE_CNT_SFSYSFOLDER NC_("STR_SVT_MIMETYPE_CNT_SFSYSFOLDER", "System folder") -#define STR_SVT_MIMETYPE_APP_TEMPLATE NC_("STR_SVT_MIMETYPE_APP_TEMPLATE", "%PRODUCTNAME Template") -#define STR_SVT_MIMETYPE_IMAGE_GENERIC NC_("STR_SVT_MIMETYPE_IMAGE_GENERIC", "Image") -#define STR_SVT_MIMETYPE_APP_MSEXCEL NC_("STR_SVT_MIMETYPE_APP_MSEXCEL", "MS Excel document") -#define STR_SVT_MIMETYPE_APP_MSEXCEL_TEMPL NC_("STR_SVT_MIMETYPE_APP_MSEXCEL_TEMPL", "MS Excel Template") -#define STR_SVT_MIMETYPE_APP_MSPPOINT NC_("STR_SVT_MIMETYPE_APP_MSPPOINT", "MS PowerPoint document") -#define STR_SVT_MIMETYPE_TEXT_VCALENDAR NC_("STR_SVT_MIMETYPE_TEXT_VCALENDAR", "vCalendar-file") -#define STR_SVT_MIMETYPE_TEXT_ICALENDAR NC_("STR_SVT_MIMETYPE_TEXT_ICALENDAR", "iCalendar-File") -#define STR_SVT_MIMETYPE_TEXT_XMLICALENDAR NC_("STR_SVT_MIMETYPE_TEXT_XMLICALENDAR", "XML-iCalendar-File") -#define STR_SVT_MIMETYPE_TEXT_CDE_CALENDAR_APP NC_("STR_SVT_MIMETYPE_TEXT_CDE_CALENDAR_APP", "CDE-Calendar-File") -#define STR_SVT_MIMETYPE_INET_MSG_RFC822 NC_("STR_SVT_MIMETYPE_INET_MSG_RFC822", "message/rfc822") -#define STR_SVT_MIMETYPE_INET_MULTI_ALTERNATIVE NC_("STR_SVT_MIMETYPE_INET_MULTI_ALTERNATIVE", "multipart/alternative") -#define STR_SVT_MIMETYPE_INET_MULTI_DIGEST NC_("STR_SVT_MIMETYPE_INET_MULTI_DIGEST", "multipart/digest") -#define STR_SVT_MIMETYPE_INET_MULTI_PARALLEL NC_("STR_SVT_MIMETYPE_INET_MULTI_PARALLEL", "multipart/parallel") -#define STR_SVT_MIMETYPE_INET_MULTI_RELATED NC_("STR_SVT_MIMETYPE_INET_MULTI_RELATED", "multipart/related") -#define STR_SVT_MIMETYPE_INET_MULTI_MIXED NC_("STR_SVT_MIMETYPE_INET_MULTI_MIXED", "multipart/mixed") -#define STR_SVT_MIMETYPE_APP_SXCALC NC_("STR_SVT_MIMETYPE_APP_SXCALC", "OpenOffice.org 1.0 Spreadsheet") -#define STR_SVT_MIMETYPE_APP_SXCHART NC_("STR_SVT_MIMETYPE_APP_SXCHART", "OpenOffice.org 1.0 Chart") -#define STR_SVT_MIMETYPE_APP_SXDRAW NC_("STR_SVT_MIMETYPE_APP_SXDRAW", "OpenOffice.org 1.0 Drawing") -#define STR_SVT_MIMETYPE_APP_SXMATH NC_("STR_SVT_MIMETYPE_APP_SXMATH", "OpenOffice.org 1.0 Formula") -#define STR_SVT_MIMETYPE_APP_SXWRITER NC_("STR_SVT_MIMETYPE_APP_SXWRITER", "OpenOffice.org 1.0 Text Document") -#define STR_SVT_MIMETYPE_APP_SXIMPRESS NC_("STR_SVT_MIMETYPE_APP_SXIMPRESS", "OpenOffice.org 1.0 Presentation") -#define STR_SVT_MIMETYPE_APP_SXGLOBAL NC_("STR_SVT_MIMETYPE_APP_SXGLOBAL", "OpenOffice.org 1.0 Master Document") -#define STR_SVT_MIMETYPE_APP_SXIPACKED NC_("STR_SVT_MIMETYPE_APP_SXIPACKED", "OpenOffice.org 1.0 Presentation (packed)") #endif diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 8ebc442ed764..93946c20a892 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -121,8 +121,7 @@ class SvxLineItem; #define SID_GRID_USE (SID_SD_START+154) #define ID_VAL_MOUSESTART_X (SID_SD_START+200) #define ID_VAL_MOUSESTART_Y (SID_SD_START+201) -#define ID_VAL_LENGTH_X (SID_SD_START+202) -#define ID_VAL_LENGTH_Y (SID_SD_START+203) + // free #define ID_VAL_MOUSEEND_X (SID_SD_START+204) #define ID_VAL_MOUSEEND_Y (SID_SD_START+205) #define ID_VAL_AXIS_X (SID_SD_START+206) diff --git a/include/svx/svxitems.hrc b/include/svx/svxitems.hrc index 01c1fa7465b3..bb2ce7754e84 100644 --- a/include/svx/svxitems.hrc +++ b/include/svx/svxitems.hrc @@ -52,7 +52,6 @@ const std::pair<const char*, sal_uInt16> RID_ATTR_NAMES[] = { NC_("RID_ATTR_NAMES", "Character blinking") , SID_ATTR_CHAR_AUTOKERN }, { NC_("RID_ATTR_NAMES", "Character set color") , SID_ATTR_CHAR_CHARSETCOLOR }, { NC_("RID_ATTR_NAMES", "Overline") , SID_ATTR_CHAR_OVERLINE }, - { NC_("RID_ATTR_NAMES", "Paragraph") , SID_ATTR_PARA }, { NC_("RID_ATTR_NAMES", "Alignment") , SID_ATTR_PARA_ADJUST }, { NC_("RID_ATTR_NAMES", "Line spacing") , SID_ATTR_PARA_LINESPACE }, { NC_("RID_ATTR_NAMES", "Page Break") , SID_ATTR_PARA_PAGEBREAK }, diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index f6c6752e8c66..01e55838560e 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -221,8 +221,6 @@ #define ID_VAL_BORDER (SID_SD_START+199) // In svxids.hrc: ID_VAL_MOUSESTART_X (SID_SD_START+200) // In svxids.hrc: ID_VAL_MOUSESTART_Y (SID_SD_START+201) -// In svxids.hrc: ID_VAL_LENGTH_X (SID_SD_START+202) -// In svxids.hrc: ID_VAL_LENGTH_Y (SID_SD_START+203) // In svxids.hrc: ID_VAL_MOUSEEND_X (SID_SD_START+204) // In svxids.hrc: ID_VAL_MOUSEEND_Y (SID_SD_START+205) // In svxids.hrc: ID_VAL_AXIS_X (SID_SD_START+206) |