[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source editeng/source include/editeng

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 10 19:09:34 UTC 2020


 desktop/source/lib/init.cxx       |    4 +++-
 editeng/source/items/frmitems.cxx |   31 +++++++++++++++++++++++++++++++
 include/editeng/boxitem.hxx       |    4 ++++
 3 files changed, 38 insertions(+), 1 deletion(-)

New commits:
commit 035d850179688137dcf145cf3e779b6e05779239
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Aug 10 12:57:00 2020 +0200
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Mon Aug 10 21:09:01 2020 +0200

    lok: send cell border state updates
    
    Change-Id: I400ee3cb9f0a98804d98e25d0164fa5148b79191
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100424
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7e6b71c77c1e..d33454297cf8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2756,7 +2756,9 @@ static void doc_iniUnoCommands ()
         OUString(".uno:ParaspaceIncrease"),
         OUString(".uno:ParaspaceDecrease"),
         OUString(".uno:AcceptTrackedChange"),
-        OUString(".uno:RejectTrackedChange")
+        OUString(".uno:RejectTrackedChange"),
+        OUString(".uno:BorderInner"),
+        OUString(".uno:BorderOuter")
     };
 
     util::URL aCommandURL;
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 0e1c22731ad7..d21e3ce75591 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1440,6 +1440,23 @@ SvxBoxItem& SvxBoxItem::operator=( const SvxBoxItem& rBox )
 }
 
 
+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 )
@@ -2318,6 +2335,20 @@ 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;
+}
+
 SvxBoxInfoItem &SvxBoxInfoItem::operator=( const SvxBoxInfoItem& rCpy )
 {
     if (this != &rCpy)
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 103967578f20..8cf1c2d60545 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -118,6 +118,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)
@@ -234,6 +236,8 @@ public:
             nValidFlags &= ~nValid;
     }
     void                    ResetFlags();
+
+    virtual boost::property_tree::ptree dumpAsJSON() const override;
 };
 
 namespace editeng


More information about the Libreoffice-commits mailing list