diff options
-rw-r--r-- | include/registry/reader.hxx | 16 | ||||
-rw-r--r-- | include/registry/registry.hxx | 7 | ||||
-rw-r--r-- | registry/source/reflread.cxx | 5 | ||||
-rw-r--r-- | registry/source/reflread.hxx | 6 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 8 | ||||
-rw-r--r-- | registry/source/reflwrit.hxx | 7 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 11 | ||||
-rw-r--r-- | stoc/source/simpleregistry/simpleregistry.cxx | 2 | ||||
-rw-r--r-- | unoidl/source/legacyprovider.cxx | 2 |
9 files changed, 17 insertions, 47 deletions
diff --git a/include/registry/reader.hxx b/include/registry/reader.hxx index 0e2da0735431..6d3deb8f63d5 100644 --- a/include/registry/reader.hxx +++ b/include/registry/reader.hxx @@ -59,23 +59,11 @@ public: @param length the size in bytes of the binary blob representing the type - @param copy if true, the type reader creates an internal copy of the - given buffer, and the given buffer is not accessed after this constructor - returns; if false, the type reader works directly on the given buffer, - which must remain available unmodified until the underlying type reader - is destroyed (note that the lifetime of the underlying type reader can be - different from the lifetime of this <code>Reader</code> instance) - - @param maxVersion the maximum binary blob version the client is prepared - to handle; must not be negative - @exception std::bad_alloc is raised if an out-of-memory condition occurs */ - Reader( - void const * buffer, sal_uInt32 length, bool copy, - typereg_Version maxVersion) + Reader(void const * buffer, sal_uInt32 length) { - if (!typereg_reader_create(buffer, length, copy, maxVersion, &m_handle)) + if (!typereg_reader_create(buffer, length, false/*copy*/, TYPEREG_VERSION_1, &m_handle)) { throw std::bad_alloc(); } diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx index e9cbff830f4f..9309e7ff0311 100644 --- a/include/registry/registry.hxx +++ b/include/registry/registry.hxx @@ -558,12 +558,10 @@ public: @param[in] keyName specifies the name of the key which will be resolved relative to this key. The resolved name will be prefixed with the name of this key. - @param[in] firstLinkOnly ignored @param[out] rResolvedName the resolved name. @return RegError::NO_ERROR if succeeds else an error code. */ inline RegError getResolvedKeyName(const rtl::OUString& keyName, - bool firstLinkOnly, rtl::OUString& rResolvedName) const; /// returns the name of the registry in which the key is defined. @@ -994,13 +992,12 @@ inline RegError RegistryKey::getLinkTarget(const rtl::OUString& , inline RegError RegistryKey::getResolvedKeyName(const rtl::OUString& keyName, - bool firstLinkOnly, - rtl::OUString& rResolvedName) const + rtl::OUString& rResolvedName) const { if (m_registry.isValid()) return m_registry.m_pApi->getResolvedKeyName(m_hImpl, keyName.pData, - firstLinkOnly, + true, &rResolvedName.pData); else return RegError::INVALID_KEY; diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index 9d7ce59a7eb7..1df3a639aa09 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -1723,11 +1723,10 @@ void TYPEREG_CALLTYPE typereg_reader_getSuperTypeName( } RegistryTypeReader::RegistryTypeReader(const sal_uInt8* buffer, - sal_uInt32 bufferLen, - bool copyData) + sal_uInt32 bufferLen) : m_hImpl(nullptr) { - m_hImpl = createEntry(buffer, bufferLen, copyData); + m_hImpl = createEntry(buffer, bufferLen, false/*copyData*/); } RegistryTypeReader::~RegistryTypeReader() diff --git a/registry/source/reflread.hxx b/registry/source/reflread.hxx index 6912fa8baf45..ab029bd2cb52 100644 --- a/registry/source/reflread.hxx +++ b/registry/source/reflread.hxx @@ -43,13 +43,9 @@ public: @param buffer points to the binary data block. @param bufferLen specifies the size of the binary data block. - @param copyData specifies if the data block should be copied. - The block can be copied to ensure that the data - is valid for the lifetime of this instance. */ RegistryTypeReader(const sal_uInt8* buffer, - sal_uInt32 bufferLen, - bool copyData); + sal_uInt32 bufferLen); /// Destructor. The Destructor frees the data block if the copyData flag was TRUE. ~RegistryTypeReader(); diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index eaa1d18ab3fc..59e712f5a966 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -1337,17 +1337,15 @@ static TypeWriterImpl TYPEREG_CALLTYPE createEntry( RegistryTypeWriter::RegistryTypeWriter(RTTypeClass RTTypeClass, const rtl::OUString& typeName, const rtl::OUString& superTypeName, - sal_uInt16 fieldCount, - sal_uInt16 methodCount, - sal_uInt16 referenceCount) + sal_uInt16 fieldCount) : m_hImpl(nullptr) { m_hImpl = createEntry(RTTypeClass, typeName.pData, superTypeName.pData, fieldCount, - methodCount, - referenceCount); + 0, + 0); } RegistryTypeWriter::~RegistryTypeWriter() diff --git a/registry/source/reflwrit.hxx b/registry/source/reflwrit.hxx index dcf2eecaf722..9e47e53300db 100644 --- a/registry/source/reflwrit.hxx +++ b/registry/source/reflwrit.hxx @@ -47,16 +47,11 @@ public: with '/' as separator. @param fieldCount specifies the number of fields (eg. number of attrbutes/properties, enum values or constants). - @param methodCount specifies the number of methods. - @param referenceCount specifies the number of references (eg. number of supported interfaces, - exported services ...) */ RegistryTypeWriter(RTTypeClass RTTypeClass, const rtl::OUString& typeName, const rtl::OUString& superTypeName, - sal_uInt16 fieldCount, - sal_uInt16 methodCount, - sal_uInt16 referenceCount); + sal_uInt16 fieldCount); /** Destructor. The Destructor frees the internal data block. diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 12455b00c363..e367edbe53da 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -1074,7 +1074,7 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, sal_uInt8* pSrcBuffer, bool bReport) { - RegistryTypeReader reader(pSrcBuffer, srcValueSize, false); + RegistryTypeReader reader(pSrcBuffer, srcValueSize); if (reader.getTypeClass() == RT_TYPE_INVALID) { @@ -1101,7 +1101,7 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, if (!rValue.readAt(VALUE_HEADEROFFSET, pBuffer, valueSize, rwBytes) && (rwBytes == valueSize)) { - RegistryTypeReader reader2(pBuffer, valueSize, false); + RegistryTypeReader reader2(pBuffer, valueSize); if ((reader.getTypeClass() != reader2.getTypeClass()) || reader2.getTypeClass() == RT_TYPE_INVALID) @@ -1212,9 +1212,7 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue, RegistryTypeWriter writer(reader.getTypeClass(), reader.getTypeName(), reader.getSuperTypeName(), - (sal_uInt16)count, - 0, - 0); + (sal_uInt16)count); for (sal_uInt32 i=0 ; i < reader.getFieldCount(); i++) { @@ -1502,8 +1500,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ sal::static_int_cast< unsigned long >(valueSize)); fprintf(stdout, "%s Data = ", indent); dumpType( - typereg::Reader( - pBuffer, valueSize, false, TYPEREG_VERSION_1), + typereg::Reader(pBuffer, valueSize), sIndent + " "); } break; diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index 5c4f7abf0047..eeef53671b78 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -975,7 +975,7 @@ OUString Key::getResolvedName(OUString const & aKeyName) { osl::MutexGuard guard(registry_->mutex_); OUString resolved; - RegError err = key_.getResolvedKeyName(aKeyName, true, resolved); + RegError err = key_.getResolvedKeyName(aKeyName, resolved); if (err != RegError::NO_ERROR) { throw css::registry::InvalidRegistryException( (("com.sun.star.registry.SimpleRegistry key getResolvedName:" diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx index 7edcdb6b2279..bf96504f7e1a 100644 --- a/unoidl/source/legacyprovider.cxx +++ b/unoidl/source/legacyprovider.cxx @@ -196,7 +196,7 @@ typereg::Reader getReader(RegistryKey & key, std::vector< char > * buffer) { ("legacy format: cannot get binary value of key " + key.getName() + ": " + OUString::number(static_cast<int>(e)))); } - typereg::Reader reader(&(*buffer)[0], size, false, TYPEREG_VERSION_1); + typereg::Reader reader(&(*buffer)[0], size); if (!reader.isValid()) { throw FileFormatException( key.getRegistryName(), |