summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-03-27 19:36:11 -0400
committerHenry Castro <hcastro@collabora.com>2020-05-21 00:41:20 +0200
commit43b8212464096f163316fb211e64789492542ede (patch)
tree21e39909a6667ed8744d78831d7feacb48613dac /svx
parentc2bb20652142f0cadbba3cf82f73a62f6c569981 (diff)
LOk: notify the state values of the position and size property panel
Notify to client side when the UNO commands (TransformPosX, TransformPosY, TransformWidth,TransformHeight) have changed only valid for mobile devices. The state values are obtained from "position and a size" property panel of the sidebar and they have a converted units formatted text and simplify client side not to convert the units again. Change-Id: I0d37a9746d550e09bf2a5b182530ef7c2a0dee37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91238 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91578 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94517 Tested-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 9c00e4602864..8965f38b56cf 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -817,8 +817,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)
{
+ weld::MetricSpinButton* pControl = nullptr;
+ switch (nSID)
+ {
+ case SID_ATTR_TRANSFORM_POS_X:
+ pControl = mxMtrPosX.get();
+ break;
+ case SID_ATTR_TRANSFORM_POS_Y:
+ pControl = mxMtrPosY.get();
+ break;
+ case SID_ATTR_TRANSFORM_WIDTH:
+ pControl = mxMtrWidth.get();
+ break;
+ case SID_ATTR_TRANSFORM_HEIGHT:
+ pControl = mxMtrHeight.get();
+ break;
+ }
+
+ if (pControl && !pControl->get_text().isEmpty())
+ {
+ rState.put(pControl->get_buildable_name().getStr(), pControl->get_text().toUtf8().getStr());
+ }
}
void PosSizePropertyPanel::executeSize()