summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorDarshan11 <darshan.upadhyay@collabora.com>2024-03-13 16:34:38 +0530
committerSzymon Kłos <szymon.klos@collabora.com>2024-03-15 10:05:47 +0100
commit2a263f9114985fcdcab9e9bfc035c6593ec40f1c (patch)
treefe45059491357983d34bef50824bf80a3fc6c28e /sfx2
parentc57b9282a500741812448a4ad3c68956f6764b4a (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>
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 38db25888c1f..b31a93fc9c9b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1058,8 +1058,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" ||
@@ -1131,6 +1129,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", std::to_string(aEvent.IsEnabled) == "0" ? "true" : "false");
+ aTree.put("state", std::to_string(bTemp) == "1" ? "true" : "false");
+ SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aTree.extractData());
+ return;
+ }
else if (aEvent.FeatureURL.Path == "AssignLayout" ||
aEvent.FeatureURL.Path == "StatusSelectionMode" ||
aEvent.FeatureURL.Path == "Signature" ||