diff options
author | Henry Castro <hcastro@collabora.com> | 2020-03-27 19:36:11 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-03-31 17:14:08 +0200 |
commit | 52ef588267d191304138a88b962314b5dec84356 (patch) | |
tree | 88edb1556ab9eeca739f8f46bc9f699ab31b9678 /svx/source/sidebar/possize/PosSizePropertyPanel.cxx | |
parent | 68d7fff82e5f72e37ca9a4e5e18367c172cdecd3 (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>
Diffstat (limited to 'svx/source/sidebar/possize/PosSizePropertyPanel.cxx')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
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() |