officecfg/registry/data/org/openoffice/Office/Accelerators.xcu         |    6 
 officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu      |    5 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu   |    8 
 officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu |   20 
 svx/Library_svx.mk                                                     |    1 
 svx/source/tbxctrls/tbunodevtoolscontrollers.cxx                       |  266 
----------
 svx/util/svx.component                                                 |    5 
 sw/UIConfig_swriter.mk                                                 |    1 
 sw/uiconfig/swriter/menubar/menubar.xml                                |    1 
 sw/uiconfig/swriter/toolbar/devtools.xml                               |   15 
 10 files changed, 328 deletions(-)

New commits:
commit 65b3a5cbc7e018b4e3f4f61228bf9334fd9a956e
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Jan 9 12:02:59 2021 +0900
Commit:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
CommitDate: Sat Jan 9 12:07:04 2021 +0900

    Revert "Very early work-in-progress commit for the "DevTools" dockable 
toolbar"
    
    Better path forward is to use a dockable window for the DevTools - added in
    commit 5f5ee992bd8377dc984b576950d468f6407d5c63
    
    This reverts commit c0d770d4feb919cb3306c48d576ac30709154eae.

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 98e8de1cb688..967aa98a04db 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6155,12 +6155,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
             <value xml:lang="en-US">.uno:UpdateInputFields</value>
           </prop>
         </node>
-        <node oor:name="F11_MOD1_MOD2" oor:op="replace">
-          <prop oor:name="Command">
-            <value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
-            <value 
xml:lang="en-US">vnd.libreoffice.devtools:FocusToDevTools</value>
-          </prop>
-        </node>
         <node oor:name="F_MOD1_MOD2" oor:op="replace">
           <prop oor:name="Command">
             <value xml:lang="x-no-translate">I10N SHORTCUTS - NO 
TRANSLATE</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu 
b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
index 822dc8da9584..3e64280d514c 100644
--- a/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu
@@ -75,10 +75,5 @@
         <value>vnd.org.libreoffice.recentdocs:*</value>
       </prop>
     </node>
-    <node oor:name="org.libreoffice.DevToolsDispatcher" oor:op="replace">
-      <prop oor:name="Protocols">
-        <value>vnd.libreoffice.devtools:*</value>
-      </prop>
-    </node>
   </node>
 </oor:component-data>
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index c9aee96ee153..fadfcb966638 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1710,14 +1710,6 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
           <value>1</value>
         </prop>
       </node>
-      <node oor:name="vnd.libreoffice.devtools:FocusToDevTools" 
oor:op="replace">
-        <prop oor:name="Label" oor:type="xs:string">
-          <value xml:lang="en-US">DevTools...</value>
-        </prop>
-        <prop oor:name="Properties" oor:type="xs:int">
-          <value>1</value>
-        </prop>
-      </node>
       <node oor:name=".uno:ExtendedHelp" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">~What's This?</value>
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index cd05d2951869..f5d7bdf862d3 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -139,26 +139,6 @@
           <value>false</value>
         </prop>
       </node>
-      <node oor:name="private:resource/toolbar/devtools" oor:op="replace">
-        <prop oor:name="DockPos" oor:type="xs:string">
-          <value>0,1</value>
-        </prop>
-        <prop oor:name="Docked" oor:type="xs:boolean">
-          <value>true</value>
-        </prop>
-        <prop oor:name="DockingArea" oor:type="xs:int">
-          <value>1</value>
-        </prop>
-        <prop oor:name="UIName" oor:type="xs:string">
-          <value xml:lang="en-US">DevTools</value>
-        </prop>
-        <prop oor:name="Visible" oor:type="xs:boolean">
-          <value>false</value>
-        </prop>
-        <prop oor:name="ContextSensitive" oor:type="xs:boolean">
-          <value>false</value>
-        </prop>
-      </node>
       <node oor:name="private:resource/toolbar/textobjectbar" oor:op="replace">
         <prop oor:name="DockPos" oor:type="xs:string">
           <value>0,1</value>
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index 0e8557ecb0f8..18b5cc64cb37 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -238,7 +238,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
     svx/source/tbxctrls/linewidthctrl \
     svx/source/tbxctrls/tbunocontroller \
     svx/source/tbxctrls/tbunosearchcontrollers \
