officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu |   14 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu   |   49 +++
 starmath/Library_sm.mk                                         |    2 
 starmath/UIConfig_smath.mk                                     |    1 
 starmath/source/SmElementsPanel.cxx                            |  105 ++++++
 starmath/source/SmElementsPanel.hxx                            |   59 +++
 starmath/source/SmPanelFactory.cxx                             |  136 ++++++++
 starmath/uiconfig/smath/ui/sidebarelements_math.ui             |  154 
++++++++++
 starmath/util/sm.component                                     |    4 
 9 files changed, 524 insertions(+)

New commits:
commit e5b1edebd722d724322d9cde90f4319c82571f16
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Apr 25 18:24:43 2022 +0300
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sun Jun 5 07:35:28 2022 +0200

    tdf#125931: Add Elements deck and Elements panel to Math's sidebar
    
    Change-Id: Ie04a5dc48de38f318f0ddb42efc42cea022dc62c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133393
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135399
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
index c26b96ec287b..20cb7d0b52ac 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Factories.xcu
@@ -146,6 +146,20 @@
           <value>org.libreoffice.comp.chart2.sidebar.ChartPanelFactory</value>
         </prop>
       </node>
+      <node oor:name="SmPanelFactory" oor:op="replace">
+        <prop oor:name="Type">
+          <value>toolpanel</value>
+        </prop>
+        <prop oor:name="Name">
+          <value>SmPanelFactory</value>
+        </prop>
+        <prop oor:name="Module">
+          <value></value>
+        </prop>
+        <prop oor:name="FactoryImplementation">
+          <value>org.libreoffice.comp.Math.sidebar.SmPanelFactory</value>
+        </prop>
+      </node>
     </node>
   </node>
 </oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index 086c745c9d82..a6e268628941 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -298,6 +298,26 @@
         </prop>
       </node>
 
+      <node oor:name="ElementsDeck" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Elements</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>ElementsDeck</value>
+        </prop>
+        <prop oor:name="IconURL" oor:type="xs:string">
+          
<value>private:graphicrepository/sfx2/res/symphony/sidebar-gallery-large.png</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Math, any, visible;
+          </value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>300</value>
+        </prop>
+      </node>
+
     </node>
     <node oor:name="PanelList">
 
@@ -742,6 +762,35 @@
         </prop>
       </node>
 
+      <node oor:name="MathElementsPanel" oor:op="replace">
+        <prop oor:name="Title" oor:type="xs:string">
+          <value xml:lang="en-US">Elements</value>
+        </prop>
+        <prop oor:name="TitleBarIsOptional" oor:type="xs:boolean">
+          <value>true</value>
+        </prop>
+        <prop oor:name="Id" oor:type="xs:string">
+          <value>MathElementsPanel</value>
+        </prop>
+        <prop oor:name="DeckId" oor:type="xs:string">
+          <value>ElementsDeck</value>
+        </prop>
+        <prop oor:name="ContextList">
+          <value oor:separator=";">
+            Math, any, visible;
+          </value>
+        </prop>
+        <prop oor:name="ImplementationURL" oor:type="xs:string">
+          
<value>private:resource/toolpanel/SmPanelFactory/MathElementsPanel</value>
+        </prop>
+        <prop oor:name="OrderIndex" oor:type="xs:int">
+          <value>100</value>
+        </prop>
+        <prop oor:name="WantsAWT" oor:type="xs:boolean">
+          <value>false</value>
+        </prop>
+      </node>
+
       <node oor:name="PosSizePropertyPanel" oor:op="replace">
         <prop oor:name="Title" oor:type="xs:string">
           <value xml:lang="en-US">Position and Size</value>
diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk
index 613a8cbdb7cd..91d62caed114 100644
--- a/starmath/Library_sm.mk
+++ b/starmath/Library_sm.mk
@@ -67,6 +67,8 @@ $(eval $(call gb_Library_add_exception_objects,sm,\
         starmath/source/AccessibleSmElement \
         starmath/source/AccessibleSmElementsControl \
         starmath/source/ElementsDockingWindow \
+        starmath/source/SmElementsPanel \
+        starmath/source/SmPanelFactory \
         starmath/source/accessibility \
         starmath/source/action \
         starmath/source/caret \
diff --git a/starmath/UIConfig_smath.mk b/starmath/UIConfig_smath.mk
index 2a39af9e4a6d..45b12819731a 100644
--- a/starmath/UIConfig_smath.mk
+++ b/starmath/UIConfig_smath.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/smath,\
        starmath/uiconfig/smath/ui/mathwindow \
        starmath/uiconfig/smath/ui/printeroptions \
        starmath/uiconfig/smath/ui/savedefaultsdialog \
+       starmath/uiconfig/smath/ui/sidebarelements_math \
        starmath/uiconfig/smath/ui/smathsettings \
        starmath/uiconfig/smath/ui/spacingdialog \
        starmath/uiconfig/smath/ui/symdefinedialog \
diff --git a/starmath/source/SmElementsPanel.cxx 
b/starmath/source/SmElementsPanel.cxx
new file mode 100644
index 000000000000..a4c8d7c6d883
--- /dev/null
+++ b/starmath/source/SmElementsPanel.cxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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 <sal/config.h>
+
+#include <sfx2/dispatch.hxx>
+#include <svl/stritem.hxx>
+
+#include "SmElementsPanel.hxx"
+#include <starmath.hrc>
+#include <smmod.hxx>
+#include <strings.hrc>
+#include <view.hxx>
+
+namespace sm::sidebar
+{
+// static
+std::unique_ptr<PanelLayout> SmElementsPanel::Create(weld::Widget& rParent,
+                                                     const SfxBindings& 
rBindings)
+{
+    return std::make_unique<SmElementsPanel>(rParent, rBindings);
+}
+
+SmElementsPanel::SmElementsPanel(weld::Widget& rParent, const SfxBindings& 
rBindings)
+    : PanelLayout(&rParent, "MathElementsPanel", 
"modules/smath/ui/sidebarelements_math.ui")
+    , mrBindings(rBindings)
+    , mxCategoryList(m_xBuilder->weld_tree_view("categorylist"))
+    , mxElementsControl(std::make_unique<SmElementsControl>(
+          m_xBuilder->weld_scrolled_window("scrolledwindow", true)))
+    , mxElementsControlWin(
+          std::make_unique<weld::CustomWeld>(*m_xBuilder, "element_selector", 
*mxElementsControl))
+{
+    for (size_t i = 0; i < SmElementsControl::categoriesSize(); ++i)
+        
mxCategoryList->append_text(SmResId(std::get<0>(SmElementsControl::categories()[i])));
+
+    mxCategoryList->set_size_request(-1, mxCategoryList->get_height_rows(6));
+
+    mxCategoryList->connect_changed(LINK(this, SmElementsPanel, 
CategorySelectedHandle));
+    mxCategoryList->select_text(SmResId(RID_CATEGORY_UNARY_BINARY_OPERATORS));
+
+    mxElementsControl->setVerticalMode(false); // Sidebar currently can only 
dock to a side
+    mxElementsControl->setElementSetId(RID_CATEGORY_UNARY_BINARY_OPERATORS);
+    mxElementsControl->SetSelectHdl(LINK(this, SmElementsPanel, 
ElementClickHandler));
+}
+
+SmElementsPanel::~SmElementsPanel()
+{
+    mxElementsControlWin.reset();
+    mxElementsControl.reset();
+    mxCategoryList.reset();
+}
+
+IMPL_LINK(SmElementsPanel, CategorySelectedHandle, weld::TreeView&, rList, 
void)
+{
+    const OUString sSelected = rList.get_selected_text();
+    for (size_t i = 0; i < SmElementsControl::categoriesSize(); ++i)
+    {
+        const TranslateId& rCategoryId = 
std::get<0>(SmElementsControl::categories()[i]);
+        OUString aCurrentCategoryString = SmResId(rCategoryId);
+        if (aCurrentCategoryString == sSelected)
+        {
+            mxElementsControl->setElementSetId(rCategoryId);
+            if (SmViewShell* pViewSh = GetView())
+                
mxElementsControl->setSmSyntaxVersion(pViewSh->GetDoc()->GetSmSyntaxVersion());
+            return;
+        }
+    }
+}
+
+IMPL_LINK(SmElementsPanel, ElementClickHandler, SmElement&, rElement, void)
+{
+    if (SmViewShell* pViewSh = GetView())
+    {
+        std::unique_ptr<SfxStringItem> pInsertCommand
+            = std::make_unique<SfxStringItem>(SID_INSERTCOMMANDTEXT, 
rElement.getText());
+        pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList(
+            SID_INSERTCOMMANDTEXT, SfxCallMode::RECORD, { pInsertCommand.get() 
});
+    }
+}
+
+SmViewShell* SmElementsPanel::GetView() const
+{
+    SfxViewShell* pView = 
mrBindings.GetDispatcher()->GetFrame()->GetViewShell();
+    return dynamic_cast<SmViewShell*>(pView);
+}
+
+} // end of namespace sm::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/starmath/source/SmElementsPanel.hxx 
b/starmath/source/SmElementsPanel.hxx
new file mode 100644
index 000000000000..4629b33af409
--- /dev/null
+++ b/starmath/source/SmElementsPanel.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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 <sal/config.h>
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <sfx2/sidebar/SidebarModelUpdate.hxx>
+#include <sfx2/sidebar/PanelLayout.hxx>
+#include <vcl/customweld.hxx>
+#include <vcl/EnumContext.hxx>
+
+#include <ElementsDockingWindow.hxx>
+
+#include <memory>
+
+namespace sm::sidebar
+{
+class SmElementsPanel : public PanelLayout
+{
+public:
+    static std::unique_ptr<PanelLayout> Create(weld::Widget& rParent, const 
SfxBindings& rBindings);
+    SmElementsPanel(weld::Widget& rParent, const SfxBindings& rBindings);
+    ~SmElementsPanel();
+
+private:
+    DECL_LINK(CategorySelectedHandle, weld::TreeView&, void);
+    DECL_LINK(ElementClickHandler, SmElement&, void);
+
+    SmViewShell* GetView() const;
+
+    const SfxBindings& mrBindings;
+
+    std::unique_ptr<weld::TreeView> mxCategoryList;
+    std::unique_ptr<SmElementsControl> mxElementsControl;
+    std::unique_ptr<weld::CustomWeld> mxElementsControlWin;
+};
+
+} // end of namespace sm::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/starmath/source/SmPanelFactory.cxx 
b/starmath/source/SmPanelFactory.cxx
new file mode 100644
index 000000000000..243c3d05a5f2
--- /dev/null
+++ b/starmath/source/SmPanelFactory.cxx
@@ -0,0 +1,136 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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 <sal/config.h>
+
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
+#include <com/sun/star/ui/XUIElementFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <sfx2/sidebar/SidebarPanelBase.hxx>
+#include <vcl/weldutils.hxx>
+
+#include "SmElementsPanel.hxx"
+
+namespace
+{
+typedef cppu::WeakComponentImplHelper<css::ui::XUIElementFactory, 
css::lang::XServiceInfo>
+    PanelFactoryInterfaceBase;
+
+class SmPanelFactory final : public cppu::BaseMutex, public 
PanelFactoryInterfaceBase
+{
+public:
+    SmPanelFactory()
+        : PanelFactoryInterfaceBase(m_aMutex)
+    {
+    }
+
+    SmPanelFactory(const SmPanelFactory&) = delete;
+    const SmPanelFactory& operator=(const SmPanelFactory&) = delete;
+
+    // XUIElementFactory
+    css::uno::Reference<css::ui::XUIElement> SAL_CALL
+    createUIElement(const OUString& ResourceURL,
+                    const css::uno::Sequence<css::beans::PropertyValue>& 
Arguments) override;
+
+    // XServiceInfo
+    OUString SAL_CALL getImplementationName() override;
+    sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override;
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+};
+
+css::uno::Reference<css::ui::XUIElement> SAL_CALL 
SmPanelFactory::createUIElement(
+    const OUString& ResourceURL, const 
css::uno::Sequence<css::beans::PropertyValue>& Arguments)
+{
+    try
+    {
+        const comphelper::NamedValueCollection aArguments(Arguments);
+        auto xFrame(aArguments.getOrDefault("Frame", 
css::uno::Reference<css::frame::XFrame>()));
+        auto xParentWindow(
+            aArguments.getOrDefault("ParentWindow", 
css::uno::Reference<css::awt::XWindow>()));
+        const sal_uInt64 nBindingsValue(aArguments.getOrDefault("SfxBindings", 
sal_uInt64(0)));
+        SfxBindings* pBindings = 
reinterpret_cast<SfxBindings*>(nBindingsValue);
+
+        weld::Widget* pParent(nullptr);
+        if (auto pTunnel = 
dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get()))
+            pParent = pTunnel->getWidget();
+
+        if (!pParent)
+            throw css::uno::RuntimeException("SmPanelFactory::createUIElement: 
no ParentWindow");
+        if (!xFrame)
+            throw css::uno::RuntimeException("SmPanelFactory::createUIElement: 
no Frame");
+        if (!pBindings)
+            throw css::uno::RuntimeException("SmPanelFactory::createUIElement: 
no SfxBindings");
+
+        std::unique_ptr<PanelLayout> pPanel;
+        css::ui::LayoutSize aLayoutSize{ -1, -1, -1 };
+        if (ResourceURL.endsWith("/MathElementsPanel"))
+        {
+            pPanel = sm::sidebar::SmElementsPanel::Create(*pParent, 
*pBindings);
+            aLayoutSize = { 300, -1, -1 };
+        }
+
+        if (pPanel)
+            return sfx2::sidebar::SidebarPanelBase::Create(ResourceURL, 
xFrame, std::move(pPanel),
+                                                           aLayoutSize);
+    }
+    catch (const css::uno::RuntimeException&)
+    {
+        throw;
+    }
+    catch (const css::uno::Exception&)
+    {
+        css::uno::Any anyEx = cppu::getCaughtException();
+        throw 
css::lang::WrappedTargetRuntimeException("SmPanelFactory::createUIElement 
exception",
+                                                       nullptr, anyEx);
+    }
+
+    return {};
+}
+
+OUString SmPanelFactory::getImplementationName()
+{
+    return "org.libreoffice.comp.Math.sidebar.SmPanelFactory";
+}
+
+sal_Bool SmPanelFactory::supportsService(OUString const& ServiceName)
+{
+    return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> SmPanelFactory::getSupportedServiceNames()
+{
+    return { "com.sun.star.ui.UIElementFactory" };
+}
+
+} // end of unnamed namespace
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+org_libreoffice_comp_Math_sidebar_SmPanelFactory(css::uno::XComponentContext*,
+                                                 
css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new SmPanelFactory);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/starmath/uiconfig/smath/ui/sidebarelements_math.ui 
b/starmath/uiconfig/smath/ui/sidebarelements_math.ui
new file mode 100644
index 000000000000..c645e7f8d349
--- /dev/null
+++ b/starmath/uiconfig/smath/ui/sidebarelements_math.ui
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.1 -->
+<interface domain="svx">
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkTreeStore" id="liststore1">
+    <columns>
+      <!-- column-name text -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
+  <!-- n-columns=1 n-rows=1 -->
+  <object class="GtkGrid" id="MathElementsPanel">
+    <property name="visible">True</property>
+    <property name="can-focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="border-width">6</property>
+    <child>
+      <!-- n-columns=1 n-rows=1 -->
+      <object class="GtkGrid" id="container">
+        <property name="visible">True</property>
+        <property name="can-focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="row-spacing">3</property>
+        <property name="column-spacing">6</property>
+        <child>
+          <object class="GtkPaned" id="splitter">
+            <property name="visible">True</property>
+            <property name="can-focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <property name="orientation">vertical</property>
+            <property name="wide-handle">True</property>
+            <child>
+              <!-- n-columns=1 n-rows=1 -->
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <child>
+                  <object class="GtkScrolledWindow">
+                    <property name="visible">True</property>
+                    <property name="can-focus">True</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="shadow-type">in</property>
+                    <child>
+                      <object class="GtkTreeView" id="categorylist">
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="model">liststore1</property>
+                        <property name="headers-visible">False</property>
+                        <property name="search-column">0</property>
+                        <property name="show-expanders">False</property>
+                        <child internal-child="selection">
+                          <object class="GtkTreeSelection" 
id="treeview-selection2"/>
+                        </child>
+                        <child>
+                          <object class="GtkTreeViewColumn" 
id="treeviewcolumn0">
+                            <child>
+                              <object class="GtkCellRendererText" 
id="cellrenderertext1"/>
+                              <attributes>
+                                <attribute name="text">1</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">False</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+            <child>
+              <!-- n-columns=1 n-rows=1 -->
+              <object class="GtkGrid">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="vexpand">True</property>
+                <property name="row-spacing">6</property>
+                <child>
+                  <!-- n-columns=1 n-rows=1 -->
+                  <object class="GtkGrid">
+                    <property name="visible">True</property>
+                    <property name="can-focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow">
+                        <property name="visible">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="hexpand">True</property>
+                        <property name="vexpand">True</property>
+                        <property name="shadow-type">in</property>
+                        <child>
+                          <object class="GtkViewport">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <child>
+                              <object class="GtkDrawingArea" 
id="element_selector">
+                                <property name="visible">True</property>
+                                <property name="can-focus">True</property>
+                                <property name="events">GDK_BUTTON_MOTION_MASK 
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | 
GDK_KEY_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | 
GDK_STRUCTURE_MASK | GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK</property>
+                                <property name="hexpand">True</property>
+                                <property name="vexpand">True</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">0</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="resize">True</property>
+                <property name="shrink">True</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="left-attach">0</property>
+            <property name="top-attach">0</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="left-attach">0</property>
+        <property name="top-attach">0</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/starmath/util/sm.component b/starmath/util/sm.component
index 4f354df4acb0..2b84a17c429c 100644
--- a/starmath/util/sm.component
+++ b/starmath/util/sm.component
@@ -63,4 +63,8 @@
         constructor="com_sun_star_comp_Math_MathTypeFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
   </implementation>
+  <implementation name="org.libreoffice.comp.Math.sidebar.SmPanelFactory"
+        constructor="org_libreoffice_comp_Math_sidebar_SmPanelFactory">
+    <service name="com.sun.star.ui.UIElementFactory"/>
+  </implementation>
 </component>

Reply via email to