[Libreoffice-commits] core.git: configmgr/source helpcompiler/inc helpcompiler/source idl/inc idl/source include/helpcompiler mysqlc/source opencl/inc xmlscript/source

Noel Grandin noel.grandin at collabora.co.uk
Mon Oct 30 12:07:19 UTC 2017


 configmgr/source/components.cxx                 |    2 +-
 configmgr/source/components.hxx                 |    2 +-
 helpcompiler/inc/BasCodeTagger.hxx              |    2 +-
 helpcompiler/source/BasCodeTagger.cxx           |    2 +-
 helpcompiler/source/HelpIndexer.cxx             |    2 +-
 idl/inc/database.hxx                            |    2 +-
 idl/inc/slot.hxx                                |    4 ++--
 idl/inc/types.hxx                               |    2 +-
 idl/source/objects/slot.cxx                     |    4 ++--
 idl/source/objects/types.cxx                    |    2 +-
 idl/source/prj/database.cxx                     |    3 ++-
 include/helpcompiler/HelpIndexer.hxx            |    8 ++++----
 mysqlc/source/mysqlc_connection.hxx             |    2 +-
 opencl/inc/opencl_device_selection.h            |    2 +-
 xmlscript/source/xmldlg_imexp/imp_share.hxx     |    8 ++++----
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx |    2 +-
 16 files changed, 25 insertions(+), 24 deletions(-)

New commits:
commit 9ee60319c675087486907707c8a2b18b5c9dc9fc
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Oct 30 11:45:58 2017 +0200

    loplugin:constmethod in idl,helpcompiler
    
    Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef
    Reviewed-on: https://gerrit.libreoffice.org/44050
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index ddbebe103e60..5354763b0c95 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -878,7 +878,7 @@ void Components::parseModificationLayer(int layer, OUString const & url) {
     }
 }
 
-int Components::getExtensionLayer(bool shared) {
+int Components::getExtensionLayer(bool shared) const {
     int layer = shared ? sharedExtensionLayer_ : userExtensionLayer_;
     if (layer == -1) {
         throw css::uno::RuntimeException(
diff --git a/configmgr/source/components.hxx b/configmgr/source/components.hxx
index fc10060e0845..5006c864acdc 100644
--- a/configmgr/source/components.hxx
+++ b/configmgr/source/components.hxx
@@ -139,7 +139,7 @@ private:
 
     void parseModificationLayer(int layer, OUString const & url);
 
-    int getExtensionLayer(bool shared);
+    int getExtensionLayer(bool shared) const;
 
     typedef std::set< RootAccess * > WeakRootSet;
 
diff --git a/helpcompiler/inc/BasCodeTagger.hxx b/helpcompiler/inc/BasCodeTagger.hxx
index ae180fa7451c..d8dbffa4cd49 100644
--- a/helpcompiler/inc/BasCodeTagger.hxx
+++ b/helpcompiler/inc/BasCodeTagger.hxx
@@ -56,7 +56,7 @@ class L10N_DLLPUBLIC LibXmlTreeWalker
     LibXmlTreeWalker( xmlDocPtr doc );
     void nextNode();
     xmlNodePtr currentNode() { return m_pCurrentNode;}
-    bool end();
+    bool end() const;
     void ignoreCurrNodesChildren();
 };
 
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx
index b472ac6dc2b6..20a4f1bb8061 100644
--- a/helpcompiler/source/BasCodeTagger.cxx
+++ b/helpcompiler/source/BasCodeTagger.cxx
@@ -43,7 +43,7 @@ void LibXmlTreeWalker::ignoreCurrNodesChildren()
           m_Queue.pop_back();
 }
 
-bool LibXmlTreeWalker::end()
+bool LibXmlTreeWalker::end() const
 {
     return m_pCurrentNode->next == nullptr && m_Queue.empty();
 }
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 5e016fb0ff6e..51966f4c71dc 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -110,7 +110,7 @@ bool HelpIndexer::scanForFiles(OUString const & path) {
     return true;
 }
 
-void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) {
+void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) const {
     // Add the help path as an indexed, untokenized field.
 
     OUString path = "#HLP#" + d_module + "/" + fileName;
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 2d48204b5f57..bc4ef2a5e27e 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -112,7 +112,7 @@ public:
     void                    SetPath(const OUString &s) { aPath = s; }
     SvRefMemberList<SvMetaObject *>& GetStack() { return aContextStack; }
 
-    void                    Write(const OString& rText);
+    void                    Write(const OString& rText) const;
     void                    WriteError( SvTokenStream & rInStm );
     void                    SetError( const OString& rError, SvToken const & rTok );
     void                    SetAndWriteError( SvTokenStream & rInStm, const OString& rError );
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index d9ac77a591f5..1aa6ebca6913 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -120,7 +120,7 @@ public:
     virtual void        Insert( SvSlotElementList& ) override;
     void                WriteSlotStubs( const OString& rShellName,
                                     ByteStringList & rList,
-                                    SvStream & rOutStm );
+                                    SvStream & rOutStm ) const;
     sal_uInt16          WriteSlotMap( const OString& rShellName,
                                     sal_uInt16 nCount,
                                     SvSlotElementList&,
@@ -128,7 +128,7 @@ public:
                                     SvIdlDataBase & rBase,
                                     SvStream & rOutStm );
     sal_uInt16          WriteSlotParamArray( SvIdlDataBase & rBase,
-                                            SvStream & rOutStm );
+                                            SvStream & rOutStm ) const;
 };
 
 #endif // INCLUDED_IDL_INC_SLOT_HXX
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index c4ceed384fdf..0d7de1c59a63 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -43,7 +43,7 @@ public:
 
     virtual bool        Test( SvTokenStream & rInStm ) override;
     virtual bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override;
