summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-03-27 19:24:14 -0400
committerHenry Castro <hcastro@collabora.com>2020-04-06 03:06:07 +0200
commit219cb84f901676a738892e87ba6f726805d5e72c (patch)
treec66c57fbc5dcf54244b50adfe21f336e3e062c89 /include
parent7c5d207c6adaafa8c4f6fe90e3389c7fdaadc800 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91577 Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/bindings.hxx2
-rw-r--r--include/sfx2/ctrlitem.hxx2
-rw-r--r--include/sfx2/sidebar/ControllerItem.hxx4
-rw-r--r--include/svx/sidebar/AreaPropertyPanelBase.hxx4
4 files changed, 12 insertions, 0 deletions
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 8b8cc0c7080d..28b4d5248517 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -141,6 +141,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 fc93c62beff2..489fdb9461a8 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -64,6 +64,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 51befddff94d..71f7cd84c8b6 100644
--- a/include/sfx2/sidebar/ControllerItem.hxx
+++ b/include/sfx2/sidebar/ControllerItem.hxx
@@ -45,6 +45,9 @@ public:
const sal_uInt16 nSId,
const SfxItemState eState,
const SfxPoolItem* pState) = 0;
+ virtual void GetControlState(
+ const sal_uInt16 nSId,
+ boost::property_tree::ptree& rState) = 0;
virtual ~ItemUpdateReceiverInterface();
};
@@ -67,6 +70,7 @@ public:
private:
virtual void StateChanged (sal_uInt16 nSId, SfxItemState eState, const SfxPoolItem* pState) override;
+ virtual void GetControlState (sal_uInt16 nSId, boost::property_tree::ptree& rState) override;
ItemUpdateReceiverInterface& mrItemUpdateReceiver;
};
diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index d6bde2831b80..2847606789e1 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -63,6 +63,10 @@ public:
const SfxItemState eState,
const SfxPoolItem* pState) 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;