[Libreoffice-commits] core.git: 2 commits - chart2/source sfx2/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 8 12:00:10 UTC 2021


 chart2/source/controller/inc/ChartController.hxx        |    1 
 chart2/source/controller/main/ChartController.cxx       |    9 ++++
 chart2/source/controller/main/ChartController_Tools.cxx |   30 ++++++++++++++++
 sfx2/source/control/unoctitm.cxx                        |    5 ++
 4 files changed, 44 insertions(+), 1 deletion(-)

New commits:
commit 8e4d220d346fc08bc669f8cff967693c39674906
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 5 18:11:41 2021 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jan 8 12:59:33 2021 +0100

    lok: Apply chart line width
    
    Change-Id: I94a6406eeb929498592ca5430cf7248cfd3e9f77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108815
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108946
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index a0f6c55afab5..8f4d9ade8af2 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -501,6 +501,7 @@ private:
     void executeDispatch_FillColor(sal_uInt32 nColor);
     void executeDispatch_FillGradient(OUString sJSONGradient);
     void executeDispatch_LineColor(sal_uInt32 nColor);
+    void executeDispatch_LineWidth(sal_uInt32 nWidth);
 
     void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle);
 
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 8612b1e20513..219ad91cfa70 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1121,6 +1121,15 @@ void SAL_CALL ChartController::dispatch(
             this->executeDispatch_LineColor(nColor);
         }
     }
+    else if(aCommand == "LineWidth")
+    {
+        if (rArgs.getLength() > 0)
+        {
+            sal_Int32 nWidth = -1;
+            rArgs[0].Value >>= nWidth;
+            this->executeDispatch_LineWidth(nWidth);
+        }
+    }
     else if(aCommand.startsWith("FillGradient"))
     {
         this->executeDispatch_FillGradient(aCommand.copy(aCommand.indexOf('=') + 1));
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index bc796925b4a8..a5feac9eb7a6 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -1013,6 +1013,36 @@ void ChartController::executeDispatch_LineColor(sal_uInt32 nColor)
     }
 }
 
+void ChartController::executeDispatch_LineWidth(sal_uInt32 nWidth)
+{
+    try
+    {
+        OUString aCID( m_aSelection.getSelectedCID() );
+        const uno::Reference< frame::XModel >& xChartModel = getModel();
+        if( xChartModel.is() )
+        {
+            Reference< beans::XPropertySet > xPropSet(
+                ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) );
+
+            ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+            if (eType == OBJECTTYPE_DIAGRAM)
+            {
+                css::uno::Reference<css::chart2::XDiagram> xDiagram(
+                        xPropSet, css::uno::UNO_QUERY);
+                if (xDiagram.is())
+                    xPropSet.set(xDiagram->getWall());
+            }
+
+            if( xPropSet.is() )
+                xPropSet->setPropertyValue( "LineWidth", css::uno::makeAny( nWidth ) );
+        }
+    }
+    catch( const uno::Exception& )
+    {
+        DBG_UNHANDLED_EXCEPTION( "chart2" );
+    }
+}
+
 void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, int nY)
 {
     if (!m_pDrawViewWrapper)
commit deac866cf724fdbd4141ff8bf7b46fa21b40ba69
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Jan 6 17:19:50 2021 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jan 8 12:59:20 2021 +0100

    lok: send linespacing updates
    
    Change-Id: I2dd123b04a2d6a03eac92aca5db5a4413b386e7c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108877
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108945
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 9c78b4c693ce..ddccd885ab15 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1020,7 +1020,10 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra
         aEvent.FeatureURL.Path == "FormatPaintbrush" ||
         aEvent.FeatureURL.Path == "FreezePanes" ||
         aEvent.FeatureURL.Path == "Sidebar" ||
-        aEvent.FeatureURL.Path == "SheetRightToLeft")
+        aEvent.FeatureURL.Path == "SheetRightToLeft" ||
+        aEvent.FeatureURL.Path == "SpacePara1" ||
+        aEvent.FeatureURL.Path == "SpacePara15" ||
+        aEvent.FeatureURL.Path == "SpacePara2")
     {
         bool bTemp = false;
         aEvent.State >>= bTemp;


More information about the Libreoffice-commits mailing list