[Libreoffice-commits] core.git: include/unotools include/vcl ucb/source unotools/source vcl/inc xmlhelp/source

Noel Grandin noel at peralex.com
Mon Aug 15 05:52:14 UTC 2016


 include/unotools/configitem.hxx              |    4 ---
 include/unotools/configvaluecontainer.hxx    |   11 ----------
 include/unotools/eventcfg.hxx                |    2 -
 include/unotools/extendedsecurityoptions.hxx |    1 
 include/unotools/itemholderbase.hxx          |    3 --
 include/unotools/securityoptions.hxx         |    7 ------
 include/vcl/bitmap.hxx                       |   21 ++-----------------
 include/vcl/commandevent.hxx                 |    2 -
 include/vcl/inputctx.hxx                     |    6 +----
 include/vcl/outdev.hxx                       |    3 --
 include/vcl/outdevstate.hxx                  |    5 +---
 include/vcl/settings.hxx                     |    9 +++-----
 include/vcl/vclenum.hxx                      |    3 --
 include/vcl/window.hxx                       |   10 +++------
 ucb/source/ucp/file/bc.hxx                   |    3 --
 unotools/source/config/eventcfg.cxx          |    2 -
 unotools/source/config/pathoptions.cxx       |   29 +++++++++------------------
 unotools/source/ucbhelper/ucblockbytes.cxx   |    1 
 vcl/inc/listbox.hxx                          |    1 
 vcl/inc/salwtype.hxx                         |    3 --
 vcl/inc/unx/wmadaptor.hxx                    |    2 -
 xmlhelp/source/treeview/tvread.cxx           |    1 
 22 files changed, 29 insertions(+), 100 deletions(-)

New commits:
commit d64395704e1a41e8f39e70a219ce3be90928e04d
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Aug 11 14:06:49 2016 +0200

    loplugin:unusedenumconstants in unotools..xmlhelp
    
    Change-Id: Id7ddc0fc1f57c5e8e7fb002e31d54fb8e9f8ffab
    Reviewed-on: https://gerrit.libreoffice.org/28050
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/unotools/configitem.hxx b/include/unotools/configitem.hxx
index a418887..00452d5 100644
--- a/include/unotools/configitem.hxx
+++ b/include/unotools/configitem.hxx
@@ -63,9 +63,7 @@ namespace utl
         CONFIG_NAME_PLAINTEXT_NAME, // unescaped local node name, for user display etc.
         CONFIG_NAME_LOCAL_NAME,     // local node name, for use in XNameAccess etc. ("Item", "Q & A")
         CONFIG_NAME_LOCAL_PATH,     // one-level relative path, for use when building paths etc.  ("Item", "Typ['Q & A']")
-        CONFIG_NAME_FULL_PATH,       // full absolute path. ("/org.openoffice.Sample/Group/Item", "/org.openoffice.Sample/Set/Typ['Q & A']")
-
-        CONFIG_NAME_DEFAULT = CONFIG_NAME_LOCAL_PATH // default format
+        CONFIG_NAME_FULL_PATH       // full absolute path. ("/org.openoffice.Sample/Group/Item", "/org.openoffice.Sample/Set/Typ['Q & A']")
     };
 
     class ConfigChangeListener_Impl;
diff --git a/include/unotools/configvaluecontainer.hxx b/include/unotools/configvaluecontainer.hxx
index 664f10a..2ee3e86 100644
--- a/include/unotools/configvaluecontainer.hxx
+++ b/include/unotools/configvaluecontainer.hxx
@@ -26,17 +26,6 @@
 #include <memory>
 
 
