[Libreoffice-commits] core.git: include/svx officecfg/registry sc/source sd/source starmath/source svx/source svx/util sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jan 15 19:29:22 UTC 2020


 include/svx/lboxctrl.hxx                                        |   30 -
 officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu |   22 
 sc/source/ui/app/scdll.cxx                                      |    2 
 sd/source/ui/app/sddll.cxx                                      |    4 
 starmath/source/smdll.cxx                                       |    2 
 svx/source/tbxctrls/lboxctrl.cxx                                |  234 ++++------
 svx/util/svx.component                                          |    4 
 sw/source/uibase/app/swmodule.cxx                               |    2 
 8 files changed, 149 insertions(+), 151 deletions(-)

New commits:
commit c34edadf5bd3d1d9f3c9c056af28b8964d8f1ca0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 15 11:46:00 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 15 20:28:50 2020 +0100

    rework SvxUndoRedoControl to be a PopupWindowController
    
    Change-Id: I78b4e03c76bc3aa8479013ae157a9e1316dcfecd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86841
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/lboxctrl.hxx b/include/svx/lboxctrl.hxx
index 928b81080feb..5aeaf54ee4b3 100644
--- a/include/svx/lboxctrl.hxx
+++ b/include/svx/lboxctrl.hxx
@@ -20,38 +20,36 @@
 #ifndef INCLUDED_SVX_LBOXCTRL_HXX
 #define INCLUDED_SVX_LBOXCTRL_HXX
 
-#include <sfx2/tbxctrl.hxx>
 #include <rtl/ustring.hxx>
 #include <vector>
+#include <svtools/popupwindowcontroller.hxx>
 #include <svx/svxdllapi.h>
 
 class ToolBox;
 class SvxPopupWindowListBox;
 
-
-class SVX_DLLPUBLIC SvxUndoRedoControl final : public SfxToolBoxControl
+class SVX_DLLPUBLIC SvxUndoRedoControl final : public svt::PopupWindowController
 {
-    OUString                aActionStr;
-    VclPtr<SvxPopupWindowListBox> pPopupWin;
     std::vector< OUString > aUndoRedoList;
     OUString                aDefaultTooltip;
 
-    void    Impl_SetInfo( sal_Int32 nCount );
+public:
+    SvxUndoRedoControl(const css::uno::Reference<css::uno::XComponentContext>& rContext);
+    virtual ~SvxUndoRedoControl() override;
 
-    DECL_LINK( PopupModeEndHdl, FloatingWindow*, void );
-    DECL_LINK( SelectHdl, ListBox&, void );
+    using svt::ToolboxController::createPopupWindow;
+    virtual VclPtr<vcl::Window> createPopupWindow( vcl::Window* pParent ) override;
 
-public:
-    SFX_DECL_TOOLBOX_CONTROL();
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName() override;
+    virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
 
-    SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
-    virtual ~SvxUndoRedoControl() override;
+    // XInitialization
+    virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& rArguments ) override;
 
-    virtual void StateChanged( sal_uInt16 nSID,
-                               SfxItemState eState,
-                               const SfxPoolItem* pState ) override;
+    virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
 
-    virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
+    void Do(sal_Int16 nCount);
 };
 
 #endif
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index ec3474f0594c..bad60fb6b38f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -1536,6 +1536,28 @@
           <value>com.sun.star.comp.svx.UnderlineToolBoxControl</value>
         </prop>
       </node>
+      <node oor:name="UndoToolBoxControl" oor:op="replace">
+        <prop oor:name="Command">
+          <value>.uno:Undo</value>
+        </prop>
+        <prop oor:name="Module">
+          <value/>
+        </prop>
+        <prop oor:name="Controller">
+          <value>com.sun.star.comp.svx.UndoRedoToolBoxControl</value>
+        </prop>
+      </node>
+      <node oor:name="RedoToolBoxControl" oor:op="replace">
+        <prop oor:name="Command">
+          <value>.uno:Redo</value>
+        </prop>
+        <prop oor:name="Module">
+          <value/>
+        </prop>
+        <prop oor:name="Controller">
+          <value>com.sun.star.comp.svx.UndoRedoToolBoxControl</value>
+        </prop>
+      </node>
       <node oor:name="XLineColorToolBox" oor:op="replace">
         <prop oor:name="Command">
           <value>.uno:XLineColor</value>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index d3a1bbdc1035..dfcb7d5edc11 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -151,8 +151,6 @@ void ScDLL::Init()
     SvxStyleToolBoxControl          ::RegisterControl(SID_STYLE_APPLY,          pMod);
     SvxClipBoardControl             ::RegisterControl(SID_PASTE,                pMod );
     SvxClipBoardControl             ::RegisterControl(SID_PASTE_UNFORMATTED,    pMod );
