diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-11-19 17:31:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-11-19 22:04:09 +0100 |
commit | 1f43e2071f5aba897946028dbc8c86c6b00825df (patch) | |
tree | 3842ce89d4b0ac30511d41ce8883572a89bea2d2 | |
parent | 95ffa27c593a7fa31309b5e72a55d966862db9a0 (diff) |
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>
-rw-r--r-- | sax/qa/cppunit/attributes.cxx | 8 | ||||
-rw-r--r-- | sax/qa/cppunit/parser.cxx | 4 | ||||
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/sax/qa/cppunit/attributes.cxx b/sax/qa/cppunit/attributes.cxx index 5b45876e3e96..899716d62f15 100644 --- a/sax/qa/cppunit/attributes.cxx +++ b/sax/qa/cppunit/attributes.cxx @@ -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() ); } diff --git a/sax/qa/cppunit/parser.cxx b/sax/qa/cppunit/parser.cxx index 261091fe8769..670c1afa9277 100644 --- a/sax/qa/cppunit/parser.cxx +++ b/sax/qa/cppunit/parser.cxx @@ -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 ); } diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 3c67010ad1cb..ec8065016a12 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -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 ] ) ) ); } } |