Kaydet (Commit) 251cb2a7 authored tarafından Abhyudaya Sharma's avatar Abhyudaya Sharma Kaydeden (comit) Tor Lillqvist

tdf#96099 Remove std::vector typedefs

Change-Id: Ic7e1cecaecadf3f9ebfa183727d61046dd87e473
Reviewed-on: https://gerrit.libreoffice.org/55260Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst b292a276
...@@ -130,7 +130,6 @@ void IndexerPreProcessor::processDocument ...@@ -130,7 +130,6 @@ void IndexerPreProcessor::processDocument
struct Data struct Data
{ {
std::vector<std::string> _idList; std::vector<std::string> _idList;
typedef std::vector<std::string>::const_iterator cIter;
void append(const std::string &id) void append(const std::string &id)
{ {
......
...@@ -34,7 +34,6 @@ namespace sd { ...@@ -34,7 +34,6 @@ namespace sd {
typedef std::unordered_map< OUString, CustomAnimationEffectPtr > EffectsSubTypeMap; typedef std::unordered_map< OUString, CustomAnimationEffectPtr > EffectsSubTypeMap;
typedef std::unordered_map< OUString, OUString > UStringMap; typedef std::unordered_map< OUString, OUString > UStringMap;
typedef std::vector< OUString > UStringList;
class CustomAnimationPreset class CustomAnimationPreset
{ {
...@@ -51,8 +50,8 @@ public: ...@@ -51,8 +50,8 @@ public:
const OUString& getLabel() const { return maLabel; } const OUString& getLabel() const { return maLabel; }
double getDuration() const { return mfDuration; } double getDuration() const { return mfDuration; }
UStringList getSubTypes(); std::vector<OUString> getSubTypes();
UStringList getProperties() const; std::vector<OUString> getProperties() const;
bool hasProperty( const OUString& rProperty ) const; bool hasProperty( const OUString& rProperty ) const;
bool isTextOnly() const { return mbIsTextOnly; } bool isTextOnly() const { return mbIsTextOnly; }
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <CustomAnimationPreset.hxx> #include <CustomAnimationPreset.hxx>
#include <algorithm> #include <algorithm>
#include <vector>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -157,9 +158,9 @@ void CustomAnimationPreset::add( const CustomAnimationEffectPtr& pEffect ) ...@@ -157,9 +158,9 @@ void CustomAnimationPreset::add( const CustomAnimationEffectPtr& pEffect )
maSubTypes[ pEffect->getPresetSubType() ] = pEffect; maSubTypes[ pEffect->getPresetSubType() ] = pEffect;
} }
UStringList CustomAnimationPreset::getSubTypes() std::vector<OUString> CustomAnimationPreset::getSubTypes()
{ {
UStringList aSubTypes; std::vector<OUString> aSubTypes;
if( maSubTypes.size() > 1 ) if( maSubTypes.size() > 1 )
{ {
...@@ -197,9 +198,9 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const OUString& rstrS ...@@ -197,9 +198,9 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const OUString& rstrS
return xNode; return xNode;
} }
UStringList CustomAnimationPreset::getProperties() const std::vector<OUString> CustomAnimationPreset::getProperties() const
{ {
UStringList aPropertyList; std::vector<OUString> aPropertyList;
if (!maProperty.isEmpty()) if (!maProperty.isEmpty())
{ {
sal_Int32 nPos = 0; sal_Int32 nPos = 0;
...@@ -572,7 +573,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n ...@@ -572,7 +573,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor]; CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor];
if( pPreset.get() ) if( pPreset.get() )
{ {
UStringList aSubTypes = pPreset->getSubTypes(); std::vector<OUString> aSubTypes = pPreset->getSubTypes();
OUString aSubType; OUString aSubType;
if( !aSubTypes.empty() ) if( !aSubTypes.empty() )
......
...@@ -141,9 +141,9 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId ) ...@@ -141,9 +141,9 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
OUString aPropertyValue; OUString aPropertyValue;
rValue >>= aPropertyValue; rValue >>= aPropertyValue;
UStringList aSubTypes( pDescriptor->getSubTypes() ); std::vector<OUString> aSubTypes( pDescriptor->getSubTypes() );
UStringList::iterator aIter( aSubTypes.begin() ); std::vector<OUString>::iterator aIter( aSubTypes.begin() );
const UStringList::iterator aEnd( aSubTypes.end() ); const std::vector<OUString>::iterator aEnd( aSubTypes.end() );
mpControl->Enable( aIter != aEnd ); mpControl->Enable( aIter != aEnd );
......
...@@ -575,7 +575,7 @@ void CustomAnimationPane::updateControls() ...@@ -575,7 +575,7 @@ void CustomAnimationPane::updateControls()
Any aValue; Any aValue;
UStringList aProperties( pDescriptor->getProperties() ); std::vector<OUString> aProperties( pDescriptor->getProperties() );
if( aProperties.size() >= 1 ) if( aProperties.size() >= 1 )
{ {
mnPropertyType = getPropertyType( aProperties.front() ); mnPropertyType = getPropertyType( aProperties.front() );
...@@ -1212,7 +1212,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet() ...@@ -1212,7 +1212,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
{ {
sal_Int32 nType = nPropertyTypeNone; sal_Int32 nType = nPropertyTypeNone;
UStringList aProperties( pDescriptor->getProperties() ); std::vector<OUString> aProperties( pDescriptor->getProperties() );
if( aProperties.size() >= 1 ) if( aProperties.size() >= 1 )
nType = getPropertyType( aProperties.front() ); nType = getPropertyType( aProperties.front() );
......
...@@ -382,7 +382,7 @@ void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange ) ...@@ -382,7 +382,7 @@ void SfxTemplatePanelControl::StateChanged( StateChangedType nStateChange )
Window::StateChanged( nStateChange ); Window::StateChanged( nStateChange );
} }
void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries_t& rEntries) const void StyleTreeListBox_Impl::MakeExpanded_Impl(std::vector<OUString>& rEntries) const
{ {
SvTreeListEntry* pEntry; SvTreeListEntry* pEntry;
for (pEntry = FirstVisible(); pEntry; pEntry = NextVisible(pEntry)) for (pEntry = FirstVisible(); pEntry; pEntry = NextVisible(pEntry))
...@@ -563,7 +563,7 @@ void MakeTree_Impl(StyleTreeArr_Impl& rArr) ...@@ -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<OUString>& rEntries,
const OUString &rStr) const OUString &rStr)
{ {
for (const auto & rEntry : rEntries) for (const auto & rEntry : rEntries)
...@@ -576,7 +576,7 @@ inline bool IsExpanded_Impl( const ExpandedEntries_t& rEntries, ...@@ -576,7 +576,7 @@ inline bool IsExpanded_Impl( const ExpandedEntries_t& rEntries,
SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox, SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox,
StyleTree_Impl* pEntry, StyleTree_Impl* pEntry,
const ExpandedEntries_t& rEntries, const std::vector<OUString>& rEntries,
SfxStyleFamily eStyleFamily, SfxStyleFamily eStyleFamily,
SvTreeListEntry* pParent) SvTreeListEntry* pParent)
{ {
...@@ -1042,7 +1042,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox() ...@@ -1042,7 +1042,7 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
} }
MakeTree_Impl(aArr); MakeTree_Impl(aArr);
ExpandedEntries_t aEntries; std::vector<OUString> aEntries;
pTreeBox->MakeExpanded_Impl(aEntries); pTreeBox->MakeExpanded_Impl(aEntries);
pTreeBox->SetUpdateMode( false ); pTreeBox->SetUpdateMode( false );
pTreeBox->Clear(); pTreeBox->Clear();
......
...@@ -85,7 +85,6 @@ public: ...@@ -85,7 +85,6 @@ public:
virtual bool EventNotify( NotifyEvent& rNEvt ) override; virtual bool EventNotify( NotifyEvent& rNEvt ) override;
}; };
typedef std::vector<OUString> ExpandedEntries_t;
/** TreeListBox class for displaying the hierarchical view of the templates /** TreeListBox class for displaying the hierarchical view of the templates
*/ */
...@@ -130,7 +129,7 @@ public: ...@@ -130,7 +129,7 @@ public:
{ {
return aStyle; return aStyle;
} }
void MakeExpanded_Impl(ExpandedEntries_t& rEntries) const; void MakeExpanded_Impl(std::vector<OUString>& rEntries) const;
virtual VclPtr<PopupMenu> CreateContextMenu() override; virtual VclPtr<PopupMenu> CreateContextMenu() override;
}; };
......
...@@ -59,8 +59,7 @@ namespace stoc_corefl ...@@ -59,8 +59,7 @@ namespace stoc_corefl
{ {
#ifdef TEST_LIST_CLASSES #ifdef TEST_LIST_CLASSES
typedef std::vector< OUString > ClassNameVector; extern std::vector<OUString> g_aClassNames;
extern ClassNameVector g_aClassNames;
#endif #endif
......
...@@ -832,8 +832,7 @@ namespace sw ...@@ -832,8 +832,7 @@ namespace sw
sal_uInt16 WrtRedlineAuthor::AddName( const OUString& rNm ) sal_uInt16 WrtRedlineAuthor::AddName( const OUString& rNm )
{ {
sal_uInt16 nRet; sal_uInt16 nRet;
typedef std::vector<OUString>::iterator myiter; auto aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
if (aIter != maAuthors.end()) if (aIter != maAuthors.end())
nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin()); nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin());
else else
......
...@@ -391,11 +391,10 @@ namespace ftp { ...@@ -391,11 +391,10 @@ namespace ftp {
IdentSet; IdentSet;
typedef std::vector< css::uno::Reference< css::sdbc::XRow > > typedef std::vector< css::uno::Reference< css::sdbc::XRow > >
ItemSet; ItemSet;
typedef std::vector< OUString > PathSet;
IdentSet m_aIdents; IdentSet m_aIdents;
ItemSet m_aItems; ItemSet m_aItems;
PathSet m_aPath; std::vector<OUString> m_aPath;
css::uno::Sequence< css::beans::Property > css::uno::Sequence< css::beans::Property >
m_sProperty; m_sProperty;
......
...@@ -386,7 +386,7 @@ namespace chelp { ...@@ -386,7 +386,7 @@ namespace chelp {
IdentSet m_aIdents; IdentSet m_aIdents;
ItemSet m_aItems; ItemSet m_aItems;
PathSet m_aPath; std::vector<OUString> m_aPath;
css::uno::Sequence< css::beans::Property > m_sProperty; css::uno::Sequence< css::beans::Property > m_sProperty;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment