Skip to content

Commit

Permalink
loplugin:unusedenumvalues
Browse files Browse the repository at this point in the history
Change-Id: I9dcc9f73af6db5b4f7cc946bc28931e5c230b34c
Reviewed-on: https://gerrit.libreoffice.org/29012
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
  • Loading branch information
Noel Grandin committed Sep 19, 2016
1 parent 4f86b7a commit 1658bd2
Show file tree
Hide file tree
Showing 19 changed files with 12 additions and 190 deletions.
1 change: 1 addition & 0 deletions compilerplugins/clang/unusedenumvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
excludedTypes = set([
"SwVarFormat", "RES_FIELDS", "SwFillOrder", "SwIoDetect", "SwDocumentSettingsPropertyHandles",
"SalGenericDataType", "SwDateSubFormat", "XclFutureRecType", "ds_status", "MediaCommand",
"EmfPlusHatchStyle"
])

# clang does not always use exactly the same numbers in the type-parameter vars it generates
Expand Down
1 change: 0 additions & 1 deletion dbaccess/source/ui/inc/dbwizsetup.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ protected:
enum ApplyResult
{
AR_LEAVE_MODIFIED, // something was modified and has successfully been committed
AR_LEAVE_UNCHANGED, // no changes were made
AR_KEEP // don't leave the page (e.g. because an error occurred)
};

Expand Down
3 changes: 1 addition & 2 deletions filter/source/config/cache/filtercache.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ class FilterCache : public BaseLock
E_CONTAINS_TYPES = 2,
E_CONTAINS_FILTERS = 4,
E_CONTAINS_FRAMELOADERS = 8,
E_CONTAINS_CONTENTHANDLERS = 16,
E_CONTAINS_ALL = 31 // must be a combination of all excepting E_CONTAINS_NOTHING! Please update if items will be added or removed ...
E_CONTAINS_CONTENTHANDLERS = 16
};


Expand Down
7 changes: 3 additions & 4 deletions idlc/inc/astdeclaration.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ class AstScope;
// Enum defining the different kinds of Ast nodes
enum NodeType
{
NT_object, // Denotes an object
NT_service, // Denotes an servcie
NT_service, // Denotes a service
NT_interface_member, // Denotes an interface which is exported from object
NT_service_member, // Denotes an service which is exported from object
NT_service_member, // Denotes a service which is exported from object
NT_observes, // Denotes an observed interface
NT_needs, // Denotes an needed service
NT_needs, // Denotes a needed service
NT_module, // Denotes a module
NT_root, // Denotes the root of AST
NT_interface, // Denotes an interface
Expand Down
3 changes: 0 additions & 3 deletions include/basic/sbxdef.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ enum SbxDataType {
SbxVECTOR = 0x1000, // simple counted array
SbxARRAY = 0x2000, // array
SbxBYREF = 0x4000, // access by reference

SbxUSER1 = 256, // first user defined data type
SbxUSERn = 2047 // last user defined data type
};

const sal_uInt32 SBX_TYPE_WITH_EVENTS_FLAG = 0x10000;
Expand Down
3 changes: 1 addition & 2 deletions include/editeng/svxenum.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ enum class SvxLineSpaceRule
{
Auto,
Fix,
Min,
End
Min
};

enum class SvxInterLineSpaceRule
Expand Down
121 changes: 0 additions & 121 deletions include/filter/msfilter/escherex.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,6 @@ enum ESCHER_AnchorText
ESCHER_AnchorBottomCenteredBaseline
};

enum ESCHER_cDir
{
ESCHER_cDir0, // Right
ESCHER_cDir90, // Down
ESCHER_cDir180, // Left
ESCHER_cDir270 // Up
};

// connector style
enum ESCHER_cxSTYLE
{
Expand All @@ -228,54 +220,6 @@ enum ESCHER_txfl
ESCHER_txflVertN // Vertical, non-@
};

