sfx2/source/control/unoctitm.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
New commits: commit fa93750070793cd548d028feb39e4d0e0e61ae5a Author: Darshan11 <darshan.upadh...@collabora.com> AuthorDate: Wed Mar 13 16:34:38 2024 +0530 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Mar 18 13:16:51 2024 +0100 Send ParaRightToLeft state messageto client side - Before this patch in online text in paragraph was changing according to uno command but client was not getting and info about is RTL true or TRL true - this will send message [:unoParaRightToLeft=true || :unoParaLeftToRight=true] at client side - added more properties like disabled and state information to handle both case at same time in online - which will be helpful to our existing locgic where to add or from where to remove selected class on element according to response Change-Id: Ia443215342d6a81f4e60fa9237149f6b18420e16 Change-Id: I08fb7e474e099822b26c732fe1e5dac8e773c58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164767 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164817 diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index fade31109f35..8072e1a9ad8d 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1096,8 +1096,6 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "DeleteNote" || aEvent.FeatureURL.Path == "AcceptChanges" || aEvent.FeatureURL.Path == "SetDefault" || - aEvent.FeatureURL.Path == "ParaLeftToRight" || - aEvent.FeatureURL.Path == "ParaRightToLeft" || aEvent.FeatureURL.Path == "ParaspaceIncrease" || aEvent.FeatureURL.Path == "ParaspaceDecrease" || aEvent.FeatureURL.Path == "TableDialog" || @@ -1169,6 +1167,18 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra { aBuffer.append(aEvent.IsEnabled ? std::u16string_view(u"enabled") : std::u16string_view(u"disabled")); } + else if (aEvent.FeatureURL.Path == "ParaLeftToRight" || + aEvent.FeatureURL.Path == "ParaRightToLeft") + { + tools::JsonWriter aTree; + bool bTemp = false; + aEvent.State >>= bTemp; + aTree.put("commandName", aEvent.FeatureURL.Complete); + aTree.put("disabled", !aEvent.IsEnabled); + aTree.put("state", bTemp ? "true" : "false"); + SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.finishAndGetAsOString()); + return; + } else if (aEvent.FeatureURL.Path == "AssignLayout" || aEvent.FeatureURL.Path == "StatusSelectionMode" || aEvent.FeatureURL.Path == "Signature" ||