[Libreoffice-commits] core.git: sax/qa sax/source scaddins/source sc/source sfx2/source shell/qa

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 4 20:25:40 UTC 2021


 sax/qa/cppunit/xmlimport.cxx               |   11 +++++------
 sax/source/fastparser/fastparser.cxx       |    1 -
 sax/source/fastparser/legacyfastparser.cxx |    3 +--
 sc/source/core/data/dpresfilter.cxx        |    1 -
 sc/source/core/data/table5.cxx             |    4 ----
 scaddins/source/analysis/analysis.cxx      |    1 -
 sfx2/source/dialog/infobar.cxx             |    3 +--
 shell/qa/zip/ziptest.cxx                   |    3 +--
 8 files changed, 8 insertions(+), 19 deletions(-)

New commits:
commit bf82274d327146ec0aa2b4f8a0e6d1bf24366cb3
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Mon Oct 4 20:37:54 2021 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon Oct 4 22:25:07 2021 +0200

    drop 'using namespace std' in sax/sc/scaddins/sfx2/shell
    
    Change-Id: I422a6d5b0151115203fd2d7c0fc5597903d3ec8b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123064
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx
index 3da498ecded4..cb34ff1f5eb2 100644
--- a/sax/qa/cppunit/xmlimport.cxx
+++ b/sax/qa/cppunit/xmlimport.cxx
@@ -49,7 +49,6 @@ using namespace css;
 using namespace uno;
 using namespace io;
 using namespace xml::sax;
-using namespace std;
 using namespace ::osl;
 using namespace sax_fastparser;
 
@@ -71,8 +70,8 @@ class TestDocumentHandler : public cppu::WeakImplHelper< XDocumentHandler >
 {
 private:
     OUString m_aStr;
-    deque< pair<OUString,OUString> > m_aNamespaceStack;
-    stack<sal_uInt16> m_aCountStack;
+    std::deque< std::pair<OUString,OUString> > m_aNamespaceStack;
+    std::stack<sal_uInt16> m_aCountStack;
 
     OUString canonicalform(const OUString &sName, const OUString &sValue, bool isElement);
     OUString getNamespace(std::u16string_view sName);
@@ -126,7 +125,7 @@ OUString TestDocumentHandler::getNamespace(std::u16string_view sName)
 {
     for (sal_Int16 i = m_aNamespaceStack.size() - 1; i>=0; i--)
     {
-        pair<OUString, OUString> aPair = m_aNamespaceStack.at(i);
+        std::pair<OUString, OUString> aPair = m_aNamespaceStack.at(i);
         if (aPair.first == sName)
             return aPair.second;
     }
@@ -137,8 +136,8 @@ void SAL_CALL TestDocumentHandler::startDocument()
 {
     m_aStr.clear();
     m_aNamespaceStack.clear();
-    m_aNamespaceStack.emplace_back( make_pair( OUString( "default" ), OUString() ) );
-    m_aCountStack = stack<sal_uInt16>();
+    m_aNamespaceStack.emplace_back( std::make_pair( OUString( "default" ), OUString() ) );
+    m_aCountStack = std::stack<sal_uInt16>();
     m_aCountStack.emplace(0);
 }
 
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 86bd8a734b63..97435e2219ea 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -54,7 +54,6 @@
 // Inverse of libxml's BAD_CAST.
 #define XML_CAST( str ) reinterpret_cast< const char* >( str )
 
-using namespace std;
 using namespace ::osl;
 using namespace ::cppu;
 using namespace ::com::sun::star::uno;
diff --git a/sax/source/fastparser/legacyfastparser.cxx b/sax/source/fastparser/legacyfastparser.cxx
index c748eb057fbe..d32b12d8a5f9 100644
--- a/sax/source/fastparser/legacyfastparser.cxx
+++ b/sax/source/fastparser/legacyfastparser.cxx
@@ -29,7 +29,6 @@
 #include <memory>
 #include <vector>
 
-using namespace std;
 using namespace ::cppu;
 using namespace css;
 using namespace uno;
@@ -49,7 +48,7 @@ private:
 
         NamespaceDefine( const OUString& rPrefix, const OUString& rNamespaceURI ) : m_aPrefix( rPrefix ), m_aNamespaceURI( rNamespaceURI ) {}
     };
-    vector< unique_ptr< NamespaceDefine > > m_aNamespaceDefines;
+    std::vector< std::unique_ptr< NamespaceDefine > > m_aNamespaceDefines;
 
 public:
     NamespaceHandler();
diff --git a/sc/source/core/data/dpresfilter.cxx b/sc/source/core/data/dpresfilter.cxx
index 0080f1931809..fb13707e83b3 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -20,7 +20,6 @@
 #include <limits>
 
 using namespace com::sun::star;
-using namespace std;
 
 ScDPResultFilter::ScDPResultFilter(const OUString& rDimName, bool bDataLayout) :
     maDimName(rDimName), mbHasValue(false), mbDataLayout(bDataLayout) {}
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 244ba04d53aa..6c04781df60a 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -340,7 +340,6 @@ void ScTable::GetAllRowBreaks(set<SCROW>& rBreaks, bool bPage, bool bManual) con
 
     if (bManual)
     {
-        using namespace std;
         copy(maRowManualBreaks.begin(), maRowManualBreaks.end(),
              inserter(rBreaks, rBreaks.begin()));
     }
@@ -353,7 +352,6 @@ void ScTable::GetAllColBreaks(set<SCCOL>& rBreaks, bool bPage, bool bManual) con
 
     if (bManual)
     {
-        using namespace std;
         copy(maColManualBreaks.begin(), maColManualBreaks.end(),
              inserter(rBreaks, rBreaks.begin()));
     }
@@ -399,8 +397,6 @@ SCROW ScTable::GetNextManualBreak(SCROW nRow) const
 
 void ScTable::RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow)
 {
-    using namespace std;
-
     if (!ValidRow(nStartRow) || !ValidRow(nEndRow))
         return;
 
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index 0b96bcc28430..dca1c370d994 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -38,7 +38,6 @@ constexpr OUStringLiteral MY_IMPLNAME = u"com.sun.star.sheet.addin.AnalysisImpl"
 
 using namespace                 ::com::sun::star;
 using namespace sca::analysis;
-using namespace std;
 
 OUString AnalysisAddIn::GetFuncDescrStr(const TranslateId* pResId, sal_uInt16 nStrIndex)
 {
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 9ca00fb95e47..eade717ea474 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -28,7 +28,6 @@
 #include <vcl/weldutils.hxx>
 #include <bitmaps.hlst>
 
-using namespace std;
 using namespace drawinglayer::geometry;
 using namespace drawinglayer::processor2d;
 using namespace drawinglayer::primitive2d;
@@ -107,7 +106,7 @@ void SfxInfoBarWindow::SetCloseButtonImage()
     Point aBtnPos(0, 0);
 
     const ViewInformation2D aNewViewInfos;
-    const unique_ptr<BaseProcessor2D> pProcessor(
+    const std::unique_ptr<BaseProcessor2D> pProcessor(
         createBaseProcessor2DFromOutputDevice(*xDevice, aNewViewInfos));
 
     const ::tools::Rectangle aRect(aBtnPos, xDevice->PixelToLogic(aSize));
diff --git a/shell/qa/zip/ziptest.cxx b/shell/qa/zip/ziptest.cxx
index 2ebe056d5b8b..c2eb74222429 100644
--- a/shell/qa/zip/ziptest.cxx
+++ b/shell/qa/zip/ziptest.cxx
@@ -31,12 +31,11 @@
 #include <string>
 #include <stream_helper.hxx>
 #include "testzipimpl.hxx"
-using namespace std;
 
 class Test : public CppUnit::TestFixture
 {
 private:
-    wstring documentName;
+    std::wstring documentName;
     LPSTREAM pStream;
 
 public:


More information about the Libreoffice-commits mailing list