// text direction (needed for Bi-Di support)
enum ESCHER_txDir
{
ESCHER_txdirLTR, // left-to-right text direction
ESCHER_txdirRTL, // right-to-left text direction
ESCHER_txdirContext // context text direction
};

// Callout Type
enum ESCHER_spcot
{
ESCHER_spcotRightAngle = 1,
ESCHER_spcotOneSegment = 2,
ESCHER_spcotTwoSegment = 3,
ESCHER_spcotThreeSegment= 4
};

// Callout Angle
enum ESCHER_spcoa
{
ESCHER_spcoaAny,
ESCHER_spcoa30,
ESCHER_spcoa45,
ESCHER_spcoa60,
ESCHER_spcoa90,
ESCHER_spcoa0
};

// Callout Drop
enum ESCHER_spcod
{
ESCHER_spcodTop,
ESCHER_spcodCenter,
ESCHER_spcodBottom,
ESCHER_spcodSpecified
};

// FontWork alignment
enum ESCHER_GeoTextAlign
{
ESCHER_AlignTextStretch, // Stretch each line of text to fit width.
ESCHER_AlignTextCenter, // Center text on width.
ESCHER_AlignTextLeft, // Left justify.
ESCHER_AlignTextRight, // Right justify.
ESCHER_AlignTextLetterJust, // Spread letters out to fit width.
ESCHER_AlignTextWordJust, // Spread words out to fit width.
ESCHER_AlignTextInvalid // Invalid
};

// flags for pictures
enum ESCHER_BlipFlags
Expand All @@ -290,71 +234,6 @@ enum ESCHER_BlipFlags
ESCHER_BlipFlagLinkToFile = 8
};


enum ESCHER_3DRenderMode
{
ESCHER_FullRender, // Generate a full rendering
ESCHER_Wireframe, // Generate a wireframe
ESCHER_BoundingCube // Generate a bounding cube
};


enum ESCHER_xFormType
{
ESCHER_xFormAbsolute, // Apply transform in absolute space centered on shape
ESCHER_xFormShape, // Apply transform to shape geometry
ESCHER_xFormDrawing // Apply transform in drawing space
};


enum ESCHER_ShadowType
{
ESCHER_ShadowOffset, // N pixel offset shadow
ESCHER_ShadowDouble, // Use second offset too
ESCHER_ShadowRich, // Rich perspective shadow (cast relative to shape)
ESCHER_ShadowShape, // Rich perspective shadow (cast in shape space)
ESCHER_ShadowDrawing, // Perspective shadow cast in drawing space
ESCHER_ShadowEmbossOrEngrave
};

// - the type of a (length) measurement
enum ESCHER_dzType
{
ESCHER_dzTypeMin = 0,
ESCHER_dzTypeDefault = 0, // Default size, ignore the values
ESCHER_dzTypeA = 1, // Values are in EMUs
ESCHER_dzTypeV = 2, // Values are in pixels
ESCHER_dzTypeShape = 3, // Values are 16.16 fractions of shape size
ESCHER_dzTypeFixedAspect = 4, // Aspect ratio is fixed
ESCHER_dzTypeAFixed = 5, // EMUs, fixed aspect ratio
ESCHER_dzTypeVFixed = 6, // Pixels, fixed aspect ratio
ESCHER_dzTypeShapeFixed = 7, // Proportion of shape, fixed aspect ratio
ESCHER_dzTypeFixedAspectEnlarge= 8, // Aspect ratio is fixed, favor larger size
ESCHER_dzTypeAFixedBig = 9, // EMUs, fixed aspect ratio
ESCHER_dzTypeVFixedBig = 10, // Pixels, fixed aspect ratio
ESCHER_dzTypeShapeFixedBig= 11, // Proportion of shape, fixed aspect ratio
ESCHER_dzTypeMax = 11
};

