[Libreoffice-commits] .: stoc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Mar 10 05:39:19 PST 2011
stoc/source/simpleregistry/simpleregistry.cxx | 61 +++++++++++++++-----------
1 file changed, 36 insertions(+), 25 deletions(-)
New commits:
commit cc57f28d17c9ce04f02a2428c00b1463bd42cc0a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 10 09:56:23 2011 +0000
simplify this a bit
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index 123ed41..2e98594 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -298,32 +298,43 @@ RegistryValueType SAL_CALL RegistryKeyImpl::getValueType( )
throw InvalidRegistryException(
OUString( RTL_CONSTASCII_USTRINGPARAM("InvalidRegistryException") ),
(OWeakObject *)this );
- } else
- {
- RegValueType type;
- sal_uInt32 size;
-
- if (m_key.getValueInfo(OUString(), &type, &size))
- {
- return RegistryValueType_NOT_DEFINED;
- } else
- {
- switch (type)
- {
- case RG_VALUETYPE_LONG: return RegistryValueType_LONG;
- case RG_VALUETYPE_STRING: return RegistryValueType_ASCII;
- case RG_VALUETYPE_UNICODE: return RegistryValueType_STRING;
- case RG_VALUETYPE_BINARY: return RegistryValueType_BINARY;
- case RG_VALUETYPE_LONGLIST: return RegistryValueType_LONGLIST;
- case RG_VALUETYPE_STRINGLIST: return RegistryValueType_ASCIILIST;
- case RG_VALUETYPE_UNICODELIST: return RegistryValueType_STRINGLIST;
- default: return RegistryValueType_NOT_DEFINED;
- }
- }
}
-
- return RegistryValueType_NOT_DEFINED;
-}
+
+ RegValueType type;
+ sal_uInt32 size;
+ if (m_key.getValueInfo(OUString(), &type, &size))
+ return RegistryValueType_NOT_DEFINED;
+
+ RegistryValueType eRet = RegistryValueType_NOT_DEFINED;
+ switch (type)
+ {
+ case RG_VALUETYPE_LONG:
+ eRet = RegistryValueType_LONG;
+ break;
+ case RG_VALUETYPE_STRING:
+ eRet = RegistryValueType_ASCII;
+ break;
+ case RG_VALUETYPE_UNICODE:
+ eRet = RegistryValueType_STRING;
+ break;
+ case RG_VALUETYPE_BINARY:
+ eRet = RegistryValueType_BINARY;
+ break;
+ case RG_VALUETYPE_LONGLIST:
+ eRet = RegistryValueType_LONGLIST;
+ break;
+ case RG_VALUETYPE_STRINGLIST:
+ eRet = RegistryValueType_ASCIILIST;
+ break;
+ case RG_VALUETYPE_UNICODELIST:
+ eRet = RegistryValueType_STRINGLIST;
+ break;
+ default:
+ eRet = RegistryValueType_NOT_DEFINED;
+ break;
+ }
+ return eRet;
+}
//*************************************************************************
sal_Int32 SAL_CALL RegistryKeyImpl::getLongValue( )
More information about the Libreoffice-commits
mailing list