desktop/source/lib/init.cxx                     |   10 +++
 oox/Library_oox.mk                              |    1 
 oox/inc/drawingml/chart/datatablecontext.hxx    |   42 ++++++++++++++
 oox/inc/drawingml/chart/datatablemodel.hxx      |   41 ++++++++++++++
 oox/inc/drawingml/chart/plotareacontext.hxx     |   15 -----
 oox/inc/drawingml/chart/plotareamodel.hxx       |    9 ---
 oox/source/drawingml/chart/datatablecontext.cxx |   68 ++++++++++++++++++++++++
 oox/source/drawingml/chart/plotareacontext.cxx  |   32 -----------
 oox/source/drawingml/chart/plotareamodel.cxx    |    7 --
 sfx2/source/control/unoctitm.cxx                |    8 ++
 10 files changed, 171 insertions(+), 62 deletions(-)

New commits:
commit 32e38ec654cfd467aad74da59366bd41142b3bdc
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Apr 14 15:57:01 2022 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Apr 15 01:35:09 2022 +0200

    oox: move DataTable{Context,Model} into own file, prop. "showKeys"
    
    Move DataTableContext and DataTableModel into its own files and
    add the missing "showKeys" property of the data table (dTable).
    
    Change-Id: I44fb436000c7f00a596fc9b12489d15ea1368e68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133021
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index ca88ab100039..01da0aa4374d 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
     oox/source/drawingml/chart/datasourcecontext \
     oox/source/drawingml/chart/datasourceconverter \
     oox/source/drawingml/chart/datasourcemodel \
+    oox/source/drawingml/chart/datatablecontext \
     oox/source/drawingml/chart/modelbase \
     oox/source/drawingml/chart/objectformatter \
     oox/source/drawingml/chart/plotareacontext \
diff --git a/oox/inc/drawingml/chart/datatablecontext.hxx 
b/oox/inc/drawingml/chart/datatablecontext.hxx
new file mode 100644
index 000000000000..01a75c6e634d
--- /dev/null
+++ b/oox/inc/drawingml/chart/datatablecontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <drawingml/chart/chartcontextbase.hxx>
+
+namespace oox::drawingml::chart
+{
+struct DataTableModel;
+
+/** Handler for a data table context (c:dTable element).
+ */
+class DataTableContext final : public ContextBase<DataTableModel>
+{
+public:
+    explicit DataTableContext(::oox::core::ContextHandler2Helper& rParent, 
DataTableModel& rModel);
+    virtual ~DataTableContext() override;
+
+    virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement,
+                                                           const 
AttributeList& rAttribs) override;
+};
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/datatablemodel.hxx 
b/oox/inc/drawingml/chart/datatablemodel.hxx
new file mode 100644
index 000000000000..5c7fe7901200
--- /dev/null
+++ b/oox/inc/drawingml/chart/datatablemodel.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+namespace oox::drawingml::chart
+{
+struct DataTableModel
+{
+    bool mbShowHBorder : 1; /// Show Horizontal Border
+    bool mbShowVBorder : 1; /// Show Vertical Border
+    bool mbShowOutline : 1; /// Show outline
+    bool mbShowKeys : 1;
+
+    DataTableModel()
+        : mbShowHBorder(false)
+        , mbShowVBorder(false)
+        , mbShowOutline(false)
+        , mbShowKeys(false)
+    {
+    }
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/plotareacontext.hxx 
b/oox/inc/drawingml/chart/plotareacontext.hxx
index 05984449f9d0..2b3fae932161 100644
--- a/oox/inc/drawingml/chart/plotareacontext.hxx
+++ b/oox/inc/drawingml/chart/plotareacontext.hxx
@@ -53,21 +53,6 @@ public:
     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 
nElement, const AttributeList& rAttribs ) override;
 };
 
