From 251cb2a7b8b6c1f3fa6335911f0df38b23765da2 Mon Sep 17 00:00:00 2001 From: Abhyudaya Sharma Date: Mon, 4 Jun 2018 11:10:59 +0530 Subject: tdf#96099 Remove std::vector typedefs Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473 Reviewed-on: https://gerrit.libreoffice.org/55260 Tested-by: Jenkins Reviewed-by: Tor Lillqvist --- helpcompiler/source/HelpLinker.cxx | 1 - sd/inc/CustomAnimationPreset.hxx | 5 ++--- sd/source/core/CustomAnimationPreset.cxx | 11 ++++++----- sd/source/ui/animations/CustomAnimationDialog.cxx | 6 +++--- sd/source/ui/animations/CustomAnimationPane.cxx | 4 ++-- sfx2/source/dialog/templdlg.cxx | 8 ++++---- sfx2/source/inc/templdgi.hxx | 3 +-- stoc/source/corereflection/base.hxx | 3 +-- sw/source/filter/ww8/writerhelper.cxx | 3 +-- ucb/source/ucp/ftp/ftpresultsetbase.hxx | 3 +-- xmlhelp/source/cxxhelp/provider/resultsetbase.hxx | 2 +- 11 files changed, 22 insertions(+), 27 deletions(-) diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index b146349200b7..6cce931643d3 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -130,7 +130,6 @@ void IndexerPreProcessor::processDocument struct Data { std::vector _idList; - typedef std::vector::const_iterator cIter; void append(const std::string &id) { diff --git a/sd/inc/CustomAnimationPreset.hxx b/sd/inc/CustomAnimationPreset.hxx index 2685dd2be4d3..85318c9c4c2a 100644 --- a/sd/inc/CustomAnimationPreset.hxx +++ b/sd/inc/CustomAnimationPreset.hxx @@ -34,7 +34,6 @@ namespace sd { typedef std::unordered_map< OUString, CustomAnimationEffectPtr > EffectsSubTypeMap; typedef std::unordered_map< OUString, OUString > UStringMap; -typedef std::vector< OUString > UStringList; class CustomAnimationPreset { @@ -51,8 +50,8 @@ public: const OUString& getLabel() const { return maLabel; } double getDuration() const { return mfDuration; } - UStringList getSubTypes(); - UStringList getProperties() const; + std::vector getSubTypes(); + std::vector getProperties() const; bool hasProperty( const OUString& rProperty ) const; bool isTextOnly() const { return mbIsTextOnly; } diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 84c6413e17c7..e420c5885800 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -48,6 +48,7 @@ #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -157,9 +158,9 @@ void CustomAnimationPreset::add( const CustomAnimationEffectPtr& pEffect ) maSubTypes[ pEffect->getPresetSubType() ] = pEffect; } -UStringList CustomAnimationPreset::getSubTypes() +std::vector CustomAnimationPreset::getSubTypes() { - UStringList aSubTypes; + std::vector aSubTypes; if( maSubTypes.size() > 1 ) { @@ -197,9 +198,9 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const OUString& rstrS return xNode; } -UStringList CustomAnimationPreset::getProperties() const +std::vector CustomAnimationPreset::getProperties() const { - UStringList aPropertyList; + std::vector aPropertyList; if (!maProperty.isEmpty()) { sal_Int32 nPos = 0; @@ -572,7 +573,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor]; if( pPreset.get() ) { - UStringList aSubTypes = pPreset->getSubTypes(); + std::vector aSubTypes = pPreset->getSubTypes(); OUString aSubType; if( !aSubTypes.empty() ) diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 523d869ed683..95f23249006f 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -141,9 +141,9 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId ) OUString aPropertyValue; rValue >>= aPropertyValue; - UStringList aSubTypes( pDescriptor->getSubTypes() ); - UStringList::iterator aIter( aSubTypes.begin() ); - const UStringList::iterator aEnd( aSubTypes.end() ); + std::vector aSubTypes( pDescriptor->getSubTypes() ); + std::vector::iterator aIter( aSubTypes.begin() ); + const std::vector::iterator aEnd( aSubTypes.end() ); mpControl->Enable( aIter != aEnd ); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 01c5a1c9283f..e7f8c553d6a2 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -575,7 +575,7 @@ void CustomAnimationPane::updateControls() Any aValue; - UStringList aProperties( pDescriptor->getProperties() ); + std::vector aProperties( pDescriptor->getProperties() ); if( aProperties.size() >= 1 ) { mnPropertyType = getPropertyType( aProperties.front() ); @@ -1212,7 +1212,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet() { sal_Int32 nType = nPropertyTypeNone; - UStringList aProperties( pDescriptor->getProperties() ); + std::vector aProperties( pDescriptor->getProperties() ); if( aProperties.size() >= 1 ) nType = getPropertyType( aProperties.front() ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 1429438271cf..02453fb2f9a0 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -382,7 +382,7 @@ void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) Window::StateChanged( nStateChange ); } -void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries_t& rEntries) const +void StyleTreeListBox_Impl::MakeExpanded_Impl(std::vector& rEntries) const { SvTreeListEntry* pEntry; for (pEntry = FirstVisible(); pEntry; pEntry = NextVisible(pEntry)) @@ -563,7 +563,7 @@ void MakeTree_Impl(StyleTreeArr_Impl& rArr) }); } -inline bool IsExpanded_Impl( const ExpandedEntries_t& rEntries, +inline bool IsExpanded_Impl( const std::vector& rEntries, const OUString &rStr) { for (const auto & rEntry : rEntries) @@ -576,7 +576,7 @@ inline bool IsExpanded_Impl( const ExpandedEntries_t& rEntries, SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox, StyleTree_Impl* pEntry, - const ExpandedEntries_t& rEntries, + const std::vector& rEntries, SfxStyleFamily eStyleFamily, SvTreeListEntry* pParent) { @@ -1042,7 +1042,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() } MakeTree_Impl(aArr); - ExpandedEntries_t aEntries; + std::vector aEntries; pTreeBox->MakeExpanded_Impl(aEntries); pTreeBox->SetUpdateMode( false ); pTreeBox->Clear(); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 584a36d38cfe..c5caf475a387 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -85,7 +85,6 @@ public: virtual bool EventNotify( NotifyEvent& rNEvt ) override; }; -typedef std::vector ExpandedEntries_t; /** TreeListBox class for displaying the hierarchical view of the templates */ @@ -130,7 +129,7 @@ public: { return aStyle; } - void MakeExpanded_Impl(ExpandedEntries_t& rEntries) const; + void MakeExpanded_Impl(std::vector& rEntries) const; virtual VclPtr CreateContextMenu() override; }; diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 4c05b91078c9..bf2b93ad8d24 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -59,8 +59,7 @@ namespace stoc_corefl { #ifdef TEST_LIST_CLASSES -typedef std::vector< OUString > ClassNameVector; -extern ClassNameVector g_aClassNames; +extern std::vector g_aClassNames; #endif diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 2cffb3becf13..3c07721e2564 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -832,8 +832,7 @@ namespace sw sal_uInt16 WrtRedlineAuthor::AddName( const OUString& rNm ) { sal_uInt16 nRet; - typedef std::vector::iterator myiter; - myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm); + auto aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm); if (aIter != maAuthors.end()) nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin()); else diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx b/ucb/source/ucp/ftp/ftpresultsetbase.hxx index aae070a6a38e..94105862e55e 100644 --- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetbase.hxx @@ -391,11 +391,10 @@ namespace ftp { IdentSet; typedef std::vector< css::uno::Reference< css::sdbc::XRow > > ItemSet; - typedef std::vector< OUString > PathSet; IdentSet m_aIdents; ItemSet m_aItems; - PathSet m_aPath; + std::vector m_aPath; css::uno::Sequence< css::beans::Property > m_sProperty; diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx index d684db8f5b66..1e40736f8bc9 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx @@ -386,7 +386,7 @@ namespace chelp { IdentSet m_aIdents; ItemSet m_aItems; - PathSet m_aPath; + std::vector m_aPath; css::uno::Sequence< css::beans::Property > m_sProperty; -- cgit