diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2018-06-20 22:40:45 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-23 13:13:14 +0200 |
commit | 6441c2f2e20bc424c6a4cd1c2d704710e4d80346 (patch) | |
tree | 83859a71b3f28a6305030e369c88a7f22b0918da /shell | |
parent | 849d5d9903e54c92682227dfad545664e4bbda53 (diff) |
tdf#96099 Remove trivial std::vector typedefs in sd, sfx2, shell
Change-Id: Ib3708c9650f273de4a2f549d2ce9f2465bd37d6c
Reviewed-on: https://gerrit.libreoffice.org/56206
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/inc/types.hxx | 2 | ||||
-rw-r--r-- | shell/source/tools/lngconvex/lngconvex.cxx | 12 | ||||
-rw-r--r-- | shell/source/unix/sysshell/recently_used_file_handler.cxx | 16 | ||||
-rw-r--r-- | shell/source/win32/ooofilereader/keywordstag.cxx | 4 | ||||
-rw-r--r-- | shell/source/win32/ooofilereader/keywordstag.hxx | 2 | ||||
-rw-r--r-- | shell/source/win32/simplemail/senddoc.cxx | 7 |
6 files changed, 18 insertions, 25 deletions
diff --git a/shell/inc/types.hxx b/shell/inc/types.hxx index bfc0cd94324a..6834bc60963d 100644 --- a/shell/inc/types.hxx +++ b/shell/inc/types.hxx @@ -25,8 +25,6 @@ #include <utility> #include <vector> -typedef std::vector<std::wstring> StringList_t; - //+------------------------------------------------------------------------- // Declare: XmlTagAttributes_t, xml tag attribute struct // XmlTag_t, xml tag including content and attributes. diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 9146f6e46be5..802cafb6a08b 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -146,8 +146,6 @@ private: std::ios::iostate m_OldIos; }; -typedef std::vector<std::string> string_container_t; - class iso_lang_identifier { public: @@ -371,7 +369,7 @@ void read_ulf_file(const std::string& FileName, Substitutor& Substitutor) void read_file( const std::string& fname, - string_container_t& string_container) + std::vector<std::string>& string_container) { std::ifstream file(fname.c_str()); StreamExceptionsEnabler sexc(file); @@ -459,7 +457,7 @@ void start_language_section( replace the all placeholder and append the result to the output file */ void inflate_rc_template_to_file( - std::ostream& os, const string_container_t& rctmpl, Substitutor& substitutor) + std::ostream& os, const std::vector<std::string>& rctmpl, Substitutor& substitutor) { StreamExceptionsEnabler sexc(os); @@ -472,8 +470,8 @@ void inflate_rc_template_to_file( { substitutor.set_language(iso_lang_identifier(iter->first)); - string_container_t::const_iterator rct_iter = rctmpl.begin(); - string_container_t::const_iterator rct_iter_end = rctmpl.end(); + auto rct_iter = rctmpl.cbegin(); + auto rct_iter_end = rctmpl.cend(); if (!rctmpl.empty()) start_language_section(oi, iso_lang_identifier(iter->first)); @@ -535,7 +533,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) Substitutor substitutor; read_ulf_file(ULF_FILE(cmdline), substitutor); - string_container_t rc_tmpl; + std::vector<std::string> rc_tmpl; read_file(RC_TEMPLATE(cmdline), rc_tmpl); std::ofstream rc_file(RC_FILE(cmdline)); diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx index ced51eda9787..49c200eb47b6 100644 --- a/shell/source/unix/sysshell/recently_used_file_handler.cxx +++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx @@ -39,8 +39,6 @@ #include <time.h> namespace /* private */ { - typedef std::vector<string_t> string_container_t; - #define TAG_RECENT_FILES "RecentFiles" #define TAG_RECENT_ITEM "RecentItem" #define TAG_URI "URI" @@ -60,7 +58,7 @@ namespace /* private */ { recently_used_item( const string_t& uri, const string_t& mime_type, - const string_container_t& groups) : + const std::vector<string_t>& groups) : uri_(uri), mime_type_(mime_type), is_private_(false), @@ -100,10 +98,10 @@ namespace /* private */ { bool has_group(const string_t& name) const { - string_container_t::const_iterator iter_end = groups_.end(); + auto iter_end = groups_.cend(); return (has_groups() && iter_end != std::find_if( - groups_.begin(), iter_end, + groups_.cbegin(), iter_end, [&name](const string_t& s) { return (0 == strcasecmp(s.c_str(), name.c_str())); }) // compare two string_t's case insensitive @@ -127,8 +125,8 @@ namespace /* private */ { { write_xml_start_tag(TAG_GROUPS, file, true); - string_container_t::const_iterator iter = groups_.begin(); - string_container_t::const_iterator iter_end = groups_.end(); + auto iter = groups_.cbegin(); + auto iter_end = groups_.cend(); for ( ; iter != iter_end; ++iter) write_xml_tag(TAG_GROUP, (*iter), file); @@ -192,7 +190,7 @@ namespace /* private */ { string_t mime_type_; time_t timestamp_; bool is_private_; - string_container_t groups_; + std::vector<string_t> groups_; }; typedef std::vector<std::unique_ptr<recently_used_item>> recently_used_item_list_t; @@ -387,7 +385,7 @@ namespace /* private */ { } else { - string_container_t groups; + std::vector<string_t> groups; groups.push_back(GROUP_OOO); groups.push_back(GROUP_STAR_OFFICE); groups.push_back(GROUP_STAR_SUITE); diff --git a/shell/source/win32/ooofilereader/keywordstag.cxx b/shell/source/win32/ooofilereader/keywordstag.cxx index 4abb5af921b3..8a8600e2823f 100644 --- a/shell/source/win32/ooofilereader/keywordstag.cxx +++ b/shell/source/win32/ooofilereader/keywordstag.cxx @@ -43,8 +43,8 @@ void CKeywordsTag::addAttributes(const XmlTagAttributes_t& /*attributes*/) std::wstring CKeywordsTag::getTagContent( ) { - StringList_t::const_iterator keywords_Iter= m_slKeywords.begin( ); - StringList_t::const_iterator keywords_Iter_end = m_slKeywords.end( ); + auto keywords_Iter= m_slKeywords.cbegin( ); + auto keywords_Iter_end = m_slKeywords.cend( ); std::wstring ret_KeyWord_String = ( keywords_Iter != keywords_Iter_end) ? *keywords_Iter++ : L""; for ( ; keywords_Iter != keywords_Iter_end; ++keywords_Iter) diff --git a/shell/source/win32/ooofilereader/keywordstag.hxx b/shell/source/win32/ooofilereader/keywordstag.hxx index d1dbe9288dfd..3fb5372c47eb 100644 --- a/shell/source/win32/ooofilereader/keywordstag.hxx +++ b/shell/source/win32/ooofilereader/keywordstag.hxx @@ -39,7 +39,7 @@ class CKeywordsTag : public ITag virtual ::std::wstring const getTagAttribute( ::std::wstring const & /*attrname*/ ) override { return ::std::wstring(); }; private: - StringList_t m_slKeywords; + std::vector<std::wstring> m_slKeywords; std::wstring m_sCurrentKeyword; }; diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 636a0d862f4e..e4f9c3b3dfd9 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -42,7 +42,6 @@ void dumpParameter(); #endif -typedef std::vector<std::wstring> StringList_t; typedef std::vector<MapiRecipDescW> MapiRecipientList_t; typedef std::vector<MapiFileDescW> MapiAttachmentList_t; @@ -55,9 +54,9 @@ namespace /* private */ std::wstring gFrom; std::wstring gSubject; std::wstring gBody; - StringList_t gTo; - StringList_t gCc; - StringList_t gBcc; + std::vector<std::wstring> gTo; + std::vector<std::wstring> gCc; + std::vector<std::wstring> gBcc; // Keep temp filepath and displayed name std::vector<std::pair<std::wstring, std::wstring>> gAttachments; int gMapiFlags = 0; |