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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 6 11:30:13 UTC 2020


 chart2/source/controller/inc/ChartController.hxx        |    1 
 chart2/source/controller/main/ChartController.cxx       |    9 +++++++
 chart2/source/controller/main/ChartController_Tools.cxx |   20 ++++++++++++++++
 desktop/source/lib/init.cxx                             |    2 -
 4 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit c43393135a6cd0f748433fc39ff45938b82e0464
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Sep 21 11:16:35 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 6 13:29:31 2020 +0200

    Allow to save file if chart editing is active
    
    This helps in online where autosave after user
    closed view with chart editing active caused
    document to be broken and not allowing to open again.
    
    Change-Id: Iab6a9bfe2c5f67c155ee97726e752c83fc47af5f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103091
    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/+/104011
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e3c4d8ae7d2f..0d94f67cea11 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3972,7 +3972,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
     bool bResult = false;
     LokChartHelper aChartHelper(SfxViewShell::Current());
 
-    if (aChartHelper.GetWindow() )
+    if (aChartHelper.GetWindow() && aCommand != ".uno:Save" )
     {
         util::URL aCommandURL;
         aCommandURL.Path = aCommand.copy(5);
commit 72f36d5e7a982b1a8b58dd73da4db580bf5124f1
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 17 13:27:53 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 6 13:29:24 2020 +0200

    lok: Add posibility to change chart fill color
    
    Change-Id: I519a0fe15c4983803109aed7eef840d36a5e7b21
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102920
    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/+/103141
    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 e464786bc217..293e1b732774 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -497,6 +497,7 @@ private:
 
     void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
     void executeDispatch_LOKPieSegmentDragging(int nOffset);
+    void executeDispatch_FillColor(sal_uInt32 nColor);
 
     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 f81b261182fa..df58f924189a 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1104,6 +1104,15 @@ void SAL_CALL ChartController::dispatch(
             this->executeDispatch_PositionAndSize(&rArgs);
         }
     }
+    else if(aCommand == "FillColor")
+    {
+        if (rArgs.getLength() > 0)
+        {
+            sal_uInt32 nColor;
+            rArgs[0].Value >>= nColor;
+            this->executeDispatch_FillColor(nColor);
+        }
+    }
     else if(aCommand == "Paste")
         this->executeDispatch_Paste();
     else if(aCommand == "Copy" )
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index d72a629757a1..0b6401456c9a 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -920,6 +920,26 @@ void ChartController::executeDispatch_ToggleGridVertical()
     aUndoGuard.commit();
 }
 
+void ChartController::executeDispatch_FillColor(sal_uInt32 nColor)
+{
+    try
+    {
+        OUString aCID( m_aSelection.getSelectedCID() );
+        const uno::Reference< frame::XModel >& xChartModel = getModel();
+        if( xChartModel.is() )
+        {
+            Reference< beans::XPropertySet > xPointProperties(
+                ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) );
+            if( xPointProperties.is() )
+                xPointProperties->setPropertyValue( "FillColor", uno::Any( nColor ) );
+        }
+    }
+    catch( const uno::Exception& )
+    {
+        DBG_UNHANDLED_EXCEPTION( "chart2" );
+    }
+}
+
 void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, int nY)
 {
     if (!m_pDrawViewWrapper)


More information about the Libreoffice-commits mailing list