diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-08-10 12:57:00 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-08-26 13:18:43 +0200 |
commit | cc2823b980d0ab87278de87282ddfc6a49b2508a (patch) | |
tree | d45297cef6a53218e22d50cd9804900be4358a14 /editeng/source/items | |
parent | 77f12e60687ab639da34aa71e84085d1c3d5a402 (diff) |
lok: send cell border state updates
Change-Id: I400ee3cb9f0a98804d98e25d0164fa5148b79191
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100424
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101385
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'editeng/source/items')
-rw-r--r-- | editeng/source/items/frmitems.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 53b3b0d15ff7..371621157b8e 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1294,6 +1294,23 @@ SvxBoxItem::~SvxBoxItem() } +boost::property_tree::ptree SvxBoxItem::dumpAsJSON() const +{ + boost::property_tree::ptree aTree; + + boost::property_tree::ptree aState; + aState.put("top", GetTop() && !GetTop()->isEmpty()); + aState.put("bottom", GetBottom() && !GetBottom()->isEmpty()); + aState.put("left", GetLeft() && !GetLeft()->isEmpty()); + aState.put("right", GetRight() && !GetRight()->isEmpty()); + + aTree.push_back(std::make_pair("state", aState)); + aTree.put("commandName", ".uno:BorderOuter"); + + return aTree; +} + + static bool CmpBrdLn( const std::unique_ptr<SvxBorderLine> & pBrd1, const SvxBorderLine* pBrd2 ) { if( pBrd1.get() == pBrd2 ) @@ -2072,6 +2089,22 @@ SvxBoxInfoItem::~SvxBoxInfoItem() { } + +boost::property_tree::ptree SvxBoxInfoItem::dumpAsJSON() const +{ + boost::property_tree::ptree aTree; + + boost::property_tree::ptree aState; + aState.put("vertical", GetVert() && !GetVert()->isEmpty()); + aState.put("horizontal", GetHori() && !GetHori()->isEmpty()); + + aTree.push_back(std::make_pair("state", aState)); + aTree.put("commandName", ".uno:BorderInner"); + + return aTree; +} + + bool SvxBoxInfoItem::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); |