sax/source/expatwrap/sax_expat.cxx | 3 +-- sax/source/expatwrap/saxwriter.cxx | 1 - sd/source/console/PresenterBitmapContainer.cxx | 1 - sd/source/console/PresenterTheme.cxx | 7 +++---- sd/source/ui/dlg/RemoteDialog.cxx | 1 - sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx | 1 - sd/source/ui/unoidl/DrawController.cxx | 1 - sd/source/ui/view/frmview.cxx | 1 - sdext/source/minimizer/impoptimizer.cxx | 5 ++--- starmath/source/unomodel.cxx | 3 +-- stoc/source/invocation_adapterfactory/iafactory.cxx | 3 +-- stoc/source/security/access_controller.cxx | 7 +++---- stoc/source/security/permissions.cxx | 3 +-- svl/source/numbers/zforlist.cxx | 1 - svtools/source/control/scriptedtext.cxx | 13 ++++++------- svx/source/items/customshapeitem.cxx | 1 - sw/source/core/unocore/unoportenum.cxx | 1 - sw/source/filter/xml/xmlimp.cxx | 1 - sw/source/ui/config/optcomp.cxx | 1 - sw/source/uibase/utlui/content.cxx | 11 +++++------ 20 files changed, 23 insertions(+), 43 deletions(-)
New commits: commit 79176694ddc7bce40ce2b82d3f332be8642a5167 Author: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> AuthorDate: Tue Feb 14 23:34:19 2023 +0100 Commit: Gabor Kelemen <kelem...@ubuntu.com> CommitDate: Thu Feb 16 08:14:21 2023 +0000 Drop 'using namespace ::std' in dirs s* Change-Id: If3119a1f2274aac0bf70576458e3adb4505a2a45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147076 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelem...@ubuntu.com> diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 146a8c4193db..d6d63fb654bd 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -45,7 +45,6 @@ #include <expat.h> -using namespace ::std; using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::lang; @@ -160,7 +159,7 @@ public: // module scope rtl::Reference < comphelper::AttributeList > rAttrList; // External entity stack - vector<struct Entity> vecEntity; + std::vector<struct Entity> vecEntity; void pushEntity( Entity &&entity ) { vecEntity.push_back( std::move(entity) ); } void popEntity() diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index e19a31211d98..708efc573983 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -41,7 +41,6 @@ #include <rtl/character.hxx> #include <sal/log.hxx> -using namespace ::std; using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star::uno; diff --git a/sd/source/console/PresenterBitmapContainer.cxx b/sd/source/console/PresenterBitmapContainer.cxx index e435c8dbac69..b25dacdf1101 100644 --- a/sd/source/console/PresenterBitmapContainer.cxx +++ b/sd/source/console/PresenterBitmapContainer.cxx @@ -27,7 +27,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using namespace ::std; namespace sdext::presenter { diff --git a/sd/source/console/PresenterTheme.cxx b/sd/source/console/PresenterTheme.cxx index 59c340d8627a..4ea59a5fa8cd 100644 --- a/sd/source/console/PresenterTheme.cxx +++ b/sd/source/console/PresenterTheme.cxx @@ -30,7 +30,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using namespace ::std; namespace sdext::presenter { @@ -51,7 +50,7 @@ public: sal_Int32 mnRight; sal_Int32 mnBottom; - vector<sal_Int32> ToVector() + std::vector<sal_Int32> ToVector() { return { @@ -199,7 +198,7 @@ public: OUString GetStyleName (const OUString& rsResourceName) const; private: - typedef map<OUString, OUString> StyleAssociations; + typedef std::map<OUString, OUString> StyleAssociations; StyleAssociations maStyleAssociations; void ProcessStyleAssociation( @@ -227,7 +226,7 @@ public: StyleAssociationContainer maStyleAssociations; Reference<container::XHierarchicalNameAccess> mxThemeRoot; std::shared_ptr<PresenterBitmapContainer> mpIconContainer; - typedef map<OUString,SharedFontDescriptor> FontContainer; + typedef std::map<OUString,SharedFontDescriptor> FontContainer; FontContainer maFontContainer; SharedPaneStyle GetPaneStyle (const OUString& rsStyleName) const; diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx index e28f57ecdecc..411e4ea621bc 100644 --- a/sd/source/ui/dlg/RemoteDialog.cxx +++ b/sd/source/ui/dlg/RemoteDialog.cxx @@ -11,7 +11,6 @@ #include <RemoteServer.hxx> using namespace ::sd; -using namespace ::std; RemoteDialog::RemoteDialog(weld::Window* pWindow) : GenericDialogController(pWindow, "modules/simpress/ui/remotedialog.ui", "RemoteDialog") diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx index 268658823423..8e3fcff143a4 100644 --- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx +++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx @@ -33,7 +33,6 @@ #include <osl/doublecheckedlocking.h> #include <osl/getglobalmutex.hxx> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index c64d72cb609c..3dd4c4c65478 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -49,7 +49,6 @@ #include <memory> -using namespace ::std; using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 7df57671014e..2e2d742d9579 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -45,7 +45,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -using namespace ::std; namespace sd { diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx index 572b6c6e6347..72be9c666086 100644 --- a/sdext/source/minimizer/impoptimizer.cxx +++ b/sdext/source/minimizer/impoptimizer.cxx @@ -53,7 +53,6 @@ #include <comphelper/propertyvalue.hxx> -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::io; using namespace ::com::sun::star::awt; @@ -70,7 +69,7 @@ using namespace ::com::sun::star::presentation; static void ImpExtractCustomShow( const Reference< XModel >& rxModel, std::u16string_view rCustomShowName ) { - vector< Reference< XDrawPage > > vNonUsedPageList; + std::vector< Reference< XDrawPage > > vNonUsedPageList; try { PageCollector::CollectNonCustomShowPages( rxModel, rCustomShowName, vNonUsedPageList ); @@ -87,7 +86,7 @@ static void ImpExtractCustomShow( const Reference< XModel >& rxModel, std::u16st static void ImpDeleteUnusedMasterPages( const Reference< XModel >& rxModel ) { - vector< PageCollector::MasterPageEntity > aMasterPageList; + std::vector< PageCollector::MasterPageEntity > aMasterPageList; PageCollector::CollectMasterPages( rxModel, aMasterPageList ); // now master pages that are not marked can be deleted diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 985c2971f035..f2f8abfb50e2 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -55,7 +55,6 @@ #include <cfgitem.hxx> using namespace ::cppu; -using namespace ::std; using namespace ::comphelper; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -812,7 +811,7 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu // this is get SmModule *pp = SM_MOD(); const SmSymbolManager &rManager = pp->GetSymbolManager(); - vector < const SmSym * > aVector; + std::vector < const SmSym * > aVector; const SymbolPtrVec_t aSymbols( rManager.GetSymbols() ); for (const SmSym* pSymbol : aSymbols) diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 894b00f42637..e79518cad1b9 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -45,7 +45,6 @@ #include <unordered_map> #include <vector> -using namespace ::std; using namespace ::osl; using namespace ::com::sun::star; using namespace css::uno; @@ -811,7 +810,7 @@ Reference< XInterface > FactoryImpl::createAdapter( &adapter_set, m_receiver2adapters, xKey.get(), rTypes ); if (nullptr == that) // again no entry { - pair< t_ptr_set::const_iterator, bool > i(adapter_set->insert(pNew)); + std::pair< t_ptr_set::const_iterator, bool > i(adapter_set->insert(pNew)); SAL_WARN_IF( !i.second, "stoc", "set already contains " << *(i.first) << " != " << pNew); diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index a62742692e5c..a99ea23b00e9 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -54,7 +54,6 @@ constexpr OUStringLiteral SERVICE_NAME = u"com.sun.star.security.AccessControlle constexpr OUStringLiteral USER_CREDS = u"access-control.user-credentials.id"; -using namespace ::std; using namespace ::osl; using namespace ::cppu; using namespace ::com::sun::star; @@ -296,11 +295,11 @@ class AccessController bool m_defaultPerm_init; bool m_singleUser_init; // for multi-user mode - lru_cache< OUString, PermissionCollection, OUStringHash, equal_to< OUString > > + lru_cache< OUString, PermissionCollection, OUStringHash, std::equal_to< OUString > > m_user2permissions; ThreadData m_rec; - typedef vector< pair< OUString, Any > > t_rec_vec; + typedef std::vector< std::pair< OUString, Any > > t_rec_vec; void clearPostPoned(); void checkAndClearPostPoned(); @@ -600,7 +599,7 @@ PermissionCollection AccessController::getEffectivePermissions( if (demanded_perm.hasValue()) { // enqueue - rec->push_back( pair< OUString, Any >( userId, demanded_perm ) ); + rec->push_back( std::pair< OUString, Any >( userId, demanded_perm ) ); } #ifdef __DIAGNOSE SAL_INFO("stoc", "> info: recurring call of user: " << userId ); diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 1799f9c8c2a5..12f39ce3d83a 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -38,7 +38,6 @@ #include "permissions.h" -using namespace ::std; using namespace ::osl; using namespace ::com::sun::star; using namespace css::uno; @@ -491,7 +490,7 @@ PermissionCollection::PermissionCollection( Sequence< OUString > PermissionCollection::toStrings() const { - vector< OUString > strings; + std::vector< OUString > strings; strings.reserve( 8 ); for ( Permission * perm = m_head.get(); perm; perm = perm->m_next.get() ) { diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index c85ae2ae838d..51e9b3e6cc33 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -61,7 +61,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::lang; -using namespace ::std; // Constants for type offsets per Country/Language (CL) #define ZF_STANDARD 0 diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 18c6445b95e5..e47924687bab 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -28,7 +28,6 @@ #include <com/sun/star/i18n/XBreakIterator.hpp> -using namespace ::std; using namespace ::com::sun::star; @@ -42,9 +41,9 @@ private: vcl::Font maDefltFont; /// The default font of the output device. OUString maText; /// The text. - vector< sal_Int32 > maPosVec; /// The start position of each text portion. - vector< sal_Int16 > maScriptVec; /// The script type of each text portion. - vector< sal_Int32 > maWidthVec; /// The output width of each text portion. + std::vector< sal_Int32 > maPosVec; /// The start position of each text portion. + std::vector< sal_Int16 > maScriptVec; /// The script type of each text portion. + std::vector< sal_Int32 > maWidthVec; /// The output width of each text portion. Size maTextSize; /// The size the text will take in the current output device. /** Gets the font of the given script type. */ @@ -112,7 +111,7 @@ void SvtScriptedTextHelper_Impl::CalculateSizes() if( !maPosVec.empty() ) { DBG_ASSERT( maPosVec.size() - 1 == maScriptVec.size(), - "SvtScriptedTextHelper_Impl::CalculateWidth - invalid vectors" ); + "SvtScriptedTextHelper_Impl::CalculateWidth - invalid std::vectors" ); sal_Int32 nThisPos = maPosVec[ 0 ]; sal_Int32 nNextPos; @@ -244,8 +243,8 @@ void SvtScriptedTextHelper_Impl::DrawText( const Point& _rPos ) if( maText.isEmpty() || maPosVec.empty() ) return; - DBG_ASSERT( maPosVec.size() - 1 == maScriptVec.size(), "SvtScriptedTextHelper_Impl::DrawText - invalid vectors" ); - DBG_ASSERT( maScriptVec.size() == maWidthVec.size(), "SvtScriptedTextHelper_Impl::DrawText - invalid vectors" ); + DBG_ASSERT( maPosVec.size() - 1 == maScriptVec.size(), "SvtScriptedTextHelper_Impl::DrawText - invalid std::vectors" ); + DBG_ASSERT( maScriptVec.size() == maWidthVec.size(), "SvtScriptedTextHelper_Impl::DrawText - invalid std::vectors" ); mrOutDevice.Push(vcl::PushFlags::FONT | vcl::PushFlags::TEXTCOLOR); diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index 3caa270de999..5f2ef96a251b 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -26,7 +26,6 @@ #include <com/sun/star/beans/PropertyValue.hpp> -using namespace ::std; using namespace com::sun::star; diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 39f7c034562f..b434ec772381 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -68,7 +68,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; -using namespace ::std; typedef std::pair< TextRangeList_t * const, SwTextAttr const * const > PortionList_t; typedef std::stack< PortionList_t > PortionStack_t; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 44c890eb3df8..a0dc24ed5162 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -88,7 +88,6 @@ using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::xforms; using namespace ::xmloff::token; -using namespace ::std; namespace { diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index d760e885a66e..7f6e6bf95141 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -39,7 +39,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::document; using namespace ::com::sun::star::uno; -using namespace ::std; struct SwCompatibilityOptPage_Impl { diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 1148689ce9d9..8628f0f42588 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -114,7 +114,6 @@ #define CTYPE_CNT 0 #define CTYPE_CTT 1 -using namespace ::std; using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; @@ -460,7 +459,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineText( i, m_pWrtShell->GetLayout(), true, false, false), ' ')); aEntry = SwNavigationPI::CleanEntry(aEntry); - auto pCnt(make_unique<SwOutlineContent>(this, aEntry, i, nLevel, + auto pCnt(std::make_unique<SwOutlineContent>(this, aEntry, i, nLevel, m_pWrtShell->IsOutlineMovable(i), nYPos)); m_pMember->insert(std::move(pCnt)); } @@ -507,7 +506,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) if (SwTable* pTable = SwTable::FindTable(&rTableFormat)) nYPos = getYPos(*pTable->GetTableNode()); } - auto pCnt = make_unique<SwContent>(this, rTableFormat.GetName(), nYPos); + auto pCnt = std::make_unique<SwContent>(this, rTableFormat.GetName(), nYPos); if( !rTableFormat.GetInfo( aAskItem ) && !aAskItem.pObject ) // not visible pCnt->SetInvisible(); @@ -758,7 +757,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) = rFormatFootnote.GetViewNumStr(*m_pWrtShell->GetDoc(), m_pWrtShell->GetLayout(), true) + " " + lcl_GetFootnoteText(*pTextFootnote); - auto pCnt(make_unique<SwTextFootnoteContent>( + auto pCnt(std::make_unique<SwTextFootnoteContent>( this, sText, pTextFootnote, ++nPos)); if (!pTextFootnote->GetTextNode().getLayoutFrame(m_pWrtShell->GetLayout())) pCnt->SetInvisible(); @@ -836,7 +835,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) { for (auto& r : aArr) { - auto pCnt(make_unique<SwURLFieldContent>(this, r.sText, INetURLObject::decode( + auto pCnt(std::make_unique<SwURLFieldContent>(this, r.sText, INetURLObject::decode( r.rINetAttr.GetINetFormat().GetValue(), INetURLObject::DecodeMechanism::Unambiguous), &r.rINetAttr, 0)); @@ -898,7 +897,7 @@ void SwContentType::FillMemberList(bool* pbContentChanged) SwGetINetAttrs::size_type n = 0; for (auto p : aStableSortINetAttrsArray) { - auto pCnt = make_unique<SwURLFieldContent>(this, p->sText, + auto pCnt = std::make_unique<SwURLFieldContent>(this, p->sText, INetURLObject::decode(p->rINetAttr.GetINetFormat().GetValue(), INetURLObject::DecodeMechanism::Unambiguous), &p->rINetAttr, ++n);