[Libreoffice-commits] core.git: 3 commits - framework/inc framework/source

Stephan Bergmann sbergman at redhat.com
Thu Apr 7 19:52:26 UTC 2016


 framework/inc/classes/converter.hxx                   |    2 
 framework/inc/classes/filtercachedata.hxx             |   14 +--
 framework/inc/classes/protocolhandlercache.hxx        |    2 
 framework/inc/stdtypes.h                              |   18 ----
 framework/source/accelerators/presethandler.cxx       |    4 -
 framework/source/accelerators/storageholder.cxx       |   20 ++---
 framework/source/fwi/classes/converter.cxx            |    4 -
 framework/source/fwi/classes/protocolhandlercache.cxx |    2 
 framework/source/inc/accelerators/keymapping.hxx      |    4 -
 framework/source/inc/accelerators/presethandler.hxx   |    4 -
 framework/source/inc/accelerators/storageholder.hxx   |    2 
 framework/source/jobs/jobexecutor.cxx                 |    6 -
 framework/source/services/pathsettings.cxx            |   70 +++++++++---------
 13 files changed, 66 insertions(+), 86 deletions(-)

New commits:
commit a0c96b0aa845866ce412427a55a25941712ab3cf
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 7 21:50:52 2016 +0200

    Remove unused Int32HashCode
    
    Change-Id: I0f43db050155b231dda8f78ed8f8144609c7125b

diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index 0f1f28f..9cc1807 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -38,14 +38,6 @@ namespace framework{
     Own hash functions used for stl-structures ... e.g. hash tables/maps ...
 */
 
-struct Int32HashCode
-{
-    size_t operator()( const ::sal_Int32& nValue ) const
-    {
-        return (size_t)nValue;
-    }
-};
-
 struct KeyEventHashCode
 {
     size_t operator()( const css::awt::KeyEvent& aEvent ) const
commit 031d314eae926244246565b401d86396eb5b73d6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 7 21:49:06 2016 +0200

    Just use the hash<sal_Int16> default
    
    Change-Id: Ice2c0cbf382997c2d07cc8cd4a7b085a153fffef

diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index dd0afe9..0f1f28f 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -38,14 +38,6 @@ namespace framework{
     Own hash functions used for stl-structures ... e.g. hash tables/maps ...
 */
 
-struct ShortHashCode
-{
-    size_t operator()( const ::sal_Int16& nShort ) const
-    {
-        return (size_t)nShort;
-    }
-};
-
 struct Int32HashCode
 {
     size_t operator()( const ::sal_Int32& nValue ) const
diff --git a/framework/source/inc/accelerators/keymapping.hxx b/framework/source/inc/accelerators/keymapping.hxx
index 4edc268..d86917e 100644
--- a/framework/source/inc/accelerators/keymapping.hxx
+++ b/framework/source/inc/accelerators/keymapping.hxx
@@ -55,9 +55,7 @@ class KeyMapping
         typedef std::unordered_map<OUString, sal_Int16, OUStringHash> Identifier2CodeHash;
 
         /** @short  hash structure to map key codes to identifier. */
-        typedef std::unordered_map< sal_Int16                    ,
-                                    OUString              ,
-                                    ShortHashCode > Code2IdentifierHash;
+        typedef std::unordered_map<sal_Int16, OUString> Code2IdentifierHash;
 
     // member
 
commit 4be81de0d623571d81c167f326dfb913fdb08df6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 7 21:44:02 2016 +0200

    Resolve OUStringList typedef
    
    Change-Id: Ifb5dc5128b5619abb83eea427c7fb1115fd825f3

diff --git a/framework/inc/classes/converter.hxx b/framework/inc/classes/converter.hxx
index 3409403..cf8adf1 100644
--- a/framework/inc/classes/converter.hxx
+++ b/framework/inc/classes/converter.hxx
@@ -39,7 +39,7 @@ class FWI_DLLPUBLIC Converter
         static css::uno::Sequence< css::beans::NamedValue >    convert_seqPropVal2seqNamedVal  ( const css::uno::Sequence< css::beans::PropertyValue >& lSource );
 
         // Seq<String> => Vector<String>
-        static OUStringList                                    convert_seqOUString2OUStringList( const css::uno::Sequence< OUString >&           lSource );
+        static std::vector<OUString> convert_seqOUString2OUStringList( const css::uno::Sequence< OUString >&           lSource );
 
         static OUString                                 convert_DateTime2ISO8601        ( const DateTime&                                        aSource );
 };
diff --git a/framework/inc/classes/filtercachedata.hxx b/framework/inc/classes/filtercachedata.hxx
index e16b73a..5f7f6a3 100644
--- a/framework/inc/classes/filtercachedata.hxx
+++ b/framework/inc/classes/filtercachedata.hxx
@@ -113,8 +113,8 @@ struct FileType
         OUString            sMediaType;
         OUString            sClipboardFormat;
         sal_Int32           nDocumentIconID;
-        OUStringList        lURLPattern;
-        OUStringList        lExtensions;
+        std::vector<OUString> lURLPattern;
+        std::vector<OUString> lExtensions;
 };
 
 // These struct describe a filter which is registered for one type.
@@ -179,7 +179,7 @@ struct Filter
         OUString     sFilterService;
         OUString     sUIComponent;
         sal_Int32           nFlags;
-        OUStringList        lUserData;
+        std::vector<OUString> lUserData;
         sal_Int32           nFileFormatVersion;
         OUString     sTemplateName;
 };
@@ -220,7 +220,7 @@ struct Detector
     public:
 
         OUString     sName;
-        OUStringList        lTypes;
+        std::vector<OUString> lTypes;
 };
 
 // Programmer can register his own services for loading documents in a frame.
