desktop/source/lib/init.cxx | 4 +++- editeng/source/items/frmitems.cxx | 33 +++++++++++++++++++++++++++++++++ include/editeng/boxitem.hxx | 4 ++++ 3 files changed, 40 insertions(+), 1 deletion(-)
New commits: commit e20c9a176ab1567ad8f0ea337132d4965474be51 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Aug 10 12:57:00 2020 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Aug 13 09:48:50 2020 +0200 lok: send cell border state updates Change-Id: I400ee3cb9f0a98804d98e25d0164fa5148b79191 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100424 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100640 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 08a4247513c7..02bf19602150 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2826,7 +2826,9 @@ static void doc_iniUnoCommands () OUString(".uno:Substract"), OUString(".uno:DistributeSelection"), OUString(".uno:Intersect"), - OUString(".uno:FreezePanesRow") + OUString(".uno:FreezePanesRow"), + OUString(".uno:BorderInner"), + OUString(".uno:BorderOuter") }; util::URL aCommandURL; diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 37f1c1a04ff7..8eb8ba879533 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1325,6 +1325,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 ) @@ -2105,6 +2122,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)); diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx index ee317ec4fc99..c96306f38120 100644 --- a/include/editeng/boxitem.hxx +++ b/include/editeng/boxitem.hxx @@ -115,6 +115,8 @@ public: static css::table::BorderLine2 SvxLineToLine( const editeng::SvxBorderLine* pLine, bool bConvert ); static bool LineToSvxLine(const css::table::BorderLine& rLine, editeng::SvxBorderLine& rSvxLine, bool bConvert); static bool LineToSvxLine(const css::table::BorderLine2& rLine, editeng::SvxBorderLine& rSvxLine, bool bConvert); + + virtual boost::property_tree::ptree dumpAsJSON() const override; }; inline void SvxBoxItem::SetAllDistances(sal_uInt16 const nNew) @@ -230,6 +232,8 @@ public: nValidFlags &= ~nValid; } void ResetFlags(); + + virtual boost::property_tree::ptree dumpAsJSON() const override; }; namespace editeng _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits