diff options
author | Henry Castro <hcastro@collabora.com> | 2020-03-27 19:24:14 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2020-03-31 15:26:42 +0200 |
commit | a5207e5b3230a57666cf27f4f4e54c5e5dd81605 (patch) | |
tree | 146a954819670f42ad977489601b0630af27a5a2 /include | |
parent | 9e5eab8f736becc49f43b08a93d8c8690fc9b040 (diff) |
lok: introduce QueryControlState function
The sidebar usually executes UNO commands to the core framework,
however the controls already have formatted the text that is useful
in Online client side. For example the units conversion.
The QueryControlState method will retrieve the current formatted text
of the sidebar control to be used in Client Side.
Change-Id: I0b3e3a1462d4391ac911352f35808a5e5d9f9ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91237
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/bindings.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/ctrlitem.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sidebar/ControllerItem.hxx | 4 | ||||
-rw-r--r-- | include/svx/sidebar/AreaPropertyPanelBase.hxx | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx index 5d1e7b5e4089..a320862d5f03 100644 --- a/include/sfx2/bindings.hxx +++ b/include/sfx2/bindings.hxx @@ -140,6 +140,8 @@ public: */ SfxItemState QueryState( sal_uInt16 nSID, std::unique_ptr<SfxPoolItem> &rpState ); + void QueryControlState ( sal_uInt16 nSID, boost::property_tree::ptree& rState ); + const SfxPoolItem* ExecuteSynchron( sal_uInt16 nSlot, const SfxPoolItem **pArgs = nullptr); bool Execute( sal_uInt16 nSlot, diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx index 78ac2d1a6fe2..8e3b6cc98586 100644 --- a/include/sfx2/ctrlitem.hxx +++ b/include/sfx2/ctrlitem.hxx @@ -69,6 +69,8 @@ public: virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual void GetControlState( sal_uInt16 nSID, boost::property_tree::ptree& ); + MapUnit GetCoreMetric() const; static SfxItemState GetItemState( const SfxPoolItem* pState ); diff --git a/include/sfx2/sidebar/ControllerItem.hxx b/include/sfx2/sidebar/ControllerItem.hxx index 23a94487706e..981106fa1e9a 100644 --- a/include/sfx2/sidebar/ControllerItem.hxx +++ b/include/sfx2/sidebar/ControllerItem.hxx @@ -46,6 +46,9 @@ public: const SfxItemState eState, const SfxPoolItem* pState, const bool bIsEnabled) = 0; + virtual void GetControlState( + const sal_uInt16 nSId, + boost::property_tree::ptree& rState) = 0; virtual ~ItemUpdateReceiverInterface(); }; @@ -77,6 +80,7 @@ public: protected: virtual void StateChanged (sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) override; + virtual void GetControlState (sal_uInt16 nSId, boost::property_tree::ptree& rState) override; private: ItemUpdateReceiverInterface& mrItemUpdateReceiver; diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx index b24281efea5f..5736617080f8 100644 --- a/include/svx/sidebar/AreaPropertyPanelBase.hxx +++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx @@ -72,6 +72,10 @@ public: const SfxPoolItem* pState, const bool bIsEnabled) override; + virtual void GetControlState( + const sal_uInt16 /*nSId*/, + boost::property_tree::ptree& /*rState*/) override {}; + const static sal_Int32 DEFAULT_CENTERX; const static sal_Int32 DEFAULT_CENTERY; const static sal_Int32 DEFAULT_ANGLE; |