-    sal_uLong           MakeSfx( OStringBuffer& rAtrrArray );
+    sal_uLong           MakeSfx( OStringBuffer& rAtrrArray ) const;
     virtual void        Insert( SvSlotElementList& );
 };
 
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index ff32774ae4c1..2db9e130fd76 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -355,7 +355,7 @@ static OString MakeSlotName( SvStringHashEntry const * pEntry )
 
 void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
                                 ByteStringList & rList,
-                                SvStream & rOutStm )
+                                SvStream & rOutStm ) const
 {
     if ( !GetExport() && !GetHidden() )
         return;
@@ -595,7 +595,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
     rOutStm.WriteCharPtr( " )," ) << endl;
 }
 
-sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm )
+sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) const
 {
     if ( !GetExport() && !GetHidden() )
         return 0;
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 3dbe7ecd9825..d79efe81fc43 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -96,7 +96,7 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
     return bOk;
 }
 
-sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray )
+sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
 {
     SvMetaType * pType = GetType();
     DBG_ASSERT( pType, "no type for attribute" );
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 7dd941ae91cd..46c7b576f5bd 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -366,7 +366,8 @@ SvMetaClass * SvIdlDataBase::FindKnownClass( const OString& aName )
     }
     return nullptr;
 }
-void SvIdlDataBase::Write(const OString& rText)
+
+void SvIdlDataBase::Write(const OString& rText) const
 {
     if( nVerbosity != 0 )
         fprintf( stdout, "%s", rText.getStr() );
diff --git a/include/helpcompiler/HelpIndexer.hxx b/include/helpcompiler/HelpIndexer.hxx
index 869fe535ab7f..832780f6b1d2 100644
--- a/include/helpcompiler/HelpIndexer.hxx
+++ b/include/helpcompiler/HelpIndexer.hxx
@@ -59,7 +59,7 @@ class L10N_DLLPUBLIC HelpIndexer {
     /**
      * Get the error string (empty if no error occurred).
      */
-        OUString const & getErrorMessage() { return d_error;}
+    OUString const & getErrorMessage() const { return d_error;}
 
     private:
 
@@ -71,17 +71,17 @@ class L10N_DLLPUBLIC HelpIndexer {
     /**
      * Scan for files in the given directory.
      */
-        bool scanForFiles(OUString const &path);
+    bool scanForFiles(OUString const &path);
 
     /**
      * Fill the Document with information on the given help file.
      */
-        void helpDocument(OUString const & fileName, lucene::document::Document *doc);
+    void helpDocument(OUString const & fileName, lucene::document::Document *doc) const;
 
     /**
      * Create a reader for the given file, and create an "empty" reader in case the file doesn't exist.
      */
-        static lucene::util::Reader *helpFileReader(OUString const & path);
+    static lucene::util::Reader *helpFileReader(OUString const & path);
 };
 
 #endif
diff --git a/mysqlc/source/mysqlc_connection.hxx b/mysqlc/source/mysqlc_connection.hxx
index 4ef6bb044a45..b3fd5a78bfe9 100644
--- a/mysqlc/source/mysqlc_connection.hxx
+++ b/mysqlc/source/mysqlc_connection.hxx
@@ -119,7 +119,7 @@ namespace connectivity
             OConnection(MysqlCDriver& _rDriver, sql::Driver * cppDriver);
             virtual ~OConnection();
 
-            rtl_TextEncoding getConnectionEncoding() { return m_settings.encoding; }
+            rtl_TextEncoding getConnectionEncoding() const { return m_settings.encoding; }
 
 
             // OComponentHelper
diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h
index 761a79647faa..54caf183f2aa 100644
--- a/opencl/inc/opencl_device_selection.h
+++ b/opencl/inc/opencl_device_selection.h
@@ -395,7 +395,7 @@ public:
         mpCurrent = mpCurrent->next;
     }
 
-    bool isValid()
+    bool isValid() const
     {
         return mpCurrent != nullptr;
     }
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 7b60e7c5aefa..8f41b29172c9 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -131,7 +131,7 @@ public:
     sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID;
 
     bool isEventElement(
-        sal_Int32 nUid, OUString const & rLocalName )
+        sal_Int32 nUid, OUString const & rLocalName ) const
     {
         return ((XMLNS_SCRIPT_UID == nUid && (rLocalName == "event" || rLocalName == "listener-event" )) ||
                 (XMLNS_DIALOGS_UID == nUid && rLocalName == "event" ));
@@ -144,7 +144,7 @@ public:
         OUString const & rStyleId ) const;
 
     css::uno::Reference< css::uno::XComponentContext >
