mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-13 08:14:20 +01:00
Merge pull request #1391 from pocoproject/revert-1195-netssl-openssl-wshadow-fixes
Revert "GH #1050 NetSSL_OpenSSL: fix gcc -Wshadow warnings"
This commit is contained in:
commit
a4c072457f
@ -62,9 +62,9 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional(const C& rValue):
|
Optional(const C& value):
|
||||||
/// Creates a Optional with the given value.
|
/// Creates a Optional with the given value.
|
||||||
_value(rValue),
|
_value(value),
|
||||||
_isSpecified(true)
|
_isSpecified(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -81,10 +81,10 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional& assign(const C& rValue)
|
Optional& assign(const C& value)
|
||||||
/// Assigns a value to the Optional.
|
/// Assigns a value to the Optional.
|
||||||
{
|
{
|
||||||
_value = rValue;
|
_value = value;
|
||||||
_isSpecified = true;
|
_isSpecified = true;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
@ -97,9 +97,9 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional& operator = (const C& rValue)
|
Optional& operator = (const C& value)
|
||||||
{
|
{
|
||||||
return assign(rValue);
|
return assign(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional& operator = (const Optional& other)
|
Optional& operator = (const Optional& other)
|
||||||
|
@ -214,9 +214,9 @@ void MailMessage::addRecipient(const MailRecipient& recipient)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MailMessage::setRecipients(const Recipients& rRecipients)
|
void MailMessage::setRecipients(const Recipients& recipients)
|
||||||
{
|
{
|
||||||
_recipients.assign(rRecipients.begin(), rRecipients.end());
|
_recipients.assign(recipients.begin(), recipients.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -326,12 +326,12 @@ void MailMessage::addAttachment(const std::string& name, PartSource* pSource, Co
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MailMessage::read(std::istream& istr, PartHandler& rHandler)
|
void MailMessage::read(std::istream& istr, PartHandler& handler)
|
||||||
{
|
{
|
||||||
readHeader(istr);
|
readHeader(istr);
|
||||||
if (isMultipart())
|
if (isMultipart())
|
||||||
{
|
{
|
||||||
readMultipart(istr, rHandler);
|
readMultipart(istr, handler);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -41,8 +41,8 @@ Context::Params::Params():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Context::Context(Usage contextUsage, const Params& params):
|
Context::Context(Usage usage, const Params& params):
|
||||||
_usage(contextUsage),
|
_usage(usage),
|
||||||
_mode(params.verificationMode),
|
_mode(params.verificationMode),
|
||||||
_pSSLContext(0),
|
_pSSLContext(0),
|
||||||
_extendedCertificateVerification(true)
|
_extendedCertificateVerification(true)
|
||||||
@ -52,16 +52,16 @@ Context::Context(Usage contextUsage, const Params& params):
|
|||||||
|
|
||||||
|
|
||||||
Context::Context(
|
Context::Context(
|
||||||
Usage contextUsage,
|
Usage usage,
|
||||||
const std::string& privateKeyFile,
|
const std::string& privateKeyFile,
|
||||||
const std::string& certificateFile,
|
const std::string& certificateFile,
|
||||||
const std::string& caLocation,
|
const std::string& caLocation,
|
||||||
VerificationMode mode,
|
VerificationMode verificationMode,
|
||||||
int verificationDepth,
|
int verificationDepth,
|
||||||
bool loadDefaultCAs,
|
bool loadDefaultCAs,
|
||||||
const std::string& cipherList):
|
const std::string& cipherList):
|
||||||
_usage(contextUsage),
|
_usage(usage),
|
||||||
_mode(mode),
|
_mode(verificationMode),
|
||||||
_pSSLContext(0),
|
_pSSLContext(0),
|
||||||
_extendedCertificateVerification(true)
|
_extendedCertificateVerification(true)
|
||||||
{
|
{
|
||||||
@ -69,7 +69,7 @@ Context::Context(
|
|||||||
params.privateKeyFile = privateKeyFile;
|
params.privateKeyFile = privateKeyFile;
|
||||||
params.certificateFile = certificateFile;
|
params.certificateFile = certificateFile;
|
||||||
params.caLocation = caLocation;
|
params.caLocation = caLocation;
|
||||||
params.verificationMode = mode;
|
params.verificationMode = verificationMode;
|
||||||
params.verificationDepth = verificationDepth;
|
params.verificationDepth = verificationDepth;
|
||||||
params.loadDefaultCAs = loadDefaultCAs;
|
params.loadDefaultCAs = loadDefaultCAs;
|
||||||
params.cipherList = cipherList;
|
params.cipherList = cipherList;
|
||||||
@ -78,20 +78,20 @@ Context::Context(
|
|||||||
|
|
||||||
|
|
||||||
Context::Context(
|
Context::Context(
|
||||||
Usage contextUsage,
|
Usage usage,
|
||||||
const std::string& caLocation,
|
const std::string& caLocation,
|
||||||
VerificationMode mode,
|
VerificationMode verificationMode,
|
||||||
int verificationDepth,
|
int verificationDepth,
|
||||||
bool loadDefaultCAs,
|
bool loadDefaultCAs,
|
||||||
const std::string& cipherList):
|
const std::string& cipherList):
|
||||||
_usage(contextUsage),
|
_usage(usage),
|
||||||
_mode(mode),
|
_mode(verificationMode),
|
||||||
_pSSLContext(0),
|
_pSSLContext(0),
|
||||||
_extendedCertificateVerification(true)
|
_extendedCertificateVerification(true)
|
||||||
{
|
{
|
||||||
Params params;
|
Params params;
|
||||||
params.caLocation = caLocation;
|
params.caLocation = caLocation;
|
||||||
params.verificationMode = mode;
|
params.verificationMode = verificationMode;
|
||||||
params.verificationDepth = verificationDepth;
|
params.verificationDepth = verificationDepth;
|
||||||
params.loadDefaultCAs = loadDefaultCAs;
|
params.loadDefaultCAs = loadDefaultCAs;
|
||||||
params.cipherList = cipherList;
|
params.cipherList = cipherList;
|
||||||
|
@ -41,17 +41,17 @@ HTTPSClientSession::HTTPSClientSession():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HTTPSClientSession::HTTPSClientSession(const SecureStreamSocket& rSocket):
|
HTTPSClientSession::HTTPSClientSession(const SecureStreamSocket& socket):
|
||||||
HTTPClientSession(rSocket),
|
HTTPClientSession(socket),
|
||||||
_pContext(rSocket.context())
|
_pContext(socket.context())
|
||||||
{
|
{
|
||||||
setPort(HTTPS_PORT);
|
setPort(HTTPS_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HTTPSClientSession::HTTPSClientSession(const SecureStreamSocket& rSocket, Session::Ptr pSession):
|
HTTPSClientSession::HTTPSClientSession(const SecureStreamSocket& socket, Session::Ptr pSession):
|
||||||
HTTPClientSession(rSocket),
|
HTTPClientSession(socket),
|
||||||
_pContext(rSocket.context()),
|
_pContext(socket.context()),
|
||||||
_pSession(pSession)
|
_pSession(pSession)
|
||||||
{
|
{
|
||||||
setPort(HTTPS_PORT);
|
setPort(HTTPS_PORT);
|
||||||
|
@ -24,8 +24,8 @@ namespace Poco {
|
|||||||
namespace Net {
|
namespace Net {
|
||||||
|
|
||||||
|
|
||||||
SecureSMTPClientSession::SecureSMTPClientSession(const StreamSocket& rSocket):
|
SecureSMTPClientSession::SecureSMTPClientSession(const StreamSocket& socket):
|
||||||
SMTPClientSession(rSocket)
|
SMTPClientSession(socket)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,18 +48,18 @@ SecureServerSocket::SecureServerSocket(const Socket& socket):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureServerSocket::SecureServerSocket(const SocketAddress& rAddress, int backlog):
|
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog):
|
||||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||||
{
|
{
|
||||||
impl()->bind(rAddress, true);
|
impl()->bind(address, true);
|
||||||
impl()->listen(backlog);
|
impl()->listen(backlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureServerSocket::SecureServerSocket(const SocketAddress& rAddress, int backlog, Context::Ptr pContext):
|
SecureServerSocket::SecureServerSocket(const SocketAddress& address, int backlog, Context::Ptr pContext):
|
||||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||||
{
|
{
|
||||||
impl()->bind(rAddress, true);
|
impl()->bind(address, true);
|
||||||
impl()->listen(backlog);
|
impl()->listen(backlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,8 +68,8 @@ SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog):
|
|||||||
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
ServerSocket(new SecureServerSocketImpl(SSLManager::instance().defaultServerContext()), true)
|
||||||
{
|
{
|
||||||
IPAddress wildcardAddr;
|
IPAddress wildcardAddr;
|
||||||
SocketAddress socketAddress(wildcardAddr, port);
|
SocketAddress address(wildcardAddr, port);
|
||||||
impl()->bind(socketAddress, true);
|
impl()->bind(address, true);
|
||||||
impl()->listen(backlog);
|
impl()->listen(backlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ SecureServerSocket::SecureServerSocket(Poco::UInt16 port, int backlog, Context::
|
|||||||
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
ServerSocket(new SecureServerSocketImpl(pContext), true)
|
||||||
{
|
{
|
||||||
IPAddress wildcardAddr;
|
IPAddress wildcardAddr;
|
||||||
SocketAddress socketAddress(wildcardAddr, port);
|
SocketAddress address(wildcardAddr, port);
|
||||||
impl()->bind(socketAddress, true);
|
impl()->bind(address, true);
|
||||||
impl()->listen(backlog);
|
impl()->listen(backlog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,27 +46,27 @@ SocketImpl* SecureServerSocketImpl::acceptConnection(SocketAddress& clientAddr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureServerSocketImpl::connect(const SocketAddress& rAddress)
|
void SecureServerSocketImpl::connect(const SocketAddress& address)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureServerSocketImpl::connect(const SocketAddress& rAddress, const Poco::Timespan& timeout)
|
void SecureServerSocketImpl::connect(const SocketAddress& address, const Poco::Timespan& timeout)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureServerSocketImpl::connectNB(const SocketAddress& rAddress)
|
void SecureServerSocketImpl::connectNB(const SocketAddress& address)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
throw Poco::InvalidAccessException("Cannot connect() a SecureServerSocket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureServerSocketImpl::bind(const SocketAddress& rAddress, bool reuseAddress)
|
void SecureServerSocketImpl::bind(const SocketAddress& address, bool reuseAddress)
|
||||||
{
|
{
|
||||||
_impl.bind(rAddress, reuseAddress);
|
_impl.bind(address, reuseAddress);
|
||||||
reset(_impl.sockfd());
|
reset(_impl.sockfd());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,13 +97,13 @@ int SecureServerSocketImpl::receiveBytes(void* buffer, int length, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SecureServerSocketImpl::sendTo(const void* buffer, int length, const SocketAddress& rAddress, int flags)
|
int SecureServerSocketImpl::sendTo(const void* buffer, int length, const SocketAddress& address, int flags)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot sendTo() on a SecureServerSocket");
|
throw Poco::InvalidAccessException("Cannot sendTo() on a SecureServerSocket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SecureServerSocketImpl::receiveFrom(void* buffer, int length, SocketAddress& rAddress, int flags)
|
int SecureServerSocketImpl::receiveFrom(void* buffer, int length, SocketAddress& address, int flags)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot receiveFrom() on a SecureServerSocket");
|
throw Poco::InvalidAccessException("Cannot receiveFrom() on a SecureServerSocket");
|
||||||
}
|
}
|
||||||
|
@ -47,50 +47,50 @@ SecureStreamSocket::SecureStreamSocket(Context::Ptr pContext, Session::Ptr pSess
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address):
|
||||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||||
{
|
{
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress, const std::string& hostName):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName):
|
||||||
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
StreamSocket(new SecureStreamSocketImpl(SSLManager::instance().defaultClientContext()))
|
||||||
{
|
{
|
||||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress, Context::Ptr pContext):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext):
|
||||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||||
{
|
{
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress, Context::Ptr pContext, Session::Ptr pSession):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, Context::Ptr pContext, Session::Ptr pSession):
|
||||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||||
{
|
{
|
||||||
useSession(pSession);
|
useSession(pSession);
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress, const std::string& hostName, Context::Ptr pContext):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext):
|
||||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||||
{
|
{
|
||||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SecureStreamSocket::SecureStreamSocket(const SocketAddress& rAddress, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
SecureStreamSocket::SecureStreamSocket(const SocketAddress& address, const std::string& hostName, Context::Ptr pContext, Session::Ptr pSession):
|
||||||
StreamSocket(new SecureStreamSocketImpl(pContext))
|
StreamSocket(new SecureStreamSocketImpl(pContext))
|
||||||
{
|
{
|
||||||
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
static_cast<SecureStreamSocketImpl*>(impl())->setPeerHostName(hostName);
|
||||||
useSession(pSession);
|
useSession(pSession);
|
||||||
connect(rAddress);
|
connect(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,23 +64,23 @@ void SecureStreamSocketImpl::acceptSSL()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureStreamSocketImpl::connect(const SocketAddress& rAddress)
|
void SecureStreamSocketImpl::connect(const SocketAddress& address)
|
||||||
{
|
{
|
||||||
_impl.connect(rAddress, !_lazyHandshake);
|
_impl.connect(address, !_lazyHandshake);
|
||||||
reset(_impl.sockfd());
|
reset(_impl.sockfd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureStreamSocketImpl::connect(const SocketAddress& rAddress, const Poco::Timespan& timeout)
|
void SecureStreamSocketImpl::connect(const SocketAddress& address, const Poco::Timespan& timeout)
|
||||||
{
|
{
|
||||||
_impl.connect(rAddress, timeout, !_lazyHandshake);
|
_impl.connect(address, timeout, !_lazyHandshake);
|
||||||
reset(_impl.sockfd());
|
reset(_impl.sockfd());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureStreamSocketImpl::connectNB(const SocketAddress& rAddress)
|
void SecureStreamSocketImpl::connectNB(const SocketAddress& address)
|
||||||
{
|
{
|
||||||
_impl.connectNB(rAddress);
|
_impl.connectNB(address);
|
||||||
reset(_impl.sockfd());
|
reset(_impl.sockfd());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ void SecureStreamSocketImpl::connectSSL()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SecureStreamSocketImpl::bind(const SocketAddress& rAddress, bool reuseAddress)
|
void SecureStreamSocketImpl::bind(const SocketAddress& address, bool reuseAddress)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot bind() a SecureStreamSocketImpl");
|
throw Poco::InvalidAccessException("Cannot bind() a SecureStreamSocketImpl");
|
||||||
}
|
}
|
||||||
@ -129,13 +129,13 @@ int SecureStreamSocketImpl::receiveBytes(void* buffer, int length, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SecureStreamSocketImpl::sendTo(const void* buffer, int length, const SocketAddress& rAddress, int flags)
|
int SecureStreamSocketImpl::sendTo(const void* buffer, int length, const SocketAddress& address, int flags)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot sendTo() on a SecureStreamSocketImpl");
|
throw Poco::InvalidAccessException("Cannot sendTo() on a SecureStreamSocketImpl");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SecureStreamSocketImpl::receiveFrom(void* buffer, int length, SocketAddress& rAddress, int flags)
|
int SecureStreamSocketImpl::receiveFrom(void* buffer, int length, SocketAddress& address, int flags)
|
||||||
{
|
{
|
||||||
throw Poco::InvalidAccessException("Cannot receiveFrom() on a SecureStreamSocketImpl");
|
throw Poco::InvalidAccessException("Cannot receiveFrom() on a SecureStreamSocketImpl");
|
||||||
}
|
}
|
||||||
|
@ -111,11 +111,11 @@ bool X509Certificate::verify(const Poco::Crypto::X509Certificate& certificate, c
|
|||||||
// compare by IP
|
// compare by IP
|
||||||
const HostEntry& heData = DNS::resolve(*it);
|
const HostEntry& heData = DNS::resolve(*it);
|
||||||
const HostEntry::AddressList& addr = heData.addresses();
|
const HostEntry::AddressList& addr = heData.addresses();
|
||||||
HostEntry::AddressList::const_iterator itAddr = addr.begin();
|
HostEntry::AddressList::const_iterator it = addr.begin();
|
||||||
HostEntry::AddressList::const_iterator itEnd = addr.end();
|
HostEntry::AddressList::const_iterator itEnd = addr.end();
|
||||||
for (; itAddr != itEnd && !ok; ++itAddr)
|
for (; it != itEnd && !ok; ++it)
|
||||||
{
|
{
|
||||||
ok = (*itAddr == ip);
|
ok = (*it == ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -712,14 +712,14 @@ void XMLWriter::declareNamespaces(const XMLString& namespaceURI, const XMLString
|
|||||||
bool defaultNameSpaceUsed = false;
|
bool defaultNameSpaceUsed = false;
|
||||||
XMLString defaultNamespaceURI = _namespaces.getURI(XMLString());
|
XMLString defaultNamespaceURI = _namespaces.getURI(XMLString());
|
||||||
XMLString local;
|
XMLString local;
|
||||||
XMLString prefixString;
|
XMLString prefix;
|
||||||
XMLString elementNamespaceURI = namespaceURI;
|
XMLString elementNamespaceURI = namespaceURI;
|
||||||
Name::split(qname, prefixString, local);
|
Name::split(qname, prefix, local);
|
||||||
if (elementNamespaceURI.empty())
|
if (elementNamespaceURI.empty())
|
||||||
elementNamespaceURI = _namespaces.getURI(prefixString);
|
elementNamespaceURI = _namespaces.getURI(prefix);
|
||||||
if (!elementNamespaceURI.empty())
|
if (!elementNamespaceURI.empty())
|
||||||
{
|
{
|
||||||
usedNamespaces[prefixString].insert(elementNamespaceURI);
|
usedNamespaces[prefix].insert(elementNamespaceURI);
|
||||||
if (!defaultNamespaceURI.empty() && elementNamespaceURI == defaultNamespaceURI)
|
if (!defaultNamespaceURI.empty() && elementNamespaceURI == defaultNamespaceURI)
|
||||||
defaultNameSpaceUsed = true;
|
defaultNameSpaceUsed = true;
|
||||||
}
|
}
|
||||||
@ -733,7 +733,7 @@ void XMLWriter::declareNamespaces(const XMLString& namespaceURI, const XMLString
|
|||||||
XMLString attributeLocal;
|
XMLString attributeLocal;
|
||||||
Name::split(attributeQName, attributePrefix, attributeLocal);
|
Name::split(attributeQName, attributePrefix, attributeLocal);
|
||||||
if (attributeNamespaceURI.empty())
|
if (attributeNamespaceURI.empty())
|
||||||
attributeNamespaceURI = _namespaces.getURI(prefixString);
|
attributeNamespaceURI = _namespaces.getURI(prefix);
|
||||||
if (!attributeNamespaceURI.empty())
|
if (!attributeNamespaceURI.empty())
|
||||||
{
|
{
|
||||||
usedNamespaces[attributePrefix].insert(attributeNamespaceURI);
|
usedNamespaces[attributePrefix].insert(attributeNamespaceURI);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user