diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-05-28 19:41:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-17 11:55:13 +0200 |
commit | 9881bea8d41997fb46579eb5f0314300159c96cc (patch) | |
tree | f52daa7055d2d28959e2d1ad576d963b7c0d3b2d /svl | |
parent | ec4034c4a4f23574401ba2a74b635d9ed4befbc8 (diff) |
remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/test_INetContentType.cxx | 6 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/svl/qa/unit/test_INetContentType.cxx b/svl/qa/unit/test_INetContentType.cxx index 0eea403275e5..8495d2d93273 100644 --- a/svl/qa/unit/test_INetContentType.cxx +++ b/svl/qa/unit/test_INetContentType.cxx @@ -41,7 +41,7 @@ void Test::testBad() { OUString in("foo=bar"); CPPUNIT_ASSERT_EQUAL( static_cast<sal_Unicode const *>(nullptr), - INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength())); + INetMIME::scanContentType(in)); OUString t; OUString s; INetContentTypeParameterList ps; @@ -55,7 +55,7 @@ void Test::testFull() { OUString in("foo/bar;baz=boz"); CPPUNIT_ASSERT_EQUAL( in.getStr() + in.getLength(), - INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength())); + INetMIME::scanContentType(in)); OUString t; OUString s; INetContentTypeParameterList ps; @@ -71,7 +71,7 @@ void Test::testFollow() { OUString in("foo/bar;baz=boz;base64,"); CPPUNIT_ASSERT_EQUAL( in.getStr() + std::strlen("foo/bar;baz=boz"), - INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength())); + INetMIME::scanContentType(in)); OUString t; OUString s; INetContentTypeParameterList ps; diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index 58532eb08a5c..a4cfc252589e 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -749,7 +749,7 @@ bool INetContentTypes::parse( OUString t; OUString s; INetContentTypeParameterList p; - if (INetMIME::scanContentType(b, e, &t, &s, pParameters == nullptr ? nullptr : &p) == e) { + if (INetMIME::scanContentType(rMediaType, &t, &s, pParameters == nullptr ? nullptr : &p) == e) { rType = t; rSubType = s; if (pParameters != nullptr) { |