-enum class CVCFlags
-{
-    LAZY_UPDATE         = 0x0000,
-    UPDATE_ACCESS       = 0x0001,
-    IMMEDIATE_UPDATE    = 0x0002,
-};
-namespace o3tl
-{
-    template<> struct typed_flags<CVCFlags> : is_typed_flags<CVCFlags, 0x03> {};
-}
-
 namespace utl
 {
 
diff --git a/include/unotools/eventcfg.hxx b/include/unotools/eventcfg.hxx
index cfe6026..046eb6a 100644
--- a/include/unotools/eventcfg.hxx
+++ b/include/unotools/eventcfg.hxx
@@ -31,8 +31,6 @@
 
 enum class GlobalEventId
 {
-    STARTAPP,
-    CLOSEAPP,
     DOCCREATED,
     CREATEDOC,
     LOADFINISHED,
diff --git a/include/unotools/extendedsecurityoptions.hxx b/include/unotools/extendedsecurityoptions.hxx
index 8726c72..b82711a 100644
--- a/include/unotools/extendedsecurityoptions.hxx
+++ b/include/unotools/extendedsecurityoptions.hxx
@@ -50,7 +50,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtExtendedSecurityOptions : public utl
         {
             OPEN_NEVER                  = 0,
             OPEN_WITHSECURITYCHECK,
-            OPEN_ALWAYS
         };
 
          SvtExtendedSecurityOptions();
diff --git a/include/unotools/itemholderbase.hxx b/include/unotools/itemholderbase.hxx
index 7071e3c..b8b075c 100644
--- a/include/unotools/itemholderbase.hxx
+++ b/include/unotools/itemholderbase.hxx
@@ -33,7 +33,6 @@ struct ItemHolderMutexBase
 enum EItem
 {
     E_ACCESSIBILITYOPTIONS          ,   // 2
-    E_ADDXMLTOSTORAGEOPTIONS        ,
     E_APEARCFG                      ,   // 2
 
     E_CJKOPTIONS                    ,   // 2
@@ -70,8 +69,6 @@ enum EItem
     E_PRINTFILEOPTIONS              ,   // 2
     E_PRINTWARNINGOPTIONS           ,
 
-    E_REGOPTIONS                    ,
-
     E_SAVEOPTIONS                   ,
     E_SEARCHOPT                     ,
     E_SECURITYOPTIONS               ,
diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx
index 47160fa..4bd6e95 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -79,13 +79,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSecurityOptions : public utl::detail
             E_BLOCKUNTRUSTEDREFERERLINKS
         };
 
-        enum MacroAction
-        {
-            MA_DONTRUN = 0,
-            MA_CONFIRM,
-            MA_RUN
-        };
-
         typedef css::uno::Sequence< OUString > Certificate;
 
         /*
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 31811b9..99113b8 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -75,12 +75,11 @@ enum class BmpVectorizeFlags
 {
     Inner         = 0x0001,
     Outer         = 0x0002,
-    BoundOnly     = 0x0004,
-    ReduceEdges   = 0x0008,
+    ReduceEdges   = 0x0004,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<BmpVectorizeFlags> : is_typed_flags<BmpVectorizeFlags, 0x0f> {};
+    template<> struct typed_flags<BmpVectorizeFlags> : is_typed_flags<BmpVectorizeFlags, 0x07> {};
 }
 
 #define BMP_COL_TRANS               Color( 252, 3, 251 )
@@ -115,21 +114,7 @@ enum BmpCombine
 enum BmpReduce
 {
     BMP_REDUCE_SIMPLE = 0,
-    BMP_REDUCE_POPULAR = 1,
-    BMP_REDUCE_MEDIAN = 2
-};
-
-enum BmpEmboss
-{
-    BMP_EMBOSS_TOPLEFT = 0,
-    BMP_EMBOSS_TOP = 1,
-    BMP_EMBOSS_TOPRIGHT = 2,
-    BMP_EMBOSS_LEFT = 3,
-    BMP_EMBOSS_MIDDLE = 4,
-    BMP_EMBOSS_RIGHT = 5,
-    BMP_EMBOSS_BOTTOMLEFT = 6,
-    BMP_EMBOSS_BOTTOM = 7,
-    BMP_EMBOSS_BOTTOMRIGHT = 8
+    BMP_REDUCE_POPULAR = 1
 };
 
 enum BmpFilter
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index bd5f40a..eb8fab1 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -236,10 +236,8 @@ enum class MediaCommand
     VolumeMute            = 16,// Mute the volume.
     VolumeUp              = 17,// Raise the volume.
     Menu                  = 18,// Button Menu pressed.
-    MenuHold              = 19,// Button Menu (long) pressed.
     PlayHold              = 20,// Button Play (long) pressed.
     NextTrackHold         = 21,// Button Right holding pressed.
-    PreviousTrackHold     = 22,// Button Left holding pressed.
 };
 
 class VCL_DLLPUBLIC CommandMediaData
diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx
index 49f0c8f..95c860e 100644
--- a/include/vcl/inputctx.hxx
+++ b/include/vcl/inputctx.hxx
@@ -30,13 +30,11 @@ enum class InputContextFlags
 {
     NONE         = 0x0000,
     Text         = 0x0001,
-    ExtText      = 0x0002,
-    ExtTextOn    = 0x0004,
-    ExtTextOff   = 0x0008,
+    ExtText      = 0x0002
 };
 namespace o3tl
 {
-    template<> struct typed_flags<InputContextFlags> : is_typed_flags<InputContextFlags, 0x000f> {};
+    template<> struct typed_flags<InputContextFlags> : is_typed_flags<InputContextFlags, 0x0003> {};
 }
 
 
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 9bfc0d6..f52afed 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -209,8 +209,7 @@ enum class DrawGridFlags
     NONE                 = 0x0000,
     Dots                 = 0x0001,
     HorzLines            = 0x0002,
-    VertLines            = 0x0004,
-    Lines                = HorzLines | VertLines,
+    VertLines            = 0x0004
 };
 namespace o3tl
 {
diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index adf915d..4a509a1 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -68,11 +68,10 @@ enum class ComplexTextLayoutFlags
     TextOriginLeft    = 0x0004,
     TextOriginRight   = 0x0008,
     ComplexDisabled   = 0x0100,
-    LigaturesEnabled  = 0x0200,
-    SubstituteDigits  = 0x0400
+    LigaturesEnabled  = 0x0200
 };
 namespace o3tl {
-    template<> struct typed_flags<ComplexTextLayoutFlags> : is_typed_flags<ComplexTextLayoutFlags, 0x070f> {};
+    template<> struct typed_flags<ComplexTextLayoutFlags> : is_typed_flags<ComplexTextLayoutFlags, 0x030f> {};
 }
 
 class OutDevState
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 93b78d2..f4a7e34 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -204,14 +204,13 @@ namespace o3tl
 enum class SelectionOptions
 {
     NONE       = 0x0000,
-    Word       = 0x0001,
-    Focus      = 0x0002,
-    Invert     = 0x0004,
-    ShowFirst  = 0x0008,
+    Focus      = 0x0001,
+    Invert     = 0x0002,
+    ShowFirst  = 0x0004,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<SelectionOptions> : is_typed_flags<SelectionOptions, 0x000f> {};
+    template<> struct typed_flags<SelectionOptions> : is_typed_flags<SelectionOptions, 0x0007> {};
 }
 
 enum class DisplayOptions
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index d6d9180..aa2aaaa 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -125,10 +125,7 @@ enum VclResponseType
     RET_NO      = 3,
     RET_RETRY   = 4,
     RET_IGNORE  = 5,
-    RET_ACCEPT  = 6,
     RET_CLOSE   = 7,
-    RET_APPLY   = 8,
-    RET_NONE    = 9,
     RET_HELP    = 10
 };
 
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index bab4395..ef5135b 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -342,8 +342,7 @@ enum class StateChangedType : sal_uInt16
     ExtendedStyle      = 17,
     Mirroring          = 18,
     Layout             = 19,
-    ControlFocus       = 20,
-    User               = 10000
+    ControlFocus       = 20
 };
 
 // GetFocusFlags
@@ -378,13 +377,12 @@ enum class DrawFlags
     NoDisable           = 0x0008,
     NoMnemonic          = 0x0010,
     NoSelection         = 0x0020,
-    NoFocus             = 0x0040,
-    NoBackground        = 0x0080,
-    NoRollover          = 0x0100,
+    NoBackground        = 0x0040,
+    NoRollover          = 0x0080,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<DrawFlags> : is_typed_flags<DrawFlags, 0x01ff> {};
+    template<> struct typed_flags<DrawFlags> : is_typed_flags<DrawFlags, 0x00ff> {};
 }
 
 // DialogControl-Flags
diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx
index c071f61..506bf59 100644
--- a/ucb/source/ucp/file/bc.hxx
+++ b/ucb/source/ucp/file/bc.hxx
@@ -258,8 +258,7 @@ namespace fileaccess {
         enum state { NameForInsertionSet = 1,
                      JustInserted = 2,
                      Deleted = 4,
-                     FullFeatured = 8,
-                     Connected = 16 };
+                     FullFeatured = 8 };
         bool                                                                    m_bFolder;
         sal_uInt16                                                                  m_nState;
 
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 0f968a8..19226c22e 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -47,8 +47,6 @@ static const char ROOTNODE_EVENTS[] = "Office.Events/ApplicationEvents";
 
 static o3tl::enumarray<GlobalEventId, const char*> pEventAsciiNames =
 {
-"OnStartApp",
-"OnCloseApp",
 "OnCreate",
 "OnNew",
 "OnLoadFinished",
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d5963e7..944eb36 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -46,6 +46,7 @@
 
 #include "itemholder1.hxx"
 
+#include <set>
 #include <unordered_map>
 #include <vector>
 
@@ -68,18 +69,11 @@ using namespace com::sun::star::lang;
 
 #define STRPOS_NOTFOUND       -1
 
-enum VarNameProperty
-{
-    VAR_NEEDS_SYSTEM_PATH,
-    VAR_NEEDS_FILEURL
-};
-
 typedef std::unordered_map<OUString, sal_Int32, OUStringHash> NameToHandleMap;
 
 typedef std::unordered_map<sal_Int32, sal_Int32> EnumToHandleMap;
 
-typedef std::unordered_map<OUString, VarNameProperty, OUStringHash>
-    VarNameToEnumMap;
+typedef std::set<OUString> VarNameSet;
 
 // class SvtPathOptions_Impl ---------------------------------------------
 class SvtPathOptions_Impl
@@ -91,7 +85,7 @@ class SvtPathOptions_Impl
         Reference< XStringSubstitution >    m_xSubstVariables;
         Reference< XMacroExpander >         m_xMacroExpander;
         mutable EnumToHandleMap             m_aMapEnumToPropHandle;
-        VarNameToEnumMap                    m_aMapVarNamesToEnum;
+        VarNameSet                          m_aSystemPathVarNames;
 
         LanguageTag                         m_aLanguageTag;
         OUString                            m_aEmptyString;
@@ -174,7 +168,6 @@ struct PropertyStruct
 struct VarNameAttribute
 {
     const char*             pVarName;       // The name of the path variable
-    VarNameProperty         eVarProperty;   // Which return value is needed by this path variable
 };
 
 static const PropertyStruct aPropNames[] =
@@ -208,10 +201,10 @@ static const PropertyStruct aPropNames[] =
 
 static const VarNameAttribute aVarNameAttribute[] =
 {
-    { SUBSTITUTE_INSTPATH,  VAR_NEEDS_SYSTEM_PATH },    // $(instpath)
-    { SUBSTITUTE_PROGPATH,  VAR_NEEDS_SYSTEM_PATH },    // $(progpath)
-    { SUBSTITUTE_USERPATH,  VAR_NEEDS_SYSTEM_PATH },    // $(userpath)
-    { SUBSTITUTE_PATH,      VAR_NEEDS_SYSTEM_PATH },    // $(path)
+    { SUBSTITUTE_INSTPATH },    // $(instpath)
+    { SUBSTITUTE_PROGPATH },    // $(progpath)
+    { SUBSTITUTE_USERPATH },    // $(userpath)
+    { SUBSTITUTE_PATH },    // $(path)
 };
 
 // class SvtPathOptions_Impl ---------------------------------------------
@@ -343,8 +336,8 @@ OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar ) const
         aSubString = aSubString.toAsciiLowerCase();
 
         // Look for special variable that needs a system path.
-        VarNameToEnumMap::const_iterator pIter = m_aMapVarNamesToEnum.find( aSubString );
-        if ( pIter != m_aMapVarNamesToEnum.end() )
+        VarNameSet::const_iterator pIter = m_aSystemPathVarNames.find( aSubString );
+        if ( pIter != m_aSystemPathVarNames.end() )
             bConvertLocal = true;
 
         nPosition += nLength;
@@ -429,9 +422,7 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
     nCount = sizeof( aVarNameAttribute ) / sizeof( VarNameAttribute );
     for ( i = 0; i < nCount; i++ )
     {
-        m_aMapVarNamesToEnum.insert( VarNameToEnumMap::value_type(
-                OUString::createFromAscii( aVarNameAttribute[i].pVarName ),
-                aVarNameAttribute[i].eVarProperty ));
+        m_aSystemPathVarNames.insert( OUString::createFromAscii( aVarNameAttribute[i].pVarName ) );
     }
 
     // Set language type!
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index bc9d748..e55cf20 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -282,7 +282,6 @@ public:
     enum ReplyType {
         NOREPLY,
         EXIT,
-        RETRY,
         REQUESTHANDLED
     };
 
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 5a6a317..6e61d93 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -37,7 +37,6 @@ enum LB_EVENT_TYPE
 {
     LET_MBDOWN,
     LET_TRACKING,
-    LET_TRACKING_END,
     LET_KEYMOVE,
     LET_KEYSPACE
 };
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index 75fae73..b7f803e 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -220,8 +220,7 @@ typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalEvent nEvent, const void* p
 enum class SalObjEvent {
     GetFocus           = 1,
     LoseFocus          = 2,
-    ToTop              = 3,
-    Count              = 4
+    ToTop              = 3
 };
 
 typedef long (*SALOBJECTPROC)( void* pInst, SalObject* pObject,
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 2aae1ac..817cea4 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -88,7 +88,6 @@ public:
         WIN_APP_STATE,
         WIN_EXPANDED_SIZE,
         WIN_ICONS,
-        WIN_WORKSPACE_NAMES,
         WIN_CLIENT_LIST,
 
         // atoms for general WM hints
@@ -107,7 +106,6 @@ public:
         SAL_USEREVENT,
         SAL_EXTTEXTEVENT,
         SAL_GETTIMEEVENT,
-        DTWM_IS_RUNNING,
         VCL_SYSTEM_SETTINGS,
         XSETTINGS,
         XEMBED,
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index b3b0f15..fd9ae6c 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -82,7 +82,6 @@ namespace treeview {
         }
 
         enum Kind {
-            tree_view,
             tree_node,
             tree_leaf,
             other


More information about the Libreoffice-commits mailing list