@@ -262,7 +262,7 @@ struct Loader
 
         OUString sName;
         OUStringHashMap lUINames;
-        OUStringList    lTypes;
+        std::vector<OUString> lTypes;
 };
 
 // Programmer can register his own services to handle a FileType and intercept dispatches.
@@ -300,7 +300,7 @@ struct ContentHandler
     public:
 
         OUString     sName;
-        OUStringList        lTypes;
+        std::vector<OUString> lTypes;
 };
 
 // We need different hash maps for different tables of our configuration management.
@@ -319,7 +319,7 @@ class SetNodeHash : public std::unordered_map< OUString                    ,
 // The preferred hash maps file extensions to preferred types to find these ones faster.
 
 class PerformanceHash   :   public  std::unordered_map< OUString,
-                                                        OUStringList,
+                                                        std::vector<OUString>,
                                                         OUStringHash >
 {
 };
diff --git a/framework/inc/classes/protocolhandlercache.hxx b/framework/inc/classes/protocolhandlercache.hxx
index 930ce17..69e9c92 100644
--- a/framework/inc/classes/protocolhandlercache.hxx
+++ b/framework/inc/classes/protocolhandlercache.hxx
@@ -52,7 +52,7 @@ struct FWI_DLLPUBLIC ProtocolHandler
         /// the uno implementation name of this handler
         OUString m_sUNOName;
         /// list of URL pattern which defines the protocols which this handler is registered for
-        OUStringList m_lProtocols;
+        std::vector<OUString> m_lProtocols;
 };
 
 /**
diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index c58c2b7..dd0afe9 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -79,8 +79,6 @@ struct KeyEventEqualsFunc
     }
 };
 
-typedef ::std::vector< OUString > OUStringList;
-
 /**
     Basic OUString hash.
     Key and values are OUStrings.
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index ceb134e..1845677 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 a6c3925..cf7f55c 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 5028c34..56070bc 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 20b26f4..dc7c3b4 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 c096e68..3451ef7 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 a725e7d..60691c4 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 f53c025..9ab4825 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 149987d..befd73f1 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                 )


More information about the Libreoffice-commits mailing list