-    const & getComponentContext()  { return _xContext; }
+    const & getComponentContext() const { return _xContext; }
     css::uno::Reference< css::util::XNumberFormatsSupplier >
     const & getNumberFormatsSupplier();
 
@@ -179,7 +179,7 @@ public:
 
     virtual ~DialogImport() override;
 
-    const css::uno::Reference< css::frame::XModel >& getDocOwner() { return _xDoc; }
+    const css::uno::Reference< css::frame::XModel >& getDocOwner() const { return _xDoc; }
 
     // XRoot
     virtual void SAL_CALL startDocument(
@@ -269,7 +269,7 @@ class StyleElement
     short _inited, _hasValue;
 
     void setFontProperties(
-        css::uno::Reference< css::beans::XPropertySet > const & xProps );
+        css::uno::Reference< css::beans::XPropertySet > const & xProps ) const;
 
 public:
     virtual css::uno::Reference< css::xml::input::XElement >
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 3fbba4859984..e1592b407c9c 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -274,7 +274,7 @@ void StyleElement::importVisualEffectStyle(
 }
 
 void StyleElement::setFontProperties(
-    Reference< beans::XPropertySet > const & xProps )
+    Reference< beans::XPropertySet > const & xProps ) const
 {
     xProps->setPropertyValue("FontDescriptor", makeAny( _descr ) );
     xProps->setPropertyValue("FontEmphasisMark", makeAny( _fontEmphasisMark ) );


More information about the Libreoffice-commits mailing list