-
-struct DataTableModel;
-
-/** Handler for a data table context (c:dTable element).
- */
-class DataTableContext final : public ContextBase< DataTableModel >
-{
-public:
-    explicit            DataTableContext( ::oox::core::ContextHandler2Helper& 
rParent, DataTableModel& rModel );
-    virtual             ~DataTableContext() override;
-
-    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 
nElement, const AttributeList& rAttribs ) override;
-};
-
-
 struct PlotAreaModel;
 
 /** Handler for a chart plot area context (c:plotArea element).
diff --git a/oox/inc/drawingml/chart/plotareamodel.hxx 
b/oox/inc/drawingml/chart/plotareamodel.hxx
index ad7a2495b714..11990095378f 100644
--- a/oox/inc/drawingml/chart/plotareamodel.hxx
+++ b/oox/inc/drawingml/chart/plotareamodel.hxx
@@ -24,6 +24,7 @@
 #include <drawingml/chart/axismodel.hxx>
 #include <drawingml/chart/seriesmodel.hxx>
 #include <drawingml/chart/typegroupmodel.hxx>
+#include <drawingml/chart/datatablemodel.hxx>
 
 namespace oox::drawingml::chart {
 
@@ -51,14 +52,6 @@ struct WallFloorModel
                         ~WallFloorModel();
 };
 
-struct DataTableModel
-{
-    bool                mbShowHBorder;      /// Show Horizontal Border
-    bool                mbShowVBorder;      /// Show Vertical Border
-    bool                mbShowOutline;      /// Show outline
-    explicit            DataTableModel();
-};
-
 struct PlotAreaModel
 {
     typedef ModelVector< TypeGroupModel >   TypeGroupVector;
diff --git a/oox/source/drawingml/chart/datatablecontext.cxx 
b/oox/source/drawingml/chart/datatablecontext.cxx
new file mode 100644
index 000000000000..c40a4f782450
--- /dev/null
+++ b/oox/source/drawingml/chart/datatablecontext.cxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <drawingml/chart/datatablecontext.hxx>
+
+#include <drawingml/chart/plotareamodel.hxx>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <oox/token/namespaces.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox::drawingml::chart
+{
+using ::oox::core::ContextHandler2Helper;
+using ::oox::core::ContextHandlerRef;
+
+DataTableContext::DataTableContext(ContextHandler2Helper& rParent, 
DataTableModel& rModel)
+    : ContextBase<DataTableModel>(rParent, rModel)
+{
+}
+
+DataTableContext::~DataTableContext() {}
+
+ContextHandlerRef DataTableContext::onCreateContext(sal_Int32 nElement,
+                                                    const AttributeList& 
rAttribs)
+{
+    switch (getCurrentElement())
+    {
+        case C_TOKEN(dTable):
+            switch (nElement)
+            {
+                case C_TOKEN(showHorzBorder):
+                    mrModel.mbShowHBorder = rAttribs.getBool(XML_val, false);
+                    break;
+                case C_TOKEN(showVertBorder):
+                    mrModel.mbShowVBorder = rAttribs.getBool(XML_val, false);
+                    break;
+                case C_TOKEN(showOutline):
+                    mrModel.mbShowOutline = rAttribs.getBool(XML_val, false);
+                    break;
+                case C_TOKEN(showKeys):
+                    //mrModel.mbShowKeys = rAttribs.getBool( XML_val, false );
+                    break;
+            }
+            break;
+    }
+    return nullptr;
+}
+
+} // namespace oox::drawingml::chart
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/plotareacontext.cxx 
b/oox/source/drawingml/chart/plotareacontext.cxx
index 4f231e0eda35..4afddee4700c 100644
--- a/oox/source/drawingml/chart/plotareacontext.cxx
+++ b/oox/source/drawingml/chart/plotareacontext.cxx
@@ -24,6 +24,7 @@
 #include <drawingml/chart/plotareamodel.hxx>
 #include <drawingml/chart/seriescontext.hxx>
 #include <drawingml/chart/typegroupcontext.hxx>
+#include <drawingml/chart/datatablecontext.hxx>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/attributelist.hxx>
 #include <oox/token/namespaces.hxx>
@@ -106,37 +107,6 @@ ContextHandlerRef WallFloorContext::onCreateContext( 
sal_Int32 nElement, const A
     return nullptr;
 }
 
-DataTableContext::DataTableContext( ContextHandler2Helper& rParent, 
DataTableModel& rModel ) :
-    ContextBase< DataTableModel >( rParent, rModel )
-{
-}
-
-DataTableContext::~DataTableContext()
-{
-}
-
-ContextHandlerRef DataTableContext::onCreateContext( sal_Int32 nElement, const 
AttributeList& rAttribs)
-{
-    switch( getCurrentElement() )
-    {
-        case C_TOKEN( dTable ):
-            switch( nElement )
-            {
-                case C_TOKEN( showHorzBorder ):
-                        mrModel.mbShowHBorder = rAttribs.getBool( XML_val, 
false );
-                        break;
-                case C_TOKEN( showVertBorder ):
-                        mrModel.mbShowVBorder = rAttribs.getBool( XML_val, 
false );
-                        break;
-                case C_TOKEN( showOutline ):
-                        mrModel.mbShowOutline = rAttribs.getBool( XML_val, 
false );
-                        break;
-            }
-        break;
-    }
-    return nullptr;
-}
-
 PlotAreaContext::PlotAreaContext( ContextHandler2Helper& rParent, 
PlotAreaModel& rModel ) :
     ContextBase< PlotAreaModel >( rParent, rModel )
 {
diff --git a/oox/source/drawingml/chart/plotareamodel.cxx 
b/oox/source/drawingml/chart/plotareamodel.cxx
index ba949572a950..cb4f6383ddfa 100644
--- a/oox/source/drawingml/chart/plotareamodel.cxx
+++ b/oox/source/drawingml/chart/plotareamodel.cxx
@@ -38,13 +38,6 @@ WallFloorModel::~WallFloorModel()
 {
 }
 
-DataTableModel::DataTableModel() :
-        mbShowHBorder(false),
-        mbShowVBorder(false),
-        mbShowOutline(false)
-{
-}
-
 PlotAreaModel::PlotAreaModel()
 {
     mxShapeProp.create().getFillProperties().moFillType = XML_noFill;
commit ee76783d2b2718a66bceefc6f8a71019daa7cc5b
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Apr 14 19:12:37 2022 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Apr 15 01:34:56 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>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d8e0ca6c95ee..e017ec4d9985 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3158,7 +3158,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 3ea0a1f9e397..57ef3404b8be 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1104,6 +1104,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")
     {

Reply via email to