summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx6
-rw-r--r--sfx2/source/control/unoctitm.cxx27
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx23
3 files changed, 51 insertions, 5 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4a4a10efaa65..8045eed42b75 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2672,7 +2672,11 @@ static void doc_iniUnoCommands ()
OUString(".uno:Orientation"),
OUString(".uno:ObjectAlignLeft"),
OUString(".uno:ObjectAlignRight"),
- OUString(".uno:AlignCenter")
+ OUString(".uno:AlignCenter"),
+ OUString(".uno:TransformPosX"),
+ OUString(".uno:TransformPosY"),
+ OUString(".uno:TransformWidth"),
+ OUString(".uno:TransformHeight")
};
util::URL aCommandURL;
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" ||
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index e684d4da2bc2..120b753a29d6 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -844,8 +844,29 @@ void PosSizePropertyPanel::NotifyItemUpdate(
mpCbxScale->Check( static_cast<bool>(sUserData.toInt32()) );
}
-void PosSizePropertyPanel::GetControlState(const sal_uInt16 /*nSID*/, boost::property_tree::ptree& /*rState*/)
+void PosSizePropertyPanel::GetControlState(const sal_uInt16 nSID, boost::property_tree::ptree& rState)
{
+ VclPtr<vcl::Window> pControl;
+ switch (nSID)
+ {
+ case SID_ATTR_TRANSFORM_POS_X:
+ pControl = mpMtrPosX;
+ break;
+ case SID_ATTR_TRANSFORM_POS_Y:
+ pControl = mpMtrPosY;
+ break;
+ case SID_ATTR_TRANSFORM_WIDTH:
+ pControl = mpMtrWidth;
+ break;
+ case SID_ATTR_TRANSFORM_HEIGHT:
+ pControl = mpMtrHeight;
+ break;
+ }
+
+ if (pControl && !pControl->GetText().isEmpty())
+ {
+ rState.put(pControl->get_id().toUtf8().getStr(),pControl->GetText().toUtf8().getStr());
+ }
}
void PosSizePropertyPanel::executeSize()