sw/qa/uibase/shells/shells.cxx      |    4 ++--
 sw/source/uibase/shells/textsh1.cxx |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 92deea6301a02f5530f17263f58402344f82013c
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Wed Jan 11 08:14:55 2023 +0530
Commit:     Pranam Lashkari <lpra...@collabora.com>
CommitDate: Thu Jan 12 02:49:11 2023 +0000

    sw: rename .uno:UpdateSections command fields
    
    renamed fields name in JSON to be consistent with section insertion and 
getter
    
    Signed-off-by: Pranam Lashkari <lpra...@collabora.com>
    Change-Id: Icca0be155542b7dc6df1b29e6c7d4191db8659ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145315
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@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 b8f466b63a8e..8a7d7fce4f87 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 c7fe4fc9c190..7e8edb2fc508 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);
         }
     }

Reply via email to