loplugin:constmethod in idl,helpcompiler
Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef Reviewed-on: https://gerrit.libreoffice.org/44050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
4eec79bb37
commit
9ee60319c6
@ -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_;
|
int layer = shared ? sharedExtensionLayer_ : userExtensionLayer_;
|
||||||
if (layer == -1) {
|
if (layer == -1) {
|
||||||
throw css::uno::RuntimeException(
|
throw css::uno::RuntimeException(
|
||||||
|
@ -139,7 +139,7 @@ private:
|
|||||||
|
|
||||||
void parseModificationLayer(int layer, OUString const & url);
|
void parseModificationLayer(int layer, OUString const & url);
|
||||||
|
|
||||||
int getExtensionLayer(bool shared);
|
int getExtensionLayer(bool shared) const;
|
||||||
|
|
||||||
typedef std::set< RootAccess * > WeakRootSet;
|
typedef std::set< RootAccess * > WeakRootSet;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class L10N_DLLPUBLIC LibXmlTreeWalker
|
|||||||
LibXmlTreeWalker( xmlDocPtr doc );
|
LibXmlTreeWalker( xmlDocPtr doc );
|
||||||
void nextNode();
|
void nextNode();
|
||||||
xmlNodePtr currentNode() { return m_pCurrentNode;}
|
xmlNodePtr currentNode() { return m_pCurrentNode;}
|
||||||
bool end();
|
bool end() const;
|
||||||
void ignoreCurrNodesChildren();
|
void ignoreCurrNodesChildren();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ void LibXmlTreeWalker::ignoreCurrNodesChildren()
|
|||||||
m_Queue.pop_back();
|
m_Queue.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LibXmlTreeWalker::end()
|
bool LibXmlTreeWalker::end() const
|
||||||
{
|
{
|
||||||
return m_pCurrentNode->next == nullptr && m_Queue.empty();
|
return m_pCurrentNode->next == nullptr && m_Queue.empty();
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ bool HelpIndexer::scanForFiles(OUString const & path) {
|
|||||||
return true;
|
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.
|
// Add the help path as an indexed, untokenized field.
|
||||||
|
|
||||||
OUString path = "#HLP#" + d_module + "/" + fileName;
|
OUString path = "#HLP#" + d_module + "/" + fileName;
|
||||||
|
@ -112,7 +112,7 @@ public:
|
|||||||
void SetPath(const OUString &s) { aPath = s; }
|
void SetPath(const OUString &s) { aPath = s; }
|
||||||
SvRefMemberList<SvMetaObject *>& GetStack() { return aContextStack; }
|
SvRefMemberList<SvMetaObject *>& GetStack() { return aContextStack; }
|
||||||
|
|
||||||
void Write(const OString& rText);
|
void Write(const OString& rText) const;
|
||||||
void WriteError( SvTokenStream & rInStm );
|
void WriteError( SvTokenStream & rInStm );
|
||||||
void SetError( const OString& rError, SvToken const & rTok );
|
void SetError( const OString& rError, SvToken const & rTok );
|
||||||
void SetAndWriteError( SvTokenStream & rInStm, const OString& rError );
|
void SetAndWriteError( SvTokenStream & rInStm, const OString& rError );
|
||||||
|
@ -120,7 +120,7 @@ public:
|
|||||||
virtual void Insert( SvSlotElementList& ) override;
|
virtual void Insert( SvSlotElementList& ) override;
|
||||||
void WriteSlotStubs( const OString& rShellName,
|
void WriteSlotStubs( const OString& rShellName,
|
||||||
ByteStringList & rList,
|
ByteStringList & rList,
|
||||||
SvStream & rOutStm );
|
SvStream & rOutStm ) const;
|
||||||
sal_uInt16 WriteSlotMap( const OString& rShellName,
|
sal_uInt16 WriteSlotMap( const OString& rShellName,
|
||||||
sal_uInt16 nCount,
|
sal_uInt16 nCount,
|
||||||
SvSlotElementList&,
|
SvSlotElementList&,
|
||||||
@ -128,7 +128,7 @@ public:
|
|||||||
SvIdlDataBase & rBase,
|
SvIdlDataBase & rBase,
|
||||||
SvStream & rOutStm );
|
SvStream & rOutStm );
|
||||||
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
|
sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase,
|
||||||
SvStream & rOutStm );
|
SvStream & rOutStm ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDED_IDL_INC_SLOT_HXX
|
#endif // INCLUDED_IDL_INC_SLOT_HXX
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
virtual bool Test( SvTokenStream & rInStm ) override;
|
virtual bool Test( SvTokenStream & rInStm ) override;
|
||||||
virtual bool ReadSvIdl( SvIdlDataBase &, 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& );
|
virtual void Insert( SvSlotElementList& );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -355,7 +355,7 @@ static OString MakeSlotName( SvStringHashEntry const * pEntry )
|
|||||||
|
|
||||||
void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
|
void SvMetaSlot::WriteSlotStubs( const OString& rShellName,
|
||||||
ByteStringList & rList,
|
ByteStringList & rList,
|
||||||
SvStream & rOutStm )
|
SvStream & rOutStm ) const
|
||||||
{
|
{
|
||||||
if ( !GetExport() && !GetHidden() )
|
if ( !GetExport() && !GetHidden() )
|
||||||
return;
|
return;
|
||||||
@ -595,7 +595,7 @@ void SvMetaSlot::WriteSlot( const OString& rShellName, sal_uInt16 nCount,
|
|||||||
rOutStm.WriteCharPtr( " )," ) << endl;
|
rOutStm.WriteCharPtr( " )," ) << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm )
|
sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rOutStm ) const
|
||||||
{
|
{
|
||||||
if ( !GetExport() && !GetHidden() )
|
if ( !GetExport() && !GetHidden() )
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -96,7 +96,7 @@ bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase,
|
|||||||
return bOk;
|
return bOk;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray )
|
sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) const
|
||||||
{
|
{
|
||||||
SvMetaType * pType = GetType();
|
SvMetaType * pType = GetType();
|
||||||
DBG_ASSERT( pType, "no type for attribute" );
|
DBG_ASSERT( pType, "no type for attribute" );
|
||||||
|
@ -366,7 +366,8 @@ SvMetaClass * SvIdlDataBase::FindKnownClass( const OString& aName )
|
|||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
void SvIdlDataBase::Write(const OString& rText)
|
|
||||||
|
void SvIdlDataBase::Write(const OString& rText) const
|
||||||
{
|
{
|
||||||
if( nVerbosity != 0 )
|
if( nVerbosity != 0 )
|
||||||
fprintf( stdout, "%s", rText.getStr() );
|
fprintf( stdout, "%s", rText.getStr() );
|
||||||
|
@ -59,7 +59,7 @@ class L10N_DLLPUBLIC HelpIndexer {
|
|||||||
/**
|
/**
|
||||||
* Get the error string (empty if no error occurred).
|
* Get the error string (empty if no error occurred).
|
||||||
*/
|
*/
|
||||||
OUString const & getErrorMessage() { return d_error;}
|
OUString const & getErrorMessage() const { return d_error;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -71,17 +71,17 @@ class L10N_DLLPUBLIC HelpIndexer {
|
|||||||
/**
|
/**
|
||||||
* Scan for files in the given directory.
|
* 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.
|
* 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.
|
* 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
|
#endif
|
||||||
|
@ -119,7 +119,7 @@ namespace connectivity
|
|||||||
OConnection(MysqlCDriver& _rDriver, sql::Driver * cppDriver);
|
OConnection(MysqlCDriver& _rDriver, sql::Driver * cppDriver);
|
||||||
virtual ~OConnection();
|
virtual ~OConnection();
|
||||||
|
|
||||||
rtl_TextEncoding getConnectionEncoding() { return m_settings.encoding; }
|
rtl_TextEncoding getConnectionEncoding() const { return m_settings.encoding; }
|
||||||
|
|
||||||
|
|
||||||
// OComponentHelper
|
// OComponentHelper
|
||||||
|
@ -395,7 +395,7 @@ public:
|
|||||||
mpCurrent = mpCurrent->next;
|
mpCurrent = mpCurrent->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isValid()
|
bool isValid() const
|
||||||
{
|
{
|
||||||
return mpCurrent != nullptr;
|
return mpCurrent != nullptr;
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ public:
|
|||||||
sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID;
|
sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID;
|
||||||
|
|
||||||
bool isEventElement(
|
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" )) ||
|
return ((XMLNS_SCRIPT_UID == nUid && (rLocalName == "event" || rLocalName == "listener-event" )) ||
|
||||||
(XMLNS_DIALOGS_UID == nUid && rLocalName == "event" ));
|
(XMLNS_DIALOGS_UID == nUid && rLocalName == "event" ));
|
||||||
@ -144,7 +144,7 @@ public:
|
|||||||
OUString const & rStyleId ) const;
|
OUString const & rStyleId ) const;
|
||||||
|
|
||||||
css::uno::Reference< css::uno::XComponentContext >
|
css::uno::Reference< css::uno::XComponentContext >
|
||||||
const & getComponentContext() { return _xContext; }
|
const & getComponentContext() const { return _xContext; }
|
||||||
css::uno::Reference< css::util::XNumberFormatsSupplier >
|
css::uno::Reference< css::util::XNumberFormatsSupplier >
|
||||||
const & getNumberFormatsSupplier();
|
const & getNumberFormatsSupplier();
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ public:
|
|||||||
|
|
||||||
virtual ~DialogImport() override;
|
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
|
// XRoot
|
||||||
virtual void SAL_CALL startDocument(
|
virtual void SAL_CALL startDocument(
|
||||||
@ -269,7 +269,7 @@ class StyleElement
|
|||||||
short _inited, _hasValue;
|
short _inited, _hasValue;
|
||||||
|
|
||||||
void setFontProperties(
|
void setFontProperties(
|
||||||
css::uno::Reference< css::beans::XPropertySet > const & xProps );
|
css::uno::Reference< css::beans::XPropertySet > const & xProps ) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual css::uno::Reference< css::xml::input::XElement >
|
virtual css::uno::Reference< css::xml::input::XElement >
|
||||||
|
@ -274,7 +274,7 @@ void StyleElement::importVisualEffectStyle(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void StyleElement::setFontProperties(
|
void StyleElement::setFontProperties(
|
||||||
Reference< beans::XPropertySet > const & xProps )
|
Reference< beans::XPropertySet > const & xProps ) const
|
||||||
{
|
{
|
||||||
xProps->setPropertyValue("FontDescriptor", makeAny( _descr ) );
|
xProps->setPropertyValue("FontDescriptor", makeAny( _descr ) );
|
||||||
xProps->setPropertyValue("FontEmphasisMark", makeAny( _fontEmphasisMark ) );
|
xProps->setPropertyValue("FontEmphasisMark", makeAny( _fontEmphasisMark ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user