diff options
Diffstat (limited to 'editeng/source')
-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)); |