summaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 08:50:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 12:58:31 +0100
commit693d40fed862614e05fbad167f7f09005683d6da (patch)
treea908faedb0c82264de7051a30cfded2c9e6e3289 /registry
parentc0cf07d3da5245e594f8f1ad11479e85bd15b88f (diff)
loplugin:constantparam in oox,registry,reportdesign
Change-Id: I914fa6c6ef2f660eb6b8570c9c5f86cef477be80 Reviewed-on: https://gerrit.libreoffice.org/44093 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'registry')
-rw-r--r--registry/inc/regapi.hxx6
-rw-r--r--registry/source/reflread.cxx6
-rw-r--r--registry/source/reflwrit.cxx8
-rw-r--r--registry/source/registry.cxx5
-rw-r--r--registry/tools/regview.cxx2
5 files changed, 11 insertions, 16 deletions
diff --git a/registry/inc/regapi.hxx b/registry/inc/regapi.hxx
index 31bf1d8ee219..35c4ddda35a9 100644
--- a/registry/inc/regapi.hxx
+++ b/registry/inc/regapi.hxx
@@ -59,16 +59,14 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRootKey(RegHandle hRegistry,
RegKeyHandle* phRootKey);
-/** This function opens a registry with the specified name.
+/** This function opens a registry with the specified name. in readonly mode.
@param registryName points to a null terminated string specifying the name of the registry.
@param phRegistry points to a handle of the opened registry if the function succeeds otherwise NULL.
- @param accessMode specifies the accessmode of the registry, RegAccessMode::READONLY or RegAccessMode::READWRITE.
@return REG_NO_ERROR if succeeds else an error code.
*/
REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName,
- RegHandle* phRegistry,
- RegAccessMode accessMode);
+ RegHandle* phRegistry);
/** This function closes a registry.
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index 7065adea01cb..1a06dab771e3 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -1237,10 +1237,10 @@ bool TYPEREG_CALLTYPE typereg_reader_create(
}
}
-static TypeReaderImpl TYPEREG_CALLTYPE createEntry(const sal_uInt8* buffer, sal_uInt32 len, bool copyBuffer)
+static TypeReaderImpl TYPEREG_CALLTYPE createEntry(const sal_uInt8* buffer, sal_uInt32 len)
{
void * handle;
- typereg_reader_create(buffer, len, copyBuffer, TYPEREG_VERSION_1, &handle);
+ typereg_reader_create(buffer, len, false/*copyBuffer*/, TYPEREG_VERSION_1, &handle);
return handle;
}
@@ -1718,7 +1718,7 @@ RegistryTypeReader::RegistryTypeReader(const sal_uInt8* buffer,
sal_uInt32 bufferLen)
: m_hImpl(nullptr)
{
- m_hImpl = createEntry(buffer, bufferLen, false/*copyData*/);
+ m_hImpl = createEntry(buffer, bufferLen);
}
RegistryTypeReader::~RegistryTypeReader()
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index c729029b6e3b..fd57ebc2047a 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -1282,14 +1282,14 @@ sal_Bool TYPEREG_CALLTYPE typereg_writer_setSuperTypeName(
static TypeWriterImpl TYPEREG_CALLTYPE createEntry(
RTTypeClass typeClass, rtl_uString const * typeName, rtl_uString const * superTypeName,
- sal_uInt16 fieldCount, sal_uInt16 methodCount, sal_uInt16 referenceCount)
+ sal_uInt16 fieldCount)
{
OUString empty;
sal_uInt16 superTypeCount = rtl_uString_getLength(superTypeName) == 0
? 0 : 1;
TypeWriterImpl t = typereg_writer_create(
TYPEREG_VERSION_0, empty.pData, empty.pData, typeClass, false, typeName,
- superTypeCount, fieldCount, methodCount, referenceCount);
+ superTypeCount, fieldCount, 0/*methodCount*/, 0/*referenceCount*/);
if (superTypeCount > 0) {
typereg_writer_setSuperTypeName(t, 0, superTypeName);
}
@@ -1307,9 +1307,7 @@ RegistryTypeWriter::RegistryTypeWriter(RTTypeClass RTTypeClass,
m_hImpl = createEntry(RTTypeClass,
typeName.pData,
superTypeName.pData,
- fieldCount,
- 0,
- 0);
+ fieldCount);
}
RegistryTypeWriter::~RegistryTypeWriter()
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 157887d9d28c..61b2c7ba1445 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -357,13 +357,12 @@ RegError REGISTRY_CALLTYPE reg_openRootKey(RegHandle hRegistry,
// reg_openRegistry
RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName,
- RegHandle* phRegistry,
- RegAccessMode accessMode)
+ RegHandle* phRegistry)
{
RegError _ret;
ORegistry* pReg = new ORegistry();
- if ((_ret = pReg->initRegistry(registryName, accessMode)) != RegError::NO_ERROR)
+ if ((_ret = pReg->initRegistry(registryName, RegAccessMode::READONLY)) != RegError::NO_ERROR)
{
delete pReg;
*phRegistry = nullptr;
diff --git a/registry/tools/regview.cxx b/registry/tools/regview.cxx
index 178289fc297d..56aa343f4254 100644
--- a/registry/tools/regview.cxx
+++ b/registry/tools/regview.cxx
@@ -46,7 +46,7 @@ int __cdecl main( int argc, char * argv[] )
}
OUString regName( convertToFileUrl(argv[1], strlen(argv[1])) );
- if (reg_openRegistry(regName.pData, &hReg, RegAccessMode::READONLY) != RegError::NO_ERROR)
+ if (reg_openRegistry(regName.pData, &hReg) != RegError::NO_ERROR)
{
fprintf(stderr, "open registry \"%s\" failed\n", argv[1]);
exit(1);