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/extras/uiwriter/uiwriter8.cxx | |
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/extras/uiwriter/uiwriter8.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter8.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index d6816c67eef4..65a1352dc79b 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -1634,13 +1634,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf132603) tools::JsonWriter aJsonWriter; pTextDoc->getPostIts(aJsonWriter); OString pChar = aJsonWriter.finishAndGetAsOString(); - std::stringstream aStream(pChar.getStr()); + std::stringstream aStream((std::string(pChar))); boost::property_tree::ptree aTree; boost::property_tree::read_json(aStream, aTree); for (const boost::property_tree::ptree::value_type& rValue : aTree.get_child("comments")) { const boost::property_tree::ptree& rComment = rValue.second; - OString aText(rComment.get<std::string>("text").c_str()); + + OString aText(rComment.get<std::string>("text")); CPPUNIT_ASSERT_EQUAL(OString("Comment"), aText); } } |