desktop/source/lib/init.cxx            |   10 +++++++++-
 sc/source/ui/inc/SparklineRenderer.hxx |    6 +++++-
 sfx2/source/control/unoctitm.cxx       |    8 ++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 065dc2b6c936cb064f6d58ed65fc2fcc5f4d621e
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Apr 14 19:12:37 2022 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Tue Apr 19 01:48:57 2022 +0200

    lok: report state for sparkline UNO commands
    
    Change-Id: Ic1e8464ec97ef91f631944dbaa3de0e5bff26c89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133006
    Tested-by: Tomaž Vajngerl <qui...@gmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit ee76783d2b2718a66bceefc6f8a71019daa7cc5b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133060
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c6fb6d1460b8..6ab245c55d35 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3164,7 +3164,15 @@ static void doc_iniUnoCommands ()
         OUString(".uno:RunMacro"),
         OUString(".uno:SpacePara1"),
         OUString(".uno:SpacePara15"),
-        OUString(".uno:SpacePara2")
+        OUString(".uno:SpacePara2"),
+        OUString(".uno:InsertSparkline"),
+        OUString(".uno:DeleteSparkline"),
+        OUString(".uno:DeleteSparklineGroup"),
+        OUString(".uno:EditSparklineGroup"),
+        OUString(".uno:EditSparkline"),
+        OUString(".uno:GroupSparklines"),
+        OUString(".uno:UngroupSparklines"),
+        OUString(".uno:FormatSparklineMenu"),
     };
 
     util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 00985b1fe4ee..0681abcc61c3 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1109,6 +1109,14 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 
nSID, SfxViewFrame* pViewFra
              aEvent.FeatureURL.Path == "IncrementIndent" ||
              aEvent.FeatureURL.Path == "DecrementIndent" ||
              aEvent.FeatureURL.Path == "EditHeaderAndFooter" ||
+             aEvent.FeatureURL.Path == "InsertSparkline" ||
+             aEvent.FeatureURL.Path == "DeleteSparkline" ||
+             aEvent.FeatureURL.Path == "DeleteSparklineGroup" ||
+             aEvent.FeatureURL.Path == "EditSparklineGroup" ||
+             aEvent.FeatureURL.Path == "EditSparkline" ||
+             aEvent.FeatureURL.Path == "GroupSparklines" ||
+             aEvent.FeatureURL.Path == "UngroupSparklines" ||
+             aEvent.FeatureURL.Path == "FormatSparklineMenu" ||
              aEvent.FeatureURL.Path == "NumberFormatDecDecimals" ||
              aEvent.FeatureURL.Path == "NumberFormatIncDecimals")
     {
commit 2ca7d319d1dfa300f1138baf7ddd74c2fccc9673
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon Apr 11 20:18:18 2022 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Tue Apr 19 01:48:45 2022 +0200

    sc: fix rendering when sparkline doesn't have a data range
    
    Change-Id: I945594d93c893043cea1758b3ad9c4e7692ef27e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132815
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 538166da779e13197411cade8bd7dedb94778525)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132934
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/source/ui/inc/SparklineRenderer.hxx 
b/sc/source/ui/inc/SparklineRenderer.hxx
index 9f697a6002b2..60d648d25602 100644
--- a/sc/source/ui/inc/SparklineRenderer.hxx
+++ b/sc/source/ui/inc/SparklineRenderer.hxx
@@ -15,6 +15,7 @@
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolygontools.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
+#include <comphelper/scopeguard.hxx>
 
 #include <Sparkline.hxx>
 #include <SparklineGroup.hxx>
@@ -494,6 +495,8 @@ public:
                 tools::Long nOneX, tools::Long nOneY, double fScaleX, double 
fScaleY)
     {
         rRenderContext.Push();
+        comphelper::ScopeGuard aPushPopGuard([&rRenderContext]() { 
rRenderContext.Pop(); });
+
         rRenderContext.SetAntialiasing(AntialiasingFlags::Enable);
         rRenderContext.SetClipRegion(vcl::Region(rRectangle));
 
@@ -508,7 +511,9 @@ public:
         auto const& rRangeList = pSparkline->getInputRange();
 
         if (rRangeList.empty())
+        {
             return;
+        }
 
         auto pSparklineGroup = pSparkline->getSparklineGroup();
         auto const& rAttributes = pSparklineGroup->getAttributes();
@@ -564,7 +569,6 @@ public:
             drawLine(rRenderContext, aOutputRectangle, aSparklineValues,
                      pSparklineGroup->getAttributes());
         }
-        rRenderContext.Pop();
     }
 };
 }

Reply via email to