summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-11 14:06:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-15 05:51:53 +0000
commitd64395704e1a41e8f39e70a219ce3be90928e04d (patch)
treef04fd671709347e82752f2faa3aab30c9a0a9faf /unotools
parent9532f45ff009f67940c77dccd463f3088866b75e (diff)
loplugin:unusedenumconstants in unotools..xmlhelp
Change-Id: Id7ddc0fc1f57c5e8e7fb002e31d54fb8e9f8ffab Reviewed-on: https://gerrit.libreoffice.org/28050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/eventcfg.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx29
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx1
3 files changed, 10 insertions, 22 deletions
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 0f968a85e22a..19226c22e60c 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 d5963e76c107..944eb366dd72 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 bc9d74820f58..e55cf2091c74 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -282,7 +282,6 @@ public:
enum ReplyType {
NOREPLY,
EXIT,
- RETRY,
REQUESTHANDLED
};