sw/qa/uibase/shells/shells.cxx | 12 ++++++------ sw/source/uibase/uno/loktxdoc.cxx | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit 08260893ad23b4334430e9b14952c93794a22607 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Jun 19 09:53:56 2025 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Jun 19 13:02:27 2025 +0200 LOK Extract API: Use camelCase for "text before / after" in redline data extraction This improves consistency. See https://gerrit.libreoffice.org/c/core/+/186690/comments/eaf49418_87ae6bd2 Change-Id: If80730536e3d387a643d93d2d5c92658ec8a3748 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186705 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx index ded1ce697cb3..7dec82eebec7 100644 --- a/sw/qa/uibase/shells/shells.cxx +++ b/sw/qa/uibase/shells/shells.cxx @@ -917,10 +917,10 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testDocumentStructureExtractRedlines) CPPUNIT_ASSERT_EQUAL("Mike"s, change.get<std::string>("author")); CPPUNIT_ASSERT_EQUAL("Delete “Donec”"s, change.get<std::string>("description")); CPPUNIT_ASSERT_EQUAL(""s, change.get<std::string>("comment")); - auto text_before = change.get<std::string>("text-before"); + auto text_before = change.get<std::string>("textBefore"); CPPUNIT_ASSERT_EQUAL(size_t(200), text_before.size()); CPPUNIT_ASSERT(text_before.ends_with(" egestas. ")); - auto text_after = change.get<std::string>("text-after"); + auto text_after = change.get<std::string>("textAfter"); CPPUNIT_ASSERT_EQUAL(size_t(200), text_after.size()); CPPUNIT_ASSERT(text_after.starts_with(" blandit ")); ++it; @@ -937,10 +937,10 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testDocumentStructureExtractRedlines) CPPUNIT_ASSERT_EQUAL("Mike"s, change.get<std::string>("author")); CPPUNIT_ASSERT_EQUAL("Attributes changed"s, change.get<std::string>("description")); CPPUNIT_ASSERT_EQUAL(""s, change.get<std::string>("comment")); - auto text_before = change.get<std::string>("text-before"); + auto text_before = change.get<std::string>("textBefore"); CPPUNIT_ASSERT_EQUAL(size_t(200), text_before.size()); CPPUNIT_ASSERT(text_before.ends_with(" arcu, nec ")); - auto text_after = change.get<std::string>("text-after"); + auto text_after = change.get<std::string>("textAfter"); CPPUNIT_ASSERT_EQUAL(size_t(200), text_after.size()); CPPUNIT_ASSERT(text_after.starts_with(" eros ")); ++it; @@ -957,10 +957,10 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testDocumentStructureExtractRedlines) CPPUNIT_ASSERT_EQUAL("Mike"s, change.get<std::string>("author")); CPPUNIT_ASSERT_EQUAL("Insert “ Sapienti sat.”"s, change.get<std::string>("description")); CPPUNIT_ASSERT_EQUAL(""s, change.get<std::string>("comment")); - auto text_before = change.get<std::string>("text-before"); + auto text_before = change.get<std::string>("textBefore"); CPPUNIT_ASSERT_EQUAL(size_t(200), text_before.size()); CPPUNIT_ASSERT(text_before.ends_with(" est orci.")); - auto text_after = change.get<std::string>("text-after"); + auto text_after = change.get<std::string>("textAfter"); CPPUNIT_ASSERT(text_after.empty()); ++it; } diff --git a/sw/source/uibase/uno/loktxdoc.cxx b/sw/source/uibase/uno/loktxdoc.cxx index 5e3e4d9a592d..d9a782495e48 100644 --- a/sw/source/uibase/uno/loktxdoc.cxx +++ b/sw/source/uibase/uno/loktxdoc.cxx @@ -878,14 +878,14 @@ void GetDocStructureTrackChanges(tools::JsonWriter& rJsonWriter, const SwDocShel { auto xCursor = xStart->getText()->createTextCursorByRange(xStart); xCursor->goLeft(200, /*bExpand*/ true); - rJsonWriter.put("text-before", xCursor->getString()); + rJsonWriter.put("textBefore", xCursor->getString()); } if (auto xEnd = xRedlineProperties->getPropertyValue(UNO_NAME_REDLINE_END) .query<css::text::XTextRange>()) { auto xCursor = xEnd->getText()->createTextCursorByRange(xEnd); xCursor->goRight(200, /*bExpand*/ true); - rJsonWriter.put("text-after", xCursor->getString()); + rJsonWriter.put("textAfter", xCursor->getString()); } // UNO_NAME_REDLINE_IDENTIFIER: OUString (the value of a pointer, not persistent) // UNO_NAME_REDLINE_MOVED_ID: sal_uInt32; 0 == not moved, 1 == moved, but don't have its pair, 2+ == unique ID