Kaydet (Commit) 081ae7a7 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:unusedmethods registry,store

Change-Id: Ie78eb881a7fc47d0cd7b9862bd0cd200153ce77d
Reviewed-on: https://gerrit.libreoffice.org/16679Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 2e7fe508
...@@ -123,24 +123,6 @@ public: ...@@ -123,24 +123,6 @@ public:
/// Assign operator /// Assign operator
inline RegistryTypeReader& operator == (const RegistryTypeReader& toAssign); inline RegistryTypeReader& operator == (const RegistryTypeReader& toAssign);
/// checks if the registry type reader points to a valid Api.
inline bool isValid() const;
/** @deprecated
returns the minor version number.
We currently don't support a versioning concept of IDL interfaces and
so this function is currently not used.
*/
inline sal_uInt16 getMinorVersion() const;
/** @deprecated
returns the major version number.
We currently don't support a versioning concept of IDL interfaces and
so this function is currently not used.
*/
inline sal_uInt16 getMajorVersion() const;
/** returns the typeclass of the type represented by this blob. /** returns the typeclass of the type represented by this blob.
...@@ -157,23 +139,6 @@ public: ...@@ -157,23 +139,6 @@ public:
*/ */
inline rtl::OUString getSuperTypeName() const; inline rtl::OUString getSuperTypeName() const;
/** @deprecated
returns the unique identifier for an interface type as an out parameter.
An earlier version of UNO used an unique identifier for interfaces. In the
current version of UNO this uik was eliminated and this function is
not longer used.
*/
inline void getUik(RTUik& uik) const;
/** returns the documentation string of this type.
*/
inline rtl::OUString getDoku() const;
/** returns the IDL filename where the type is defined.
*/
inline rtl::OUString getFileName() const;
/** returns the number of fields (attributes/properties, enum values or number /** returns the number of fields (attributes/properties, enum values or number
of constants in a module). of constants in a module).
...@@ -211,98 +176,6 @@ public: ...@@ -211,98 +176,6 @@ public:
*/ */
inline rtl::OUString getFieldFileName( sal_uInt16 index ) const; inline rtl::OUString getFieldFileName( sal_uInt16 index ) const;
/** returns the number of methods of an interface type.
*/
inline sal_uInt32 getMethodCount() const;
/** returns the name of the method specified by index.
*/
inline rtl::OUString getMethodName( sal_uInt16 index ) const;
/** returns number of parameters of the method specified by index.
*/
inline sal_uInt32 getMethodParamCount( sal_uInt16 index ) const;
/** returns the full qualified parameter typename.
@param index indicates the method
@param paramIndex indeciates the parameter which type will be returned.
*/
inline rtl::OUString getMethodParamType( sal_uInt16 index, sal_uInt16 paramIndex ) const;
/** returns the name of a parameter.
@param index indicates the method
@param paramIndex indiciates the parameter which name will be returned.
*/
inline rtl::OUString getMethodParamName( sal_uInt16 index, sal_uInt16 paramIndex ) const;
/** returns the parameter mode, if it is an in, out or inout parameter.
@param index indicates the method
@param paramIndex indeciates the parameter which mode will be returned.
*/
inline RTParamMode getMethodParamMode( sal_uInt16 index, sal_uInt16 paramIndex ) const;
/** returns the number of exceptions which are declared for the method specified by index.
@param index indicates the method
*/
inline sal_uInt32 getMethodExcCount( sal_uInt16 index ) const;
/** returns the full qualified exception type of the specified exception.
@param index indicates the method
@param excIndex indeciates the exception which typename will be returned.
*/
inline rtl::OUString getMethodExcType( sal_uInt16 index, sal_uInt16 excIndex ) const;
/** returns the full qualified return type of the method specified by index.
*/
inline rtl::OUString getMethodReturnType( sal_uInt16 index ) const;
/** returns the full qualified exception type of the specified exception.
@param index indicates the method
*/
inline RTMethodMode getMethodMode( sal_uInt16 index ) const;
/** returns the documentation string of the method specified by index.
@param index indicates the method.
*/
inline rtl::OUString getMethodDoku( sal_uInt16 index ) const;
/** returns the number of references (supported interfaces, exported services).
*/
inline sal_uInt32 getReferenceCount() const;
/** returns the full qualified typename of the reference specified by index.
@param index indicates the reference.
*/
inline rtl::OUString getReferenceName( sal_uInt16 index ) const;
/** returns the type of the reference specified by index.
@param index indicates the reference.
*/
inline RTReferenceType getReferenceType( sal_uInt16 index ) const;
/** returns the documentation string of the reference specified by index.
@param index indicates the reference.
*/
inline rtl::OUString getReferenceDoku( sal_uInt16 index ) const;
/** returns the access mode of the reference specified by index.
The only valid value is RTFieldAccess::OPTIONAL in the context of
references.
@param index indicates the reference.
*/
inline RTFieldAccess getReferenceAccess( sal_uInt16 index ) const;
protected: protected:
/// stores the registry type reader Api. /// stores the registry type reader Api.
...@@ -344,14 +217,11 @@ inline RegistryTypeReader& RegistryTypeReader::operator == (const RegistryTypeRe ...@@ -344,14 +217,11 @@ inline RegistryTypeReader& RegistryTypeReader::operator == (const RegistryTypeRe
return *this; return *this;
} }
inline sal_uInt16 RegistryTypeReader::getMinorVersion() const
{ return m_pApi->getMinorVersion(m_hImpl); }
inline bool RegistryTypeReader::isValid() const
{ return (m_hImpl != NULL); }
inline sal_uInt16 RegistryTypeReader::getMajorVersion() const
{ return m_pApi->getMajorVersion(m_hImpl); }
inline RTTypeClass RegistryTypeReader::getTypeClass() const inline RTTypeClass RegistryTypeReader::getTypeClass() const
{ return m_pApi->getTypeClass(m_hImpl); } { return m_pApi->getTypeClass(m_hImpl); }
...@@ -370,23 +240,6 @@ inline rtl::OUString RegistryTypeReader::getSuperTypeName() const ...@@ -370,23 +240,6 @@ inline rtl::OUString RegistryTypeReader::getSuperTypeName() const
return sRet; return sRet;
} }
inline void RegistryTypeReader::getUik(RTUik& uik) const
{ m_pApi->getUik(m_hImpl, &uik); }
inline rtl::OUString RegistryTypeReader::getDoku() const
{
rtl::OUString sRet;
m_pApi->getDoku(m_hImpl, &sRet.pData);
return sRet;
}
inline rtl::OUString RegistryTypeReader::getFileName() const
{
rtl::OUString sRet;
m_pApi->getFileName(m_hImpl, &sRet.pData);
return sRet;
}
inline sal_uInt32 RegistryTypeReader::getFieldCount() const inline sal_uInt32 RegistryTypeReader::getFieldCount() const
{ return m_pApi->getFieldCount(m_hImpl); } { return m_pApi->getFieldCount(m_hImpl); }
...@@ -428,86 +281,6 @@ inline rtl::OUString RegistryTypeReader::getFieldFileName( sal_uInt16 index ) co ...@@ -428,86 +281,6 @@ inline rtl::OUString RegistryTypeReader::getFieldFileName( sal_uInt16 index ) co
return sRet; return sRet;
} }
inline sal_uInt32 RegistryTypeReader::getMethodCount() const
{ return m_pApi->getMethodCount(m_hImpl); }
inline rtl::OUString RegistryTypeReader::getMethodName( sal_uInt16 index ) const
{
rtl::OUString sRet;
m_pApi->getMethodName(m_hImpl, &sRet.pData, index);
return sRet;
}
inline sal_uInt32 RegistryTypeReader::getMethodParamCount( sal_uInt16 index ) const
{ return m_pApi->getMethodParamCount(m_hImpl, index); }
inline rtl::OUString RegistryTypeReader::getMethodParamType( sal_uInt16 index, sal_uInt16 paramIndex ) const
{
rtl::OUString sRet;
m_pApi->getMethodParamType(m_hImpl, &sRet.pData, index, paramIndex);
return sRet;
}
inline rtl::OUString RegistryTypeReader::getMethodParamName( sal_uInt16 index, sal_uInt16 paramIndex ) const
{
rtl::OUString sRet;
m_pApi->getMethodParamName(m_hImpl, &sRet.pData, index, paramIndex);
return sRet;
}
inline RTParamMode RegistryTypeReader::getMethodParamMode( sal_uInt16 index, sal_uInt16 paramIndex ) const
{ return m_pApi->getMethodParamMode(m_hImpl, index, paramIndex); }
inline sal_uInt32 RegistryTypeReader::getMethodExcCount( sal_uInt16 index ) const
{ return m_pApi->getMethodExcCount(m_hImpl, index); }
inline rtl::OUString RegistryTypeReader::getMethodExcType( sal_uInt16 index, sal_uInt16 excIndex ) const
{
rtl::OUString sRet;
m_pApi->getMethodExcType(m_hImpl, &sRet.pData, index, excIndex);
return sRet;
}
inline rtl::OUString RegistryTypeReader::getMethodReturnType( sal_uInt16 index ) const
{
rtl::OUString sRet;
m_pApi->getMethodReturnType(m_hImpl, &sRet.pData, index);
return sRet;
}
inline RTMethodMode RegistryTypeReader::getMethodMode( sal_uInt16 index ) const
{ return m_pApi->getMethodMode(m_hImpl, index); }
inline rtl::OUString RegistryTypeReader::getMethodDoku( sal_uInt16 index ) const
{
rtl::OUString sRet;
m_pApi->getMethodDoku(m_hImpl, &sRet.pData, index);
return sRet;
}
inline sal_uInt32 RegistryTypeReader::getReferenceCount() const
{ return m_pApi->getReferenceCount(m_hImpl); }
inline rtl::OUString RegistryTypeReader::getReferenceName( sal_uInt16 index ) const
{
rtl::OUString sRet;
m_pApi->getReferenceName(m_hImpl, &sRet.pData, index);
return sRet;
}
inline RTReferenceType RegistryTypeReader::getReferenceType( sal_uInt16 index ) const
{ return m_pApi->getReferenceType(m_hImpl, index); }
inline rtl::OUString RegistryTypeReader::getReferenceDoku( sal_uInt16 index ) const
{
rtl::OUString sRet;
m_pApi->getReferenceDoku(m_hImpl, &sRet.pData, index);
return sRet;
}
inline RTFieldAccess RegistryTypeReader::getReferenceAccess( sal_uInt16 index ) const
{ return m_pApi->getReferenceAccess(m_hImpl, index); }
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -112,26 +112,6 @@ public: ...@@ -112,26 +112,6 @@ public:
/// Assign operator /// Assign operator
inline RegistryTypeWriter& operator == (const RegistryTypeWriter& toAssign); inline RegistryTypeWriter& operator == (const RegistryTypeWriter& toAssign);
/** @deprecated
sets the unique identifier for an interface type.
An earlier version of UNO used an unique identifier for interfaces. In the
current version of UNO this uik was eliminated and this function is
not longer used.
*/
inline void setUik(const RTUik& uik);
/** sets a documentation string for the type.
This documentation should be the same as the documentation which is provided
for this type in IDL.
*/
inline void setDoku(const rtl::OUString& doku);
/** sets the IDL filename where this type is defined.
*/
inline void setFileName(const rtl::OUString& fileName);
/** sets the data for a field member of a type blob. /** sets the data for a field member of a type blob.
@param index indicates the index of the field. @param index indicates the index of the field.
...@@ -151,48 +131,6 @@ public: ...@@ -151,48 +131,6 @@ public:
RTFieldAccess access, RTFieldAccess access,
const RTConstValue& constValue = RTConstValue()); const RTConstValue& constValue = RTConstValue());
/** sets the data for a method.
@param index indicates the index of the method.
@param name specifies the name.
@param returnTypeName specifies the full qualified return typename.
@param mode specifies the method mode.
@param paramCount specifies the number of parameters.
@param excCount specifies the number of exceptions.
@param doku specifies the documentation string of the field.
*/
inline void setMethodData(sal_uInt16 index,
const rtl::OUString& name,
const rtl::OUString& returnTypeName,
RTMethodMode mode,
sal_uInt16 paramCount,
sal_uInt16 excCount,
const rtl::OUString& doku);
/** sets the data for the specified parameter of a method.
@param index indicates the index of the method.
@param paramIndex specifies the index of the parameter.
@param type specifies the full qualified typename.
@param name specifies the name.
@param mode specifies the parameter mode.
*/
inline void setParamData(sal_uInt16 index,
sal_uInt16 paramIndex,
const rtl::OUString& type,
const rtl::OUString& name,
RTParamMode mode);
/** sets the data for the specified exception of a method.
@param index indicates the index of the method.
@param excIndex specifies the index of the exception.
@param type specifies the full qualified typename of the exception.
*/
inline void setExcData(sal_uInt16 index,
sal_uInt16 excIndex,
const rtl::OUString& type);
/** returns a pointer to the new type blob. /** returns a pointer to the new type blob.
The pointer will be invalid (NULL) if the instance of The pointer will be invalid (NULL) if the instance of
...@@ -204,20 +142,6 @@ public: ...@@ -204,20 +142,6 @@ public:
*/ */
inline sal_uInt32 getBlopSize(); inline sal_uInt32 getBlopSize();
/** sets the data for a reference member.
@param index indicates the index of the reference.
@param name specifies the name.
@param refType specifies the full qualified typename of the reference.
@param doku specifies the documentation string of the reference.
@param access specifies the access mode of the reference.
*/
inline void setReferenceData( sal_uInt16 index,
const rtl::OUString& name,
RTReferenceType refType,
const rtl::OUString& doku,
RTFieldAccess access = RTFieldAccess::INVALID);
protected: protected:
/// stores the registry type writer Api. /// stores the registry type writer Api.
...@@ -281,50 +205,6 @@ inline void RegistryTypeWriter::setFieldData( sal_uInt16 index, ...@@ -281,50 +205,6 @@ inline void RegistryTypeWriter::setFieldData( sal_uInt16 index,
m_pApi->setFieldData(m_hImpl, index, name.pData, typeName.pData, doku.pData, fileName.pData, access, constValue.m_type, constValue.m_value); m_pApi->setFieldData(m_hImpl, index, name.pData, typeName.pData, doku.pData, fileName.pData, access, constValue.m_type, constValue.m_value);
} }
inline void RegistryTypeWriter::setMethodData(sal_uInt16 index,
const rtl::OUString& name,
const rtl::OUString& returnTypeName,
RTMethodMode mode,
sal_uInt16 paramCount,
sal_uInt16 excCount,
const rtl::OUString& doku)
{
m_pApi->setMethodData(m_hImpl, index, name.pData, returnTypeName.pData, mode, paramCount, excCount, doku.pData);
}
inline void RegistryTypeWriter::setUik(const RTUik& uik)
{
m_pApi->setUik(m_hImpl, &uik);
}
inline void RegistryTypeWriter::setDoku(const rtl::OUString& doku)
{
m_pApi->setDoku(m_hImpl, doku.pData);
}
inline void RegistryTypeWriter::setFileName(const rtl::OUString& doku)
{
m_pApi->setFileName(m_hImpl, doku.pData);
}
inline void RegistryTypeWriter::setParamData(sal_uInt16 index,
sal_uInt16 paramIndex,
const rtl::OUString& type,
const rtl::OUString& name,
RTParamMode mode)
{
m_pApi->setParamData(m_hImpl, index, paramIndex, type.pData, name.pData, mode);
}
inline void RegistryTypeWriter::setExcData(sal_uInt16 index,
sal_uInt16 excIndex,
const rtl::OUString& type)
{
m_pApi->setExcData(m_hImpl, index, excIndex, type.pData);
}
inline const sal_uInt8* RegistryTypeWriter::getBlop() inline const sal_uInt8* RegistryTypeWriter::getBlop()
{ {
return m_pApi->getBlop(m_hImpl); return m_pApi->getBlop(m_hImpl);
...@@ -336,15 +216,6 @@ inline sal_uInt32 RegistryTypeWriter::getBlopSize() ...@@ -336,15 +216,6 @@ inline sal_uInt32 RegistryTypeWriter::getBlopSize()
} }
inline void RegistryTypeWriter::setReferenceData( sal_uInt16 index,
const rtl::OUString& name,
RTReferenceType refType,
const rtl::OUString& doku,
RTFieldAccess access)
{
m_pApi->setReferenceData(m_hImpl, index, name.pData, refType, doku.pData, access);
}
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -152,36 +152,6 @@ public: ...@@ -152,36 +152,6 @@ public:
*/ */
inline RegError destroy(const rtl::OUString& registryName); inline RegError destroy(const rtl::OUString& registryName);
/** loads registry information from a specified file and save it under the
specified keyName.
@param rKey references a currently open key. The key which should store the registry information
is a subkey of this key.
@param keyName specifies the name of the key which stores the registry information. If keyName is
is an empty string the registry information will be saved under the key specified
by rKey.
@param regFileName specifies the file containing the registry information.
@return RegError::NO_ERROR if succeeds else an error code.
*/
inline RegError loadKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName);
/** saves the registry information of the specified key and all subkeys and save
it in the specified file.
@param rKey references a currently open key. The key which information is saved by this
function is a subkey of this key.
@param keyName specifies the name of the key which information should be stored.
If keyName is an empty string the registry information under the key specified
by rKey is saved in the specified file.
@param regFileName specifies the file containing the registry information.
@return RegError::NO_ERROR if succeeds else an error code.
*/
inline RegError saveKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName);
/** merges the registry information of the specified key with the registry /** merges the registry information of the specified key with the registry
information of the specified file. information of the specified file.
...@@ -203,15 +173,6 @@ public: ...@@ -203,15 +173,6 @@ public:
bool bWarnings = false, bool bWarnings = false,
bool bReport = false); bool bReport = false);
/** This function reports the complete registry information of a key and all of its subkeys.
All information which are available (keynames, value types, values, ...)
will be printed to stdout for report issues only.
@param rKey references a currently open key which content will be reported.
@return RegError::NO_ERROR if succeeds else an error code.
*/
inline RegError dumpRegistry(RegistryKey& rKey);
friend class RegistryKey; friend class RegistryKey;
friend class RegistryKeyArray; friend class RegistryKeyArray;
friend class RegistryKeyNames; friend class RegistryKeyNames;
...@@ -297,8 +258,6 @@ protected: ...@@ -297,8 +258,6 @@ protected:
@param length specifies the length of the array specified by pKeyNames. @param length specifies the length of the array specified by pKeyNames.
*/ */
inline void setKeyNames(Registry& registry, rtl_uString** pKeyNames, sal_uInt32 length); inline void setKeyNames(Registry& registry, rtl_uString** pKeyNames, sal_uInt32 length);
/// delete the array of key names.
inline RegError freeKeyNames();
/// stores the number of key names, the number of elements. /// stores the number of key names, the number of elements.
sal_uInt32 m_length; sal_uInt32 m_length;
...@@ -455,13 +414,6 @@ public: ...@@ -455,13 +414,6 @@ public:
inline RegError getKeyNames(const rtl::OUString& keyName, inline RegError getKeyNames(const rtl::OUString& keyName,
RegistryKeyNames& rSubKeyNames); RegistryKeyNames& rSubKeyNames);
/** closes all keys specified in the array.
@param rSubKeys reference a RegistryKeyArray which contains the open keys.
@return RegError::NO_ERROR if succeeds else an error code.
*/
inline RegError closeSubKeys(RegistryKeyArray& rSubKeys);
/** deletes the specified key. /** deletes the specified key.
@param keyName specifies the name of the key which will be deleted. @param keyName specifies the name of the key which will be deleted.
...@@ -627,9 +579,6 @@ public: ...@@ -627,9 +579,6 @@ public:
/// returns the name of the registry in which the key is defined. /// returns the name of the registry in which the key is defined.
inline rtl::OUString getRegistryName(); inline rtl::OUString getRegistryName();
/// returns the registry in which the key is defined.
Registry getRegistry() const { return m_registry; }
friend class Registry; friend class Registry;
public: public:
/// @cond INTERNAL /// @cond INTERNAL
...@@ -641,10 +590,6 @@ public: ...@@ -641,10 +590,6 @@ public:
inline RegistryKey(Registry& registry, inline RegistryKey(Registry& registry,
RegKeyHandle hKey); RegKeyHandle hKey);
/** returns the internal key handle.
*/
RegKeyHandle getKeyHandle() const { return m_hImpl; }
protected: protected:
/** sets the internal registry on which this key should work. /** sets the internal registry on which this key should work.
*/ */
...@@ -746,22 +691,6 @@ inline void RegistryKeyNames::setKeyNames(Registry& registry, ...@@ -746,22 +691,6 @@ inline void RegistryKeyNames::setKeyNames(Registry& registry,
m_registry = registry; m_registry = registry;
} }
inline RegError RegistryKeyNames::freeKeyNames()
{
if (m_registry.isValid() && m_pKeyNames)
{
RegError ret = RegError::NO_ERROR;
ret = m_registry.m_pApi->freeKeyNames(m_pKeyNames, m_length);
m_registry = Registry();
m_length = 0;
m_pKeyNames = NULL;
return ret;
} else
return RegError::INVALID_KEY;
}
inline RegistryKey::RegistryKey() inline RegistryKey::RegistryKey()
: m_hImpl(NULL) : m_hImpl(NULL)
{ } { }
...@@ -900,14 +829,6 @@ inline RegError RegistryKey::getKeyNames(const rtl::OUString& keyName, ...@@ -900,14 +829,6 @@ inline RegError RegistryKey::getKeyNames(const rtl::OUString& keyName,
return RegError::INVALID_KEY; return RegError::INVALID_KEY;
} }
inline RegError RegistryKey::closeSubKeys(RegistryKeyArray& rSubKeys)
{
if (m_registry.isValid())
return rSubKeys.closeKeyHandles();
else
return RegError::INVALID_KEY;
}
inline RegError RegistryKey::deleteKey(const rtl::OUString& keyName) inline RegError RegistryKey::deleteKey(const rtl::OUString& keyName)
{ {
if (m_registry.isValid()) if (m_registry.isValid())
...@@ -1206,16 +1127,6 @@ inline RegError Registry::destroy(const rtl::OUString& registryName) ...@@ -1206,16 +1127,6 @@ inline RegError Registry::destroy(const rtl::OUString& registryName)
return ret; return ret;
} }
inline RegError Registry::loadKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName)
{ return m_pApi->loadKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData); }
inline RegError Registry::saveKey(RegistryKey& rKey,
const rtl::OUString& keyName,
const rtl::OUString& regFileName)
{ return m_pApi->saveKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData); }
inline RegError Registry::mergeKey(RegistryKey& rKey, inline RegError Registry::mergeKey(RegistryKey& rKey,
const rtl::OUString& keyName, const rtl::OUString& keyName,
const rtl::OUString& regFileName, const rtl::OUString& regFileName,
...@@ -1223,9 +1134,6 @@ inline RegError Registry::mergeKey(RegistryKey& rKey, ...@@ -1223,9 +1134,6 @@ inline RegError Registry::mergeKey(RegistryKey& rKey,
bool bReport) bool bReport)
{ return m_pApi->mergeKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData, bWarnings, bReport); } { return m_pApi->mergeKey(m_hImpl, rKey.m_hImpl, keyName.pData, regFileName.pData, bWarnings, bReport); }
inline RegError Registry::dumpRegistry(RegistryKey& rKey)
{ return m_pApi->dumpRegistry(m_hImpl, rKey.m_hImpl); }
#endif #endif
......
...@@ -121,9 +121,6 @@ public: ...@@ -121,9 +121,6 @@ public:
const OUString& getName() const const OUString& getName() const
{ return m_name; } { return m_name; }
sal_uInt32 getRefCount() const
{ return m_refCount; }
OUString getFullPath(OUString const & path) const; OUString getFullPath(OUString const & path) const;
private: private:
......
...@@ -295,12 +295,6 @@ struct OStorePageKey ...@@ -295,12 +295,6 @@ struct OStorePageKey
m_nHigh (store::htonl(nHigh)) m_nHigh (store::htonl(nHigh))
{} {}
void swap (OStorePageKey & rhs)
{
store::swap(m_nLow, rhs.m_nLow);
store::swap(m_nHigh, rhs.m_nHigh);
}
OStorePageKey (const OStorePageKey & rhs) OStorePageKey (const OStorePageKey & rhs)
: m_nLow (rhs.m_nLow), m_nHigh (rhs.m_nHigh) : m_nLow (rhs.m_nLow), m_nHigh (rhs.m_nHigh)
{} {}
...@@ -386,19 +380,6 @@ struct OStorePageLink ...@@ -386,19 +380,6 @@ struct OStorePageLink
return store::ntohl(m_nAddr); return store::ntohl(m_nAddr);
} }
void link (OStorePageLink & rPred)
{
// @@@ swap (rPred); @@@
OStorePageLink tmp (rPred);
rPred = *this;
*this = tmp;
}
void unlink (OStorePageLink& rPred)
{
rPred = *this;
*this = OStorePageLink();
}
}; };
/*======================================================================== /*========================================================================
...@@ -551,13 +532,6 @@ struct PageData ...@@ -551,13 +532,6 @@ struct PageData
return store_E_None; return store_E_None;
} }
storeError verifyVersion (sal_uInt32 nMagic) const
{
if (m_aGuard.m_nMagic != store::htonl(nMagic))
return store_E_WrongVersion;
else
return store_E_None;
}
}; };
/*======================================================================== /*========================================================================
...@@ -803,7 +777,6 @@ public: ...@@ -803,7 +777,6 @@ public:
/** Location. /** Location.
*/ */
inline sal_uInt32 location() const; inline sal_uInt32 location() const;
inline void location (sal_uInt32 nAddr);
protected: protected:
/** Representation. /** Representation.
...@@ -843,7 +816,6 @@ public: ...@@ -843,7 +816,6 @@ public:
} }
PageHolder & get() { return m_xPage; } PageHolder & get() { return m_xPage; }
PageHolder const & get() const { return m_xPage; }
virtual storeError guard (sal_uInt32 nAddr) = 0; virtual storeError guard (sal_uInt32 nAddr) = 0;
virtual storeError verify (sal_uInt32 nAddr) const = 0; virtual storeError verify (sal_uInt32 nAddr) const = 0;
...@@ -869,12 +841,6 @@ inline sal_uInt32 OStorePageObject::location() const ...@@ -869,12 +841,6 @@ inline sal_uInt32 OStorePageObject::location() const
return m_xPage->location(); return m_xPage->location();
} }
inline void OStorePageObject::location (sal_uInt32 nAddr)
{
m_xPage->location(nAddr);
touch();
}
/*======================================================================== /*========================================================================
* *
* The End. * The End.
......
...@@ -70,13 +70,6 @@ struct OStoreDataPageData : public store::OStorePageData ...@@ -70,13 +70,6 @@ struct OStoreDataPageData : public store::OStorePageData
return self::capacity (base::m_aDescr); return self::capacity (base::m_aDescr);
} }
/** usage.
*/
sal_uInt16 usage() const
{
return (store::ntohs(base::m_aDescr.m_nUsed) - self::thePageSize);
}
/** Construction. /** Construction.
*/ */
explicit OStoreDataPageData (sal_uInt16 nPageSize = self::thePageSize) explicit OStoreDataPageData (sal_uInt16 nPageSize = self::thePageSize)
...@@ -576,26 +569,6 @@ struct OStoreDirectoryPageData : public store::OStorePageData ...@@ -576,26 +569,6 @@ struct OStoreDirectoryPageData : public store::OStorePageData
return (store::ntohs(base::m_aDescr.m_nSize) - self::thePageSize); return (store::ntohs(base::m_aDescr.m_nSize) - self::thePageSize);
} }
/** usage.
*/
sal_uInt16 usage() const
{
return (store::ntohs(base::m_aDescr.m_nUsed) - self::thePageSize);
}
/** initialize.
*/
void initialize()
{
base::m_aGuard.m_nMagic = store::htonl(self::theTypeId);
base::m_aDescr.m_nUsed = store::htons(self::thePageSize);
m_aNameBlock.initialize();
m_aDataBlock.initialize();
memset (m_pData, 0, capacity());
}
/** Construction. /** Construction.
*/ */
explicit OStoreDirectoryPageData (sal_uInt16 nPageSize) explicit OStoreDirectoryPageData (sal_uInt16 nPageSize)
...@@ -729,14 +702,6 @@ public: ...@@ -729,14 +702,6 @@ public:
return rtl_crc32 (nPath, pszName, rtl_str_getLength(pszName)); return rtl_crc32 (nPath, pszName, rtl_str_getLength(pszName));
} }
sal_Size getName (sal_Char * pBuffer, sal_Size nBufsize) const
{
sal_Char const * pszName = PAGE().m_aNameBlock.m_pData;
sal_Size nLength = rtl_str_getLength(pszName);
memcpy (pBuffer, pszName, nLength < nBufsize ? nLength : nBufsize);
return nLength;
}
/** dataLength. /** dataLength.
*/ */
sal_uInt32 dataLength() const sal_uInt32 dataLength() const
......
...@@ -195,13 +195,6 @@ struct OStoreBTreeNodeData : public store::OStorePageData ...@@ -195,13 +195,6 @@ struct OStoreBTreeNodeData : public store::OStorePageData
self::m_aGuard.m_nMagic = store::htonl(nDepth); self::m_aGuard.m_nMagic = store::htonl(nDepth);
} }
/** queryMerge.
*/
bool queryMerge (const self &rPageR) const
{
return ((usageCount() + rPageR.usageCount()) <= capacityCount());
}
/** querySplit. /** querySplit.
*/ */
bool querySplit() const bool querySplit() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment