[Libreoffice-commits] core.git: codemaker/source include/codemaker include/registry registry/source sal/textenc store/source

Noel Grandin noel.grandin at collabora.co.uk
Fri Oct 20 06:51:18 UTC 2017


 codemaker/source/codemaker/global.cxx      |    2 
 codemaker/source/cppumaker/cppuoptions.cxx |    2 
 codemaker/source/cppumaker/cppuoptions.hxx |    2 
 codemaker/source/cppumaker/cpputype.cxx    |   36 +++----
 codemaker/source/javamaker/javaoptions.cxx |    2 
 codemaker/source/javamaker/javaoptions.hxx |    2 
 include/codemaker/global.hxx               |    4 
 include/codemaker/options.hxx              |    2 
 include/registry/registry.hxx              |   10 +-
 include/registry/writer.hxx                |    2 
 registry/source/keyimpl.cxx                |    4 
 registry/source/keyimpl.hxx                |    4 
 registry/source/reflread.cxx               |  144 ++++++++++++++---------------
 registry/source/reflwrit.cxx               |   12 +-
 sal/textenc/textenc.cxx                    |    2 
 store/source/storbios.cxx                  |    8 -
 store/source/storbios.hxx                  |    8 -
 store/source/stordata.cxx                  |    8 -
 store/source/stordata.hxx                  |   10 +-
 store/source/stortree.cxx                  |    4 
 store/source/stortree.hxx                  |    4 
 21 files changed, 136 insertions(+), 136 deletions(-)

New commits:
commit 14d45665433eec974acd96f813f2bf314bdb3eba
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Oct 19 11:09:13 2017 +0200

    loplugin:constmethod in codemaker,registry,store
    
    Change-Id: Ie75875974f054ff79bd64b1c261e79e2b78eb7fc
    Reviewed-on: https://gerrit.libreoffice.org/43540
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index 46d5a07e35a6..30484f7e6111 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -273,7 +273,7 @@ FileStream::~FileStream()
         osl_closeFile(m_file);
 }
 
-bool FileStream::isValid()
+bool FileStream::isValid() const
 {
     if ( m_file )
         return true;
diff --git a/codemaker/source/cppumaker/cppuoptions.cxx b/codemaker/source/cppumaker/cppuoptions.cxx
index af644af1538f..d4575968b784 100644
--- a/codemaker/source/cppumaker/cppuoptions.cxx
+++ b/codemaker/source/cppumaker/cppuoptions.cxx
@@ -320,7 +320,7 @@ OString CppuOptions::prepareHelp()
     return help;
 }
 
-OString CppuOptions::prepareVersion()
+OString CppuOptions::prepareVersion() const
 {
     OString version = m_program + " Version 2.0\n\n";
     return version;
diff --git a/codemaker/source/cppumaker/cppuoptions.hxx b/codemaker/source/cppumaker/cppuoptions.hxx
index 497fbd96402b..882dfa66dbef 100644
--- a/codemaker/source/cppumaker/cppuoptions.hxx
+++ b/codemaker/source/cppumaker/cppuoptions.hxx
@@ -32,7 +32,7 @@ public:
 
     OString  prepareHelp() override;
 
-    OString  prepareVersion();
+    OString  prepareVersion() const;
 
 protected:
 };
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index dafbe682fd8b..bff92a920d57 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -167,7 +167,7 @@ public:
         CppuOptions const & options);
 
     void dumpDependedTypes(
-        codemaker::GeneratedTypeSet & generated, CppuOptions const & options);
+        codemaker::GeneratedTypeSet & generated, CppuOptions const & options) const;
 
     virtual void dumpHdlFile(
         FileStream & out, codemaker::cppumaker::Includes & includes) {
@@ -176,7 +176,7 @@ public:
 
     virtual void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & includes) = 0;
 
-    OUString dumpHeaderDefine(FileStream& o, OUString const & extension);
+    OUString dumpHeaderDefine(FileStream& o, OUString const & extension) const;
 
     void dumpGetCppuType(FileStream & out);
 
@@ -198,7 +198,7 @@ public:
     OUString getTypeClass(OUString const & name, bool cStyle = false);
 
     void dumpCppuGetType(
-        FileStream & out, OUString const & name, OUString const * ownName = nullptr);
+        FileStream & out, OUString const & name, OUString const * ownName = nullptr) const;
 
     sal_uInt32 getInheritedMemberCount();
 
@@ -454,7 +454,7 @@ bool CppuType::dumpFile(
 }
 
 void CppuType::dumpDependedTypes(
-    codemaker::GeneratedTypeSet & generated, CppuOptions const & options)
+    codemaker::GeneratedTypeSet & generated, CppuOptions const & options) const
 {
     if (!options.isValid("-nD")) {
         codemaker::cppumaker::Dependencies::Map const & map
@@ -466,7 +466,7 @@ void CppuType::dumpDependedTypes(
 }
 
 OUString CppuType::dumpHeaderDefine(
-    FileStream & out, OUString const & extension)
+    FileStream & out, OUString const & extension) const
 {
     OUString def(
         "INCLUDED_" + name_.replace('.', '_').toAsciiUpperCase() + "_"
@@ -849,7 +849,7 @@ void CppuType::dumpType(
 }
 
 void CppuType::dumpCppuGetType(
-    FileStream & out, OUString const & name, OUString const * ownName)
+    FileStream & out, OUString const & name, OUString const * ownName) const
 {
     //TODO: What are these calls good for?
     OUString nucleus;
@@ -1110,16 +1110,16 @@ public:
     virtual void dumpDeclaration(FileStream& o) override;
     void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & includes) override;
 
-    void        dumpAttributes(FileStream& o);
-    void        dumpMethods(FileStream& o);
+    void        dumpAttributes(FileStream& o) const;
+    void        dumpMethods(FileStream& o) const;
     void        dumpNormalGetCppuType(FileStream& o) override;
     void        dumpComprehensiveGetCppuType(FileStream& o) override;
     void        dumpCppuAttributeRefs(FileStream& o, sal_uInt32& index);
     void        dumpCppuMethodRefs(FileStream& o, sal_uInt32& index);
     void        dumpCppuAttributes(FileStream& o, sal_uInt32& index);
     void        dumpCppuMethods(FileStream& o, sal_uInt32& index);
-    void dumpAttributesCppuDecl(FileStream & out, std::set< OUString > * seen);
-    void dumpMethodsCppuDecl(FileStream & out, std::set< OUString > * seen);
+    void dumpAttributesCppuDecl(FileStream & out, std::set< OUString > * seen) const;
+    void dumpMethodsCppuDecl(FileStream & out, std::set< OUString > * seen) const;
 
 private:
     virtual void addComprehensiveGetCppuTypeIncludes(
@@ -1131,11 +1131,11 @@ private:
 
     void dumpExceptionTypeName(
         FileStream & out, OUString const & prefix, sal_uInt32 index,
-        OUString const & name);
+        OUString const & name) const;
 
     sal_Int32 dumpExceptionTypeNames(
         FileStream & out, OUString const & prefix,
-        std::vector< OUString > const & exceptions, bool runtimeException);
+        std::vector< OUString > const & exceptions, bool runtimeException) const;
 
     rtl::Reference< unoidl::InterfaceTypeEntity > entity_;
     bool m_isDeprecated;
@@ -1196,7 +1196,7 @@ void InterfaceType::dumpHppFile(
     out << "}\n\n#endif // "<< headerDefine << "\n";
 }
 
-void InterfaceType::dumpAttributes(FileStream & out)
+void InterfaceType::dumpAttributes(FileStream & out) const
 {
     if (!entity_->getDirectAttributes().empty()) {
         out << "\n" << indent() << "// Attributes\n";
@@ -1219,7 +1219,7 @@ void InterfaceType::dumpAttributes(FileStream & out)
     }
 }
 
-void InterfaceType::dumpMethods(FileStream & out)
+void InterfaceType::dumpMethods(FileStream & out) const
 {
     if (!entity_->getDirectMethods().empty()) {
         out << "\n" << indent() << "// Methods\n";
@@ -1551,7 +1551,7 @@ void InterfaceType::dumpCppuMethods(FileStream & out, sal_uInt32 & index)
 }
 
 void InterfaceType::dumpAttributesCppuDecl(
-    FileStream & out, std::set< OUString > * seen)
+    FileStream & out, std::set< OUString > * seen) const
 {
     assert(seen != nullptr);
     for (const unoidl::InterfaceTypeEntity::Attribute& attr : entity_->getDirectAttributes()) {
@@ -1572,7 +1572,7 @@ void InterfaceType::dumpAttributesCppuDecl(
 }
 
 void InterfaceType::dumpMethodsCppuDecl(
-    FileStream & out, std::set< OUString > * seen)
+    FileStream & out, std::set< OUString > * seen) const
 {
     assert(seen != nullptr);
     for (const unoidl::InterfaceTypeEntity::Method& method : entity_->getDirectMethods()) {
@@ -1586,7 +1586,7 @@ void InterfaceType::dumpMethodsCppuDecl(
 
 void InterfaceType::dumpExceptionTypeName(
     FileStream & out, OUString const & prefix, sal_uInt32 index,
-    OUString const & name)
+    OUString const & name) const
 {
     out << indent() << "::rtl::OUString the_" << prefix << "ExceptionName"
         << index << "( \"" << name << "\" );\n";
@@ -1594,7 +1594,7 @@ void InterfaceType::dumpExceptionTypeName(
 
 sal_Int32 InterfaceType::dumpExceptionTypeNames(
     FileStream & out, OUString const & prefix,
-    std::vector< OUString > const & exceptions, bool runtimeException)
+    std::vector< OUString > const & exceptions, bool runtimeException) const
 {
     sal_Int32 count = 0;
     for (const OUString& ex : exceptions) {
diff --git a/codemaker/source/javamaker/javaoptions.cxx b/codemaker/source/javamaker/javaoptions.cxx
index 19818f8143be..798b32b55683 100644
--- a/codemaker/source/javamaker/javaoptions.cxx
+++ b/codemaker/source/javamaker/javaoptions.cxx
@@ -242,7 +242,7 @@ OString JavaOptions::prepareHelp()
     return help;
 }
 
-OString JavaOptions::prepareVersion()
+OString JavaOptions::prepareVersion() const
 {
     OString version(m_program);
     version += " Version 2.0\n\n";
diff --git a/codemaker/source/javamaker/javaoptions.hxx b/codemaker/source/javamaker/javaoptions.hxx
index e4eed6883849..6f6d321a2a94 100644
--- a/codemaker/source/javamaker/javaoptions.hxx
+++ b/codemaker/source/javamaker/javaoptions.hxx
@@ -32,7 +32,7 @@ public:
 
     OString  prepareHelp() override;
 
-    OString  prepareVersion();
+    OString  prepareVersion() const;
 
 protected:
 };
diff --git a/include/codemaker/global.hxx b/include/codemaker/global.hxx
index 02c9fed777e3..e26fba3d97d4 100644
--- a/include/codemaker/global.hxx
+++ b/include/codemaker/global.hxx
@@ -43,12 +43,12 @@ public:
     FileStream();
     ~FileStream();
 
-    bool isValid();
+    bool isValid() const;
 
     void createTempFile(const ::rtl::OString& sPath);
     void close();
 
-    const ::rtl::OString& getName() { return m_name; }
+    const ::rtl::OString& getName() const { return m_name; }
 
     bool write(void const * buffer, sal_uInt64 size);
 
diff --git a/include/codemaker/options.hxx b/include/codemaker/options.hxx
index 8d9b6084ec26..ca86fa1b3995 100644
--- a/include/codemaker/options.hxx
+++ b/include/codemaker/options.hxx
@@ -55,7 +55,7 @@ public:
     /// @throws IllegalArgument
     const OString&      getOption(const ::rtl::OString& option) const;
 
-    const StringVector& getInputFiles() { return m_inputFiles;}
+    const StringVector& getInputFiles() const { return m_inputFiles;}
 
     const StringVector& getExtraInputFiles() const
         { return m_extra_input_files; }
diff --git a/include/registry/registry.hxx b/include/registry/registry.hxx
index f8906668e253..36b7d77858d3 100644
--- a/include/registry/registry.hxx
+++ b/include/registry/registry.hxx
@@ -179,7 +179,7 @@ public:
     friend class RegistryKeyNames;
 
     /// returns the used registry Api.
-    const Registry_Api* getApi() { return m_pApi; }
+    const Registry_Api* getApi() const { return m_pApi; }
 protected:
 
     /// stores the used and initialized registry Api.
@@ -206,7 +206,7 @@ public:
     inline RegistryKey getElement(sal_uInt32 index);
 
     /// returns the length of the array.
-    inline sal_uInt32 getLength();
+    inline sal_uInt32 getLength() const;
 
     friend class RegistryKey;
 protected:
@@ -244,7 +244,7 @@ public:
     inline rtl::OUString getElement(sal_uInt32 index);
 
     /// returns the length of the array.
-    inline sal_uInt32 getLength();
+    inline sal_uInt32 getLength() const;
 
     friend class RegistryKey;
 protected:
@@ -591,7 +591,7 @@ inline RegistryKey RegistryKeyArray::getElement(sal_uInt32 index)
         return RegistryKey();
 }
 
-inline sal_uInt32 RegistryKeyArray::getLength()
+inline sal_uInt32 RegistryKeyArray::getLength() const
 {
     return m_length;
 }
@@ -626,7 +626,7 @@ inline rtl::OUString RegistryKeyNames::getElement(sal_uInt32 index)
         return rtl::OUString();
 }
 
-inline sal_uInt32 RegistryKeyNames::getLength()
+inline sal_uInt32 RegistryKeyNames::getLength() const
 {
     return m_length;
 }
diff --git a/include/registry/writer.hxx b/include/registry/writer.hxx
index dc3ce97c4f0f..7e3bfbd7e9bc 100644
--- a/include/registry/writer.hxx
+++ b/include/registry/writer.hxx
@@ -194,7 +194,7 @@ public:
     void setMethodParameterData(
         sal_uInt16 methodIndex, sal_uInt16 parameterIndex,
         RTParamMode flags, rtl::OUString const & name,
-        rtl::OUString const & typeName)
+        rtl::OUString const & typeName) const
     {
         if (!typereg_writer_setMethodParameterData(
                 m_handle, methodIndex, parameterIndex, flags, name.pData,
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 944226234a5a..94378ad2a5bb 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -970,7 +970,7 @@ RegError ORegKey::getUnicodeListValue(const OUString& valueName, sal_Unicode***
 
 
 RegError ORegKey::getResolvedKeyName(const OUString& keyName,
-                                     OUString& resolvedName)
+                                     OUString& resolvedName) const
 {
     if (keyName.isEmpty())
         return RegError::INVALID_KEYNAME;
@@ -1004,7 +1004,7 @@ sal_uInt32 ORegKey::countSubKeys()
     return count;
 }
 
-OStoreDirectory ORegKey::getStoreDir()
+OStoreDirectory ORegKey::getStoreDir() const
 {
     OStoreDirectory rStoreDir;
     OUString        fullPath;
diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx
index 2b3880e9e70e..f8f90e86407a 100644
--- a/registry/source/keyimpl.hxx
+++ b/registry/source/keyimpl.hxx
@@ -91,7 +91,7 @@ public:
                                     sal_uInt32* pLen) const;
 
     RegError    getResolvedKeyName(const OUString& keyName,
-                                   OUString& resolvedName);
+                                   OUString& resolvedName) const;
 
     bool isDeleted() const
         { return m_bDeleted; }
@@ -116,7 +116,7 @@ public:
     const store::OStoreFile& getStoreFile() const
                     { return m_pRegistry->getStoreFile(); }
 
-    store::OStoreDirectory getStoreDir();
+    store::OStoreDirectory getStoreDir() const;
 
     const OUString& getName() const
                     { return m_name; }
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx
index a93602ffda47..61ce0d3ed94a 100644
--- a/registry/source/reflread.cxx
+++ b/registry/source/reflread.cxx
@@ -192,7 +192,7 @@ public:
     explicit StringCache(sal_uInt16 size); // throws std::bad_alloc
     ~StringCache();
 
-    const sal_Unicode*  getString(sal_uInt16 index);
+    const sal_Unicode*  getString(sal_uInt16 index) const;
     sal_uInt16 createString(const sal_uInt8* buffer); // throws std::bad_alloc
 };
 
@@ -222,7 +222,7 @@ StringCache::~StringCache()
     }
 }
 
-const sal_Unicode* StringCache::getString(sal_uInt16 index)
+const sal_Unicode* StringCache::getString(sal_uInt16 index) const
 {
     if ((index > 0) && (index <= m_stringsCopied))
         return m_stringTable[index - 1];
@@ -269,20 +269,20 @@ public:
 
     sal_uInt32 parseIndex(); // throws std::bad_alloc
 
-    CPInfoTag       readTag(sal_uInt16 index);
-
-    const sal_Char*     readUTF8NameConstant(sal_uInt16 index);
-    bool            readBOOLConstant(sal_uInt16 index);
-    sal_Int8            readBYTEConstant(sal_uInt16 index);
-    sal_Int16           readINT16Constant(sal_uInt16 index);
-    sal_uInt16          readUINT16Constant(sal_uInt16 index);
-    sal_Int32           readINT32Constant(sal_uInt16 index);
-    sal_uInt32          readUINT32Constant(sal_uInt16 index);
-    sal_Int64           readINT64Constant(sal_uInt16 index);
-    sal_uInt64          readUINT64Constant(sal_uInt16 index);
-    float               readFloatConstant(sal_uInt16 index);
-    double              readDoubleConstant(sal_uInt16 index);
-    const sal_Unicode*  readStringConstant(sal_uInt16 index);
+    CPInfoTag           readTag(sal_uInt16 index) const;
+
+    const sal_Char*     readUTF8NameConstant(sal_uInt16 index) const;
+    bool                readBOOLConstant(sal_uInt16 index) const;
+    sal_Int8            readBYTEConstant(sal_uInt16 index) const;
+    sal_Int16           readINT16Constant(sal_uInt16 index) const;
+    sal_uInt16          readUINT16Constant(sal_uInt16 index) const;
+    sal_Int32           readINT32Constant(sal_uInt16 index) const;
+    sal_uInt32          readUINT32Constant(sal_uInt16 index) const;
+    sal_Int64           readINT64Constant(sal_uInt16 index) const;
+    sal_uInt64          readUINT64Constant(sal_uInt16 index) const;
+    float               readFloatConstant(sal_uInt16 index) const;
+    double              readDoubleConstant(sal_uInt16 index) const;
+    const sal_Unicode*  readStringConstant(sal_uInt16 index) const;
         // throws std::bad_alloc
 };
 
@@ -323,7 +323,7 @@ sal_uInt32 ConstantPool::parseIndex()
     return offset;
 }
 
-CPInfoTag ConstantPool::readTag(sal_uInt16 index)
+CPInfoTag ConstantPool::readTag(sal_uInt16 index) const
 {
     CPInfoTag tag = CP_TAG_INVALID;
 
@@ -335,7 +335,7 @@ CPInfoTag ConstantPool::readTag(sal_uInt16 index)
     return tag;
 }
 
-const sal_Char* ConstantPool::readUTF8NameConstant(sal_uInt16 index)
+const sal_Char* ConstantPool::readUTF8NameConstant(sal_uInt16 index) const
 {
     const sal_Char* aName = NULL_STRING;
 
@@ -355,7 +355,7 @@ const sal_Char* ConstantPool::readUTF8NameConstant(sal_uInt16 index)
     return aName;
 }
 
-bool ConstantPool::readBOOLConstant(sal_uInt16 index)
+bool ConstantPool::readBOOLConstant(sal_uInt16 index) const
 {
     bool aBool = false;
 
@@ -370,7 +370,7 @@ bool ConstantPool::readBOOLConstant(sal_uInt16 index)
     return aBool;
 }
 
-sal_Int8 ConstantPool::readBYTEConstant(sal_uInt16 index)
+sal_Int8 ConstantPool::readBYTEConstant(sal_uInt16 index) const
 {
     sal_Int8 aByte = 0;
 
@@ -386,7 +386,7 @@ sal_Int8 ConstantPool::readBYTEConstant(sal_uInt16 index)
     return aByte;
 }
 
-sal_Int16 ConstantPool::readINT16Constant(sal_uInt16 index)
+sal_Int16 ConstantPool::readINT16Constant(sal_uInt16 index) const
 {
     sal_Int16 aINT16 = 0;
 
@@ -401,7 +401,7 @@ sal_Int16 ConstantPool::readINT16Constant(sal_uInt16 index)
     return aINT16;
 }
 
-sal_uInt16 ConstantPool::readUINT16Constant(sal_uInt16 index)
+sal_uInt16 ConstantPool::readUINT16Constant(sal_uInt16 index) const
 {
     sal_uInt16 asal_uInt16 = 0;
 
@@ -416,7 +416,7 @@ sal_uInt16 ConstantPool::readUINT16Constant(sal_uInt16 index)
     return asal_uInt16;
 }
 
-sal_Int32 ConstantPool::readINT32Constant(sal_uInt16 index)
+sal_Int32 ConstantPool::readINT32Constant(sal_uInt16 index) const
 {
     sal_Int32 aINT32 = 0;
 
@@ -431,7 +431,7 @@ sal_Int32 ConstantPool::readINT32Constant(sal_uInt16 index)
     return aINT32;
 }
 
-sal_uInt32 ConstantPool::readUINT32Constant(sal_uInt16 index)
+sal_uInt32 ConstantPool::readUINT32Constant(sal_uInt16 index) const
 {
     sal_uInt32 aUINT32 = 0;
 
@@ -446,7 +446,7 @@ sal_uInt32 ConstantPool::readUINT32Constant(sal_uInt16 index)
     return aUINT32;
 }
 
-sal_Int64 ConstantPool::readINT64Constant(sal_uInt16 index)
+sal_Int64 ConstantPool::readINT64Constant(sal_uInt16 index) const
 {
     sal_Int64 aINT64 = 0;
 
@@ -461,7 +461,7 @@ sal_Int64 ConstantPool::readINT64Constant(sal_uInt16 index)
     return aINT64;
 }
 
-sal_uInt64 ConstantPool::readUINT64Constant(sal_uInt16 index)
+sal_uInt64 ConstantPool::readUINT64Constant(sal_uInt16 index) const
 {
     sal_uInt64 aUINT64 = 0;
 
@@ -476,7 +476,7 @@ sal_uInt64 ConstantPool::readUINT64Constant(sal_uInt16 index)
     return aUINT64;
 }
 
-float ConstantPool::readFloatConstant(sal_uInt16 index)
+float ConstantPool::readFloatConstant(sal_uInt16 index) const
 {
     union
     {
@@ -499,7 +499,7 @@ float ConstantPool::readFloatConstant(sal_uInt16 index)
     return  x.v;
 }
 
-double ConstantPool::readDoubleConstant(sal_uInt16 index)
+double ConstantPool::readDoubleConstant(sal_uInt16 index) const
 {
     union
     {
@@ -533,7 +533,7 @@ double ConstantPool::readDoubleConstant(sal_uInt16 index)
     return x.v;
 }
 
-const sal_Unicode* ConstantPool::readStringConstant(sal_uInt16 index)
+const sal_Unicode* ConstantPool::readStringConstant(sal_uInt16 index) const
 {
     const sal_Unicode* aString = NULL_WSTRING;
 
@@ -593,19 +593,19 @@ public:
         }
     }
 
-    sal_uInt32 parseIndex() { return ((m_numOfEntries ? sizeof(sal_uInt16) : 0) + (m_numOfEntries * m_FIELD_ENTRY_SIZE));}
+    sal_uInt32 parseIndex() const { return ((m_numOfEntries ? sizeof(sal_uInt16) : 0) + (m_numOfEntries * m_FIELD_ENTRY_SIZE));}
 
-    const sal_Char* getFieldName(sal_uInt16 index);
-    const sal_Char* getFieldType(sal_uInt16 index);
-    RTFieldAccess getFieldAccess(sal_uInt16 index);
-    RTValueType     getFieldConstValue(sal_uInt16 index, RTConstValueUnion* value);
+    const sal_Char* getFieldName(sal_uInt16 index) const;
+    const sal_Char* getFieldType(sal_uInt16 index) const;
+    RTFieldAccess getFieldAccess(sal_uInt16 index) const;
+    RTValueType     getFieldConstValue(sal_uInt16 index, RTConstValueUnion* value) const;
         // throws std::bad_alloc
-    const sal_Char* getFieldDoku(sal_uInt16 index);
-    const sal_Char* getFieldFileName(sal_uInt16 index);
+    const sal_Char* getFieldDoku(sal_uInt16 index) const;
+    const sal_Char* getFieldFileName(sal_uInt16 index) const;
 };
 
 
-const sal_Char* FieldList::getFieldName(sal_uInt16 index)
+const sal_Char* FieldList::getFieldName(sal_uInt16 index) const
 {
     const sal_Char* aName = nullptr;
 
@@ -621,7 +621,7 @@ const sal_Char* FieldList::getFieldName(sal_uInt16 index)
     return aName;
 }
 
-const sal_Char* FieldList::getFieldType(sal_uInt16 index)
+const sal_Char* FieldList::getFieldType(sal_uInt16 index) const
 {
     const sal_Char* aName = nullptr;
 
@@ -637,7 +637,7 @@ const sal_Char* FieldList::getFieldType(sal_uInt16 index)
     return aName;
 }
 
-RTFieldAccess FieldList::getFieldAccess(sal_uInt16 index)
+RTFieldAccess FieldList::getFieldAccess(sal_uInt16 index) const
 {
     RTFieldAccess aAccess = RTFieldAccess::INVALID;
 
@@ -653,7 +653,7 @@ RTFieldAccess FieldList::getFieldAccess(sal_uInt16 index)
     return aAccess;
 }
 
-RTValueType FieldList::getFieldConstValue(sal_uInt16 index, RTConstValueUnion* value)
+RTValueType FieldList::getFieldConstValue(sal_uInt16 index, RTConstValueUnion* value) const
 {
     RTValueType ret = RT_TYPE_NONE;
     try {
@@ -716,7 +716,7 @@ RTValueType FieldList::getFieldConstValue(sal_uInt16 index, RTConstValueUnion* v
     return ret;
 }
 
-const sal_Char* FieldList::getFieldDoku(sal_uInt16 index)
+const sal_Char* FieldList::getFieldDoku(sal_uInt16 index) const
 {
     const sal_Char* aDoku = nullptr;
 
@@ -732,7 +732,7 @@ const sal_Char* FieldList::getFieldDoku(sal_uInt16 index)
     return aDoku;
 }
 
-const sal_Char* FieldList::getFieldFileName(sal_uInt16 index)
+const sal_Char* FieldList::getFieldFileName(sal_uInt16 index) const
 {
     const sal_Char* aFileName = nullptr;
 
@@ -779,14 +779,14 @@ public:
         }
     }
 
-    const sal_Char* getReferenceName(sal_uInt16 index);
-    RTReferenceType getReferenceType(sal_uInt16 index);
-    const sal_Char* getReferenceDoku(sal_uInt16 index);
-    RTFieldAccess   getReferenceAccess(sal_uInt16 index);
+    const sal_Char* getReferenceName(sal_uInt16 index) const;
+    RTReferenceType getReferenceType(sal_uInt16 index) const;
+    const sal_Char* getReferenceDoku(sal_uInt16 index) const;
+    RTFieldAccess   getReferenceAccess(sal_uInt16 index) const;
 };
 
 
-const sal_Char* ReferenceList::getReferenceName(sal_uInt16 index)
+const sal_Char* ReferenceList::getReferenceName(sal_uInt16 index) const
 {
     const sal_Char* aName = nullptr;
 
@@ -802,7 +802,7 @@ const sal_Char* ReferenceList::getReferenceName(sal_uInt16 index)
     return aName;
 }
 
-RTReferenceType ReferenceList::getReferenceType(sal_uInt16 index)
+RTReferenceType ReferenceList::getReferenceType(sal_uInt16 index) const
 {
     RTReferenceType refType = RTReferenceType::INVALID;
 
@@ -818,7 +818,7 @@ RTReferenceType ReferenceList::getReferenceType(sal_uInt16 index)
     return refType;
 }
 
-const sal_Char* ReferenceList::getReferenceDoku(sal_uInt16 index)
+const sal_Char* ReferenceList::getReferenceDoku(sal_uInt16 index) const
 {
     const sal_Char* aDoku = nullptr;
 
@@ -834,7 +834,7 @@ const sal_Char* ReferenceList::getReferenceDoku(sal_uInt16 index)
     return aDoku;
 }
 
-RTFieldAccess ReferenceList::getReferenceAccess(sal_uInt16 index)
+RTFieldAccess ReferenceList::getReferenceAccess(sal_uInt16 index) const
 {
     RTFieldAccess aAccess = RTFieldAccess::INVALID;
 
@@ -885,22 +885,22 @@ public:
 
     sal_uInt32 parseIndex(); // throws std::bad_alloc
 
-    const sal_Char* getMethodName(sal_uInt16 index);
-    sal_uInt16      getMethodParamCount(sal_uInt16 index);
-    const sal_Char* getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex);
-    const sal_Char* getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex);
-    RTParamMode     getMethodParamMode(sal_uInt16 index, sal_uInt16 paramIndex);
-    sal_uInt16      getMethodExcCount(sal_uInt16 index);
-    const sal_Char* getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex);
-    const sal_Char* getMethodReturnType(sal_uInt16 index);
-    RTMethodMode    getMethodMode(sal_uInt16 index);
-    const sal_Char* getMethodDoku(sal_uInt16 index);
+    const sal_Char* getMethodName(sal_uInt16 index) const;
+    sal_uInt16      getMethodParamCount(sal_uInt16 index) const;
+    const sal_Char* getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const;
+    const sal_Char* getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const;
+    RTParamMode     getMethodParamMode(sal_uInt16 index, sal_uInt16 paramIndex) const;
+    sal_uInt16      getMethodExcCount(sal_uInt16 index) const;
+    const sal_Char* getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const;
+    const sal_Char* getMethodReturnType(sal_uInt16 index) const;
+    RTMethodMode    getMethodMode(sal_uInt16 index) const;
+    const sal_Char* getMethodDoku(sal_uInt16 index) const;
 
 private:
-    sal_uInt16 calcMethodParamIndex( const sal_uInt16 index );
+    sal_uInt16 calcMethodParamIndex( const sal_uInt16 index ) const;
 };
 
-sal_uInt16 MethodList::calcMethodParamIndex( const sal_uInt16 index )
+sal_uInt16 MethodList::calcMethodParamIndex( const sal_uInt16 index ) const
 {
     return (METHOD_OFFSET_PARAM_COUNT + sizeof(sal_uInt16) + (index * m_PARAM_ENTRY_SIZE));
 }
@@ -927,7 +927,7 @@ sal_uInt32 MethodList::parseIndex()
     return offset;
 }
 
-const sal_Char* MethodList::getMethodName(sal_uInt16 index)
+const sal_Char* MethodList::getMethodName(sal_uInt16 index) const
 {
     const sal_Char* aName = nullptr;
 
@@ -943,7 +943,7 @@ const sal_Char* MethodList::getMethodName(sal_uInt16 index)
     return aName;
 }
 
-sal_uInt16 MethodList::getMethodParamCount(sal_uInt16 index)
+sal_uInt16 MethodList::getMethodParamCount(sal_uInt16 index) const
 {
     sal_uInt16 aCount = 0;
 
@@ -959,7 +959,7 @@ sal_uInt16 MethodList::getMethodParamCount(sal_uInt16 index)
     return aCount;
 }
 
-const sal_Char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex)
+const sal_Char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const
 {
     const sal_Char* aName = nullptr;
     try {
@@ -979,7 +979,7 @@ const sal_Char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 para
     return aName;
 }
 
-const sal_Char* MethodList::getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex)
+const sal_Char* MethodList::getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const
 {
     const sal_Char* aName = nullptr;
     try {
@@ -999,7 +999,7 @@ const sal_Char* MethodList::getMethodParamName(sal_uInt16 index, sal_uInt16 para
     return aName;
 }
 
-RTParamMode MethodList::getMethodParamMode(sal_uInt16 index, sal_uInt16 paramIndex)
+RTParamMode MethodList::getMethodParamMode(sal_uInt16 index, sal_uInt16 paramIndex) const
 {
     RTParamMode aMode = RT_PARAM_INVALID;
     try {
@@ -1022,7 +1022,7 @@ RTParamMode MethodList::getMethodParamMode(sal_uInt16 index, sal_uInt16 paramInd
 extern "C" void __coverity_tainted_data_sanitize__(void *);
 #endif
 
-sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index)
+sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index) const
 {
     sal_uInt16 aCount = 0;
 
@@ -1041,7 +1041,7 @@ sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index)
     return aCount;
 }
 
-const sal_Char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex)
+const sal_Char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const
 {
     const sal_Char* aName = nullptr;
 
@@ -1065,7 +1065,7 @@ const sal_Char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excInd
     return aName;
 }
 
-const sal_Char* MethodList::getMethodReturnType(sal_uInt16 index)
+const sal_Char* MethodList::getMethodReturnType(sal_uInt16 index) const
 {
     const sal_Char* aName = nullptr;
 
@@ -1081,7 +1081,7 @@ const sal_Char* MethodList::getMethodReturnType(sal_uInt16 index)
     return aName;
 }
 
-RTMethodMode MethodList::getMethodMode(sal_uInt16 index)
+RTMethodMode MethodList::getMethodMode(sal_uInt16 index) const
 {
     RTMethodMode aMode = RTMethodMode::INVALID;
 
@@ -1097,7 +1097,7 @@ RTMethodMode MethodList::getMethodMode(sal_uInt16 index)
     return aMode;
 }
 
-const sal_Char* MethodList::getMethodDoku(sal_uInt16 index)
+const sal_Char* MethodList::getMethodDoku(sal_uInt16 index) const
 {
     const sal_Char* aDoku = nullptr;
 
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index f80c83f1cfeb..0c1dc67ba6fc 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -187,7 +187,7 @@ struct CPInfo
 
     CPInfo(CPInfoTag tag, struct CPInfo* prev);
 
-    sal_uInt32 getBlopSize();
+    sal_uInt32 getBlopSize() const;
 
     sal_uInt32 toBlop(sal_uInt8* buffer);
 };
@@ -204,7 +204,7 @@ CPInfo::CPInfo(CPInfoTag tag, struct CPInfo* prev)
     }
 }
 
-sal_uInt32 CPInfo::getBlopSize()
+sal_uInt32 CPInfo::getBlopSize() const
 {
     sal_uInt32 size = sizeof(sal_uInt32) /* size */ + sizeof(sal_uInt16) /* tag */;
 
@@ -518,7 +518,7 @@ public:
                  sal_uInt16        excCount,
                  const OString&    doku);
 
-    void setExcName(sal_uInt16 excIndex, const OString& name);
+    void setExcName(sal_uInt16 excIndex, const OString& name) const;
 
 protected:
 
@@ -550,7 +550,7 @@ void MethodEntry::setData(const OString&    name,
     reallocExcs(excCount);
 }
 
-void MethodEntry::setExcName(sal_uInt16 excIndex, const OString& name)
+void MethodEntry::setExcName(sal_uInt16 excIndex, const OString& name) const
 {
     if (excIndex < m_excCount)
     {
@@ -649,7 +649,7 @@ public:
 
     ~TypeWriter();
 
-    void setSuperType(sal_uInt16 index, OString const & name);
+    void setSuperType(sal_uInt16 index, OString const & name) const;
 
     void createBlop(); // throws std::bad_alloc
 };
@@ -708,7 +708,7 @@ TypeWriter::~TypeWriter()
         delete[] m_references;
 }
 
-void TypeWriter::setSuperType(sal_uInt16 index, OString const & name)
+void TypeWriter::setSuperType(sal_uInt16 index, OString const & name) const
 {
     m_superTypeNames[index] = name;
 }
diff --git a/sal/textenc/textenc.cxx b/sal/textenc/textenc.cxx
index d435c8f317e2..d78302121334 100644
--- a/sal/textenc/textenc.cxx
+++ b/sal/textenc/textenc.cxx
@@ -395,7 +395,7 @@ public:
         }
     }
 
-    ImplTextEncodingData const * get(rtl_TextEncoding encoding) {
+    ImplTextEncodingData const * get(rtl_TextEncoding encoding) const {
         return (*function_)(encoding);
     }
 
diff --git a/store/source/storbios.cxx b/store/source/storbios.cxx
index 12208b1c597a..bf343abd290e 100644
--- a/store/source/storbios.cxx
+++ b/store/source/storbios.cxx
@@ -688,7 +688,7 @@ void OStorePageBIOS::cleanup_Impl()
  * Low Level: Precond: initialized, exclusive access.
  */
 storeError OStorePageBIOS::read (
-    sal_uInt32 nAddr, void *pData, sal_uInt32 nSize)
+    sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) const
 {
     // Check precond.
     if (!m_xLockBytes.is())
@@ -703,7 +703,7 @@ storeError OStorePageBIOS::read (
  * Low Level: Precond: initialized, writeable, exclusive access.
  */
 storeError OStorePageBIOS::write (
-    sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize)
+    sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) const
 {
     // Check precond.
     if (!m_xLockBytes.is())
@@ -874,7 +874,7 @@ storeError OStorePageBIOS::loadObjectAt (OStorePageObject & rPage, sal_uInt32 nA
  * loadObjectAt_Impl.
  * Internal: Precond: initialized, readable, exclusive access.
  */
-storeError OStorePageBIOS::loadObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr)
+storeError OStorePageBIOS::loadObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) const
 {
     storeError eErrCode = m_xCache->lookupPageAt (rPage.get(), nAddr);
     if (eErrCode != store_E_NotExists)
@@ -920,7 +920,7 @@ storeError OStorePageBIOS::saveObjectAt (OStorePageObject & rPage, sal_uInt32 nA
  * saveObjectAt_Impl.
  * Internal: Precond: initialized, writeable, exclusive access.
  */
-storeError OStorePageBIOS::saveObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr)
+storeError OStorePageBIOS::saveObjectAt_Impl (OStorePageObject & rPage, sal_uInt32 nAddr) const
 {
     // Guard page (incl. set location).
     storeError eErrCode = rPage.guard (nAddr);
diff --git a/store/source/storbios.hxx b/store/source/storbios.hxx
index 997cfbc9471b..f223b4d0d258 100644
--- a/store/source/storbios.hxx
+++ b/store/source/storbios.hxx
@@ -65,12 +65,12 @@ public:
     /** read.
      */
     storeError read (
-        sal_uInt32 nAddr, void *pData, sal_uInt32 nSize);
+        sal_uInt32 nAddr, void *pData, sal_uInt32 nSize) const;
 
     /** write.
      */
     storeError write (
-        sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize);
+        sal_uInt32 nAddr, const void *pData, sal_uInt32 nSize) const;
 
     /** isWriteable.
      */
@@ -163,9 +163,9 @@ private:
     /** Page Maintenance.
      */
     storeError loadObjectAt_Impl (
-        OStorePageObject & rPage, sal_uInt32 nAddr);
+        OStorePageObject & rPage, sal_uInt32 nAddr) const;
     storeError saveObjectAt_Impl (
-        OStorePageObject & rPage, sal_uInt32 nAddr);
+        OStorePageObject & rPage, sal_uInt32 nAddr) const;
 
     OStorePageBIOS (const OStorePageBIOS&) = delete;
     OStorePageBIOS& operator= (const OStorePageBIOS&) = delete;
diff --git a/store/source/stordata.cxx b/store/source/stordata.cxx
index a2c992b983d6..1127674f8097 100644
--- a/store/source/stordata.cxx
+++ b/store/source/stordata.cxx
@@ -211,7 +211,7 @@ storeError OStoreIndirectionPageObject::verify (sal_uInt32 nAddr) const
 storeError OStoreIndirectionPageObject::read (
     sal_uInt16             nSingle,
     OStoreDataPageObject  &rData,
-    OStorePageBIOS        &rBIOS)
+    OStorePageBIOS        &rBIOS) const
 {
     PageHolderObject< page > xImpl (m_xPage);
     page const & rPage = (*xImpl);
@@ -237,7 +237,7 @@ storeError OStoreIndirectionPageObject::read (
     sal_uInt16             nDouble,
     sal_uInt16             nSingle,
     OStoreDataPageObject  &rData,
-    OStorePageBIOS        &rBIOS)
+    OStorePageBIOS        &rBIOS) const
 {
     PageHolderObject< page > xImpl (m_xPage);
     page const & rPage = (*xImpl);
@@ -270,7 +270,7 @@ storeError OStoreIndirectionPageObject::read (
     sal_uInt16             nDouble,
     sal_uInt16             nSingle,
     OStoreDataPageObject  &rData,
-    OStorePageBIOS        &rBIOS)
+    OStorePageBIOS        &rBIOS) const
 {
     PageHolderObject< page > xImpl (m_xPage);
     page const & rPage = (*xImpl);
@@ -723,7 +723,7 @@ OStoreDirectoryPageObject::scope (
 storeError OStoreDirectoryPageObject::read (
     sal_uInt32             nPage,
     OStoreDataPageObject  &rData,
-    OStorePageBIOS        &rBIOS)
+    OStorePageBIOS        &rBIOS) const
 {
     // Determine scope and link indices.
     page::DataBlock::LinkDescriptor aLink;
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index c8f1597f551a..5014971da3da 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -80,7 +80,7 @@ struct OStoreDataPageData : public store::PageData
 
     /** guard (external representation).
     */
-    void guard() { (void) this; /* loplugin:staticmethods */ }
+    void guard() const { (void) this; /* loplugin:staticmethods */ }
 
     /** verify (external representation).
     */
@@ -216,20 +216,20 @@ public:
     storeError read (
         sal_uInt16             nSingle,
         OStoreDataPageObject  &rData,
-        OStorePageBIOS        &rBIOS);
+        OStorePageBIOS        &rBIOS) const;
 
     storeError read (
         sal_uInt16             nDouble,
         sal_uInt16             nSingle,
         OStoreDataPageObject  &rData,
-        OStorePageBIOS        &rBIOS);
+        OStorePageBIOS        &rBIOS) const;
 
     storeError read (
         sal_uInt16             nTriple,
         sal_uInt16             nDouble,
         sal_uInt16             nSingle,
         OStoreDataPageObject  &rData,
-        OStorePageBIOS        &rBIOS);
+        OStorePageBIOS        &rBIOS) const;
 
     /** write (indirect data page).
     */
@@ -707,7 +707,7 @@ public:
     storeError read (
         sal_uInt32             nPage,
         OStoreDataPageObject  &rData,
-        OStorePageBIOS        &rBIOS);
+        OStorePageBIOS        &rBIOS) const;
 
     /** write (external data page).
     */
diff --git a/store/source/stortree.cxx b/store/source/stortree.cxx
index 30264e0917b6..624945914f75 100644
--- a/store/source/stortree.cxx
+++ b/store/source/stortree.cxx
@@ -301,7 +301,7 @@ storeError OStoreBTreeNodeObject::remove (
  * testInvariant.
  * Precond: root node page loaded.
  */
-void OStoreBTreeRootObject::testInvariant (char const * message)
+void OStoreBTreeRootObject::testInvariant (char const * message) const
 {
     OSL_PRECOND(m_xPage.get() != nullptr, "OStoreBTreeRootObject::testInvariant(): Null pointer");
     SAL_WARN_IF( (m_xPage->location() - m_xPage->size()) != 0, "store", message);
@@ -380,7 +380,7 @@ storeError OStoreBTreeRootObject::find_lookup (
     OStoreBTreeNodeObject & rNode,  // [out]
     sal_uInt16 &            rIndex, // [out]
     OStorePageKey const &   rKey,
-    OStorePageBIOS &        rBIOS)
+    OStorePageBIOS &        rBIOS) const
 {
     // Init node w/ root page.
     testInvariant("OStoreBTreeRootObject::find_lookup(): enter");
diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx
index 872ff0821432..f70aad057f9f 100644
--- a/store/source/stortree.hxx
+++ b/store/source/stortree.hxx
@@ -256,7 +256,7 @@ public:
         OStoreBTreeNodeObject & rNode,  // [out]
         sal_uInt16 &            rIndex, // [out]
         OStorePageKey const &   rKey,
-        OStorePageBIOS &        rBIOS);
+        OStorePageBIOS &        rBIOS) const;
 
     /** find_insert (possibly with split()).
      *  Precond: root node page loaded.
@@ -271,7 +271,7 @@ private:
     /** testInvariant.
      *  Precond: root node page loaded.
      */
-    void testInvariant (char const * message);
+    void testInvariant (char const * message) const;
 
     /** change (Root).
      *


More information about the Libreoffice-commits mailing list