-    SvxUndoRedoControl              ::RegisterControl(SID_UNDO,                 pMod );
-    SvxUndoRedoControl              ::RegisterControl(SID_REDO,                 pMod );
     svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH,  pMod );
     sc::ScNumberFormatControl       ::RegisterControl(SID_NUMBER_TYPE_FORMAT,   pMod );
 
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index e990d56053c9..a4805671b59e 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -206,10 +206,6 @@ void SdDLL::RegisterControllers(SdModule* pMod)
     SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod );
     SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod );
 
-    // #UndoRedo#
-    SvxUndoRedoControl::RegisterControl( SID_UNDO , pMod );
-    SvxUndoRedoControl::RegisterControl( SID_REDO , pMod );
-
     svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH, pMod );
 
     SvxClipBoardControl::RegisterControl( SID_PASTE, pMod );
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index a53d53ed0ffd..78dc2183bca6 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -68,8 +68,6 @@ namespace
         SvxZoomStatusBarControl::RegisterControl(SID_ATTR_ZOOM, pModule);
         SvxZoomSliderControl::RegisterControl(SID_ATTR_ZOOMSLIDER, pModule);
         SvxModifyControl::RegisterControl(SID_TEXTSTATUS, pModule);
-        SvxUndoRedoControl::RegisterControl(SID_UNDO, pModule);
-        SvxUndoRedoControl::RegisterControl(SID_REDO, pModule);
         XmlSecStatusBarControl::RegisterControl(SID_SIGNATURE, pModule);
 
         SmCmdBoxWrapper::RegisterChildWindow(true);
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index 3d709f52cb7a..28c3dc6f4fa3 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -25,7 +25,6 @@
 #include <vcl/toolbox.hxx>
 #include <vcl/event.hxx>
 #include <sfx2/app.hxx>
-#include <sfx2/tbxctrl.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewsh.hxx>
@@ -33,6 +32,7 @@
 #include <svl/eitem.hxx>
 #include <svl/slstitm.hxx>
 #include <svl/stritem.hxx>
+#include <svtools/toolbarmenu.hxx>
 #include <svx/dialmgr.hxx>
 #include <svx/lboxctrl.hxx>
 #include <vcl/mnemonic.hxx>
@@ -42,41 +42,38 @@
 #include <svx/svxids.hrc>
 #include <svx/strings.hrc>
 
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/util/URLTransformer.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+
+
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::frame;
 
-class SvxPopupWindowListBox;
-
-class SvxPopupWindowListBox: public SfxPopupWindow
+class SvxPopupWindowListBox final : public svtools::ToolbarPopup
 {
     VclPtr<ListBox> m_pListBox;
-    ToolBox &       rToolBox;
-    bool            bUserSel;
-    sal_uInt16 const nTbxId;
+    rtl::Reference<SvxUndoRedoControl> m_xControl;
+
+    DECL_LINK( SelectHdl, ListBox&, void );
 
 public:
-    SvxPopupWindowListBox( sal_uInt16 nSlotId, const OUString& rCommandURL, sal_uInt16 nTbxId, ToolBox& rTbx );
+    SvxPopupWindowListBox(SvxUndoRedoControl* pControl, vcl::Window* pParent);
     virtual ~SvxPopupWindowListBox() override;
     virtual void dispose() override;
 
-    // SfxPopupWindow
-    virtual void                PopupModeEnd() override;
-    virtual void                statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
-
     ListBox &            GetListBox()    { return *m_pListBox; }
 
-    bool                        IsUserSelected() const          { return bUserSel; }
-    void                        SetUserSelected( bool bVal )    { bUserSel = bVal; }
+    void                 SetInfo(sal_Int32 nCount);
 };
 
