diff options
30 files changed, 100 insertions, 133 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 1408f22c2480..397e07718bef 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -33,7 +33,6 @@ #include <algorithm> #include <unordered_map> -using namespace ::std; using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index eed01cce1c8b..400666ff34bc 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -32,7 +32,6 @@ #include <algorithm> -using namespace ::std; using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index a92618a81f56..085482f7e28f 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -36,7 +36,6 @@ #include <algorithm> #include <unordered_map> -using namespace ::std; using namespace ::utl; using namespace ::osl; using namespace ::com::sun::star::uno; diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 042cc142c71d..ef210f57bcfe 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -61,7 +61,6 @@ namespace writerfilter::dmapper { using namespace ::com::sun::star; -using namespace ::std; #define DEF_BORDER_DIST 190 //0,19cm #define CNF_FIRST_ROW 0x800 diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 004f34971b6a..2c802d3ce2a9 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -36,7 +36,6 @@ namespace writerfilter::dmapper { using namespace ::com::sun::star; -using namespace ::std; DomainMapperTableManager::DomainMapperTableManager() : m_nRow(0), @@ -108,7 +107,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) { #ifdef DBG_UTIL TagLogger::getInstance().startElement("tablemanager.sprm"); - string sSprm = rSprm.toString(); + std::string sSprm = rSprm.toString(); TagLogger::getInstance().chars(sSprm); TagLogger::getInstance().endElement(); #endif @@ -441,8 +440,8 @@ void DomainMapperTableManager::startLevel( ) m_aParagraphsToEndTable.top()->pop_back(); } - IntVectorPtr pNewGrid = std::make_shared<vector<sal_Int32>>(); - IntVectorPtr pNewCellWidths = std::make_shared<vector<sal_Int32>>(); + IntVectorPtr pNewGrid = std::make_shared<std::vector<sal_Int32>>(); + IntVectorPtr pNewCellWidths = std::make_shared<std::vector<sal_Int32>>(); TablePositionHandlerPtr pNewPositionHandler; m_aTableGrid.push_back( pNewGrid ); m_aCellWidths.push_back( pNewCellWidths ); @@ -458,7 +457,7 @@ void DomainMapperTableManager::startLevel( ) m_nCell.push_back( 0 ); m_nTableWidth = 0; m_nLayoutType = 0; - TableParagraphVectorPtr pNewParagraphs = std::make_shared<vector<TableParagraph>>(); + TableParagraphVectorPtr pNewParagraphs = std::make_shared<std::vector<TableParagraph>>(); m_aParagraphsToEndTable.push( pNewParagraphs ); // And push it back to the right level. diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index bf12a4e35dd1..6d8d149fa0a7 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -57,7 +57,6 @@ namespace writerfilter::ooxml { using namespace ::com::sun::star; using namespace oox; -using namespace ::std; using namespace ::com::sun::star::xml::sax; /* @@ -2153,9 +2152,9 @@ OOXMLPropertySet::Pointer_t OOXMLFastContextHandlerWrapper::getPropertySet() return pResult; } -string OOXMLFastContextHandlerWrapper::getType() const +std::string OOXMLFastContextHandlerWrapper::getType() const { - string sResult = "Wrapper("; + std::string sResult = "Wrapper("; if (mxWrappedContext.is()) { diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index 60a3df570012..0e831bd35627 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -26,7 +26,6 @@ namespace writerfilter::ooxml { using namespace ::com::sun::star; -using namespace ::std; OOXMLFastDocumentHandler::OOXMLFastDocumentHandler( diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index 230a58f34ecf..e060d2da2d6c 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -29,7 +29,6 @@ namespace writerfilter::ooxml { -using namespace ::std; using namespace com::sun::star; OOXMLProperty::OOXMLProperty(Id id, OOXMLValue::Pointer_t pValue, @@ -70,9 +69,9 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLProperty::getProps() } #ifdef DBG_UTIL -string OOXMLProperty::getName() const +std::string OOXMLProperty::getName() const { - string sResult(QNameToString(mId)); + std::string sResult(QNameToString(mId)); if (sResult.length() == 0) sResult = fastTokenToId(mId); @@ -90,9 +89,9 @@ string OOXMLProperty::getName() const #endif #ifdef DBG_UTIL -string OOXMLProperty::toString() const +std::string OOXMLProperty::toString() const { - string sResult = "("; + std::string sResult = "("; sResult += getName(); sResult += ", "; @@ -158,7 +157,7 @@ writerfilter::Reference<BinaryObj>::Pointer_t OOXMLValue::getBinary() } #ifdef DBG_UTIL -string OOXMLValue::toString() const +std::string OOXMLValue::toString() const { return "OOXMLValue"; } @@ -188,7 +187,7 @@ writerfilter::Reference<BinaryObj>::Pointer_t OOXMLBinaryValue::getBinary() } #ifdef DBG_UTIL -string OOXMLBinaryValue::toString() const +std::string OOXMLBinaryValue::toString() const { return "BinaryObj"; } @@ -245,7 +244,7 @@ uno::Any OOXMLBooleanValue::getAny() const } #ifdef DBG_UTIL -string OOXMLBooleanValue::toString() const +std::string OOXMLBooleanValue::toString() const { return mbValue ? "true" : "false"; } @@ -280,7 +279,7 @@ OUString OOXMLStringValue::getString() const } #ifdef DBG_UTIL -string OOXMLStringValue::toString() const +std::string OOXMLStringValue::toString() const { return OUStringToOString(mStr, RTL_TEXTENCODING_ASCII_US).getStr(); } @@ -309,7 +308,7 @@ uno::Any OOXMLInputStreamValue::getAny() const } #ifdef DBG_UTIL -string OOXMLInputStreamValue::toString() const +std::string OOXMLInputStreamValue::toString() const { return "InputStream"; } @@ -399,9 +398,9 @@ OOXMLPropertySet * OOXMLPropertySet::clone() const } #ifdef DBG_UTIL -string OOXMLPropertySet::toString() +std::string OOXMLPropertySet::toString() { - string sResult = "["; + std::string sResult = "["; char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "%p", this); sResult += sBuffer; @@ -447,13 +446,13 @@ writerfilter::Reference<Properties>::Pointer_t OOXMLPropertySetValue::getPropert } #ifdef DBG_UTIL -string OOXMLPropertySetValue::toString() const +std::string OOXMLPropertySetValue::toString() const { char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), "t:%p, m:%p", this, mpPropertySet.get()); - return "OOXMLPropertySetValue(" + string(sBuffer) + ")"; + return "OOXMLPropertySetValue(" + std::string(sBuffer) + ")"; } #endif @@ -523,7 +522,7 @@ OOXMLValue * OOXMLIntegerValue::clone() const } #ifdef DBG_UTIL -string OOXMLIntegerValue::toString() const +std::string OOXMLIntegerValue::toString() const { char buffer[256]; snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, mnValue); @@ -561,7 +560,7 @@ OOXMLValue * OOXMLHexValue::clone() const } #ifdef DBG_UTIL -string OOXMLHexValue::toString() const +std::string OOXMLHexValue::toString() const { char buffer[256]; snprintf(buffer, sizeof(buffer), "0x%" SAL_PRIxUINT32, mnValue); @@ -649,7 +648,7 @@ int OOXMLUniversalMeasureValue::getInt() const } #ifdef DBG_UTIL -string OOXMLUniversalMeasureValue::toString() const +std::string OOXMLUniversalMeasureValue::toString() const { return OString::number(mnValue).getStr(); } @@ -679,7 +678,7 @@ int OOXMLMeasurementOrPercentValue::getInt() const } #ifdef DBG_UTIL -string OOXMLMeasurementOrPercentValue::toString() const +std::string OOXMLMeasurementOrPercentValue::toString() const { return OString::number(mnValue).getStr(); } @@ -705,7 +704,7 @@ uno::Any OOXMLShapeValue::getAny() const } #ifdef DBG_UTIL -string OOXMLShapeValue::toString() const +std::string OOXMLShapeValue::toString() const { return "Shape"; } @@ -736,7 +735,7 @@ uno::Any OOXMLStarMathValue::getAny() const } #ifdef DBG_UTIL -string OOXMLStarMathValue::toString() const +std::string OOXMLStarMathValue::toString() const { return "StarMath"; } diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 8da804fdafba..fee665930b24 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -71,7 +71,6 @@ #include <xmloff/animationexport.hxx> using namespace css; -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star::animations; using namespace ::com::sun::star::presentation; diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 3205f0f0da96..519c3288cdce 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -70,7 +70,6 @@ #include <animations.hxx> #include <animationimport.hxx> -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 28963f4cb6be..ed280f1e1060 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -37,7 +37,6 @@ #include <anim.hxx> -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -231,7 +230,7 @@ struct XMLEffectHint class AnimExpImpl { public: - list<XMLEffectHint> maEffects; + std::list<XMLEffectHint> maEffects; static constexpr OUStringLiteral gsDimColor = u"DimColor"; static constexpr OUStringLiteral gsDimHide = u"DimHide"; diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index f1ef4782c3ae..90f5a5a609d4 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -41,7 +41,6 @@ #include <anim.hxx> #include <animimp.hxx> -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::xml; diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx index 738f47dd2bf0..c0187f905596 100644 --- a/xmloff/source/draw/descriptionimp.cxx +++ b/xmloff/source/draw/descriptionimp.cxx @@ -24,7 +24,6 @@ #include "descriptionimp.hxx" -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::xml; diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 29fc94fda272..2b8921ee27fa 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -35,7 +35,6 @@ #include <xmloff/namespacemap.hxx> #include "eventimp.hxx" -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::xml; diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index e8979e7a2291..990e46128a7c 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -35,7 +35,6 @@ #include <XMLStringBufferImportContext.hxx> -using namespace ::std; using namespace ::cppu; using namespace ::xmloff::token; using namespace ::com::sun::star; diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index a89b1ca840f3..45c1d22fcabb 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -54,7 +54,6 @@ class ShapeGroupContext; } -using namespace ::std; using namespace ::com::sun::star; using namespace ::xmloff::token; @@ -528,8 +527,8 @@ class ShapeGroupContext public: uno::Reference< drawing::XShapes > mxShapes; std::vector<SdXMLEventContextData> maEventData; - vector<ZOrderHint> maZOrderList; - vector<ZOrderHint> maUnsortedList; + std::vector<ZOrderHint> maZOrderList; + std::vector<ZOrderHint> maUnsortedList; sal_Int32 mnCurrentZ; std::shared_ptr<ShapeGroupContext> mpParentContext; @@ -647,7 +646,7 @@ void ShapeGroupContext::popGroupAndPostProcess() for (const ZOrderHint& rHint : maZOrderList) { // fill in the gaps from unordered list - for (vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; ) + for (std::vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; ) { pNewOrder[nIndex++] = (*aIt).nIs; aIt = maUnsortedList.erase(aIt); @@ -672,7 +671,7 @@ void ShapeGroupContext::popGroupAndPostProcess() sal_Int32 nIndex = 0; for (const ZOrderHint& rHint : maZOrderList) { - for (vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; ) + for (std::vector<ZOrderHint>::iterator aIt = maUnsortedList.begin(); aIt != maUnsortedList.end() && nIndex < rHint.nShould; ) { moveShape( (*aIt).nIs, nIndex++ ); aIt = maUnsortedList.erase(aIt); @@ -793,8 +792,8 @@ void XMLShapeImportHelper::addShapeConnection( css::uno::Reference< css::drawing void XMLShapeImportHelper::restoreConnections() { - const vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size(); - for( vector<ConnectionHint>::size_type i = 0; i < nCount; i++ ) + const std::vector<ConnectionHint>::size_type nCount = mpImpl->maConnections.size(); + for( std::vector<ConnectionHint>::size_type i = 0; i < nCount; i++ ) { ConnectionHint& rHint = mpImpl->maConnections[i]; uno::Reference< beans::XPropertySet > xConnector( rHint.mxConnector, uno::UNO_QUERY ); diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index f89d4d9fb71a..117511f77c64 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -31,7 +31,6 @@ #include <xmloff/xmluconv.hxx> #include "ximpshow.hxx" -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::xml; 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 ); } diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 8dfa4b1fd984..a9b1e32f6a27 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -40,7 +40,6 @@ #include <algorithm> -using namespace ::std; using namespace ::xmloff::token; using ::com::sun::star::beans::XPropertySet; diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index f76c4f2815f1..cba9da2a7293 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -53,7 +53,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; -using namespace ::std; using namespace ::xmloff::token; using ::com::sun::star::beans::XPropertySet; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 54341aab0b01..58ad8604f0a1 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -71,7 +71,6 @@ #include <vector> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; @@ -764,13 +763,13 @@ void XMLTextFieldExport::ExportFieldAutoStyle( // a header text. Reference<XText> xOurText = GetToplevelText(rTextField->getAnchor()->getText()); - map<Reference<XText>, set<OUString> >::iterator aMapIter = + std::map<Reference<XText>, std::set<OUString> >::iterator aMapIter = pUsedMasters->find(xOurText); // insert a list for our XText (if necessary) if (aMapIter == pUsedMasters->end()) { - set<OUString> aSet; + std::set<OUString> aSet; (*pUsedMasters)[xOurText] = aSet; aMapIter = pUsedMasters->find(xOurText); } @@ -1903,10 +1902,10 @@ void XMLTextFieldExport::ExportFieldDeclarations( const Reference<XText> & rText ) { // store lists for decl elements - vector<OUString> aVarName; - vector<OUString> aUserName; - vector<OUString> aSeqName; - vector<OUString> aDdeName; + std::vector<OUString> aVarName; + std::vector<OUString> aUserName; + std::vector<OUString> aSeqName; + std::vector<OUString> aDdeName; // get text fields supplier and field master name access Reference<XTextFieldsSupplier> xTextFieldsSupp(GetExport().GetModel(), @@ -1929,7 +1928,7 @@ void XMLTextFieldExport::ExportFieldDeclarations( "written out separately" ); if (nullptr != pUsedMasters) { - map<Reference<XText>, set<OUString> > ::iterator aMapIter = + std::map<Reference<XText>, std::set<OUString> > ::iterator aMapIter = pUsedMasters->find(rText); if (aMapIter != pUsedMasters->end()) { @@ -2199,7 +2198,7 @@ void XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations( // create used masters set (if none is used) if (bExportOnlyUsed) - pUsedMasters.reset( new map<Reference<XText>, set<OUString> > ); + pUsedMasters.reset( new std::map<Reference<XText>, std::set<OUString> > ); } void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName, diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 87fd2b91283a..e9858e31a722 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -74,7 +74,6 @@ using ::com::sun::star::ucb::XAnyCompare; -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -340,8 +339,8 @@ namespace class FieldParamImporter { public: - typedef pair<OUString,OUString> field_param_t; - typedef vector<field_param_t> field_params_t; + typedef std::pair<OUString,OUString> field_param_t; + typedef std::vector<field_param_t> field_params_t; FieldParamImporter(const field_params_t* const pInParams, Reference<XNameContainer> const & xOutParams) : m_pInParams(pInParams) , m_xOutParams(xOutParams) diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 59e755f0e676..4775fbad9152 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -112,7 +112,6 @@ #include <o3tl/safeint.hxx> #include <comphelper/sequenceashashmap.hxx> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -190,12 +189,12 @@ namespace class TextContentSet { public: - typedef list<Reference<XTextContent>> contents_t; - typedef back_insert_iterator<contents_t> inserter_t; + typedef std::list<Reference<XTextContent>> contents_t; + typedef std::back_insert_iterator<contents_t> inserter_t; typedef contents_t::const_iterator const_iterator_t; inserter_t getInserter() - { return back_insert_iterator<contents_t>(m_vTextContents); }; + { return std::back_insert_iterator<contents_t>(m_vTextContents); }; const_iterator_t getBegin() const { return m_vTextContents.begin(); }; const_iterator_t getEnd() const @@ -439,10 +438,10 @@ namespace xmloff const BoundFrames* GetShapes() const { return m_pShapes.get(); }; private: - unique_ptr<BoundFrames> m_pTexts; - unique_ptr<BoundFrames> m_pGraphics; - unique_ptr<BoundFrames> m_pEmbeddeds; - unique_ptr<BoundFrames> m_pShapes; + std::unique_ptr<BoundFrames> m_pTexts; + std::unique_ptr<BoundFrames> m_pGraphics; + std::unique_ptr<BoundFrames> m_pEmbeddeds; + std::unique_ptr<BoundFrames> m_pShapes; }; } @@ -680,7 +679,7 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily, } SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); - vector< XMLPropertyState > aPropStates = + std::vector< XMLPropertyState > aPropStates = xPropMapper->Filter(GetExport(), rPropSet); aPropStates.insert( aPropStates.end(), aAddStates.begin(), aAddStates.end() ); @@ -806,7 +805,7 @@ void XMLTextParagraphExport::Add( XmlStyleFamily nFamily, } SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); - vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); + std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); if( rPropSetHelper.hasProperty( NUMBERING_RULES_AUTO ) ) { @@ -903,7 +902,7 @@ OUString XMLTextParagraphExport::Find( SAL_WARN_IF( !xPropMapper.is(), "xmloff", "There is the property mapper?" ); if( !xPropMapper.is() ) return sName; - vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); + std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); aPropStates.insert( aPropStates.end(), aAddStates.begin(), aAddStates.end() ); if( std::any_of( aPropStates.begin(), aPropStates.end(), lcl_validPropState ) ) sName = GetAutoStylePool().Find( nFamily, sName, aPropStates ); @@ -918,7 +917,7 @@ OUString XMLTextParagraphExport::FindTextStyle( const XMLPropertyState** ppAddStates ) const { rtl::Reference < SvXMLExportPropertyMapper > xPropMapper(GetTextPropMapper()); - vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); + std::vector<XMLPropertyState> aPropStates(xPropMapper->Filter(GetExport(), rPropSet)); // Get parent and remove hyperlinks (they aren't of interest) OUString sName; diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx index 9f27040ecc5e..13dad5332807 100644 --- a/xmloff/source/text/txtsecte.cxx +++ b/xmloff/source/text/txtsecte.cxx @@ -32,7 +32,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; -using namespace ::std; using ::com::sun::star::beans::XPropertySet; @@ -108,7 +107,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( // Build stacks of old and new sections // Sections on top of mute sections should not be on the stack - vector< Reference<XTextSection> > aOldStack; + std::vector< Reference<XTextSection> > aOldStack; Reference<XTextSection> aCurrent(rPrevSection); while(aCurrent.is()) { @@ -121,7 +120,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( aCurrent.set(aCurrent->getParentSection()); } - vector< Reference<XTextSection> > aNewStack; + std::vector< Reference<XTextSection> > aNewStack; aCurrent.set(rNextSection); bool bMute = false; while(aCurrent.is()) @@ -139,9 +138,9 @@ void XMLTextParagraphExport::exportListAndSectionChange( } // compare the two stacks - vector<Reference<XTextSection> > ::reverse_iterator aOld = + std::vector<Reference<XTextSection> > ::reverse_iterator aOld = aOldStack.rbegin(); - vector<Reference<XTextSection> > ::reverse_iterator aNew = + std::vector<Reference<XTextSection> > ::reverse_iterator aNew = aNewStack.rbegin(); // compare bottom sections and skip equal section while ( (aOld != aOldStack.rend()) && @@ -156,7 +155,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( // (order: newest to oldest) if (aOld != aOldStack.rend()) { - vector<Reference<XTextSection> > ::iterator aOldForward( + std::vector<Reference<XTextSection> > ::iterator aOldForward( aOldStack.begin()); while ((aOldForward != aOldStack.end()) && (*aOldForward != *aOld)) diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 74b91d506e43..01a0deab4e4b 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -54,7 +54,6 @@ #include <xmloff/xmlerror.hxx> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; |