summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorDarshan11 <darshan.upadhyay@collabora.com>2024-03-13 16:34:38 +0530
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-03-27 13:09:37 +0100
commita69e32a0ca800642a3fb542c0a49a13ba04faecc (patch)
treec3d241c43b3ab9acd712ddaee80cfebf28efb641 /sfx2
parenta111a5c7f62611474d390aacb1ce5964df2a34f9 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164817 (cherry picked from commit fa93750070793cd548d028feb39e4d0e0e61ae5a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/unoctitm.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 1068b28e0ac8..f8c62b3dae19 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" ||