Extended loplugin:ostr: sax
Change-Id: Icf6ffbc746dbbc790a5a248002ecd161413f120c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159681 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -56,9 +56,9 @@ void AttributesTest::test()
|
||||
CPPUNIT_ASSERT_EQUAL( OUString("1"), xAttributeList->getValue(1) );
|
||||
CPPUNIT_ASSERT_THROW( xAttributeList->getValue(5), xml::sax::SAXException );
|
||||
|
||||
xAttributeList->addUnknown("a", "a");
|
||||
xAttributeList->addUnknown("b", "b", "b");
|
||||
xAttributeList->addUnknown("c", "c");
|
||||
xAttributeList->addUnknown("a"_ostr, "a"_ostr);
|
||||
xAttributeList->addUnknown("b", "b"_ostr, "b"_ostr);
|
||||
xAttributeList->addUnknown("c"_ostr, "c"_ostr);
|
||||
CPPUNIT_ASSERT_EQUAL( sal_Int32(3), xAttributeList->getUnknownAttributes().getLength() );
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL( sal_Int32(4), xAttributeList->getFastAttributes().getLength() );
|
||||
@@ -66,7 +66,7 @@ void AttributesTest::test()
|
||||
xAttributeList->clear();
|
||||
CPPUNIT_ASSERT( !xAttributeList->hasAttribute(1) );
|
||||
CPPUNIT_ASSERT( !xAttributeList->getFastAttributes().hasElements() );
|
||||
xAttributeList->addUnknown("c", "c");
|
||||
xAttributeList->addUnknown("c"_ostr, "c"_ostr);
|
||||
CPPUNIT_ASSERT_EQUAL( sal_Int32(1), xAttributeList->getUnknownAttributes().getLength() );
|
||||
}
|
||||
|
||||
|
@@ -83,10 +83,10 @@ uno::Reference< io::XInputStream > ParserTest::createStream(const OString& sInpu
|
||||
|
||||
void ParserTest::parse()
|
||||
{
|
||||
maInput.aInputStream = createStream("<a>...<b />..</a>");
|
||||
maInput.aInputStream = createStream("<a>...<b />..</a>"_ostr);
|
||||
mxParser->parseStream( maInput );
|
||||
|
||||
maInput.aInputStream = createStream("<b></a>");
|
||||
maInput.aInputStream = createStream("<b></a>"_ostr);
|
||||
CPPUNIT_ASSERT_THROW( mxParser->parseStream( maInput ), css::xml::sax::SAXParseException );
|
||||
}
|
||||
|
||||
|
@@ -1136,7 +1136,7 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm
|
||||
if( rEntity.maNamespaceCount.empty() )
|
||||
{
|
||||
rEntity.maNamespaceCount.push(0);
|
||||
DefineNamespace( "xml", "http://www.w3.org/XML/1998/namespace");
|
||||
DefineNamespace( "xml"_ostr, "http://www.w3.org/XML/1998/namespace");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1204,7 +1204,7 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm
|
||||
NormalizeURI( sNamespace );
|
||||
nNamespaceToken = GetNamespaceToken( sNamespace );
|
||||
if( rEntity.mxNamespaceHandler.is() )
|
||||
rEvent.mxDeclAttributes->addUnknown( "", OString( XML_CAST( namespaces[ i + 1 ] ) ) );
|
||||
rEvent.mxDeclAttributes->addUnknown( ""_ostr, OString( XML_CAST( namespaces[ i + 1 ] ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user