// compound line style
enum ESCHER_LineStyle
{
ESCHER_LineSimple, // Single line (of width lineWidth)
ESCHER_LineDouble, // Double lines of equal width
ESCHER_LineThickThin, // Double lines, one thick, one thin
ESCHER_LineThinThick, // Double lines, reverse order
ESCHER_LineTriple // Three lines, thin, thick, thin
};

// how to "fill" the line contour
enum ESCHER_LineType
{
ESCHER_lineSolidType, // Fill with a solid color
ESCHER_linePattern, // Fill with a pattern (bitmap)
ESCHER_lineTexture, // A texture (pattern with its own color map)
ESCHER_linePicture // Center a picture in the shape
};

// dashed line style
enum ESCHER_LineDashing
{
Expand Down
8 changes: 0 additions & 8 deletions include/filter/msfilter/util.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ MSFILTER_DLLPUBLIC sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cBullet,
rtl_TextEncoding& r_ioChrSet, OUString& r_ioFontName);


enum TextCategory
{
latin, //Latin
cs, //Complex Script
ea, //East Asian
sym //Symbol
};

#define OOXML_COLOR_AUTO 0x0a

/**
Expand Down
19 changes: 0 additions & 19 deletions include/registry/regtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ enum class SAL_DLLPUBLIC_RTTI RegError
{
/// no error.
NO_ERROR,
/// internal registry error.
INTERNAL_ERROR,

/// registry is not open.
REGISTRY_NOT_OPEN,
Expand Down Expand Up @@ -131,23 +129,6 @@ enum class SAL_DLLPUBLIC_RTTI RegError
the value of a key already exists and the merge process will replace it.
*/
MERGE_CONFLICT,

/** a recursion was detected resolving different link targets (no longer
used).
*/
DETECT_RECURSION,
/** the link is invalid and can not be resolved (now used by all
link-related operations, as links are no longer supported).
*/
INVALID_LINK,
/// the specified linkname is not valid (no longer used).
INVALID_LINKNAME,
/// the linknane is not valid (no longer used).
INVALID_LINKTARGET,
/// the link target points to a nonexisting key (no longer used).
LINKTARGET_NOT_EXIST,
/// the reserved buffer for the resolved keyname is to small.
BUFFERSIZE_TOSMALL
};

/// specify the calling convention for the registry API
Expand Down
8 changes: 0 additions & 8 deletions include/sfx2/mailmodelapi.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ typedef ::std::vector< OUString > AddressList_Impl;

