summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-07 21:44:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-07 21:44:02 +0200
commit4be81de0d623571d81c167f326dfb913fdb08df6 (patch)
treed84424c73163aa6901a733939190d5af4e613d41 /framework/source
parent02041335d89cfb23b59218c9201ff16baf423b81 (diff)
Resolve OUStringList typedef
Change-Id: Ifb5dc5128b5619abb83eea427c7fb1115fd825f3
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/accelerators/presethandler.cxx4
-rw-r--r--framework/source/accelerators/storageholder.cxx20
-rw-r--r--framework/source/fwi/classes/converter.cxx4
-rw-r--r--framework/source/fwi/classes/protocolhandlercache.cxx2
-rw-r--r--framework/source/inc/accelerators/presethandler.hxx4
-rw-r--r--framework/source/inc/accelerators/storageholder.hxx2
-rw-r--r--framework/source/jobs/jobexecutor.cxx6
-rw-r--r--framework/source/services/pathsettings.cxx70
8 files changed, 56 insertions, 56 deletions
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index ceb134e26d26..18456771a45c 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -462,8 +462,8 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType
const OUString* pNames;
sal_Int32 c;
sal_Int32 i;
- OUStringList lPresets;
- OUStringList lTargets;
+ std::vector<OUString> lPresets;
+ std::vector<OUString> lTargets;
// read preset names of share layer
xAccess.set(xShare, css::uno::UNO_QUERY);
diff --git a/framework/source/accelerators/storageholder.cxx b/framework/source/accelerators/storageholder.cxx
index a6c392507813..cf7f55ce5958 100644
--- a/framework/source/accelerators/storageholder.cxx
+++ b/framework/source/accelerators/storageholder.cxx
@@ -87,7 +87,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
sal_Int32 nOpenMode)
{
OUString sNormedPath = StorageHolder::impl_st_normPath(sPath);
- OUStringList lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
+ std::vector<OUString> lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
// SAFE -> ----------------------------------
osl::ResettableMutexGuard aReadLock(m_mutex);
@@ -97,7 +97,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
css::uno::Reference< css::embed::XStorage > xChild;
OUString sRelPath;
- OUStringList::const_iterator pIt;
+ std::vector<OUString>::const_iterator pIt;
for ( pIt = lFolders.begin();
pIt != lFolders.end();
@@ -167,11 +167,11 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::openPath(const OUStri
StorageHolder::TStorageList StorageHolder::getAllPathStorages(const OUString& sPath)
{
OUString sNormedPath = StorageHolder::impl_st_normPath(sPath);
- OUStringList lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
+ std::vector<OUString> lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
StorageHolder::TStorageList lStoragesOfPath;
OUString sRelPath;
- OUStringList::const_iterator pIt;
+ std::vector<OUString>::const_iterator pIt;
osl::MutexGuard g(m_mutex);
@@ -229,14 +229,14 @@ void StorageHolder::commitPath(const OUString& sPath)
void StorageHolder::closePath(const OUString& rPath)
{
OUString sNormedPath = StorageHolder::impl_st_normPath(rPath);
- OUStringList lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
+ std::vector<OUString> lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
/* convert list of paths in the following way:
[0] = "path_1" => "path_1
[1] = "path_2" => "path_1/path_2"
[2] = "path_3" => "path_1/path_2/path_3"
*/
- OUStringList::iterator pIt1;
+ std::vector<OUString>::iterator pIt1;
OUString sParentPath;
for ( pIt1 = lFolders.begin();
pIt1 != lFolders.end();
@@ -249,7 +249,7 @@ void StorageHolder::closePath(const OUString& rPath)
osl::MutexGuard g(m_mutex);
- OUStringList::reverse_iterator pIt2;
+ std::vector<OUString>::reverse_iterator pIt2;
for ( pIt2 = lFolders.rbegin();
pIt2 != lFolders.rend();
++pIt2 )
@@ -355,7 +355,7 @@ css::uno::Reference< css::embed::XStorage > StorageHolder::getParentStorage(cons
{
// normed path = "a/b/c/" ... we search for "a/b/"
OUString sNormedPath = StorageHolder::impl_st_normPath(sChildPath);
- OUStringList lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
+ std::vector<OUString> lFolders = StorageHolder::impl_st_parsePath(sNormedPath);
sal_Int32 c = lFolders.size();
// a) "" => - => no parent
@@ -498,9 +498,9 @@ OUString StorageHolder::impl_st_normPath(const OUString& sPath)
return sNormedPath;
}
-OUStringList StorageHolder::impl_st_parsePath(const OUString& sPath)
+std::vector<OUString> StorageHolder::impl_st_parsePath(const OUString& sPath)
{
- OUStringList lToken;
+ std::vector<OUString> lToken;
sal_Int32 i = 0;
while (true)
{
diff --git a/framework/source/fwi/classes/converter.cxx b/framework/source/fwi/classes/converter.cxx
index 5028c341c824..56070bcbcefd 100644
--- a/framework/source/fwi/classes/converter.cxx
+++ b/framework/source/fwi/classes/converter.cxx
@@ -40,9 +40,9 @@ css::uno::Sequence< css::beans::NamedValue > Converter::convert_seqPropVal2seqNa
/**
* converts a sequence of unicode strings into a vector of such items
*/
-OUStringList Converter::convert_seqOUString2OUStringList( const css::uno::Sequence< OUString >& lSource )
+std::vector<OUString> Converter::convert_seqOUString2OUStringList( const css::uno::Sequence< OUString >& lSource )
{
- OUStringList lDestination;
+ std::vector<OUString> lDestination;
sal_Int32 nCount = lSource.getLength();
for (sal_Int32 nItem=0; nItem<nCount; ++nItem )
diff --git a/framework/source/fwi/classes/protocolhandlercache.cxx b/framework/source/fwi/classes/protocolhandlercache.cxx
index 20b26f4d9b99..dc7c3b4966e0 100644
--- a/framework/source/fwi/classes/protocolhandlercache.cxx
+++ b/framework/source/fwi/classes/protocolhandlercache.cxx
@@ -240,7 +240,7 @@ void HandlerCFGAccess::read( HandlerHash** ppHandler ,
aHandler.m_lProtocols = Converter::convert_seqOUString2OUStringList(lTemp);
// register his pattern into the performance search hash
- for (OUStringList::iterator pItem =aHandler.m_lProtocols.begin();
+ for (std::vector<OUString>::iterator pItem =aHandler.m_lProtocols.begin();
pItem!=aHandler.m_lProtocols.end();
++pItem )
{
diff --git a/framework/source/inc/accelerators/presethandler.hxx b/framework/source/inc/accelerators/presethandler.hxx
index c096e68fff00..3451ef7cc16f 100644
--- a/framework/source/inc/accelerators/presethandler.hxx
+++ b/framework/source/inc/accelerators/presethandler.hxx
@@ -126,11 +126,11 @@ class PresetHandler
/** @short knows the names of all presets inside the current
working storage of the share layer. */
- OUStringList m_lPresets;
+ std::vector<OUString> m_lPresets;
/** @short knows the names of all targets inside the current
working storage of the user layer. */
- OUStringList m_lTargets;
+ std::vector<OUString> m_lTargets;
/** @short its the current office locale and will be used
to handle localized presets.
diff --git a/framework/source/inc/accelerators/storageholder.hxx b/framework/source/inc/accelerators/storageholder.hxx
index a725e7dc6de8..60691c4b7dac 100644
--- a/framework/source/inc/accelerators/storageholder.hxx
+++ b/framework/source/inc/accelerators/storageholder.hxx
@@ -183,7 +183,7 @@ class StorageHolder
/** @short TODO
*/
- static OUStringList impl_st_parsePath(const OUString& sPath);
+ static std::vector<OUString> impl_st_parsePath(const OUString& sPath);
};
} // namespace framework
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index f53c02531a86..9ab48255f65d 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -71,7 +71,7 @@ private:
css::uno::Reference< css::uno::XComponentContext > m_xContext;
/** cached list of all registered event names of cfg for call optimization. */
- OUStringList m_lEvents;
+ std::vector<OUString> m_lEvents;
/** we listen at the configuration for changes at the event list. */
ConfigAccess m_aConfig;
@@ -343,7 +343,7 @@ void SAL_CALL JobExecutor::elementInserted( const css::container::ContainerEvent
OUString sEvent = ::utl::extractFirstFromConfigurationPath(sValue);
if (!sEvent.isEmpty())
{
- OUStringList::iterator pEvent = std::find(m_lEvents.begin(), m_lEvents.end(), sEvent);
+ std::vector<OUString>::iterator pEvent = std::find(m_lEvents.begin(), m_lEvents.end(), sEvent);
if (pEvent == m_lEvents.end())
m_lEvents.push_back(sEvent);
}
@@ -358,7 +358,7 @@ void SAL_CALL JobExecutor::elementRemoved ( const css::container::ContainerEvent
OUString sEvent = ::utl::extractFirstFromConfigurationPath(sValue);
if (!sEvent.isEmpty())
{
- OUStringList::iterator pEvent = std::find(m_lEvents.begin(), m_lEvents.end(), sEvent);
+ std::vector<OUString>::iterator pEvent = std::find(m_lEvents.begin(), m_lEvents.end(), sEvent);
if (pEvent != m_lEvents.end())
m_lEvents.erase(pEvent);
}
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 149987d96f43..befd73f17dbc 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -121,10 +121,10 @@ class PathSettings : private cppu::BaseMutex
OUString sPathName;
/// contains all paths, which are used internally - but are not visible for the user.
- OUStringList lInternalPaths;
+ std::vector<OUString> lInternalPaths;
/// contains all paths configured by the user
- OUStringList lUserPaths;
+ std::vector<OUString> lUserPaths;
/// this special path is used to generate feature depending content there
OUString sWritePath;
@@ -365,7 +365,7 @@ private:
/** read a path info using the old cfg schema.
This is needed for "migration on demand" reasons only.
Can be removed for next major release .-) */
- OUStringList impl_readOldFormat(const OUString& sPath);
+ std::vector<OUString> impl_readOldFormat(const OUString& sPath);
/** read a path info using the new cfg schema. */
PathSettings::PathInfo impl_readNewFormat(const OUString& sPath);
@@ -375,7 +375,7 @@ private:
Can be removed with new major release ... */
void impl_mergeOldUserPaths( PathSettings::PathInfo& rPath,
- const OUStringList& lOld );
+ const std::vector<OUString>& lOld );
/** reload one path directly from the new configuration schema (because
it was updated by any external code) */
@@ -386,7 +386,7 @@ private:
or check if the given path value uses paths, which can be replaced with predefined
placeholder variables ...
*/
- void impl_subst( OUStringList& lVals ,
+ void impl_subst(std::vector<OUString>& lVals ,
const css::uno::Reference< css::util::XStringSubstitution >& xSubst ,
bool bReSubst);
@@ -395,14 +395,14 @@ private:
/** converts our new string list schema to the old ";" separated schema ... */
OUString impl_convertPath2OldStyle(const PathSettings::PathInfo& rPath ) const;
- OUStringList impl_convertOldStyle2Path(const OUString& sOldStylePath) const;
+ std::vector<OUString> impl_convertOldStyle2Path(const OUString& sOldStylePath) const;
/** remove still known paths from the given lList argument.
So real user defined paths can be extracted from the list of
fix internal paths !
*/
void impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
- OUStringList& lList);
+ std::vector<OUString>& lList);
/** rebuild the member m_lPropDesc using the path list m_lPaths. */
void impl_rebuildPropertyDescriptor();
@@ -421,7 +421,7 @@ private:
/** it checks, if the given path value seems to be a valid URL or system path. */
bool impl_isValidPath(const OUString& sPath) const;
- bool impl_isValidPath(const OUStringList& lPath) const;
+ bool impl_isValidPath(const std::vector<OUString>& lPath) const;
void impl_storePath(const PathSettings::PathInfo& aPath);
@@ -581,10 +581,10 @@ void PathSettings::impl_readAll()
}
// NO substitution here ! It's done outside ...
-OUStringList PathSettings::impl_readOldFormat(const OUString& sPath)
+std::vector<OUString> PathSettings::impl_readOldFormat(const OUString& sPath)
{
css::uno::Reference< css::container::XNameAccess > xCfg( fa_getCfgOld() );
- OUStringList aPathVal;
+ std::vector<OUString> aPathVal;
if( xCfg->hasByName(sPath) )
{
@@ -599,7 +599,7 @@ OUStringList PathSettings::impl_readOldFormat(const OUString& sPath)
}
else if (aVal >>= lStringListVal)
{
- aPathVal = comphelper::sequenceToContainer<OUStringList>(lStringListVal);
+ aPathVal = comphelper::sequenceToContainer<std::vector<OUString>>(lStringListVal);
}
}
@@ -623,19 +623,19 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath)
// read internal path list
css::uno::Reference< css::container::XNameAccess > xIPath;
xPath->getByName(CFGPROP_INTERNALPATHS) >>= xIPath;
- aPathVal.lInternalPaths = comphelper::sequenceToContainer<OUStringList>(xIPath->getElementNames());
+ aPathVal.lInternalPaths = comphelper::sequenceToContainer<std::vector<OUString>>(xIPath->getElementNames());
// read user defined path list
css::uno::Sequence<OUString> vTmpUserPathsSeq;
xPath->getByName(CFGPROP_USERPATHS) >>= vTmpUserPathsSeq;
- aPathVal.lUserPaths = comphelper::sequenceToContainer<OUStringList>(vTmpUserPathsSeq);
+ aPathVal.lUserPaths = comphelper::sequenceToContainer<std::vector<OUString>>(vTmpUserPathsSeq);
// read the writeable path
xPath->getByName(CFGPROP_WRITEPATH) >>= aPathVal.sWritePath;
// avoid duplicates, by removing the writeable path from
// the user defined path list if it happens to be there too
- OUStringList::iterator aI = std::find(aPathVal.lUserPaths.begin(), aPathVal.lUserPaths.end(), aPathVal.sWritePath);
+ std::vector<OUString>::iterator aI = std::find(aPathVal.lUserPaths.begin(), aPathVal.lUserPaths.end(), aPathVal.sWritePath);
if (aI != aPathVal.lUserPaths.end())
aPathVal.lUserPaths.erase(aI);
@@ -705,9 +705,9 @@ void PathSettings::impl_storePath(const PathSettings::PathInfo& aPath)
}
void PathSettings::impl_mergeOldUserPaths( PathSettings::PathInfo& rPath,
- const OUStringList& lOld )
+ const std::vector<OUString>& lOld )
{
- OUStringList::const_iterator pIt;
+ std::vector<OUString>::const_iterator pIt;
for ( pIt = lOld.begin();
pIt != lOld.end();
++pIt )
@@ -764,7 +764,7 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const OUString& sPath
{
// migration of old user defined values on demand
// can be disabled for a new major
- OUStringList lOldVals = impl_readOldFormat(sPath);
+ std::vector<OUString> lOldVals = impl_readOldFormat(sPath);
// replace all might existing variables with real values
// Do it before these old paths will be compared against the
// new path configuration. Otherwise some striungs uses different variables ... but substitution
@@ -958,11 +958,11 @@ void PathSettings::impl_notifyPropListener( PathSettings::EChangeOp /*eOp*/
}
}
-void PathSettings::impl_subst( OUStringList& lVals ,
+void PathSettings::impl_subst(std::vector<OUString>& lVals ,
const css::uno::Reference< css::util::XStringSubstitution >& xSubst ,
bool bReSubst)
{
- OUStringList::iterator pIt;
+ std::vector<OUString>::iterator pIt;
for ( pIt = lVals.begin();
pIt != lVals.end();
@@ -994,8 +994,8 @@ void PathSettings::impl_subst(PathSettings::PathInfo& aPath ,
OUString PathSettings::impl_convertPath2OldStyle(const PathSettings::PathInfo& rPath) const
{
- OUStringList::const_iterator pIt;
- OUStringList lTemp;
+ std::vector<OUString>::const_iterator pIt;
+ std::vector<OUString> lTemp;
lTemp.reserve(rPath.lInternalPaths.size() + rPath.lUserPaths.size() + 1);
for ( pIt = rPath.lInternalPaths.begin();
@@ -1028,9 +1028,9 @@ OUString PathSettings::impl_convertPath2OldStyle(const PathSettings::PathInfo& r
return sPathVal.makeStringAndClear();
}
-OUStringList PathSettings::impl_convertOldStyle2Path(const OUString& sOldStylePath) const
+std::vector<OUString> PathSettings::impl_convertOldStyle2Path(const OUString& sOldStylePath) const
{
- OUStringList lList;
+ std::vector<OUString> lList;
sal_Int32 nToken = 0;
do
{
@@ -1044,9 +1044,9 @@ OUStringList PathSettings::impl_convertOldStyle2Path(const OUString& sOldStylePa
}
void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
- OUStringList& lList)
+ std::vector<OUString>& lList)
{
- OUStringList::iterator pIt;
+ std::vector<OUString>::iterator pIt;
// Erase items in the internal path list from lList.
// Also erase items in the internal path list from the user path list.
@@ -1055,7 +1055,7 @@ void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
++pIt )
{
const OUString& rItem = *pIt;
- OUStringList::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
+ std::vector<OUString>::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
if (pItem != lList.end())
lList.erase(pItem);
pItem = std::find(rPath.lUserPaths.begin(), rPath.lUserPaths.end(), rItem);
@@ -1068,7 +1068,7 @@ void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
while ( pIt != rPath.lUserPaths.end() )
{
const OUString& rItem = *pIt;
- OUStringList::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
+ std::vector<OUString>::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
if ( pItem == lList.end() )
{
rPath.lUserPaths.erase(pIt);
@@ -1086,13 +1086,13 @@ void PathSettings::impl_purgeKnownPaths(PathSettings::PathInfo& rPath,
++pIt )
{
const OUString& rItem = *pIt;
- OUStringList::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
+ std::vector<OUString>::iterator pItem = std::find(lList.begin(), lList.end(), rItem);
if (pItem != lList.end())
lList.erase(pItem);
}
// Erase the write path from lList
- OUStringList::iterator pItem = std::find(lList.begin(), lList.end(), rPath.sWritePath);
+ std::vector<OUString>::iterator pItem = std::find(lList.begin(), lList.end(), rPath.sWritePath);
if (pItem != lList.end())
lList.erase(pItem);
}
@@ -1211,7 +1211,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
{
OUString sVal;
aVal >>= sVal;
- OUStringList lList = impl_convertOldStyle2Path(sVal);
+ std::vector<OUString> lList = impl_convertOldStyle2Path(sVal);
impl_subst(lList, fa_getSubstitution(), false);
impl_purgeKnownPaths(aChangePath, lList);
if (! impl_isValidPath(lList))
@@ -1227,7 +1227,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
}
else
{
- OUStringList::const_iterator pIt;
+ std::vector<OUString>::const_iterator pIt;
for ( pIt = lList.begin();
pIt != lList.end();
++pIt )
@@ -1252,7 +1252,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
css::uno::Sequence<OUString> lTmpList;
aVal >>= lTmpList;
- OUStringList lList = comphelper::sequenceToContainer<OUStringList>(lTmpList);
+ std::vector<OUString> lList = comphelper::sequenceToContainer<std::vector<OUString>>(lTmpList);
if (! impl_isValidPath(lList))
throw css::lang::IllegalArgumentException();
aChangePath.lInternalPaths = lList;
@@ -1273,7 +1273,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
css::uno::Sequence<OUString> lTmpList;
aVal >>= lTmpList;
- OUStringList lList = comphelper::sequenceToContainer<OUStringList>(lTmpList);
+ std::vector<OUString> lList = comphelper::sequenceToContainer<std::vector<OUString>>(lTmpList);
if (! impl_isValidPath(lList))
throw css::lang::IllegalArgumentException();
aChangePath.lUserPaths = lList;
@@ -1302,9 +1302,9 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
pOrgPath->takeOver(aChangePath);
}
-bool PathSettings::impl_isValidPath(const OUStringList& lPath) const
+bool PathSettings::impl_isValidPath(const std::vector<OUString>& lPath) const
{
- OUStringList::const_iterator pIt;
+ std::vector<OUString>::const_iterator pIt;
for ( pIt = lPath.begin();
pIt != lPath.end();
++pIt )