summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-19 09:48:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-19 10:44:05 +0000
commit1658bd231bc662504a072097dc614c29fe2e116d (patch)
tree00e1036c841aa7c228d443c34cdc5e88b8054ea3
parent4f86b7a86cae630c19f6f0d1b4d6672c25e2eb3c (diff)
loplugin:unusedenumvalues
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>
-rwxr-xr-xcompilerplugins/clang/unusedenumvalues.py1
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx1
-rw-r--r--filter/source/config/cache/filtercache.hxx3
-rw-r--r--idlc/inc/astdeclaration.hxx7
-rw-r--r--include/basic/sbxdef.hxx3
-rw-r--r--include/editeng/svxenum.hxx3
-rw-r--r--include/filter/msfilter/escherex.hxx121
-rw-r--r--include/filter/msfilter/util.hxx8
-rw-r--r--include/registry/regtype.h19
-rw-r--r--include/sfx2/mailmodelapi.hxx8
-rw-r--r--include/sfx2/objsh.hxx3
-rw-r--r--include/sot/exchange.hxx3
-rw-r--r--include/svtools/ivctrl.hxx3
-rw-r--r--include/svx/cube3d.hxx5
-rw-r--r--include/svx/frmsel.hxx4
-rw-r--r--include/svx/pageitem.hxx3
-rw-r--r--include/tools/stream.hxx1
-rw-r--r--include/tools/wintypes.hxx3
-rw-r--r--vcl/source/control/button.cxx3
19 files changed, 12 insertions, 190 deletions
diff --git a/compilerplugins/clang/unusedenumvalues.py b/compilerplugins/clang/unusedenumvalues.py
index 5e113da46439..eb3158509562 100755
--- a/compilerplugins/clang/unusedenumvalues.py
+++ b/compilerplugins/clang/unusedenumvalues.py
@@ -20,6 +20,7 @@ excludedSourceFiles = set([
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
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 7828e5901866..225f26b96a7f 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -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)
};
diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx
index 0e6c8da99d01..e34dc2f4b325 100644
--- a/filter/source/config/cache/filtercache.hxx
+++ b/filter/source/config/cache/filtercache.hxx
@@ -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
};
diff --git a/idlc/inc/astdeclaration.hxx b/idlc/inc/astdeclaration.hxx
index c6a76d9aa4a2..9cbd8c95e248 100644
--- a/idlc/inc/astdeclaration.hxx
+++ b/idlc/inc/astdeclaration.hxx
@@ -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
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index 24341c63198b..42863984f68c 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -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;
diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx
index 16147c2724ed..0ad9fd172c19 100644
--- a/include/editeng/svxenum.hxx
+++ b/include/editeng/svxenum.hxx
@@ -62,8 +62,7 @@ enum class SvxLineSpaceRule
{
Auto,
Fix,
- Min,
- End
+ Min
};
enum class SvxInterLineSpaceRule
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index 8282ffd570ae..1aa7de30b18e 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -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
{
@@ -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
@@ -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
{
diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx
index 634b424e9367..8aa01f5be952 100644
--- a/include/filter/msfilter/util.hxx
+++ b/include/filter/msfilter/util.hxx
@@ -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
/**
diff --git a/include/registry/regtype.h b/include/registry/regtype.h
index f36edecc962e..4677cbe33ecd 100644
--- a/include/registry/regtype.h
+++ b/include/registry/regtype.h
@@ -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,
@@ -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
diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx
index 6000378ee9ac..b0591e845045 100644
--- a/include/sfx2/mailmodelapi.hxx
+++ b/include/sfx2/mailmodelapi.hxx
@@ -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
{
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 45a0c9675512..4a464d371aea 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -120,7 +120,6 @@ enum class SfxObjectShellFlags
{
HASOPENDOC = 0x01L,
HASMENU = 0x04L,
- DONTLOADFILTERS = 0x08L,
DONTCLOSE = 0x10L,
NODOCINFO = 0x20L,
STD_NORMAL = HASOPENDOC,
@@ -128,7 +127,7 @@ enum class SfxObjectShellFlags
};
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
diff --git a/include/sot/exchange.hxx b/include/sot/exchange.hxx
index 0f4346d4b85e..f28d47e58c7e 100644
--- a/include/sot/exchange.hxx
+++ b/include/sot/exchange.hxx
@@ -89,7 +89,6 @@ SOT_DLLPUBLIC bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVec
enum class SotExchangeActionFlags {
NONE = 0x0000,
- CreateTheme = 0x0100,
KeepPosSize = 0x0200,
InsertImageMap = 0x0400,
ReplaceImageMap = 0x0800,
@@ -97,7 +96,7 @@ enum class SotExchangeActionFlags {
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
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index dd4d8e6ece34..0b22ae3e3182 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -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
diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx
index d1d2a06a4f15..dc9f34d36784 100644
--- a/include/svx/cube3d.hxx
+++ b/include/svx/cube3d.hxx
@@ -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
{
diff --git a/include/svx/frmsel.hxx b/include/svx/frmsel.hxx
index 8cc89c7a994d..2a153301e015 100644
--- a/include/svx/frmsel.hxx
+++ b/include/svx/frmsel.hxx
@@ -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
diff --git a/include/svx/pageitem.hxx b/include/svx/pageitem.hxx
index 02466cfce962..e8580cb68aec 100644
--- a/include/svx/pageitem.hxx
+++ b/include/svx/pageitem.hxx
@@ -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
};
/*--------------------------------------------------------------------
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 2154c6f9cccb..d9cf3d2de303 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -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
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index f7ebaa2a5075..cb0fd7108bd3 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -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
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 9c7c2aad2687..724b37ac156b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -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();