Kaydet (Commit) f71a3550 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:constparams in configmgr,unotools

Change-Id: Ief3df5487eb20b1f6d0e8aed89cfef4464d23a88
Reviewed-on: https://gerrit.libreoffice.org/40048Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 49bc18c0
...@@ -621,7 +621,7 @@ void XcuParser::handleGroupProp( ...@@ -621,7 +621,7 @@ void XcuParser::handleGroupProp(
} }
void XcuParser::handleUnknownGroupProp( void XcuParser::handleUnknownGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group, xmlreader::XmlReader const & reader, GroupNode const * group,
OUString const & name, Type type, Operation operation, bool finalized) OUString const & name, Type type, Operation operation, bool finalized)
{ {
switch (operation) { switch (operation) {
......
...@@ -85,7 +85,7 @@ private: ...@@ -85,7 +85,7 @@ private:
void handleGroupProp(xmlreader::XmlReader & reader, GroupNode * group); void handleGroupProp(xmlreader::XmlReader & reader, GroupNode * group);
void handleUnknownGroupProp( void handleUnknownGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group, xmlreader::XmlReader const & reader, GroupNode const * group,
OUString const & name, Type type, Operation operation, OUString const & name, Type type, Operation operation,
bool finalized); bool finalized);
......
...@@ -39,14 +39,14 @@ public: ...@@ -39,14 +39,14 @@ public:
void savePackage(); void savePackage();
/// @throws css::uno::Exception /// @throws css::uno::Exception
void addFile( css::uno::Reference< css::uno::XInterface >& xRootFolder, void addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rSourceFile ); const OUString& rSourceFile );
/// @throws css::uno::Exception /// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface > addFolder( css::uno::Reference< css::uno::XInterface >& xRootFolder, css::uno::Reference< css::uno::XInterface > addFolder( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rName ); const OUString& rName );
void addFolderWithContent( css::uno::Reference< css::uno::XInterface >& xRootFolder, void addFolderWithContent( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rDirURL ); const OUString& rDirURL );
css::uno::Reference< css::uno::XInterface >& getRootFolder(); css::uno::Reference< css::uno::XInterface >& getRootFolder();
......
...@@ -127,7 +127,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry ...@@ -127,7 +127,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry
return aValue; return aValue;
} }
void setValue( const Index rIdx, css::uno::Any& rValue ) void setValue( const Index rIdx, css::uno::Any const & rValue )
{ {
if ( static_cast<size_t>(rIdx) < getElementCount() ) if ( static_cast<size_t>(rIdx) < getElementCount() )
{ {
......
...@@ -154,7 +154,7 @@ namespace utl ...@@ -154,7 +154,7 @@ namespace utl
bool ClearNodeSet(const OUString& rNode); bool ClearNodeSet(const OUString& rNode);
// remove selected members of a set // remove selected members of a set
bool ClearNodeElements(const OUString& rNode, bool ClearNodeElements(const OUString& rNode,
css::uno::Sequence< OUString >& rElements); css::uno::Sequence< OUString > const & rElements);
// change or add members to a set // change or add members to a set
bool SetSetProperties(const OUString& rNode, const css::uno::Sequence< css::beans::PropertyValue >& rValues); bool SetSetProperties(const OUString& rNode, const css::uno::Sequence< css::beans::PropertyValue >& rValues);
// remove, change or add members of a set // remove, change or add members of a set
......
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
SAL_DLLPRIVATE static ConfigManager & getConfigManager(); SAL_DLLPRIVATE static ConfigManager & getConfigManager();
SAL_DLLPRIVATE static css::uno::Reference< css::container::XHierarchicalNameAccess> SAL_DLLPRIVATE static css::uno::Reference< css::container::XHierarchicalNameAccess>
acquireTree(utl::ConfigItem & item); acquireTree(utl::ConfigItem const & item);
SAL_DLLPRIVATE ConfigManager(); SAL_DLLPRIVATE ConfigManager();
......
...@@ -53,7 +53,7 @@ namespace utl ...@@ -53,7 +53,7 @@ namespace utl
/** revokes a termination listener /** revokes a termination listener
*/ */
UNOTOOLS_DLLPUBLIC void revokeTerminationListener( ITerminationListener* _pListener ); UNOTOOLS_DLLPUBLIC void revokeTerminationListener( ITerminationListener const * _pListener );
} }
} // namespace utl } // namespace utl
......
...@@ -73,7 +73,7 @@ namespace utl { ...@@ -73,7 +73,7 @@ namespace utl {
public: public:
void AddListener( utl::ConfigurationListener* pListener ); void AddListener( utl::ConfigurationListener* pListener );
void RemoveListener( utl::ConfigurationListener* pListener ); void RemoveListener( utl::ConfigurationListener const * pListener );
// notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster // notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster
void NotifyListeners( ConfigurationHints nHint ); void NotifyListeners( ConfigurationHints nHint );
......
...@@ -108,8 +108,8 @@ public: // construction and initialization ...@@ -108,8 +108,8 @@ public: // construction and initialization
const OUString& getImplName() const { return m_aImplName; } const OUString& getImplName() const { return m_aImplName; }
private: // implementation private: // implementation
bool initBaseInstallationData(rtl::Bootstrap& _rData); bool initBaseInstallationData(rtl::Bootstrap const & _rData);
bool initUserInstallationData(rtl::Bootstrap& _rData); bool initUserInstallationData(rtl::Bootstrap const & _rData);
}; };
namespace namespace
...@@ -312,7 +312,7 @@ static PathStatus getDerivedPath( ...@@ -312,7 +312,7 @@ static PathStatus getDerivedPath(
OUString& _rURL, OUString& _rURL,
OUString const& _aBaseURL, PathStatus _aBaseStatus, OUString const& _aBaseURL, PathStatus _aBaseStatus,
OUString const& _sRelativeURL, OUString const& _sRelativeURL,
rtl::Bootstrap& _rData, OUString const& _sBootstrapParameter rtl::Bootstrap const & _rData, OUString const& _sBootstrapParameter
) )
{ {
OUString sDerivedURL; OUString sDerivedURL;
...@@ -358,7 +358,7 @@ static inline PathStatus getDerivedPath( ...@@ -358,7 +358,7 @@ static inline PathStatus getDerivedPath(
OUString& _rURL, OUString& _rURL,
Bootstrap::Impl::PathData const& _aBaseData, Bootstrap::Impl::PathData const& _aBaseData,
OUString const& _sRelativeURL, OUString const& _sRelativeURL,
rtl::Bootstrap& _rData, OUString const& _sBootstrapParameter rtl::Bootstrap const & _rData, OUString const& _sBootstrapParameter
) )
{ {
return getDerivedPath(_rURL,_aBaseData.path,_aBaseData.status,_sRelativeURL,_rData,_sBootstrapParameter); return getDerivedPath(_rURL,_aBaseData.path,_aBaseData.status,_sRelativeURL,_rData,_sBootstrapParameter);
...@@ -394,14 +394,14 @@ static inline Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rR ...@@ -394,14 +394,14 @@ static inline Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rR
return _rResult.status = checkStatusAndNormalizeURL(_rResult.path); return _rResult.status = checkStatusAndNormalizeURL(_rResult.path);
} }
static Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rBootstrapFile) static Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap const & _rData, Bootstrap::Impl::PathData & _rBootstrapFile)
{ {
_rData.getIniName(_rBootstrapFile.path); _rData.getIniName(_rBootstrapFile.path);
return updateStatus(_rBootstrapFile); return updateStatus(_rBootstrapFile);
} }
static Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rVersionFile) static Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap const & _rData, Bootstrap::Impl::PathData & _rVersionFile)
{ {
_rData.getFrom(BOOTSTRAP_ITEM_VERSIONFILE, _rVersionFile.path); _rData.getFrom(BOOTSTRAP_ITEM_VERSIONFILE, _rVersionFile.path);
...@@ -648,7 +648,7 @@ Bootstrap::Status Bootstrap::checkBootstrapStatus(OUString& _rDiagnosticMessage, ...@@ -648,7 +648,7 @@ Bootstrap::Status Bootstrap::checkBootstrapStatus(OUString& _rDiagnosticMessage,
// class Bootstrap::Impl // class Bootstrap::Impl
bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData) bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap const & _rData)
{ {
OUString const csBaseInstallItem( BOOTSTRAP_ITEM_BASEINSTALLATION ); OUString const csBaseInstallItem( BOOTSTRAP_ITEM_BASEINSTALLATION );
OUString const csBaseInstallDefault( BOOTSTRAP_DEFAULT_BASEINSTALL ); OUString const csBaseInstallDefault( BOOTSTRAP_DEFAULT_BASEINSTALL );
...@@ -662,7 +662,7 @@ bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData) ...@@ -662,7 +662,7 @@ bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData)
return bResult; return bResult;
} }
bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData) bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap const & _rData)
{ {
OUString const csUserInstallItem( BOOTSTRAP_ITEM_USERINSTALLATION ); OUString const csUserInstallItem( BOOTSTRAP_ITEM_USERINSTALLATION );
......
...@@ -698,7 +698,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode) ...@@ -698,7 +698,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode)
return bRet; return bRet;
} }
bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString >& rElements) bool ConfigItem::ClearNodeElements(const OUString& rNode, Sequence< OUString > const & rElements)
{ {
ValueCounter_Impl aCounter(m_nInValueChange); ValueCounter_Impl aCounter(m_nInValueChange);
bool bRet = false; bool bRet = false;
......
...@@ -145,7 +145,7 @@ utl::ConfigManager & utl::ConfigManager::getConfigManager() { ...@@ -145,7 +145,7 @@ utl::ConfigManager & utl::ConfigManager::getConfigManager() {
} }
css::uno::Reference< css::container::XHierarchicalNameAccess > css::uno::Reference< css::container::XHierarchicalNameAccess >
utl::ConfigManager::acquireTree(utl::ConfigItem & item) { utl::ConfigManager::acquireTree(utl::ConfigItem const & item) {
css::uno::Sequence< css::uno::Any > args(1); css::uno::Sequence< css::uno::Any > args(1);
args[0] <<= css::beans::NamedValue( args[0] <<= css::beans::NamedValue(
"nodepath", "nodepath",
......
...@@ -160,7 +160,7 @@ namespace utl ...@@ -160,7 +160,7 @@ namespace utl
public: public:
UpdateFromConfig( const OConfigurationNode& _rRootNode, ::osl::Mutex& _rMutex ) : SubNodeAccess( _rRootNode, _rMutex ) { } UpdateFromConfig( const OConfigurationNode& _rRootNode, ::osl::Mutex& _rMutex ) : SubNodeAccess( _rRootNode, _rMutex ) { }
void operator() ( NodeValueAccessor& _rAccessor ) void operator() ( NodeValueAccessor const & _rAccessor )
{ {
::utl::lcl_copyData( _rAccessor, m_rRootNode.getNodeValue( _rAccessor.getPath( ) ), m_rMutex ); ::utl::lcl_copyData( _rAccessor, m_rRootNode.getNodeValue( _rAccessor.getPath( ) ), m_rMutex );
} }
...@@ -171,7 +171,7 @@ namespace utl ...@@ -171,7 +171,7 @@ namespace utl
public: public:
UpdateToConfig( const OConfigurationNode& _rRootNode, ::osl::Mutex& _rMutex ) : SubNodeAccess( _rRootNode, _rMutex ) { } UpdateToConfig( const OConfigurationNode& _rRootNode, ::osl::Mutex& _rMutex ) : SubNodeAccess( _rRootNode, _rMutex ) { }
void operator() ( NodeValueAccessor& _rAccessor ) void operator() ( NodeValueAccessor const & _rAccessor )
{ {
Any aNewValue; Any aNewValue;
lcl_copyData( aNewValue, _rAccessor, m_rMutex ); lcl_copyData( aNewValue, _rAccessor, m_rMutex );
......
...@@ -50,7 +50,7 @@ void ConfigurationBroadcaster::AddListener( utl::ConfigurationListener* pListene ...@@ -50,7 +50,7 @@ void ConfigurationBroadcaster::AddListener( utl::ConfigurationListener* pListene
mpList->push_back( pListener ); mpList->push_back( pListener );
} }
void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pListener ) void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener const * pListener )
{ {
if ( mpList ) { if ( mpList ) {
for ( IMPL_ConfigurationListenerList::iterator it = mpList->begin(); for ( IMPL_ConfigurationListenerList::iterator it = mpList->begin();
......
...@@ -100,7 +100,7 @@ Reference< XInterface >& ZipPackageHelper::getRootFolder() ...@@ -100,7 +100,7 @@ Reference< XInterface >& ZipPackageHelper::getRootFolder()
return mxRootFolder; return mxRootFolder;
} }
Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xRootFolder, Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface > const & xRootFolder,
const OUString& rName ) const OUString& rName )
{ {
if ( rName == ".." || rName == "." ) if ( rName == ".." || rName == "." )
...@@ -123,7 +123,7 @@ Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xR ...@@ -123,7 +123,7 @@ Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xR
return xFolder; return xFolder;
} }
void ZipPackageHelper::addFolderWithContent( Reference< XInterface >& xRootFolder, const OUString& rDirURL ) void ZipPackageHelper::addFolderWithContent( Reference< XInterface > const & xRootFolder, const OUString& rDirURL )
{ {
if (rDirURL.isEmpty()) if (rDirURL.isEmpty())
return; return;
...@@ -159,7 +159,7 @@ void ZipPackageHelper::addFolderWithContent( Reference< XInterface >& xRootFolde ...@@ -159,7 +159,7 @@ void ZipPackageHelper::addFolderWithContent( Reference< XInterface >& xRootFolde
} }
} }
void ZipPackageHelper::addFile( css::uno::Reference< css::uno::XInterface >& xRootFolder, void ZipPackageHelper::addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rSourceFile ) const OUString& rSourceFile )
{ {
OUString aFileURL( rSourceFile ); OUString aFileURL( rSourceFile );
......
...@@ -104,7 +104,7 @@ namespace utl ...@@ -104,7 +104,7 @@ namespace utl
i_data.xCloseable->addCloseListener( i_data.pListener.get() ); i_data.xCloseable->addCloseListener( i_data.pListener.get() );
} }
void lcl_deinit( CloseVeto_Data& i_data ) void lcl_deinit( CloseVeto_Data const & i_data )
{ {
if ( !i_data.xCloseable.is() ) if ( !i_data.xCloseable.is() )
return; return;
......
...@@ -182,7 +182,7 @@ namespace utl ...@@ -182,7 +182,7 @@ namespace utl
OObserverImpl::ensureObservation(); OObserverImpl::ensureObservation();
} }
void DesktopTerminationObserver::revokeTerminationListener( ITerminationListener* _pListener ) void DesktopTerminationObserver::revokeTerminationListener( ITerminationListener const * _pListener )
{ {
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
Listeners& rListeners = getListenerAdminData().aListeners; Listeners& rListeners = getListenerAdminData().aListeners;
......
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