sw: rename .uno:UpdateSections command fields
renamed fields name in JSON to be consistent with section insertion and getter
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Icca0be155542b7dc6df1b29e6c7d4191db8659ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145315
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit cc4f876d05837679caa8c86ffd8be8598b8f429e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145308
diff --git a/sw/qa/uibase/shells/shells.cxx b/sw/qa/uibase/shells/shells.cxx
index b8f466b..8a7d7fc 100644
--- a/sw/qa/uibase/shells/shells.cxx
+++ b/sw/qa/uibase/shells/shells.cxx
@@ -684,11 +684,11 @@ CPPUNIT_TEST_FIXTURE(SwUibaseShellsTest, testUpdateSections)
"type": "[][]com.sun.star.beans.PropertyValue",
"value": [
{
"Section": {
"RegionName": {
"type": "string",
"value": "ZOTERO_BIBL {} CSL_BIBLIOGRAPHY RNDnew"
},
"SectionText": {
"Content": {
"type": "string",
"value": "new content"
}
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index c7fe4fc9..7e8edb2 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -420,7 +420,7 @@ void UpdateSections(SfxRequest& rReq, SwWrtShell& rWrtSh)
}
comphelper::SequenceAsHashMap aMap(aSections[nSectionIndex++]);
OUString aSectionName = aMap["Section"].get<OUString>();
OUString aSectionName = aMap["RegionName"].get<OUString>();
if (aSectionName != pFormat->GetName())
{
const_cast<SwSectionFormat*>(pFormat)->SetFormatName(aSectionName, /*bBroadcast=*/true);
@@ -441,7 +441,7 @@ void UpdateSections(SfxRequest& rReq, SwWrtShell& rWrtSh)
rIDCO.DeleteAndJoin(*pCursorPos);
rWrtSh.EndSelect();
OUString aSectionText = aMap["SectionText"].get<OUString>();
OUString aSectionText = aMap["Content"].get<OUString>();
SwTranslateHelper::PasteHTMLToPaM(rWrtSh, pCursorPos, aSectionText.toUtf8(), true);
}
}