summaryrefslogtreecommitdiff
path: root/sfx2/source/control/unoctitm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/control/unoctitm.cxx')
-rw-r--r--sfx2/source/control/unoctitm.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 7bc2cad90b63..b27bb75451c8 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -107,7 +107,7 @@ const char* const URLTypeNames[URLType_COUNT] =
"double"
};
-static void InterceptLOKStateChangeEvent( const SfxViewFrame* pViewFrame, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState );
+static void InterceptLOKStateChangeEvent( sal_uInt16 nSID, SfxViewFrame* pViewFrame, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState );
void SfxStatusDispatcher::ReleaseAll()
{
@@ -955,7 +955,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
if (pDispatcher && pDispatcher->GetFrame())
{
- InterceptLOKStateChangeEvent(pDispatcher->GetFrame(), aEvent, pState);
+ InterceptLOKStateChangeEvent(nSID, pDispatcher->GetFrame(), aEvent, pState);
}
for (const OUString& rName: pDispatch->GetListeners().getContainedTypes())
@@ -971,7 +971,7 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt
StateChanged( nSID, eState, pState, nullptr );
}
-static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState)
+static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFrame, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem* pState)
{
if (!comphelper::LibreOfficeKit::isActive())
return;
@@ -1108,6 +1108,27 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
aBuffer.append(OUString::number(aInt32));
}
}
+ else if (aEvent.FeatureURL.Path == "TransformPosX" ||
+ aEvent.FeatureURL.Path == "TransformPosY" ||
+ aEvent.FeatureURL.Path == "TransformWidth" ||
+ aEvent.FeatureURL.Path == "TransformHeight")
+ {
+ if (aEvent.IsEnabled && comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()))
+ {
+ boost::property_tree::ptree aTree;
+ boost::property_tree::ptree aState;
+ OUString aStr(aEvent.FeatureURL.Complete);
+
+ aTree.put("commandName", aStr.toUtf8().getStr());
+ pViewFrame->GetBindings().QueryControlState(nSID, aState);
+ aTree.add_child("state", aState);
+
+ aBuffer.setLength(0);
+ std::stringstream aStream;
+ boost::property_tree::write_json(aStream, aTree);
+ aBuffer.appendAscii(aStream.str().c_str());
+ }
+ }
else if (aEvent.FeatureURL.Path == "StatusDocPos" ||
aEvent.FeatureURL.Path == "RowColSelCount" ||
aEvent.FeatureURL.Path == "StatusPageStyle" ||