diff options
author | Henry Castro <hcastro@collabora.com> | 2020-03-23 15:34:57 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-04-05 20:18:43 +0200 |
commit | f9a9938868338985aa10664fb8529f8cc6975003 (patch) | |
tree | a4d5cfc1b5d1191aca7479f2eeb5c34342578539 /svx | |
parent | 66b5cbf67b3966ca160a50096d982b3822f08bee (diff) |
lok: update the measure units if changed
Change-Id: If793e5e678277e27d66e7bcfbf3fbec999e46c63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90937
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91576
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 11 | ||||
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 0f0697a40452..9f4d06be9d16 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -39,6 +39,7 @@ #include <svx/svdpagv.hxx> #include <svx/svdview.hxx> #include <svx/transfrmhelper.hxx> +#include <boost/property_tree/json_parser.hpp> #include <svtools/unitconv.hxx> @@ -807,6 +808,16 @@ void PosSizePropertyPanel::executeSize() } } +boost::property_tree::ptree PosSizePropertyPanel::DumpAsPropertyTree() +{ + if (meDlgUnit != GetCurrentUnit(SfxItemState::DEFAULT, nullptr)) + { + mpBindings->Update( SID_ATTR_METRIC ); + } + + return PanelLayout::DumpAsPropertyTree(); +} + void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) { bool bPosXBlank = false; diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 7e5b7b4eea3b..ccb32fbc4f21 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -65,6 +65,8 @@ public: const SfxItemState eState, const SfxPoolItem* pState) override; + virtual boost::property_tree::ptree DumpAsPropertyTree() override; + SfxBindings* GetBindings() { return mpBindings;} // constructor/destructor |