diff options
author | Gabor Kelemen <gabor.kelemen.extern@allotropia.de> | 2023-02-15 01:18:28 +0100 |
---|---|---|
committer | Gabor Kelemen <kelemeng@ubuntu.com> | 2023-02-16 08:14:39 +0000 |
commit | 857b74041aa339e56ee8b2a05a910172753ed783 (patch) | |
tree | 7b5ba27120faa015f86080fd91bed13828470020 /xmloff/source/style | |
parent | 79176694ddc7bce40ce2b82d3f332be8642a5167 (diff) |
Drop 'using namespace ::std' in dirs [u-x]*
Change-Id: I8c044369826b00241496cfc7ba2463e507c0d1a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147077
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/impastpl.cxx | 30 | ||||
-rw-r--r-- | xmloff/source/style/xmlaustp.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/style/xmlexppr.cxx | 19 | ||||
-rw-r--r-- | xmloff/source/style/xmlimppr.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/style/xmlprcon.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/style/xmlprmap.cxx | 4 |
6 files changed, 42 insertions, 51 deletions
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 179c402dc246..948c1dde3b8e 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -36,8 +36,6 @@ #include "impastpl.hxx" -using namespace ::std; - using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -150,7 +148,7 @@ static OUString any2string(const uno::Any& any) // Class SvXMLAutoStylePoolProperties_Impl // ctor class SvXMLAutoStylePoolProperties_Impl -XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFamilyData, vector< XMLPropertyState >&& rProperties, OUString const & rParentName ) +XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFamilyData, std::vector< XMLPropertyState >&& rProperties, OUString const & rParentName ) : maProperties( std::move(rProperties) ), mnPos ( rFamilyData.mnCount ) { @@ -257,13 +255,13 @@ struct ComparePartial { const XMLAutoStyleFamily& rFamilyData; - bool operator()(const vector< XMLPropertyState >& lhs, + bool operator()(const std::vector< XMLPropertyState >& lhs, const XMLAutoStylePoolProperties& rhs) const { return rFamilyData.mxMapper->LessPartial(lhs, rhs.GetProperties()); } bool operator()(const XMLAutoStylePoolProperties& lhs, - const vector< XMLPropertyState >& rhs ) const + const std::vector< XMLPropertyState >& rhs ) const { return rFamilyData.mxMapper->LessPartial(lhs.GetProperties(), rhs); } @@ -271,10 +269,10 @@ struct ComparePartial } -// Adds an array of XMLPropertyState ( vector< XMLPropertyState > ) to list +// Adds an array of XMLPropertyState ( std::vector< XMLPropertyState > ) to list // if not added, yet. -bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, vector< XMLPropertyState >&& rProperties, OUString& rName, bool bDontSeek ) +bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, std::vector< XMLPropertyState >&& rProperties, OUString& rName, bool bDontSeek ) { PropertiesListType::iterator pProperties = m_PropertiesList.end();; auto [itBegin, itEnd] = std::equal_range(m_PropertiesList.begin(), m_PropertiesList.end(), rProperties, ComparePartial{rFamilyData}); @@ -296,12 +294,12 @@ bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, vector< XMLPr } -// Adds an array of XMLPropertyState ( vector< XMLPropertyState > ) with a given name. +// Adds an array of XMLPropertyState ( std::vector< XMLPropertyState > ) with a given name. // If the name exists already, nothing is done. If a style with a different name and // the same properties exists, a new one is added (like with bDontSeek). -bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, vector< XMLPropertyState >&& rProperties, const OUString& rName ) +bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, std::vector< XMLPropertyState >&& rProperties, const OUString& rName ) { if (rFamilyData.maNameSet.find(rName) != rFamilyData.maNameSet.end()) return false; @@ -315,10 +313,10 @@ bool XMLAutoStylePoolParent::AddNamed( XMLAutoStyleFamily& rFamilyData, vector< } -// Search for an array of XMLPropertyState ( vector< XMLPropertyState > ) in list +// Search for an array of XMLPropertyState ( std::vector< XMLPropertyState > ) in list -OUString XMLAutoStylePoolParent::Find( const XMLAutoStyleFamily& rFamilyData, const vector< XMLPropertyState >& rProperties ) const +OUString XMLAutoStylePoolParent::Find( const XMLAutoStyleFamily& rFamilyData, const std::vector< XMLPropertyState >& rProperties ) const { OUString sName; auto [itBegin,itEnd] = std::equal_range(m_PropertiesList.begin(), m_PropertiesList.end(), rProperties, ComparePartial{rFamilyData}); @@ -420,8 +418,8 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames( uno::Sequence<OUString>& rNames ) { // collect registered names + families - vector<sal_Int32> aFamilies; - vector<OUString> aNames; + std::vector<sal_Int32> aFamilies; + std::vector<OUString> aNames; // iterate over families for (XMLAutoStyleFamily const & rFamily : m_FamilySet) @@ -456,7 +454,7 @@ uno::Sequence<OUString> SvXMLAutoStylePoolP_Impl::GetPropertyNames() return comphelper::containerToSequence(aNames); } -// Adds an array of XMLPropertyState ( vector< XMLPropertyState > ) to list +// Adds an array of XMLPropertyState ( std::vector< XMLPropertyState > ) to list // if not added, yet. bool SvXMLAutoStylePoolP_Impl::Add( @@ -508,12 +506,12 @@ bool SvXMLAutoStylePoolP_Impl::AddNamed( } -// Search for an array of XMLPropertyState ( vector< XMLPropertyState > ) in list +// Search for an array of XMLPropertyState ( std::vector< XMLPropertyState > ) in list OUString SvXMLAutoStylePoolP_Impl::Find( XmlStyleFamily nFamily, const OUString& rParent, - const vector< XMLPropertyState >& rProperties ) const + const std::vector< XMLPropertyState >& rProperties ) const { OUString sName; diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index 20d639c3b121..47bba649b968 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -32,8 +32,6 @@ #include <osl/diagnose.h> -using namespace ::std; - using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -60,7 +58,7 @@ namespace void SvXMLAutoStylePoolP::exportStyleAttributes( comphelper::AttributeList&, XmlStyleFamily nFamily, - const vector< XMLPropertyState >& rProperties, + const std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp, const SvXMLUnitConverter&, const SvXMLNamespaceMap& @@ -170,7 +168,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( void SvXMLAutoStylePoolP::exportStyleContent( const css::uno::Reference< css::xml::sax::XDocumentHandler > &, XmlStyleFamily nFamily, - const vector< XMLPropertyState >& rProperties, + const std::vector< XMLPropertyState >& rProperties, const SvXMLExportPropertyMapper& rPropExp, const SvXMLUnitConverter&, const SvXMLNamespaceMap& @@ -325,7 +323,7 @@ void SvXMLAutoStylePoolP::RegisterNames( // iterate over sequence(s) and call RegisterName(..) for each pair const sal_Int32* pFamilies = aFamilies.getConstArray(); const OUString* pNames = aNames.getConstArray(); - sal_Int32 nCount = min( aFamilies.getLength(), aNames.getLength() ); + sal_Int32 nCount = std::min( aFamilies.getLength(), aNames.getLength() ); for( sal_Int32 n = 0; n < nCount; n++ ) RegisterName( static_cast<XmlStyleFamily>(pFamilies[n]), pNames[n] ); } @@ -337,7 +335,7 @@ css::uno::Sequence<OUString> SvXMLAutoStylePoolP::GetPropertyNames( ) } OUString SvXMLAutoStylePoolP::Add( XmlStyleFamily nFamily, - vector< XMLPropertyState >&& rProperties ) + std::vector< XMLPropertyState >&& rProperties ) { OUString sName; pImpl->Add(sName, nFamily, "", std::move(rProperties) ); @@ -346,7 +344,7 @@ OUString SvXMLAutoStylePoolP::Add( XmlStyleFamily nFamily, OUString SvXMLAutoStylePoolP::Add( XmlStyleFamily nFamily, const OUString& rParent, - vector< XMLPropertyState >&& rProperties, bool bDontSeek ) + std::vector< XMLPropertyState >&& rProperties, bool bDontSeek ) { OUString sName; pImpl->Add(sName, nFamily, rParent, std::move(rProperties), bDontSeek); @@ -367,7 +365,7 @@ bool SvXMLAutoStylePoolP::AddNamed( const OUString& rName, XmlStyleFamily nFamil OUString SvXMLAutoStylePoolP::Find( XmlStyleFamily nFamily, const OUString& rParent, - const vector< XMLPropertyState >& rProperties ) const + const std::vector< XMLPropertyState >& rProperties ) const { return pImpl->Find( nFamily, rParent, rProperties ); } diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index b1a60aabb384..122d21e08ed9 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -46,7 +46,6 @@ #include <xmloff/xmltypes.hxx> #include <xmloff/xmlprhdl.hxx> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; @@ -167,7 +166,7 @@ public: void AddProperty(const OUString& rApiName, const sal_uInt32 nIndex); const uno::Sequence<OUString>& GetApiNames(); void FillPropertyStateArray( - vector< XMLPropertyState >& rPropStates, + std::vector< XMLPropertyState >& rPropStates, const Reference< XPropertySet >& xPropSet, const rtl::Reference< XMLPropertySetMapper >& maPropMapper, const bool bDefault, @@ -247,7 +246,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames() } void FilterPropertiesInfo_Impl::FillPropertyStateArray( - vector< XMLPropertyState >& rPropStates, + std::vector< XMLPropertyState >& rPropStates, const Reference< XPropertySet >& rPropSet, const rtl::Reference< XMLPropertySetMapper >& rPropMapper, const bool bDefault, @@ -532,12 +531,12 @@ std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults( return Filter_(rExport, rPropSet, true, false/*bEnableFoFontFamily*/, nullptr); } -vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( +std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( SvXMLExport const& rExport, const Reference<XPropertySet>& xPropSet, bool bDefault, bool bEnableFoFontFamily, const uno::Sequence<OUString>* pOnlyTheseProps ) const { - vector< XMLPropertyState > aPropStateArray; + std::vector< XMLPropertyState > aPropStateArray; // Retrieve XPropertySetInfo and XPropertyState Reference< XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() ); @@ -671,7 +670,7 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_( void SvXMLExportPropertyMapper::ContextFilter( bool bEnableFoFontFamily, - vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, const Reference< XPropertySet >& rPropSet ) const { // Derived class could implement this. @@ -684,8 +683,8 @@ void SvXMLExportPropertyMapper::ContextFilter( // 2.Index of each element equal ? (So I know whether the propertynames are the same) // 3.Value of each element equal ? bool SvXMLExportPropertyMapper::Equals( - const vector< XMLPropertyState >& aProperties1, - const vector< XMLPropertyState >& aProperties2 ) const + const std::vector< XMLPropertyState >& aProperties1, + const std::vector< XMLPropertyState >& aProperties2 ) const { if (aProperties1.size() < aProperties2.size()) return true; @@ -734,8 +733,8 @@ bool SvXMLExportPropertyMapper::Equals( // 2.Index of each element equal ? (So I know whether the propertynames are the same) // 3.Value of each element equal ? bool SvXMLExportPropertyMapper::LessPartial( - const vector< XMLPropertyState >& aProperties1, - const vector< XMLPropertyState >& aProperties2 ) const + const std::vector< XMLPropertyState >& aProperties1, + const std::vector< XMLPropertyState >& aProperties2 ) const { if (aProperties1.size() < aProperties2.size()) return true; diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 446c03872215..5898c31beb07 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -52,7 +52,6 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::xml; using namespace ::com::sun::star::xml::sax; -using namespace ::std; using namespace ::xmloff::token; using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::lang::WrappedTargetException; @@ -105,7 +104,7 @@ void SvXMLImportPropertyMapper::ChainImportMapper( /** fills the given itemset with the attributes in the given list */ void SvXMLImportPropertyMapper::importXML( - vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, const Reference< XFastAttributeList >& xAttrList, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, @@ -161,7 +160,7 @@ void SvXMLImportPropertyMapper::importXML( } void SvXMLImportPropertyMapper::importXMLAttribute( - vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, const sal_uInt32 nPropType, @@ -346,7 +345,7 @@ void SvXMLImportPropertyMapper::importXMLAttribute( /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */ bool SvXMLImportPropertyMapper::handleSpecialItem( XMLPropertyState& rProperty, - vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, const OUString& rValue, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const @@ -430,7 +429,7 @@ void SvXMLImportPropertyMapper::CheckSpecialContext( } bool SvXMLImportPropertyMapper::FillPropertySet( - const vector< XMLPropertyState >& aProperties, + const std::vector< XMLPropertyState >& aProperties, const Reference< XPropertySet >& rPropSet, ContextID_Index_Pair* pSpecialContextIds ) const { @@ -469,7 +468,7 @@ bool SvXMLImportPropertyMapper::FillPropertySet( } bool SvXMLImportPropertyMapper::FillPropertySet_( - const vector<XMLPropertyState> & rProperties, + const std::vector<XMLPropertyState> & rProperties, const Reference<XPropertySet> & rPropSet, const Reference<XPropertySetInfo> & rPropSetInfo, const rtl::Reference<XMLPropertySetMapper> & rPropMapper, @@ -570,7 +569,7 @@ bool SvXMLImportPropertyMapper::FillPropertySet_( } -typedef pair<const OUString*, const Any* > PropertyPair; +typedef std::pair<const OUString*, const Any* > PropertyPair; namespace { @@ -585,7 +584,7 @@ struct PropertyPairLessFunctor } void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_( - const vector<XMLPropertyState> & rProperties, + const std::vector<XMLPropertyState> & rProperties, const Reference<XPropertySetInfo> & rPropSetInfo, const rtl::Reference<XMLPropertySetMapper> & rPropMapper, ContextID_Index_Pair* pSpecialContextIds, @@ -595,7 +594,7 @@ void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_( sal_Int32 nCount = rProperties.size(); // property pairs structure stores names + values of properties to be set. - vector<PropertyPair> aPropertyPairs; + std::vector<PropertyPair> aPropertyPairs; aPropertyPairs.reserve( nCount ); // iterate over property states that we want to set @@ -665,7 +664,7 @@ void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_( } bool SvXMLImportPropertyMapper::FillMultiPropertySet_( - const vector<XMLPropertyState> & rProperties, + const std::vector<XMLPropertyState> & rProperties, const Reference<XMultiPropertySet> & rMultiPropSet, const Reference<XPropertySetInfo> & rPropSetInfo, const rtl::Reference<XMLPropertySetMapper> & rPropMapper, @@ -697,7 +696,7 @@ bool SvXMLImportPropertyMapper::FillMultiPropertySet_( } bool SvXMLImportPropertyMapper::FillTolerantMultiPropertySet_( - const vector<XMLPropertyState> & rProperties, + const std::vector<XMLPropertyState> & rProperties, const Reference<XTolerantMultiPropertySet> & rTolMultiPropSet, const rtl::Reference<XMLPropertySetMapper> & rPropMapper, SvXMLImport& rImport, @@ -751,7 +750,7 @@ bool SvXMLImportPropertyMapper::FillTolerantMultiPropertySet_( } void SvXMLImportPropertyMapper::finished( - vector< XMLPropertyState >& rProperties, + std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const { // nothing to do here diff --git a/xmloff/source/style/xmlprcon.cxx b/xmloff/source/style/xmlprcon.cxx index 4788cc4f8c5a..023a7f5b6b01 100644 --- a/xmloff/source/style/xmlprcon.cxx +++ b/xmloff/source/style/xmlprcon.cxx @@ -27,13 +27,12 @@ #include <xmloff/xmlprmap.hxx> using namespace ::com::sun::star; -using namespace ::std; SvXMLPropertySetContext::SvXMLPropertySetContext( SvXMLImport& rImp, sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList, sal_uInt32 nFam, - vector< XMLPropertyState > &rProps, + std::vector< XMLPropertyState > &rProps, rtl::Reference < SvXMLImportPropertyMapper > xMap, sal_Int32 nSIdx, sal_Int32 nEIdx ) : SvXMLImportContext( rImp ) diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index f7145161e3b8..315a35238940 100644 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -32,8 +32,6 @@ #include <vector> -using namespace ::std; - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using ::xmloff::token::GetXMLToken; @@ -352,7 +350,7 @@ void XMLPropertySetMapper::RemoveEntry( sal_Int32 nIndex ) const sal_Int32 nEntries = GetEntryCount(); if( nIndex>=nEntries || nIndex<0 ) return; - vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = mpImpl->maMapEntries.begin(); + std::vector < XMLPropertySetMapperEntry_Impl >::iterator aEIter = mpImpl->maMapEntries.begin(); std::advance(aEIter, nIndex); mpImpl->maMapEntries.erase( aEIter ); } |