From 3bd8759f5ed0393b2cc5560cab1b5d4052bd9728 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sun, 3 Jun 2018 16:00:14 +0300 Subject: tdf#96099 Remove some trivial std::vector typedefs Change-Id: I0e60ec7a3edae42b25ff0917828d0a893ed39a38 Reviewed-on: https://gerrit.libreoffice.org/55245 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cli_ure/source/climaker/climaker_emit.cxx | 3 +-- helpcompiler/inc/HelpCompiler.hxx | 3 +-- helpcompiler/inc/HelpLinker.hxx | 2 +- helpcompiler/source/HelpCompiler.cxx | 6 +++--- helpcompiler/source/HelpLinker.cxx | 2 +- idl/inc/command.hxx | 5 +---- idl/inc/database.hxx | 2 +- idl/inc/object.hxx | 2 +- idl/inc/slot.hxx | 2 +- idl/source/objects/object.cxx | 4 ++-- idl/source/objects/slot.cxx | 2 +- idl/source/prj/command.cxx | 4 ++-- oox/inc/drawingml/chart/typegroupmodel.hxx | 4 ++-- oox/source/drawingml/chart/plotareaconverter.cxx | 2 +- 14 files changed, 19 insertions(+), 24 deletions(-) diff --git a/cli_ure/source/climaker/climaker_emit.cxx b/cli_ure/source/climaker/climaker_emit.cxx index af66a246eca5..162963b6f15d 100644 --- a/cli_ure/source/climaker/climaker_emit.cxx +++ b/cli_ure/source/climaker/climaker_emit.cxx @@ -722,9 +722,8 @@ Assembly ^ TypeEmitter::type_resolve( array< ::System::Type^>^ base_interfaces = gcnew array< ::System::Type^>( vecBaseTypes.size() ); - typedef std::vector >::const_iterator it; int index = 0; - for (it i = vecBaseTypes.begin(); i != vecBaseTypes.end(); ++i, ++index) + for (auto i = vecBaseTypes.begin(); i != vecBaseTypes.end(); ++i, ++index) base_interfaces[ index ] = get_type( *i ); type_builder = m_module_builder->DefineType( cts_name, attr, nullptr, base_interfaces ); diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx index e063bd61f1a7..518830ad62b3 100644 --- a/helpcompiler/inc/HelpCompiler.hxx +++ b/helpcompiler/inc/HelpCompiler.hxx @@ -153,7 +153,6 @@ struct joaat_hash typedef std::unordered_map Stringtable; typedef std::deque LinkedList; -typedef std::vector HashSet; typedef std::unordered_map Hashtable; @@ -165,7 +164,7 @@ public: std::string document_module; std::string document_title; - std::unique_ptr appl_hidlist; + std::unique_ptr< std::vector > appl_hidlist; std::unique_ptr appl_keywords; std::unique_ptr appl_helptexts; xmlDocPtr appl_doc; diff --git a/helpcompiler/inc/HelpLinker.hxx b/helpcompiler/inc/HelpLinker.hxx index 9002445e3784..366c0a2bf29d 100644 --- a/helpcompiler/inc/HelpLinker.hxx +++ b/helpcompiler/inc/HelpLinker.hxx @@ -63,7 +63,7 @@ public: private: Stringtable additionalFiles; - HashSet helpFiles; + std::vector helpFiles; fs::path sourceRoot; fs::path compactStylesheet; fs::path embeddStylesheet; diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index 2c56ecafc628..1013c8d8e81a 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -246,17 +246,17 @@ public: std::string documentId; std::string fileName; std::string title; - std::unique_ptr hidlist; + std::unique_ptr< std::vector > hidlist; std::unique_ptr keywords; std::unique_ptr helptexts; private: - HashSet extendedHelpText; + std::vector extendedHelpText; public: myparser(const std::string &indocumentId, const std::string &infileName, const std::string &intitle) : documentId(indocumentId), fileName(infileName), title(intitle) { - hidlist.reset(new HashSet); + hidlist.reset(new std::vector); keywords.reset(new Hashtable); helptexts.reset(new Stringtable); } diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index 6cce931643d3..c8801b14a947 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -382,7 +382,7 @@ void HelpLinker::link() // add once this as its own id. addBookmark( pFileDbBase_DBHelp, documentPath, fileB, std::string(), jarfileB, titleB); - const HashSet *hidlist = streamTable.appl_hidlist.get(); + const std::vector *hidlist = streamTable.appl_hidlist.get(); if (hidlist && !hidlist->empty()) { // now iterate over all elements of the hidlist diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx index 6be70f446e81..ea5e0f4464f5 100644 --- a/idl/inc/command.hxx +++ b/idl/inc/command.hxx @@ -23,13 +23,10 @@ #include #include -typedef ::std::vector< OUString > StringList; -typedef ::std::vector< OString* > ByteStringList; - class SvCommand { public: - StringList aInFileList; + std::vector aInFileList; OUString aSlotMapFile; OUString aPath; OUString aTargetFile; diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 65ef714d939b..6b3904b55c1a 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -70,7 +70,7 @@ class SvIdlDataBase OUString aExportFile; sal_uInt32 nUniqueId; sal_uInt32 nVerbosity; - StringList aIdFileList; + std::vector aIdFileList; std::unique_ptr pIdTable; SvRefMemberList aTypeList; diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index d385fe0367cc..5b4bdb1eb6eb 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -59,7 +59,7 @@ private: static void WriteSlotStubs( const OString& rShellName, SvSlotElementList & rSlotList, - ByteStringList & rList, + std::vector & rList, SvStream & rOutStm ); static sal_uInt16 WriteSlotParamArray( SvIdlDataBase & rBase, SvSlotElementList & rSlotList, diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index 1aa6ebca6913..deef59ca6373 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -119,7 +119,7 @@ public: virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) override; virtual void Insert( SvSlotElementList& ) override; void WriteSlotStubs( const OString& rShellName, - ByteStringList & rList, + std::vector & rList, SvStream & rOutStm ) const; sal_uInt16 WriteSlotMap( const OString& rShellName, sal_uInt16 nCount, diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index fd77df3a3a16..cdff9c074232 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -250,7 +250,7 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList ) void SvMetaClass::WriteSlotStubs( const OString& rShellName, SvSlotElementList & rSlotList, - ByteStringList & rList, + std::vector & rList, SvStream & rOutStm ) { // write all attributes @@ -305,7 +305,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ) rOutStm << endl; rOutStm.WriteCharPtr( "};" ) << endl << endl; - ByteStringList aStringList; + std::vector aStringList; WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm ); for ( size_t i = 0, n = aStringList.size(); i < n; ++i ) delete aStringList[ i ]; diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 349ed4b0913d..e04edb927e5b 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -354,7 +354,7 @@ static OString MakeSlotName( SvStringHashEntry const * pEntry ) }; void SvMetaSlot::WriteSlotStubs( const OString& rShellName, - ByteStringList & rList, + std::vector & rList, SvStream & rOutStm ) const { if ( !GetExport() && !GetHidden() ) diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index 740d384add60..b04892165057 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -132,7 +132,7 @@ bool ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand ) return true; } -static bool ResponseFile( StringList * pList, int argc, char ** argv ) +static bool ResponseFile( std::vector * pList, int argc, char ** argv ) { // program name pList->push_back( OUString::createFromAscii(*argv) ); @@ -174,7 +174,7 @@ static bool ResponseFile( StringList * pList, int argc, char ** argv ) SvCommand::SvCommand( int argc, char ** argv ) : nVerbosity(1) { - StringList aList; + std::vector aList; if( ResponseFile( &aList, argc, argv ) ) { diff --git a/oox/inc/drawingml/chart/typegroupmodel.hxx b/oox/inc/drawingml/chart/typegroupmodel.hxx index ea40faa83a1c..e790d48dabdc 100644 --- a/oox/inc/drawingml/chart/typegroupmodel.hxx +++ b/oox/inc/drawingml/chart/typegroupmodel.hxx @@ -41,13 +41,13 @@ struct UpDownBarsModel struct TypeGroupModel { typedef ModelVector< SeriesModel > SeriesVector; - typedef ::std::vector< sal_Int32 > AxisIdVector; typedef ModelRef< DataLabelsModel > DataLabelsRef; typedef ModelRef< UpDownBarsModel > UpDownBarsRef; typedef ModelRef< Shape > ShapeRef; SeriesVector maSeries; /// Series attached to this chart type group. - AxisIdVector maAxisIds; /// List of axis identifiers used by this chart type. + std::vector + maAxisIds; /// List of axis identifiers used by this chart type. DataLabelsRef mxLabels; /// Data point label settings for all series. UpDownBarsRef mxUpDownBars; /// Up/down bars in stock charts. ShapeRef mxSerLines; /// Connector lines in stacked bar charts. diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index f89044d277de..d9755fdb9631 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -368,7 +368,7 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel ) { pAxesSet = &aAxesSets.create(); // find axis models used by the type group - const TypeGroupModel::AxisIdVector& rAxisIds = typeGroup->maAxisIds; + const std::vector& rAxisIds = typeGroup->maAxisIds; if( rAxisIds.size() >= 1 ) pAxesSet->maAxes[ API_X_AXIS ] = aAxisMap.get( rAxisIds[ 0 ] ); if( rAxisIds.size() >= 2 ) -- cgit