diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 11:37:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-04-24 18:04:50 +0200 |
commit | 5c1561561a859c561fb2321420f1abb7f1cedde3 (patch) | |
tree | 7a96cf8b32bd4c088298df3c4067f0d81f549057 /sw/qa/uibase | |
parent | 5e6d8efbf3fb456ca370df04b21d2e340d9831ad (diff) |
loplugin:unnecessarygetstr extend to more std::string checking
suggested by mike kaganski
Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/uibase')
-rw-r--r-- | sw/qa/uibase/uno/uno.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx index 1336fb39ee6c..b9f03d42d5ee 100644 --- a/sw/qa/uibase/uno/uno.cxx +++ b/sw/qa/uibase/uno/uno.cxx @@ -235,7 +235,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetTextFormFields) // Then make sure we find the 2 items and ignore the bibliography: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -268,7 +268,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetDocumentProperties) // Then make sure we find the 2 properties and ignore the other one: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -309,7 +309,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetBookmarks) // Then make sure we get the 2 references but not the bibliography: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -346,7 +346,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetFields) // Then make sure we get the 1 refmark: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -401,7 +401,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetTextFormField) // Then make sure we find the inserted fieldmark: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -433,7 +433,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetSections) // Make sure we find our just inserted section: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); // Without the accompanying fix in place, this test would have failed with: @@ -465,7 +465,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetBookmark) // Then make sure we find the inserted bookmark: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); boost::property_tree::ptree aBookmark = aTree.get_child("bookmark"); @@ -499,7 +499,7 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testGetField) // Then make sure we find the inserted refmark: OString pJSON(aJsonWriter.finishAndGetAsOString()); - std::stringstream aStream(pJSON.getStr()); + std::stringstream aStream((std::string(pJSON))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); boost::property_tree::ptree aBookmark = aTree.get_child("setRef"); |