-SvxPopupWindowListBox::SvxPopupWindowListBox(sal_uInt16 nSlotId, const OUString& rCommandURL, sal_uInt16 nId, ToolBox& rTbx)
-    : SfxPopupWindow(nSlotId, &rTbx, "FloatingUndoRedo", "svx/ui/floatingundoredo.ui")
-    , rToolBox(rTbx)
-    , bUserSel(false)
-    , nTbxId(nId)
+SvxPopupWindowListBox::SvxPopupWindowListBox(SvxUndoRedoControl* pControl, vcl::Window* pParent)
+    : ToolbarPopup(pControl->getFrameInterface(), pParent, "FloatingUndoRedo", "svx/ui/floatingundoredo.ui")
+    , m_xControl(pControl)
 {
-    DBG_ASSERT( nSlotId == GetId(), "id mismatch" );
     get(m_pListBox, "treeview");
     WinBits nBits(m_pListBox->GetStyle());
     nBits &= ~WB_SIMPLEMODE;
@@ -86,7 +83,8 @@ SvxPopupWindowListBox::SvxPopupWindowListBox(sal_uInt16 nSlotId, const OUString&
     m_pListBox->set_height_request(aSize.Height());
     m_pListBox->EnableMultiSelection( true, true );
     SetBackground( GetSettings().GetStyleSettings().GetDialogColor() );
-    AddStatusListener( rCommandURL );
+
+    m_pListBox->SetSelectHdl( LINK( this, SvxPopupWindowListBox, SelectHdl ) );
 }
 
 SvxPopupWindowListBox::~SvxPopupWindowListBox()
@@ -97,156 +95,142 @@ SvxPopupWindowListBox::~SvxPopupWindowListBox()
 void SvxPopupWindowListBox::dispose()
 {
     m_pListBox.clear();
-    SfxPopupWindow::dispose();
+    ToolbarPopup::dispose();
 }
 
-void SvxPopupWindowListBox::PopupModeEnd()
+void SvxPopupWindowListBox::SetInfo( sal_Int32 nCount )
 {
-    rToolBox.EndSelection();
-    SfxPopupWindow::PopupModeEnd();
-    //FloatingWindow::PopupModeEnd();
-
-    if( SfxViewShell::Current() )
-    {
-        vcl::Window* pShellWnd = SfxViewShell::Current()->GetWindow();
-        if (pShellWnd)
-            pShellWnd->GrabFocus();
-    }
-}
-
-
-void SvxPopupWindowListBox::statusChanged( const css::frame::FeatureStateEvent& rEvent )
-{
-    rToolBox.EnableItem( nTbxId, rEvent.IsEnabled );
-    SfxPopupWindow::statusChanged( rEvent );
-}
-
-IMPL_LINK_NOARG(SvxUndoRedoControl, PopupModeEndHdl, FloatingWindow*, void)
-{
-    if( pPopupWin && FloatWinPopupFlags::NONE == pPopupWin->GetPopupModeFlags()  &&
-        pPopupWin->IsUserSelected() )
-    {
-        const sal_Int32 nCount = pPopupWin->GetListBox().GetSelectedEntryCount();
-
-        INetURLObject aObj( m_aCommandURL );
-
-        Sequence< PropertyValue > aArgs( 1 );
-        aArgs[0].Name   = aObj.GetURLPath();
-        aArgs[0].Value  <<= sal_Int16( nCount );
-        SfxToolBoxControl::Dispatch( m_aCommandURL, aArgs );
-    }
-}
-
-
-void SvxUndoRedoControl::Impl_SetInfo( sal_Int32 nCount )
-{
-    DBG_ASSERT( pPopupWin, "NULL pointer, PopupWindow missing" );
-
     const char* pId;
     if (nCount == 1)
-        pId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION;
+        pId = m_xControl->getCommandURL() == ".uno:Undo" ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION;
     else
-        pId = SID_UNDO == GetSlotId() ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS;
-    aActionStr = SvxResId(pId);
-
+        pId = m_xControl->getCommandURL() == ".uno:Undo" ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS;
+    OUString aActionStr = SvxResId(pId);
     OUString aText = aActionStr.replaceAll("$(ARG1)", OUString::number(nCount));
-    pPopupWin->SetText(aText);
+    SetText(aText);
 }
 
+IMPL_LINK(SvxPopupWindowListBox, SelectHdl, ListBox&, rListBox, void)
+{
+    if (rListBox.IsTravelSelect())
+        SetInfo(rListBox.GetSelectedEntryCount());
+    else
+    {
+        fprintf(stderr, "popdown\n");
+        m_xControl->Do(GetListBox().GetSelectedEntryCount());
+        EndPopupMode();
+    }
+}
 
-IMPL_LINK_NOARG(SvxUndoRedoControl, SelectHdl, ListBox&, void)
+void SvxUndoRedoControl::Do(sal_Int16 nCount)
 {
-    if (pPopupWin)
+    Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
+    if ( xDispatchProvider.is() )
     {
-        //pPopupWin->SetUserSelected( false );
+        css::util::URL aTargetURL;
+        Reference < XURLTransformer > xTrans( URLTransformer::create(::comphelper::getProcessComponentContext()) );
+        aTargetURL.Complete = m_aCommandURL;
+        xTrans->parseStrict( aTargetURL );
 
-        ListBox &rListBox = pPopupWin->GetListBox();
-        if (rListBox.IsTravelSelect())
-            Impl_SetInfo( rListBox.GetSelectedEntryCount() );
-        else
+        Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
+        if ( xDispatch.is() )
         {
-            pPopupWin->SetUserSelected( true );
-            pPopupWin->EndPopupMode();
+            INetURLObject aObj( m_aCommandURL );
+            Sequence< PropertyValue > aArgs( 1 );
+            aArgs[0].Name = aObj.GetURLPath();
+            aArgs[0].Value <<= nCount;
+            xDispatch->dispatch(aTargetURL, aArgs);
         }
     }
 }
 
+SvxUndoRedoControl::SvxUndoRedoControl(const css::uno::Reference<css::uno::XComponentContext>& rContext)
+    : PopupWindowController(rContext, nullptr, OUString())
+{
+}
 
-SFX_IMPL_TOOLBOX_CONTROL( SvxUndoRedoControl, SfxStringItem );
-
-SvxUndoRedoControl::SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx )
-    :SfxToolBoxControl( nSlotId, nId, rTbx ),
-    pPopupWin   ( nullptr )
+void SvxUndoRedoControl::initialize( const css::uno::Sequence< css::uno::Any >& rArguments )
 {
-    rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
-    rTbx.Invalidate();
-    aDefaultTooltip = rTbx.GetQuickHelpText( nId );
+    PopupWindowController::initialize(rArguments);
+
+    ToolBox* pToolBox = nullptr;
+    sal_uInt16 nId = 0;
+    if (getToolboxId(nId, &pToolBox) && pToolBox->GetItemCommand(nId) == m_aCommandURL)
+    {
+        pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWN | pToolBox->GetItemBits(nId));
+        aDefaultTooltip = pToolBox->GetQuickHelpText(nId);
+    }
 }
 
 SvxUndoRedoControl::~SvxUndoRedoControl()
 {
 }
 
