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(
}
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)
{
switch (operation) {
......
......@@ -85,7 +85,7 @@ private:
void handleGroupProp(xmlreader::XmlReader & reader, GroupNode * group);
void handleUnknownGroupProp(
xmlreader::XmlReader const & reader, GroupNode * group,
xmlreader::XmlReader const & reader, GroupNode const * group,
OUString const & name, Type type, Operation operation,
bool finalized);
......
......@@ -39,14 +39,14 @@ public:
void savePackage();
/// @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 );
/// @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 );
void addFolderWithContent( css::uno::Reference< css::uno::XInterface >& xRootFolder,
void addFolderWithContent( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rDirURL );
css::uno::Reference< css::uno::XInterface >& getRootFolder();
......
......@@ -127,7 +127,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityEntry
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() )
{
......
......@@ -154,7 +154,7 @@ namespace utl
bool ClearNodeSet(const OUString& rNode);
// remove selected members of a set
bool ClearNodeElements(const OUString& rNode,
css::uno::Sequence< OUString >& rElements);
css::uno::Sequence< OUString > const & rElements);
// change or add members to a set
bool SetSetProperties(const OUString& rNode, const css::uno::Sequence< css::beans::PropertyValue >& rValues);
// remove, change or add members of a set
......
......@@ -58,7 +58,7 @@ public:
SAL_DLLPRIVATE static ConfigManager & getConfigManager();
SAL_DLLPRIVATE static css::uno::Reference< css::container::XHierarchicalNameAccess>
acquireTree(utl::ConfigItem & item);
acquireTree(utl::ConfigItem const & item);
SAL_DLLPRIVATE ConfigManager();
......
......@@ -53,7 +53,7 @@ namespace utl
/** revokes a termination listener
*/
UNOTOOLS_DLLPUBLIC void revokeTerminationListener( ITerminationListener* _pListener );
UNOTOOLS_DLLPUBLIC void revokeTerminationListener( ITerminationListener const * _pListener );
}
} // namespace utl
......
......@@ -73,7 +73,7 @@ namespace utl {
public:
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
void NotifyListeners( ConfigurationHints nHint );
......
......@@ -108,8 +108,8 @@ public: // construction and initialization
const OUString& getImplName() const { return m_aImplName; }
private: // implementation
bool initBaseInstallationData(rtl::Bootstrap& _rData);
bool initUserInstallationData(rtl::Bootstrap& _rData);
bool initBaseInstallationData(rtl::Bootstrap const & _rData);
bool initUserInstallationData(rtl::Bootstrap const & _rData);
};
namespace
......@@ -312,7 +312,7 @@ static PathStatus getDerivedPath(
OUString& _rURL,
OUString const& _aBaseURL, PathStatus _aBaseStatus,
OUString const& _sRelativeURL,
rtl::Bootstrap& _rData, OUString const& _sBootstrapParameter
rtl::Bootstrap const & _rData, OUString const& _sBootstrapParameter
)
{
OUString sDerivedURL;
......@@ -358,7 +358,7 @@ static inline PathStatus getDerivedPath(
OUString& _rURL,
Bootstrap::Impl::PathData const& _aBaseData,
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);
......@@ -394,14 +394,14 @@ static inline Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rR
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);
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);
......@@ -648,7 +648,7 @@ Bootstrap::Status Bootstrap::checkBootstrapStatus(OUString& _rDiagnosticMessage,
// 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 csBaseInstallDefault( BOOTSTRAP_DEFAULT_BASEINSTALL );
......@@ -662,7 +662,7 @@ bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData)
return bResult;
}
bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData)
bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap const & _rData)
{
OUString const csUserInstallItem( BOOTSTRAP_ITEM_USERINSTALLATION );
......
......@@ -698,7 +698,7 @@ bool ConfigItem::ClearNodeSet(const OUString& rNode)
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);
bool bRet = false;
......
......@@ -145,7 +145,7 @@ utl::ConfigManager & utl::ConfigManager::getConfigManager() {
}
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);
args[0] <<= css::beans::NamedValue(
"nodepath",
......
......@@ -160,7 +160,7 @@ namespace utl
public:
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 );
}
......@@ -171,7 +171,7 @@ namespace utl
public:
UpdateToConfig( const OConfigurationNode& _rRootNode, ::osl::Mutex& _rMutex ) : SubNodeAccess( _rRootNode, _rMutex ) { }
void operator() ( NodeValueAccessor& _rAccessor )
void operator() ( NodeValueAccessor const & _rAccessor )
{
Any aNewValue;
lcl_copyData( aNewValue, _rAccessor, m_rMutex );
......
......@@ -50,7 +50,7 @@ void ConfigurationBroadcaster::AddListener( utl::ConfigurationListener* pListene
mpList->push_back( pListener );
}
void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener* pListener )
void ConfigurationBroadcaster::RemoveListener( utl::ConfigurationListener const * pListener )
{
if ( mpList ) {
for ( IMPL_ConfigurationListenerList::iterator it = mpList->begin();
......
......@@ -100,7 +100,7 @@ Reference< XInterface >& ZipPackageHelper::getRootFolder()
return mxRootFolder;
}
Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xRootFolder,
Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface > const & xRootFolder,
const OUString& rName )
{
if ( rName == ".." || rName == "." )
......@@ -123,7 +123,7 @@ Reference< XInterface > ZipPackageHelper::addFolder( Reference< XInterface >& xR
return xFolder;
}
void ZipPackageHelper::addFolderWithContent( Reference< XInterface >& xRootFolder, const OUString& rDirURL )
void ZipPackageHelper::addFolderWithContent( Reference< XInterface > const & xRootFolder, const OUString& rDirURL )
{
if (rDirURL.isEmpty())
return;
......@@ -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 )
{
OUString aFileURL( rSourceFile );
......
......@@ -104,7 +104,7 @@ namespace utl
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() )
return;
......
......@@ -182,7 +182,7 @@ namespace utl
OObserverImpl::ensureObservation();
}
void DesktopTerminationObserver::revokeTerminationListener( ITerminationListener* _pListener )
void DesktopTerminationObserver::revokeTerminationListener( ITerminationListener const * _pListener )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
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