summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx6
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx8
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx8
3 files changed, 16 insertions, 6 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 487def29974b..69560ae2bd15 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -49,6 +49,7 @@
#include <flddat.hxx>
#include <basesh.hxx>
#include <vcl/ITiledRenderable.hxx>
+#include <tools/json_writer.hxx>
static char const DATA_DIRECTORY[] = "/sw/qa/extras/tiledrendering/data/";
@@ -1619,8 +1620,9 @@ void SwTiledRenderingTest::testRedlineColors()
pWrtShell->Insert("zzz");
// Assert that info about exactly one author is returned.
- OUString aInfo = pXTextDocument->getTrackedChangeAuthors();
- std::stringstream aStream(aInfo.toUtf8().getStr());
+ tools::JsonWriter aJsonWriter;
+ pXTextDocument->getTrackedChangeAuthors(aJsonWriter);
+ std::stringstream aStream(aJsonWriter.extractAsOString().getStr());
boost::property_tree::ptree aTree;
boost::property_tree::read_json(aStream, aTree);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aTree.get_child("authors").size());
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 01d05d963b3c..64e82663bdaf 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -49,6 +49,7 @@
#include <frameformats.hxx>
#include <shellio.hxx>
#include <editeng/fontitem.hxx>
+#include <tools/json_writer.hxx>
namespace
{
@@ -2261,8 +2262,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testImageComment)
// rendering and on the desktop.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
- OUString aPostits = pTextDoc->getPostIts();
- std::stringstream aStream(aPostits.toUtf8().getStr());
+ tools::JsonWriter aJsonWriter;
+ pTextDoc->getPostIts(aJsonWriter);
+ char* pChar = aJsonWriter.extractData();
+ std::stringstream aStream(pChar);
+ free(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"))
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index dda897ee2ee3..0f9f3255f990 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -17,6 +17,7 @@
#include <textboxhelper.hxx>
#include <fmtanchr.hxx>
#include <o3tl/safeint.hxx>
+#include <tools/json_writer.hxx>
#include <wrtsh.hxx>
@@ -855,8 +856,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf132603)
dispatchCommand(mxComponent, ".uno:Copy", {});
Scheduler::ProcessEventsToIdle();
- OUString aPostits = pTextDoc->getPostIts();
- std::stringstream aStream(aPostits.toUtf8().getStr());
+ tools::JsonWriter aJsonWriter;
+ pTextDoc->getPostIts(aJsonWriter);
+ char* pChar = aJsonWriter.extractData();
+ std::stringstream aStream(pChar);
+ free(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"))