summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-10-03 20:19:02 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-10-04 07:06:07 +0200
commite05620e5b9326d9555497efb9be867003c5c5a83 (patch)
tree2a26e1e609ea87ec2a2bcb8d80644a2a2c084b62 /ucb
parentb32c9fb3d10af285dc353a27b760a427e81da311 (diff)
drop 'using namespace std' in sd + ucb
Change-Id: I7d15e9a8c37c29cd6d51c2000f72d1961cd6ff62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123029 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/cmis/auth_provider.cxx13
-rw-r--r--ucb/source/ucp/cmis/certvalidation_handler.cxx7
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx105
-rw-r--r--ucb/source/ucp/cmis/cmis_url.cxx2
-rw-r--r--ucb/source/ucp/cmis/std_inputstream.cxx23
-rw-r--r--ucb/source/ucp/cmis/std_outputstream.cxx11
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetI.cxx1
-rw-r--r--ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx13
8 files changed, 83 insertions, 92 deletions
diff --git a/ucb/source/ucp/cmis/auth_provider.cxx b/ucb/source/ucp/cmis/auth_provider.cxx
index 05a8846a11a7..c3f99f5f3de5 100644
--- a/ucb/source/ucp/cmis/auth_provider.cxx
+++ b/ucb/source/ucp/cmis/auth_provider.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
+#define OUSTR_TO_STDSTR(s) std::string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
#include <com/sun/star/task/XInteractionHandler.hpp>
@@ -21,11 +21,10 @@
#include "auth_provider.hxx"
using namespace com::sun::star;
-using namespace std;
namespace cmis
{
- bool AuthProvider::authenticationQuery( string& username, string& password )
+ bool AuthProvider::authenticationQuery( std::string& username, std::string& password )
{
if ( m_xEnv.is() )
{
@@ -67,9 +66,9 @@ namespace cmis
return false;
}
- string AuthProvider::getRefreshToken(string& rUsername)
+ std::string AuthProvider::getRefreshToken(std::string& rUsername)
{
- string refreshToken;
+ std::string refreshToken;
const css::uno::Reference<css::ucb::XCommandEnvironment> xEnv = getXEnv();
if (xEnv.is())
{
@@ -123,8 +122,8 @@ namespace cmis
return refreshToken;
}
- bool AuthProvider::storeRefreshToken(const string& username, const string& password,
- const string& refreshToken)
+ bool AuthProvider::storeRefreshToken(const std::string& username, const std::string& password,
+ const std::string& refreshToken)
{
if (refreshToken.empty())
return false;
diff --git a/ucb/source/ucp/cmis/certvalidation_handler.cxx b/ucb/source/ucp/cmis/certvalidation_handler.cxx
index ae488697a7eb..0080df37a483 100644
--- a/ucb/source/ucp/cmis/certvalidation_handler.cxx
+++ b/ucb/source/ucp/cmis/certvalidation_handler.cxx
@@ -24,12 +24,11 @@
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
-using namespace std;
using namespace com::sun::star;
namespace cmis
{
- bool CertValidationHandler::validateCertificate( vector< string > aCertificates )
+ bool CertValidationHandler::validateCertificate( std::vector< std::string > aCertificates )
{
bool bValidate = false;
if ( !aCertificates.empty() && m_xEnv.is() )
@@ -51,8 +50,8 @@ namespace cmis
uno::Reference< xml::crypto::XSecurityEnvironment > xSecurityEnv(
xSecurityContext->getSecurityEnvironment() );
- vector< string >::iterator pIt = aCertificates.begin();
- string sCert = *pIt;
+ std::vector< std::string >::iterator pIt = aCertificates.begin();
+ std::string sCert = *pIt;
// We need to get rid of the PEM header/footer lines
OUString sCleanCert = STD_TO_OUSTR( sCert );
sCleanCert = sCleanCert.replaceAll( "-----BEGIN CERTIFICATE-----", "" );
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index f4ad780444bc..57dd60f998cb 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -67,11 +67,10 @@
#include "std_inputstream.hxx"
#include "std_outputstream.hxx"
-#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
+#define OUSTR_TO_STDSTR(s) std::string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
using namespace com::sun::star;
-using namespace std;
namespace
{
@@ -104,7 +103,7 @@ namespace
default:
case libcmis::PropertyType::String:
{
- vector< string > aCmisStrings = pProperty->getStrings( );
+ auto aCmisStrings = pProperty->getStrings( );
uno::Sequence< OUString > aStrings( aCmisStrings.size( ) );
OUString* aStringsArr = aStrings.getArray( );
sal_Int32 i = 0;
@@ -117,7 +116,7 @@ namespace
break;
case libcmis::PropertyType::Integer:
{
- vector< long > aCmisLongs = pProperty->getLongs( );
+ auto aCmisLongs = pProperty->getLongs( );
uno::Sequence< sal_Int64 > aLongs( aCmisLongs.size( ) );
sal_Int64* aLongsArr = aLongs.getArray( );
sal_Int32 i = 0;
@@ -130,14 +129,14 @@ namespace
break;
case libcmis::PropertyType::Decimal:
{
- vector< double > aCmisDoubles = pProperty->getDoubles( );
+ auto aCmisDoubles = pProperty->getDoubles( );
uno::Sequence< double > aDoubles = comphelper::containerToSequence(aCmisDoubles);
aValue <<= aDoubles;
}
break;
case libcmis::PropertyType::Bool:
{
- vector< bool > aCmisBools = pProperty->getBools( );
+ auto aCmisBools = pProperty->getBools( );
uno::Sequence< sal_Bool > aBools( aCmisBools.size( ) );
sal_Bool* aBoolsArr = aBools.getArray( );
sal_Int32 i = 0;
@@ -150,7 +149,7 @@ namespace
break;
case libcmis::PropertyType::DateTime:
{
- vector< boost::posix_time::ptime > aCmisTimes = pProperty->getDateTimes( );
+ auto aCmisTimes = pProperty->getDateTimes( );
uno::Sequence< util::DateTime > aTimes( aCmisTimes.size( ) );
util::DateTime* aTimesArr = aTimes.getArray( );
sal_Int32 i = 0;
@@ -315,7 +314,7 @@ namespace cmis
OUString sProxy = rProxy.aName;
if ( rProxy.nPort > 0 )
sProxy += ":" + OUString::number( rProxy.nPort );
- libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
+ libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), std::string(), std::string(), std::string() );
// Look for a cached session, key is binding url + repo id
OUString sSessionId = m_aURL.getBindingUrl( ) + m_aURL.getRepositoryId( );
@@ -345,8 +344,8 @@ namespace cmis
AuthProvider aAuthProvider(xEnv, m_xIdentifier->getContentIdentifier(), m_aURL.getBindingUrl());
AuthProvider::setXEnv( xEnv );
- string rUsername = OUSTR_TO_STDSTR( m_aURL.getUsername( ) );
- string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
+ auto rUsername = OUSTR_TO_STDSTR( m_aURL.getUsername( ) );
+ auto rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
bool bSkipInitialPWAuth = false;
if (m_aURL.getBindingUrl() == ONEDRIVE_BASE_URL
@@ -456,7 +455,7 @@ namespace cmis
{
if ( nullptr == m_pObjectType.get( ) && m_bTransient )
{
- string typeId = m_bIsFolder ? "cmis:folder" : "cmis:document";
+ std::string typeId = m_bIsFolder ? "cmis:folder" : "cmis:document";
// The type to create needs to be fetched from the possible children types
// defined in the parent folder. Then, we'll pick up the first one we find matching
// cmis:folder or cmis:document (depending what we need to create).
@@ -473,14 +472,14 @@ namespace cmis
if ( pParent )
{
- map< string, libcmis::PropertyPtr >& aProperties = pParent->getProperties( );
- map< string, libcmis::PropertyPtr >::iterator it = aProperties.find( "cmis:allowedChildObjectTypeIds" );
+ std::map< std::string, libcmis::PropertyPtr >& aProperties = pParent->getProperties( );
+ std::map< std::string, libcmis::PropertyPtr >::iterator it = aProperties.find( "cmis:allowedChildObjectTypeIds" );
if ( it != aProperties.end( ) )
{
libcmis::PropertyPtr pProperty = it->second;
if ( pProperty )
{
- vector< string > typesIds = pProperty->getStrings( );
+ std::vector< std::string > typesIds = pProperty->getStrings( );
for ( const auto& rType : typesIds )
{
bTypeRestricted = true;
@@ -544,7 +543,7 @@ namespace cmis
// It's weird, but needed to handle case where the path isn't the folders/files
// names separated by '/' (as in Lotus Live)
INetURLObject aParentUrl( m_sURL );
- string sName = OUSTR_TO_STDSTR( aParentUrl.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ) );
+ std::string sName = OUSTR_TO_STDSTR( aParentUrl.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset ) );
aParentUrl.removeSegment( );
OUString sParentUrl = aParentUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE );
// Avoid infinite recursion if sParentUrl == m_sURL
@@ -554,7 +553,7 @@ namespace cmis
libcmis::FolderPtr pParentFolder = boost::dynamic_pointer_cast< libcmis::Folder >(xParent->getObject(xEnv));
if (pParentFolder)
{
- vector< libcmis::ObjectPtr > children = pParentFolder->getChildren();
+ std::vector< libcmis::ObjectPtr > children = pParentFolder->getChildren();
auto it = std::find_if(children.begin(), children.end(),
[&sName](const libcmis::ObjectPtr& rChild) { return rChild->getName() == sName; });
if (it != children.end())
@@ -614,13 +613,13 @@ namespace cmis
// Convert iCmisProps to Cmis Properties;
uno::Sequence< document::CmisProperty > aPropsSeq;
iCmisProps >>= aPropsSeq;
- map< string, libcmis::PropertyPtr > aProperties;
+ std::map< std::string, libcmis::PropertyPtr > aProperties;
for ( const auto& rProp : std::as_const(aPropsSeq) )
{
std::string id = OUSTR_TO_STDSTR( rProp.Id );
libcmis::PropertyPtr prop = lcl_unoToCmisProperty( rProp );
- aProperties.insert( std::pair<string, libcmis::PropertyPtr>( id, prop ) );
+ aProperties.insert( std::pair<std::string, libcmis::PropertyPtr>( id, prop ) );
}
libcmis::ObjectPtr updateObj;
try
@@ -690,10 +689,10 @@ namespace cmis
{
if ( !m_pObjectProps.empty() )
{
- map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" );
+ std::map< std::string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" );
if ( it != m_pObjectProps.end( ) )
{
- vector< string > values = it->second->getStrings( );
+ std::vector< std::string > values = it->second->getStrings( );
if ( !values.empty() )
sTitle = STD_TO_OUSTR( values.front( ) );
}
@@ -731,10 +730,10 @@ namespace cmis
{
if ( !m_pObjectProps.empty() )
{
- map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:objectId" );
+ std::map< std::string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:objectId" );
if ( it != m_pObjectProps.end( ) )
{
- vector< string > values = it->second->getStrings( );
+ std::vector< std::string > values = it->second->getStrings( );
if ( !values.empty() )
sId = STD_TO_OUSTR( values.front( ) );
}
@@ -841,13 +840,13 @@ namespace cmis
try
{
libcmis::ObjectPtr object = getObject( xEnv );
- map< string, libcmis::PropertyPtr >& aProperties = object->getProperties( );
+ std::map< std::string, libcmis::PropertyPtr >& aProperties = object->getProperties( );
uno::Sequence< document::CmisProperty > aCmisProperties( aProperties.size( ) );
document::CmisProperty* pCmisProps = aCmisProperties.getArray( );
sal_Int32 i = 0;
for ( const auto& [sId, rProperty] : aProperties )
{
- string sDisplayName = rProperty->getPropertyType()->getDisplayName( );
+ auto sDisplayName = rProperty->getPropertyType()->getDisplayName( );
bool bUpdatable = rProperty->getPropertyType()->isUpdatable( );
bool bRequired = rProperty->getPropertyType()->isRequired( );
bool bMultiValued = rProperty->getPropertyType()->isMultiValued();
@@ -1065,11 +1064,11 @@ namespace cmis
"Checkin only supported by documents" );
}
- boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
+ boost::shared_ptr< std::ostream > pOut( new std::ostringstream ( std::ios_base::binary | std::ios_base::in | std::ios_base::out ) );
uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
copyData( xIn, xOutput );
- map< string, libcmis::PropertyPtr > newProperties;
+ std::map< std::string, libcmis::PropertyPtr > newProperties;
libcmis::DocumentPtr pDoc;
try
@@ -1089,17 +1088,17 @@ namespace cmis
// Get the URL and send it back as a result
URL aCmisUrl( m_sURL );
- vector< string > aPaths = pDoc->getPaths( );
+ std::vector< std::string > aPaths = pDoc->getPaths( );
if ( !aPaths.empty() )
{
- string sPath = aPaths.front( );
+ auto sPath = aPaths.front( );
aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
}
else
{
// We may have unfiled document depending on the server, those
// won't have any path, use their ID instead
- string sId = pDoc->getId( );
+ auto sId = pDoc->getId( );
aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
}
return aCmisUrl.asString( );
@@ -1124,17 +1123,17 @@ namespace cmis
// Compute the URL of the Private Working Copy (PWC)
URL aCmisUrl( m_sURL );
- vector< string > aPaths = pPwc->getPaths( );
+ std::vector< std::string > aPaths = pPwc->getPaths( );
if ( !aPaths.empty() )
{
- string sPath = aPaths.front( );
+ auto sPath = aPaths.front( );
aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
}
else
{
// We may have unfiled PWC depending on the server, those
// won't have any path, use their ID instead
- string sId = pPwc->getId( );
+ auto sId = pPwc->getId( );
aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
}
aRet = aCmisUrl.asString( );
@@ -1168,13 +1167,13 @@ namespace cmis
pPwc->cancelCheckout( );
// Get the Original document (latest version)
- vector< libcmis::DocumentPtr > aVersions = pPwc->getAllVersions( );
+ std::vector< libcmis::DocumentPtr > aVersions = pPwc->getAllVersions( );
for ( const auto& rVersion : aVersions )
{
libcmis::DocumentPtr pVersion = rVersion;
- map< string, libcmis::PropertyPtr > aProps = pVersion->getProperties( );
+ std::map< std::string, libcmis::PropertyPtr > aProps = pVersion->getProperties( );
bool bIsLatestVersion = false;
- map< string, libcmis::PropertyPtr >::iterator propIt = aProps.find( string( "cmis:isLatestVersion" ) );
+ std::map< std::string, libcmis::PropertyPtr >::iterator propIt = aProps.find( std::string( "cmis:isLatestVersion" ) );
if ( propIt != aProps.end( ) && !propIt->second->getBools( ).empty( ) )
{
bIsLatestVersion = propIt->second->getBools( ).front( );
@@ -1184,17 +1183,17 @@ namespace cmis
{
// Compute the URL of the Document
URL aCmisUrl( m_sURL );
- vector< string > aPaths = pVersion->getPaths( );
+ std::vector< std::string > aPaths = pVersion->getPaths( );
if ( !aPaths.empty() )
{
- string sPath = aPaths.front( );
+ auto sPath = aPaths.front( );
aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) );
}
else
{
// We may have unfiled doc depending on the server, those
// won't have any path, use their ID instead
- string sId = pVersion->getId( );
+ auto sId = pVersion->getId( );
aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) );
}
aRet = aCmisUrl.asString( );
@@ -1228,7 +1227,7 @@ namespace cmis
xEnv,
"Can not get the document" );
}
- vector< libcmis::DocumentPtr > aCmisVersions = pDoc->getAllVersions( );
+ std::vector< libcmis::DocumentPtr > aCmisVersions = pDoc->getAllVersions( );
uno::Sequence< document::CmisVersion > aVersions( aCmisVersions.size( ) );
int i = 0;
for ( const auto& rVersion : aCmisVersions )
@@ -1308,7 +1307,7 @@ namespace cmis
return;
libcmis::ObjectPtr object;
- map< string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" );
+ std::map< std::string, libcmis::PropertyPtr >::iterator it = m_pObjectProps.find( "cmis:name" );
if ( it == m_pObjectProps.end( ) )
{
ucbhelper::cancelCommandExecution( uno::makeAny
@@ -1316,8 +1315,8 @@ namespace cmis
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
}
- string newName = it->second->getStrings( ).front( );
- string newPath = OUSTR_TO_STDSTR( m_sObjectPath );
+ auto newName = it->second->getStrings( ).front( );
+ auto newPath = OUSTR_TO_STDSTR( m_sObjectPath );
if ( !newPath.empty( ) && newPath[ newPath.size( ) - 1 ] != '/' )
newPath += "/";
newPath += newName;
@@ -1349,12 +1348,12 @@ namespace cmis
libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get( ) );
if ( nullptr != document )
{
- boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
+ boost::shared_ptr< std::ostream > pOut( new std::ostringstream ( std::ios_base::binary | std::ios_base::in | std::ios_base::out ) );
uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
copyData( xInputStream, xOutput );
try
{
- document->setContentStream( pOut, OUSTR_TO_STDSTR( rMimeType ), string( ), bReplaceExisting );
+ document->setContentStream( pOut, OUSTR_TO_STDSTR( rMimeType ), std::string( ), bReplaceExisting );
}
catch ( const libcmis::Exception& )
{
@@ -1388,12 +1387,12 @@ namespace cmis
}
else
{
- boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
+ boost::shared_ptr< std::ostream > pOut( new std::ostringstream ( std::ios_base::binary | std::ios_base::in | std::ios_base::out ) );
uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
copyData( xInputStream, xOutput );
try
{
- pFolder->createDocument( m_pObjectProps, pOut, OUSTR_TO_STDSTR( rMimeType ), string() );
+ pFolder->createDocument( m_pObjectProps, pOut, OUSTR_TO_STDSTR( rMimeType ), std::string() );
sNewPath = STD_TO_OUSTR( newPath );
}
catch ( const libcmis::Exception& )
@@ -1553,7 +1552,7 @@ namespace cmis
if (!document)
return false;
- boost::shared_ptr< istream > aIn = document->getContentStream( );
+ boost::shared_ptr< std::istream > aIn = document->getContentStream( );
uno::Reference< io::XInputStream > xIn = new StdInputStream( aIn );
if( !xIn.is( ) )
@@ -2039,7 +2038,7 @@ namespace cmis
// Get the children from pObject
try
{
- vector< libcmis::ObjectPtr > children = pFolder->getChildren( );
+ std::vector< libcmis::ObjectPtr > children = pFolder->getChildren( );
// Loop over the results
for ( const auto& rChild : children )
@@ -2080,20 +2079,20 @@ namespace cmis
if ( !getObjectType( xEnv ).get( ) )
return;
- map< string, libcmis::PropertyPtr >::iterator propIt = m_pObjectProps.find(rName);
- vector< string > values;
+ std::map< std::string, libcmis::PropertyPtr >::iterator propIt = m_pObjectProps.find(rName);
+ std::vector< std::string > values;
values.push_back(rValue);
if ( propIt == m_pObjectProps.end( ) && getObjectType( xEnv ).get( ) )
{
- map< string, libcmis::PropertyTypePtr > propsTypes = getObjectType( xEnv )->getPropertiesTypes( );
- map< string, libcmis::PropertyTypePtr >::iterator typeIt = propsTypes.find(rName);
+ std::map< std::string, libcmis::PropertyTypePtr > propsTypes = getObjectType( xEnv )->getPropertiesTypes( );
+ std::map< std::string, libcmis::PropertyTypePtr >::iterator typeIt = propsTypes.find(rName);
if ( typeIt != propsTypes.end( ) )
{
libcmis::PropertyTypePtr propType = typeIt->second;
libcmis::PropertyPtr property( new libcmis::Property( propType, values ) );
- m_pObjectProps.insert(pair< string, libcmis::PropertyPtr >(rName, property));
+ m_pObjectProps.insert(std::pair< std::string, libcmis::PropertyPtr >(rName, property));
}
}
else if ( propIt != m_pObjectProps.end( ) )
diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx
index 5a253757d180..66f214f2ab40 100644
--- a/ucb/source/ucp/cmis/cmis_url.cxx
+++ b/ucb/source/ucp/cmis/cmis_url.cxx
@@ -14,8 +14,6 @@
#include "cmis_url.hxx"
-using namespace std;
-
namespace cmis
{
URL::URL( OUString const & urlStr )
diff --git a/ucb/source/ucp/cmis/std_inputstream.cxx b/ucb/source/ucp/cmis/std_inputstream.cxx
index 6ab970d327f3..ed7e5d19b7a8 100644
--- a/ucb/source/ucp/cmis/std_inputstream.cxx
+++ b/ucb/source/ucp/cmis/std_inputstream.cxx
@@ -16,21 +16,20 @@
#include "std_inputstream.hxx"
-using namespace std;
using namespace com::sun::star;
namespace cmis
{
- StdInputStream::StdInputStream( boost::shared_ptr< istream > const & pStream ) :
+ StdInputStream::StdInputStream( boost::shared_ptr< std::istream > const & pStream ) :
m_pStream( pStream ),
m_nLength( 0 )
{
if (m_pStream)
{
- streampos nInitPos = m_pStream->tellg( );
- m_pStream->seekg( 0, ios_base::end );
- streampos nEndPos = m_pStream->tellg( );
- m_pStream->seekg( nInitPos, ios_base::beg );
+ auto nInitPos = m_pStream->tellg( );
+ m_pStream->seekg( 0, std::ios_base::end );
+ auto nEndPos = m_pStream->tellg( );
+ m_pStream->seekg( nInitPos, std::ios_base::beg );
m_nLength = sal_Int64( nEndPos - nInitPos );
}
@@ -75,7 +74,7 @@ namespace cmis
m_pStream->read( reinterpret_cast< char* >( aData.getArray( ) ), nBytesToRead );
nRead = m_pStream->gcount();
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
throw io::IOException( );
@@ -100,7 +99,7 @@ namespace cmis
{
nRead = m_pStream->readsome( reinterpret_cast< char* >( aData.getArray( ) ), nMaxBytesToRead );
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
throw io::IOException( );
@@ -117,9 +116,9 @@ namespace cmis
try
{
- m_pStream->seekg( nBytesToSkip, ios_base::cur );
+ m_pStream->seekg( nBytesToSkip, std::ios_base::cur );
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
throw io::IOException( );
@@ -151,9 +150,9 @@ namespace cmis
try
{
m_pStream->clear( ); // may be needed to rewind the stream
- m_pStream->seekg( location, ios_base::beg );
+ m_pStream->seekg( location, std::ios_base::beg );
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
throw io::IOException( );
diff --git a/ucb/source/ucp/cmis/std_outputstream.cxx b/ucb/source/ucp/cmis/std_outputstream.cxx
index c1a3087a1923..306dc4c44be3 100644
--- a/ucb/source/ucp/cmis/std_outputstream.cxx
+++ b/ucb/source/ucp/cmis/std_outputstream.cxx
@@ -15,12 +15,11 @@
#include "std_outputstream.hxx"
-using namespace std;
using namespace com::sun::star;
namespace cmis
{
- StdOutputStream::StdOutputStream( boost::shared_ptr< ostream > const & pStream ) :
+ StdOutputStream::StdOutputStream( boost::shared_ptr< std::ostream > const & pStream ) :
m_pStream( pStream )
{
}
@@ -28,7 +27,7 @@ namespace cmis
StdOutputStream::~StdOutputStream()
{
if (m_pStream)
- m_pStream->setstate( ios::eofbit );
+ m_pStream->setstate( std::ios::eofbit );
}
uno::Any SAL_CALL StdOutputStream::queryInterface( const uno::Type& rType )
@@ -59,7 +58,7 @@ namespace cmis
{
m_pStream->write( reinterpret_cast< const char* >( aData.getConstArray( ) ), aData.getLength( ) );
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling write: " << e.what() );
throw io::IOException( );
@@ -77,7 +76,7 @@ namespace cmis
{
m_pStream->flush( );
}
- catch ( const ios_base::failure& e )
+ catch ( const std::ios_base::failure& e )
{
SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling flush: " << e.what() );
throw io::IOException( );
@@ -91,7 +90,7 @@ namespace cmis
if (!m_pStream)
throw io::IOException( );
- m_pStream->setstate( ios_base::eofbit );
+ m_pStream->setstate( std::ios_base::eofbit );
}
}
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx
index 0da84408d562..d886a0dbf973 100644
--- a/ucb/source/ucp/ftp/ftpresultsetI.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx
@@ -25,7 +25,6 @@
#include "ftpcontent.hxx"
-using namespace std;
using namespace ftp;
using namespace com::sun::star::ucb;
using namespace com::sun::star::lang;
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index 2b7eafb0210b..83252bf837aa 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -42,7 +42,6 @@
using namespace com::sun::star::uno;
using namespace com::sun::star::ucb;
-using namespace std;
using namespace webdav_ucp;
@@ -201,8 +200,8 @@ static void NPFR_propfind_results( void* userdata,
ne_propset_iterate( set, NPFR_propfind_iter, &theResource );
// Add entry to resources list.
- vector< DAVResource > * theResources
- = static_cast< vector< DAVResource > * >( userdata );
+ std::vector< DAVResource > * theResources
+ = static_cast< std::vector< DAVResource > * >( userdata );
theResources->push_back( theResource );
}
@@ -233,8 +232,8 @@ static void NPFR_propnames_results( void* userdata,
ne_propset_iterate( results, NPFR_propnames_iter, &theResource );
// Add entry to resources list.
- vector< DAVResourceInfo > * theResources
- = static_cast< vector< DAVResourceInfo > * >( userdata );
+ std::vector< DAVResourceInfo > * theResources
+ = static_cast< std::vector< DAVResourceInfo > * >( userdata );
theResources->push_back( theResource );
}
@@ -243,8 +242,8 @@ static void NPFR_propnames_results( void* userdata,
NeonPropFindRequest::NeonPropFindRequest( HttpSession* inSession,
const char* inPath,
const Depth inDepth,
- const vector< OUString >& inPropNames,
- vector< DAVResource >& ioResources,
+ const std::vector< OUString >& inPropNames,
+ std::vector< DAVResource >& ioResources,
int & nError )
{
// Generate the list of properties we're looking for