-void SvxUndoRedoControl::StateChanged(
-    sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
+// XStatusListener
+void SAL_CALL SvxUndoRedoControl::statusChanged(const css::frame::FeatureStateEvent& rEvent)
 {
-    if ( nSID == SID_UNDO || nSID == SID_REDO )
+    if (rEvent.FeatureURL.Main == ".uno:GetUndoStrings" || rEvent.FeatureURL.Main == ".uno:GetRedoStrings")
     {
-        if ( eState == SfxItemState::DISABLED )
-        {
-            ToolBox& rBox = GetToolBox();
-            rBox.SetQuickHelpText( GetId(), aDefaultTooltip );
-        }
-        else if ( auto pStringItem = dynamic_cast<const SfxStringItem*>( pState) )
-        {
-            ToolBox& rBox = GetToolBox();
-            const OUString& aQuickHelpText = pStringItem->GetValue();
-            rBox.SetQuickHelpText( GetId(), aQuickHelpText );
-        }
-        GetToolBox().EnableItem( GetId(),
-                                SfxItemState::DISABLED != GetItemState(pState) );
+        css::uno::Sequence<OUString> aStrings;
+        rEvent.State >>= aStrings;
+        aUndoRedoList = comphelper::sequenceToContainer<std::vector<OUString>>(aStrings);
+        return;
     }
-    else
-    {
-        aUndoRedoList.clear();
 
-        if ( auto pStringListItem = dynamic_cast<const SfxStringListItem*>( pState) )
-        {
-            aUndoRedoList = pStringListItem->GetList();
-        }
+    PopupWindowController::statusChanged(rEvent);
+
+    ToolBox* pToolBox = nullptr;
+    sal_uInt16 nId = 0;
+    if (!getToolboxId(nId, &pToolBox))
+        return;
+
+    if (!rEvent.IsEnabled)
+    {
+        pToolBox->SetQuickHelpText(nId, aDefaultTooltip);
+        return;
     }
+
+    OUString aQuickHelpText;
+    if (rEvent.State >>= aQuickHelpText)
+        pToolBox->SetQuickHelpText(nId, aQuickHelpText);
 }
 
-VclPtr<SfxPopupWindow> SvxUndoRedoControl::CreatePopupWindow()
+VclPtr<vcl::Window> SvxUndoRedoControl::createPopupWindow(vcl::Window* pParent)
 {
-    DBG_ASSERT(( SID_UNDO == GetSlotId() || SID_REDO == GetSlotId() ), "mismatching ids" );
-
     if ( m_aCommandURL == ".uno:Undo" )
         updateStatus( ".uno:GetUndoStrings");
     else
         updateStatus( ".uno:GetRedoStrings");
 
-    ToolBox& rBox = GetToolBox();
+    auto xPopupWin = VclPtr<SvxPopupWindowListBox>::Create(this, pParent);
 
-    pPopupWin = VclPtr<SvxPopupWindowListBox>::Create( GetSlotId(), m_aCommandURL, GetId(), rBox );
-    pPopupWin->SetPopupModeEndHdl( LINK( this, SvxUndoRedoControl, PopupModeEndHdl ) );
-    ListBox &rListBox = pPopupWin->GetListBox();
-    rListBox.SetSelectHdl( LINK( this, SvxUndoRedoControl, SelectHdl ) );
+    ListBox &rListBox = xPopupWin->GetListBox();
 
     for(const OUString & s : aUndoRedoList)
         rListBox.InsertEntry( s );
 
-    rListBox.SelectEntryPos( 0 );
-    aActionStr = SvxResId(SID_UNDO == GetSlotId() ?
-                                  RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS);
-    Impl_SetInfo( rListBox.GetSelectedEntryCount() );
+    rListBox.SelectEntryPos(0);
+    xPopupWin->SetInfo(rListBox.GetSelectedEntryCount());
+
+    return xPopupWin;
+}
 
-    // move focus in floating window without
-    // closing it (GrabFocus() would close it!)
-    pPopupWin->StartPopupMode( &rBox, FloatWinPopupFlags::GrabFocus );
-    //pPopupWin->GetListBox().GrabFocus();
+OUString SvxUndoRedoControl::getImplementationName()
+{
+    return "com.sun.star.comp.svx.UndoRedoToolBoxControl";
+}
 
-    return pPopupWin;
+css::uno::Sequence<OUString> SvxUndoRedoControl::getSupportedServiceNames()
+{
+    return { "com.sun.star.frame.ToolbarController" };
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
+com_sun_star_comp_svx_UndoRedoToolBoxControl_get_implementation(
+    css::uno::XComponentContext* rContext,
+    css::uno::Sequence<css::uno::Any> const & )
+{
+    return cppu::acquire(new SvxUndoRedoControl(rContext));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/util/svx.component b/svx/util/svx.component
index 90e3419e5f1b..e54318dea597 100644
--- a/svx/util/svx.component
+++ b/svx/util/svx.component
@@ -124,4 +124,8 @@
     constructor="com_sun_star_comp_svx_UnderlineToolBoxControl_get_implementation">
     <service name="com.sun.star.frame.ToolbarController"/>
   </implementation>
+  <implementation name="com.sun.star.comp.svx.UndoRedoToolBoxControl"
+    constructor="com_sun_star_comp_svx_UndoRedoToolBoxControl_get_implementation">
+    <service name="com.sun.star.frame.ToolbarController"/>
+  </implementation>
 </component>
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index c9ba933ee7a6..95e3c9eecd39 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -281,8 +281,6 @@ void SwDLL::RegisterControls()
     svx::ParaFirstLineSpacingControl::RegisterControl(SID_ATTR_PARA_FIRSTLINESPACE, pMod);
 
     SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
-    SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod );
-    SvxUndoRedoControl::RegisterControl(SID_REDO, pMod );
     svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH, pMod );
 
     SvxFillToolBoxControl::RegisterControl(SID_ATTR_FILL_STYLE, pMod );


More information about the Libreoffice-commits mailing list