class SFX2_DLLPUBLIC SfxMailModel
{
public:
enum AddressRole
{
ROLE_TO,
ROLE_CC,
ROLE_BCC
};

protected:
enum SaveResult
{
Expand Down
3 changes: 1 addition & 2 deletions include/sfx2/objsh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,14 @@ enum class SfxObjectShellFlags
{
HASOPENDOC = 0x01L,
HASMENU = 0x04L,
DONTLOADFILTERS = 0x08L,
DONTCLOSE = 0x10L,
NODOCINFO = 0x20L,
STD_NORMAL = HASOPENDOC,
UNDEFINED = 0xf000000
};
namespace o3tl
{
template<> struct typed_flags<SfxObjectShellFlags> : is_typed_flags<SfxObjectShellFlags, 0xf00003d> {};
template<> struct typed_flags<SfxObjectShellFlags> : is_typed_flags<SfxObjectShellFlags, 0xf000035> {};
}

#define SFX_TITLE_TITLE 0
Expand Down
3 changes: 1 addition & 2 deletions include/sot/exchange.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,14 @@ SOT_DLLPUBLIC bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVec

enum class SotExchangeActionFlags {
NONE = 0x0000,
CreateTheme = 0x0100,
KeepPosSize = 0x0200,
InsertImageMap = 0x0400,
ReplaceImageMap = 0x0800,
Fill = 0x1000,
InsertTargetUrl = 0x2000,
};
namespace o3tl {
template<> struct typed_flags<SotExchangeActionFlags> : is_typed_flags<SotExchangeActionFlags, 0x3f00> {};
template<> struct typed_flags<SotExchangeActionFlags> : is_typed_flags<SotExchangeActionFlags, 0x3e00> {};
}

// destinations
Expand Down
3 changes: 1 addition & 2 deletions include/svtools/ivctrl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ enum SvxIconChoiceCtrlPositionMode
{
IcnViewPositionModeFree = 0, // Free pixel-perfekt positioning
IcnViewPositionModeAutoArrange = 1, // Auto arrange
IcnViewPositionModeAutoAdjust = 2, // Auto adjust
IcnViewPositionModeLast = IcnViewPositionModeAutoAdjust
IcnViewPositionModeAutoAdjust = 2 // Auto adjust
};

class SvxIconChoiceCtrlEntry
Expand Down
5 changes: 1 addition & 4 deletions include/svx/cube3d.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ enum class CubeFaces
Top = 0x0008,
Right = 0x0010,
Front = 0x0020,
Full = Bottom | Back | Left | Top | Right | Front,
OpenTopBottom = Back | Left | Right | Front,
OpenLeftRight = Bottom | Back | Top | Front,
OpenFrontBack = Bottom | Left | Top | Right
Full = Bottom | Back | Left | Top | Right | Front
};
namespace o3tl
{
Expand Down
4 changes: 0 additions & 4 deletions include/svx/frmsel.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ enum class FrameSelFlags

/** If set, all four outer frame borders are enabled. */
Outer = Left | Right | Top | Bottom,
/** If set, both inner frame borders are enabled. */
Inner = InnerHorizontal | InnerVertical,
/** If set, both diagonal frame borders are enabled. */
Diagonal = DiagonalTLBR | DiagonalBLTR,

/** If set, all frame borders will support the don't care state. */
DontCare = 0x0100
Expand Down
3 changes: 0 additions & 3 deletions include/svx/pageitem.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ enum SvxNumType
SVX_ROMAN_LOWER = css::style::NumberingType::ROMAN_LOWER,
SVX_ARABIC = css::style::NumberingType::ARABIC,
SVX_NUMBER_NONE = css::style::NumberingType::NUMBER_NONE,
SVX_CHAR_SPECIAL = css::style::NumberingType::CHAR_SPECIAL,
SVX_PAGEDESC = css::style::NumberingType::PAGE_DESCRIPTOR,
SVX_BITMAP = css::style::NumberingType::BITMAP,
SVX_CHARS_UPPER_LETTER_N = css::style::NumberingType::CHARS_UPPER_LETTER_N
};

/*--------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion include/tools/stream.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ enum class StreamMode {
SHARE_DENYALL = 0x0800, // overrides denyread,write,none
// masks
READWRITE = READ | WRITE,
SHARE_DENYREADWRITE = SHARE_DENYREAD | SHARE_DENYWRITE,
STD_READ = READ | SHARE_DENYNONE | NOCREATE,
STD_WRITE = WRITE | SHARE_DENYALL,
STD_READWRITE = READWRITE | SHARE_DENYALL
Expand Down
3 changes: 1 addition & 2 deletions include/tools/wintypes.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ enum class StandardButtonType
Ignore = 8,
Abort = 9,
Less = 10,
Reset = 11,
Count = 12,
Count = 11,
};

// prominent place for ListBox window types
Expand Down
3 changes: 1 addition & 2 deletions vcl/source/control/button.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ OUString Button::GetStandardText( StandardButtonType eButton )
{ SV_BUTTONTEXT_MORE, "~More" },
{ SV_BUTTONTEXT_IGNORE, "~Ignore" },
{ SV_BUTTONTEXT_ABORT, "~Abort" },
{ SV_BUTTONTEXT_LESS, "~Less" },
{ SV_BUTTONTEXT_RESET, "R~eset" }
{ SV_BUTTONTEXT_LESS, "~Less" }
};

ResMgr* pResMgr = ImplGetResMgr();
Expand Down

0 comments on commit 1658bd2

Please sign in to comment.