[Libreoffice-commits] core.git: framework/source framework/util include/sfx2 officecfg/registry sc/source sd/source sfx2/source sw/source
Maxim Monastirsky
momonasmon at gmail.com
Wed Nov 18 07:17:24 PST 2015
framework/source/uielement/popuptoolbarcontroller.cxx | 107 +++-------
framework/source/uielement/recentfilesmenucontroller.cxx | 2
framework/util/fwk.component | 8
include/sfx2/tbxctrl.hxx | 37 ---
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 53 ++++
sc/source/ui/app/scdll.cxx | 3
sd/source/ui/app/sddll.cxx | 2
sfx2/source/appl/appreg.cxx | 3
sfx2/source/toolbox/tbxitem.cxx | 106 ---------
sw/source/uibase/app/swmodule.cxx | 2
10 files changed, 88 insertions(+), 235 deletions(-)
New commits:
commit 5da50768716fbcb0ffc093ecd588527723109fed
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Wed Nov 18 16:36:12 2015 +0200
Unify menu-based toolbar controllers
The new GenericPopupToolbarController takes by default
the popup menu controller that registered for the same
.uno:Something command, and sets ToolBoxItemBits to
ToolBoxItemBits::DROPDOWNONLY. If a different command
specified using the "Value" property - takes the popup
menu controller that registered for this command, and
sets bits to ToolBoxItemBits::DROPDOWN.
Change-Id: I75c5300bd27fcc9f618f2ee0df2aa6aefd088239
Reviewed-on: https://gerrit.libreoffice.org/20040
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index cdf07a1..66c4ef4 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -20,6 +20,7 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <framework/menuconfiguration.hxx>
#include <rtl/ref.hxx>
#include <svtools/imagemgr.hxx>
@@ -42,8 +43,6 @@
#include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/ucb/ContentCreationException.hpp>
-#define UNO_COMMAND_RECENT_FILE_LIST ".uno:RecentFileList"
-
using namespace framework;
namespace {
@@ -74,11 +73,11 @@ protected:
void createPopupMenuController();
css::uno::Reference< css::uno::XComponentContext > m_xContext;
- bool m_bHasController;
+ bool m_bHasController;
+ OUString m_aPopupCommand;
css::uno::Reference< css::awt::XPopupMenu > m_xPopupMenu;
private:
- OUString m_aPopupCommand;
css::uno::Reference< css::frame::XUIControllerFactory > m_xPopupMenuFactory;
css::uno::Reference< css::frame::XPopupMenuController > m_xPopupMenuController;
};
@@ -217,16 +216,11 @@ void PopupMenuToolbarController::createPopupMenuController()
if ( !m_xPopupMenuController.is() )
{
- css::uno::Sequence< css::uno::Any > aArgs( 2 );
- css::beans::PropertyValue aProp;
-
- aProp.Name = "Frame";
- aProp.Value <<= m_xFrame;
- aArgs[0] <<= aProp;
+ css::uno::Sequence< css::uno::Any > aArgs( 3 );
+ aArgs[0] <<= comphelper::makePropertyValue( "Frame", m_xFrame );
+ aArgs[1] <<= comphelper::makePropertyValue( "ModuleIdentifier", getModuleName() );
+ aArgs[2] <<= comphelper::makePropertyValue( "InToolbar", true );
- aProp.Name = "ModuleIdentifier";
- aProp.Value <<= getModuleName();
- aArgs[1] <<= aProp;
try
{
m_xPopupMenu.set(
@@ -247,10 +241,11 @@ void PopupMenuToolbarController::createPopupMenuController()
}
}
-class WizardsToolbarController : public PopupMenuToolbarController
+class GenericPopupToolbarController : public PopupMenuToolbarController
{
public:
- WizardsToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ GenericPopupToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ const css::uno::Sequence< css::uno::Any >& rxArgs );
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) override;
@@ -260,75 +255,51 @@ public:
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) override;
private:
+ bool m_bSplitButton;
ToolBoxItemBits getDropDownStyle() const override;
};
-WizardsToolbarController::WizardsToolbarController(
- const css::uno::Reference< css::uno::XComponentContext >& xContext )
+GenericPopupToolbarController::GenericPopupToolbarController(
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Sequence< css::uno::Any >& rxArgs )
: PopupMenuToolbarController( xContext )
+ , m_bSplitButton( false )
{
+ css::beans::PropertyValue aPropValue;
+ for ( const auto& arg: rxArgs )
+ {
+ if ( ( arg >>= aPropValue ) && aPropValue.Name == "Value" )
+ {
+ aPropValue.Value >>= m_aPopupCommand;
+ break;
+ }
+ }
+ if ( !m_aPopupCommand.isEmpty() )
+ m_bSplitButton = true;
}
-OUString WizardsToolbarController::getImplementationName()
+OUString GenericPopupToolbarController::getImplementationName()
throw (css::uno::RuntimeException)
{
- return OUString("org.apache.openoffice.comp.framework.WizardsToolbarController");
+ return OUString("com.sun.star.comp.framework.GenericPopupToolbarController");
}
-sal_Bool WizardsToolbarController::supportsService(OUString const & rServiceName)
+sal_Bool GenericPopupToolbarController::supportsService(OUString const & rServiceName)
throw (css::uno::RuntimeException)
{
return cppu::supportsService( this, rServiceName );
}
-css::uno::Sequence<OUString> WizardsToolbarController::getSupportedServiceNames()
+css::uno::Sequence<OUString> GenericPopupToolbarController::getSupportedServiceNames()
throw (css::uno::RuntimeException)
{
css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" };
return aRet;
}
-ToolBoxItemBits WizardsToolbarController::getDropDownStyle() const
-{
- return ToolBoxItemBits::DROPDOWNONLY;
-}
-
-class OpenToolbarController : public PopupMenuToolbarController
-{
-public:
- OpenToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException) override;
-
- virtual sal_Bool SAL_CALL supportsService(OUString const & rServiceName) throw (css::uno::RuntimeException) override;
-
- virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException) override;
-};
-
-OpenToolbarController::OpenToolbarController(
- const css::uno::Reference< css::uno::XComponentContext >& xContext )
- : PopupMenuToolbarController( xContext, UNO_COMMAND_RECENT_FILE_LIST )
+ToolBoxItemBits GenericPopupToolbarController::getDropDownStyle() const
{
-}
-
-OUString OpenToolbarController::getImplementationName()
- throw (css::uno::RuntimeException)
-{
- return OUString("org.apache.openoffice.comp.framework.OpenToolbarController");
-}
-
-sal_Bool OpenToolbarController::supportsService(OUString const & rServiceName)
- throw (css::uno::RuntimeException)
-{
- return cppu::supportsService( this, rServiceName );
-}
-
-css::uno::Sequence<OUString> OpenToolbarController::getSupportedServiceNames()
- throw (css::uno::RuntimeException)
-{
- css::uno::Sequence<OUString> aRet { "com.sun.star.frame.ToolbarController" };
- return aRet;
+ return m_bSplitButton ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY;
}
class NewToolbarController : public PopupMenuToolbarController
@@ -575,19 +546,11 @@ void NewToolbarController::setItemImage( const OUString &rCommand )
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-org_apache_openoffice_comp_framework_WizardsToolbarController_get_implementation(
+com_sun_star_comp_framework_GenericPopupToolbarController_get_implementation(
css::uno::XComponentContext *context,
- css::uno::Sequence<css::uno::Any> const &)
-{
- return cppu::acquire(new WizardsToolbarController(context));
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
-org_apache_openoffice_comp_framework_OpenToolbarController_get_implementation(
- css::uno::XComponentContext *context,
- css::uno::Sequence<css::uno::Any> const &)
+ css::uno::Sequence<css::uno::Any> const &args)
{
- return cppu::acquire(new OpenToolbarController(context));
+ return cppu::acquire(new GenericPopupToolbarController(context, args));
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 9c3921f..f44482a 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -127,7 +127,7 @@ RecentFilesMenuController::RecentFilesMenuController( const uno::Reference< uno:
for ( sal_Int32 i = 0; i < args.getLength(); ++i )
{
args[i] >>= aPropValue;
- if ( aPropValue.Name == "ShowRemote" )
+ if ( aPropValue.Name == "InToolbar" )
{
aPropValue.Value >>= m_bShowRemote;
break;
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index e1744fc..4f5edfd 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -188,18 +188,14 @@
constructor="com_sun_star_comp_framework_TabWindowService_get_implementation">
<service name="com.sun.star.ui.dialogs.TabContainerWindow"/>
</implementation>
- <implementation name="org.apache.openoffice.comp.framework.OpenToolbarController"
- constructor="org_apache_openoffice_comp_framework_OpenToolbarController_get_implementation">
+ <implementation name="com.sun.star.comp.framework.GenericPopupToolbarController"
+ constructor="com_sun_star_comp_framework_GenericPopupToolbarController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
<implementation name="org.apache.openoffice.comp.framework.NewToolbarController"
constructor="org_apache_openoffice_comp_framework_NewToolbarController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
</implementation>
- <implementation name="org.apache.openoffice.comp.framework.WizardsToolbarController"
- constructor="org_apache_openoffice_comp_framework_WizardsToolbarController_get_implementation">
- <service name="com.sun.star.frame.ToolbarController"/>
- </implementation>
<implementation name="com.sun.star.comp.framework.SubToolBarController"
constructor="com_sun_star_comp_framework_SubToolBarController_get_implementation">
<service name="com.sun.star.frame.ToolbarController"/>
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index f8969fb..5bf2bf7 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -263,43 +263,6 @@ public:
};
-
-/** Toolbox that implements recent files menu for the Open file toolbar button.
-
-To use that, the appropriate Sfx*Item (like Open, OpenFromCalc, or
-OpenFromWriter) has to have SlotType = SfxStringItem, and the appropriate
-module initialization has to call RegisterControl().
-*/
-class SfxRecentFilesToolBoxControl : public SfxToolBoxControl
-{
-public:
- // We don't use SFX_DECL_TOOLBOX_CONTROL() here as we need to have this
- // RegisterControl() marked as SFX2_DLLPUBLIC
- static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx );
- static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr);
-
- SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
- virtual ~SfxRecentFilesToolBoxControl();
-
-protected:
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
-};
-
-class SfxSaveAsToolBoxControl : public SfxToolBoxControl
-{
-public:
- // We don't use SFX_DECL_TOOLBOX_CONTROL() here as we need to have this
- // RegisterControl() marked as SFX2_DLLPUBLIC
- static SfxToolBoxControl* CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx );
- static void SFX2_DLLPUBLIC RegisterControl(sal_uInt16 nSlotId = 0, SfxModule *pMod=nullptr);
-
- SfxSaveAsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox );
- virtual ~SfxSaveAsToolBoxControl();
-
-protected:
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() override;
-};
-
class SfxReloadToolBoxControl_Impl : public SfxToolBoxControl
{
protected:
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 3a28f01..c603356 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -892,7 +892,7 @@
<value>com.sun.star.report.ReportToolboxController</value>
</prop>
</node>
- <node oor:name="org.apache.openoffice.comp.framework.OpenToolbarController" oor:op="replace">
+ <node oor:name="OpenToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:Open</value>
</prop>
@@ -900,7 +900,52 @@
<value/>
</prop>
<prop oor:name="Controller">
- <value>org.apache.openoffice.comp.framework.OpenToolbarController</value>
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>.uno:RecentFileList</value>
+ </prop>
+ </node>
+ <node oor:name="WriterOpenToolbarController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:OpenFromWriter</value>
+ </prop>
+ <prop oor:name="Module">
+ <value>com.sun.star.text.TextDocument</value>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>.uno:RecentFileList</value>
+ </prop>
+ </node>
+ <node oor:name="CalcOpenToolbarController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:OpenFromCalc</value>
+ </prop>
+ <prop oor:name="Module">
+ <value>com.sun.star.sheet.SpreadsheetDocument</value>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>.uno:RecentFileList</value>
+ </prop>
+ </node>
+ <node oor:name="SaveToolbarController" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:Save</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>.uno:SaveAsMenu</value>
</prop>
</node>
<node oor:name="org.apache.openoffice.comp.framework.NewToolbarController" oor:op="replace">
@@ -914,7 +959,7 @@
<value>org.apache.openoffice.comp.framework.NewToolbarController</value>
</prop>
</node>
- <node oor:name="org.apache.openoffice.comp.framework.WizardsToolbarController" oor:op="replace">
+ <node oor:name="WizardsToolbarController" oor:op="replace">
<prop oor:name="Command">
<value>.uno:AutoPilotMenu</value>
</prop>
@@ -922,7 +967,7 @@
<value/>
</prop>
<prop oor:name="Controller">
- <value>org.apache.openoffice.comp.framework.WizardsToolbarController</value>
+ <value>com.sun.star.comp.framework.GenericPopupToolbarController</value>
</prop>
</node>
</node>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 56cfc45..455bacc 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -148,9 +148,6 @@ void ScDLL::Init()
ScMediaShell ::RegisterInterface(pMod);
ScPageBreakShell ::RegisterInterface(pMod);
- SfxRecentFilesToolBoxControl::RegisterControl(SID_OPEN_CALC, pMod);
- SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEDOC, pMod );
-
// Own Controller
ScZoomSliderControl ::RegisterControl(SID_PREVIEW_SCALINGFACTOR, pMod);
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index fc18067..9fe1148 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -244,8 +244,6 @@ void SdDLL::RegisterControllers()
SvxFrameLineStyleToolBoxControl::RegisterControl(SID_FRAME_LINESTYLE, pMod );
SvxColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod );
SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod );
-
- SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEDOC, pMod );
}
void SdDLL::Init()
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index fc648ff..fb04a9d 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -61,8 +61,7 @@ void SfxApplication::Registrations_Impl()
// Controller
SfxToolBoxControl::RegisterControl(SID_REPEAT);
SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
- SfxRecentFilesToolBoxControl::RegisterControl( SID_OPENDOC );
-};
+}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index a23c55f..3a80627 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -105,8 +105,6 @@ using namespace ::com::sun::star::ui;
SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, true);
-SFX_IMPL_TOOLBOX_CONTROL(SfxRecentFilesToolBoxControl, SfxStringItem);
-SFX_IMPL_TOOLBOX_CONTROL(SfxSaveAsToolBoxControl, SfxStringItem);
static vcl::Window* GetTopMostParentSystemWindow( vcl::Window* pWindow )
{
@@ -1132,108 +1130,4 @@ void SfxPopupWindow::Delete()
disposeOnce();
}
-
-
-SfxRecentFilesToolBoxControl::SfxRecentFilesToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
- : SfxToolBoxControl( nSlotId, nId, rBox )
-{
- rBox.SetItemBits( nId, rBox.GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN);
-}
-
-SfxRecentFilesToolBoxControl::~SfxRecentFilesToolBoxControl()
-{
-}
-
-VclPtr<SfxPopupWindow> SfxRecentFilesToolBoxControl::CreatePopupWindow()
-{
- ToolBox& rBox = GetToolBox();
- sal_uInt16 nItemId = GetId();
- ::Rectangle aRect( rBox.GetItemRect( nItemId ) );
-
- Sequence< Any > aArgs( 3 );
- PropertyValue aPropValue;
-
- aPropValue.Name = "CommandURL";
- aPropValue.Value <<= OUString( ".uno:RecentFileList" );
- aArgs[0] <<= aPropValue;
-
- aPropValue.Name = "Frame";
- aPropValue.Value <<= m_xFrame;
- aArgs[1] <<= aPropValue;
-
- aPropValue.Name = "ShowRemote";
- aPropValue.Value <<= true;
- aArgs[2] <<= aPropValue;
-
- uno::Reference< frame::XPopupMenuController > xPopupController( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.RecentFilesMenuController", aArgs, m_xContext ), UNO_QUERY );
-
- uno::Reference< awt::XPopupMenu > xPopupMenu( m_xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.awt.PopupMenu", m_xContext ), uno::UNO_QUERY );
-
- if ( xPopupController.is() && xPopupMenu.is() )
- {
- xPopupController->setPopupMenu( xPopupMenu );
-
- rBox.SetItemDown( nItemId, true );
- Reference< awt::XWindowPeer > xPeer( getParent(), uno::UNO_QUERY );
-
- if ( xPeer.is() )
- xPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 );
-
- rBox.SetItemDown( nItemId, false );
- }
-
- return nullptr;
-}
-
-SfxSaveAsToolBoxControl::SfxSaveAsToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox )
- : SfxToolBoxControl( nSlotId, nId, rBox )
-{
- rBox.SetItemBits( nId, rBox.GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN);
-}
-
-SfxSaveAsToolBoxControl::~SfxSaveAsToolBoxControl()
-{
-}
-
-VclPtr<SfxPopupWindow> SfxSaveAsToolBoxControl::CreatePopupWindow()
-{
- ToolBox& rBox = GetToolBox();
- sal_uInt16 nItemId = GetId();
- ::Rectangle aRect( rBox.GetItemRect( nItemId ) );
-
- Sequence< Any > aArgs( 2 );
- PropertyValue aPropValue;
-
- aPropValue.Name = "CommandURL";
- aPropValue.Value <<= OUString( ".uno:SaveAsMenu" );
- aArgs[0] <<= aPropValue;
-
- aPropValue.Name = "Frame";
- aPropValue.Value <<= m_xFrame;
- aArgs[1] <<= aPropValue;
-
- uno::Reference< frame::XPopupMenuController > xPopupController( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.SaveAsMenuController", aArgs, m_xContext ), UNO_QUERY );
-
- uno::Reference< awt::XPopupMenu > xPopupMenu( m_xContext->getServiceManager()->createInstanceWithContext(
- "com.sun.star.awt.PopupMenu", m_xContext ), uno::UNO_QUERY );
-
- if ( xPopupController.is() && xPopupMenu.is() )
- {
- xPopupController->setPopupMenu( xPopupMenu );
-
- rBox.SetItemDown( nItemId, true );
- Reference< awt::XWindowPeer > xPeer( getParent(), uno::UNO_QUERY );
-
- if ( xPeer.is() )
- xPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 );
-
- rBox.SetItemDown( nItemId, false );
- }
-
- return nullptr;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 238d9fb..af8329e 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -286,7 +286,6 @@ void SwDLL::RegisterControls()
{
SwModule* pMod = SW_MOD();
- SfxRecentFilesToolBoxControl::RegisterControl( FN_OPEN_FILE, pMod );
SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod );
SwTbxAnchor::RegisterControl(FN_TOOL_ANCHOR, pMod );
SwTbxFieldCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod );
@@ -295,7 +294,6 @@ void SwDLL::RegisterControls()
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEDOC, pMod );
SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod );
SvxUndoRedoControl::RegisterControl(SID_REDO, pMod );
More information about the Libreoffice-commits
mailing list