-    svx/source/tbxctrls/tbunodevtoolscontrollers \
     svx/source/tbxctrls/tbxcolor \
     svx/source/tbxctrls/tbxdrctl \
     svx/source/tbxctrls/verttexttbxctrl \
diff --git a/svx/source/tbxctrls/tbunodevtoolscontrollers.cxx 
b/svx/source/tbxctrls/tbunodevtoolscontrollers.cxx
deleted file mode 100644
index 37925815dfb9..000000000000
--- a/svx/source/tbxctrls/tbunodevtoolscontrollers.cxx
+++ /dev/null
@@ -1,266 +0,0 @@
-/* -*- 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 <sal/config.h>
-
-#include <map>
-#include <vector>
-
-#include <config_feature_desktop.h>
-
-#include <svx/strings.hrc>
-#include <svx/dialmgr.hxx>
-
-#include <comphelper/propertysequence.hxx>
-#include <cppuhelper/queryinterface.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <cppuhelper/weak.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/frame/DispatchDescriptor.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/frame/XStatusListener.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/ui/XUIElement.hpp>
-#include <com/sun/star/util/URL.hpp>
-#include <com/sun/star/util/URLTransformer.hpp>
-#include <com/sun/star/util/SearchAlgorithms.hpp>
-#include <com/sun/star/util/SearchAlgorithms2.hpp>
-
-#include <vcl/InterimItemWindow.hxx>
-#include <svl/ctloptions.hxx>
-#include <svl/srchitem.hxx>
-#include <svtools/acceleratorexecute.hxx>
-#include <svtools/toolboxcontroller.hxx>
-#include <toolkit/helper/vclunohelper.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/svapp.hxx>
-#include <rtl/instance.hxx>
-#include <svx/labelitemwindow.hxx>
-#include <svx/srchdlg.hxx>
-#include <vcl/event.hxx>
-
-namespace
-{
-// protocol handler for "vnd.libreoffice.devtools:*" URLs
-// The dispatch object will be used for shortcut commands for findbar
-class DevToolsDispatcher : public css::lang::XServiceInfo,
-                           public css::lang::XInitialization,
-                           public css::frame::XDispatchProvider,
-                           public css::frame::XDispatch,
-                           public ::cppu::OWeakObject
-{
-public:
-    DevToolsDispatcher();
-    virtual ~DevToolsDispatcher() override;
-
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type& aType) 
override;
-    virtual void SAL_CALL acquire() throw() override;
-    virtual void SAL_CALL release() throw() override;
-
-    // XServiceInfo
-    virtual OUString SAL_CALL getImplementationName() override;
-    virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) 
override;
-    virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() 
override;
-
-    // XInitialization
-    virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& 
aArguments) override;
-
-    // XDispatchProvider
-    virtual css::uno::Reference<css::frame::XDispatch>
-        SAL_CALL queryDispatch(const css::util::URL& aURL, const OUString& 
sTargetFrameName,
-                               sal_Int32 nSearchFlags) override;
-    virtual css::uno::Sequence<css::uno::Reference<css::frame::XDispatch>> 
SAL_CALL queryDispatches(
-        const css::uno::Sequence<css::frame::DispatchDescriptor>& 
lDescriptions) override;
-
-    // XDispatch
-    virtual void SAL_CALL
-    dispatch(const css::util::URL& aURL,
-             const css::uno::Sequence<css::beans::PropertyValue>& lArguments) 
override;
-    virtual void SAL_CALL
-    addStatusListener(const css::uno::Reference<css::frame::XStatusListener>& 
xListener,
-                      const css::util::URL& aURL) override;
-    virtual void SAL_CALL
-    removeStatusListener(const 
css::uno::Reference<css::frame::XStatusListener>& xListener,
-                         const css::util::URL& aURL) override;
-
-private:
-    css::uno::Reference<css::frame::XFrame> m_xFrame;
-};
-
-DevToolsDispatcher::DevToolsDispatcher() {}
-
-DevToolsDispatcher::~DevToolsDispatcher() { m_xFrame = nullptr; }
-
-// XInterface
-css::uno::Any SAL_CALL DevToolsDispatcher::queryInterface(const 
css::uno::Type& aType)
-{
-    css::uno::Any aReturn(::cppu::queryInterface(aType, 
static_cast<css::lang::XServiceInfo*>(this),
-                                                 
static_cast<css::lang::XInitialization*>(this),
-                                                 
static_cast<css::frame::XDispatchProvider*>(this),
-                                                 
static_cast<css::frame::XDispatch*>(this)));
-
-    if (aReturn.hasValue())
-        return aReturn;
-
-    return OWeakObject::queryInterface(aType);
-}
-
-void SAL_CALL DevToolsDispatcher::acquire() throw() { OWeakObject::acquire(); }
-
-void SAL_CALL DevToolsDispatcher::release() throw() { OWeakObject::release(); }
-
-// XServiceInfo
-OUString SAL_CALL DevToolsDispatcher::getImplementationName()
-{
-    return "org.libreoffice.Impl.DevToolsDispatcher";
-}
-
-sal_Bool SAL_CALL DevToolsDispatcher::supportsService(const OUString& 
ServiceName)
-{
-    return cppu::supportsService(this, ServiceName);
-}
-
-css::uno::Sequence<OUString> SAL_CALL 
DevToolsDispatcher::getSupportedServiceNames()
-{
-    return { "org.libreoffice.DevToolsDispatcher", 
"com.sun.star.frame.ProtocolHandler" };
-}
-
-// XInitialization
-void SAL_CALL DevToolsDispatcher::initialize(const 
css::uno::Sequence<css::uno::Any>& aArguments)
-{
-    if (aArguments.hasElements())
-        aArguments[0] >>= m_xFrame;
-}
-
-// XDispatchProvider
-css::uno::Reference<css::frame::XDispatch> SAL_CALL 
DevToolsDispatcher::queryDispatch(
-    const css::util::URL& aURL, const OUString& /*sTargetFrameName*/, 
sal_Int32 /*nSearchFlags*/)
-{
-    css::uno::Reference<css::frame::XDispatch> xDispatch;
-
-    if (aURL.Protocol == "vnd.libreoffice.devtools:")
-        xDispatch = this;
-
-    return xDispatch;
-}
-
-css::uno::Sequence<css::uno::Reference<css::frame::XDispatch>>
-    SAL_CALL DevToolsDispatcher::queryDispatches(
-        const css::uno::Sequence<css::frame::DispatchDescriptor>& seqDescripts)
-{
-    sal_Int32 nCount = seqDescripts.getLength();
-    css::uno::Sequence<css::uno::Reference<XDispatch>> lDispatcher(nCount);
-
-    std::transform(
-        seqDescripts.begin(), seqDescripts.end(), lDispatcher.begin(),
-        [this](const css::frame::DispatchDescriptor& rDescript) -> 
css::uno::Reference<XDispatch> {
-            return queryDispatch(rDescript.FeatureURL, rDescript.FrameName, 
rDescript.SearchFlags);
-        });
-
-    return lDispatcher;
-}
-
-// XDispatch
-void SAL_CALL DevToolsDispatcher::dispatch(
-    const css::util::URL& aURL, const 
css::uno::Sequence<css::beans::PropertyValue>& /*lArgs*/)
-{
-    //vnd.libreoffice.devtools:FocusToDevTools  - set cursor to the XXX of the 
devtools
-    if (aURL.Path != "FocusToDevTools")
-        return;
-
-    css::uno::Reference<css::beans::XPropertySet> xPropSet(m_xFrame, 
css::uno::UNO_QUERY);
-    if (!xPropSet.is())
-        return;
-
-    css::uno::Reference<css::frame::XLayoutManager> xLayoutManager;
-    css::uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
-    aValue >>= xLayoutManager;
-    if (!xLayoutManager.is())
-        return;
-
-    const OUString sResourceURL("private:resource/toolbar/devtools");
-    css::uno::Reference<css::ui::XUIElement> xUIElement = 
xLayoutManager->getElement(sResourceURL);
-    if (!xUIElement.is())
-    {
-        // show the devtools if necessary
-        xLayoutManager->createElement(sResourceURL);
-        xLayoutManager->showElement(sResourceURL);
-        xUIElement = xLayoutManager->getElement(sResourceURL);
-        if (!xUIElement.is())
-            return;
-    }
-
-    css::uno::Reference<css::awt::XWindow> 
xWindow(xUIElement->getRealInterface(),
-                                                   css::uno::UNO_QUERY);
-    VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
-    ToolBox* pToolBox = static_cast<ToolBox*>(pWindow.get());
-    pToolBox->set_id("DevTools");
-    if (!pToolBox)
-        return;
-
-    ToolBox::ImplToolItems::size_type nItemCount = pToolBox->GetItemCount();
-    for (ToolBox::ImplToolItems::size_type i = 0; i < nItemCount; ++i)
-    {
-        sal_uInt16 id = pToolBox->GetItemId(i);
-        OUString sItemCommand = pToolBox->GetItemCommand(id);
-        if (sItemCommand == ".uno:DevTools")
-        {
-            vcl::Window* pItemWin = pToolBox->GetItemWindow(id);
-            if (pItemWin)
-            {
-                SolarMutexGuard aSolarMutexGuard;
-#if 0 // ???
-                Control* pControl = dynamic_cast<Control*>(pItemWin);
-                if ( pControl )
-                    pControl->SetTextToSelected_Impl();
-#endif
-                pItemWin->GrabFocus();
-                return;
-            }
-        }
-    }
-}
-
-void SAL_CALL DevToolsDispatcher::addStatusListener(
-    const css::uno::Reference<css::frame::XStatusListener>& /*xControl*/,
-    const css::util::URL& /*aURL*/)
-{
-}
-
-void SAL_CALL DevToolsDispatcher::removeStatusListener(
-    const css::uno::Reference<css::frame::XStatusListener>& /*xControl*/,
-    const css::util::URL& /*aURL*/)
-{
-}
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-org_libreoffice_Impl_DevToolsDispatcher_get_implementation(
-    SAL_UNUSED_PARAMETER css::uno::XComponentContext*, 
css::uno::Sequence<css::uno::Any> const&)
-{
-    return cppu::acquire(new DevToolsDispatcher);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/util/svx.component b/svx/util/svx.component
index f9d2cce75229..ff8d802394ac 100644
--- a/svx/util/svx.component
+++ b/svx/util/svx.component
@@ -28,11 +28,6 @@
     <service name="com.sun.star.comp.svx.FindbarDispatcher"/>
     <service name="com.sun.star.frame.ProtocolHandler"/>
   </implementation>
-  <implementation name="org.libreoffice.Impl.DevToolsDispatcher"
-      constructor="org_libreoffice_Impl_DevToolsDispatcher_get_implementation">
-    <service name="org.libreoffice.DevToolsDispatcher"/>
-    <service name="com.sun.star.frame.ProtocolHandler"/>
-  </implementation>
   <implementation name="com.sun.star.comp.svx.RecoveryUI"
       constructor="com_sun_star_comp_svx_RecoveryUI_get_implementation">
     <service name="com.sun.star.dialog.RecoveryUI"/>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4d78aa0cb550..71a0632d6979 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/swriter,\
        sw/uiconfig/swriter/toolbar/changes \
        sw/uiconfig/swriter/toolbar/classificationbar \
        sw/uiconfig/swriter/toolbar/colorbar \
-       sw/uiconfig/swriter/toolbar/devtools \
        sw/uiconfig/swriter/toolbar/drawbar \
        sw/uiconfig/swriter/toolbar/drawingobjectbar \
        sw/uiconfig/swriter/toolbar/drawtextobjectbar \
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
index 11b52c3945bc..4ec0436d48fe 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -787,7 +787,6 @@
         </menu:menupopup>
       </menu:menu>
       <menu:menuitem 
menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog" 
menu:style="text"/>
-      <menu:menuitem menu:id="vnd.libreoffice.devtools:FocusToDevTools" 
menu:style="text"/>
       <menu:menuitem menu:id=".uno:ConfigureDialog" menu:style="text"/>
       <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
     </menu:menupopup>
diff --git a/sw/uiconfig/swriter/toolbar/devtools.xml 
b/sw/uiconfig/swriter/toolbar/devtools.xml
deleted file mode 100644
index 5b8ed5f673f0..000000000000
--- a/sw/uiconfig/swriter/toolbar/devtools.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "toolbar.dtd">
-<!--
- * 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/.
--->
-<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
-  <!-- Unrelated items, just temporary -->
-  <toolbar:toolbaritem xlink:href=".uno:FontHeight"/>
-  <toolbar:toolbarseparator/>
-  <toolbar:toolbaritem xlink:href=".uno:FontHeight"/>
-</toolbar:toolbar>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to