diff options
27 files changed, 512 insertions, 801 deletions
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 884404edd750..1b2b46dbe300 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -183,7 +183,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/main/PositionAndSizeHelper \ chart2/source/controller/main/SelectionHelper \ chart2/source/controller/main/ShapeController \ - chart2/source/controller/main/ShapeToolbarController \ chart2/source/controller/main/StatusBarCommandDispatch \ chart2/source/controller/main/UndoActions \ chart2/source/controller/main/UndoCommandDispatch \ diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 12b3613f56bb..f6ebf367020e 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -270,7 +270,6 @@ #include <svx/svxdlg.hxx> #include <svx/svxgrahicitem.hxx> #include <svx/tabline.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/unoapi.hxx> #include <svx/unofill.hxx> #include <svx/unomodel.hxx> diff --git a/chart2/source/controller/chartcontroller.component b/chart2/source/controller/chartcontroller.component index 045d61f244dc..23269baf25fa 100644 --- a/chart2/source/controller/chartcontroller.component +++ b/chart2/source/controller/chartcontroller.component @@ -43,10 +43,6 @@ constructor="com_sun_star_comp_chart2_ChartTypeDialog_get_implementation"> <service name="com.sun.star.chart2.ChartTypeDialog"/> </implementation> - <implementation name="com.sun.star.comp.chart2.ShapeToolbarController" - constructor="com_sun_star_comp_chart2_ShapeToolbarController_get_implementation"> - <service name="com.sun.star.chart2.ShapeToolbarController"/> - </implementation> <implementation name="com.sun.star.comp.chart2.WizardDialog" constructor="com_sun_star_comp_chart2_WizardDialog_get_implementation"> <service name="com.sun.star.chart2.WizardDialog"/> diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx deleted file mode 100644 index 999c9bacdd5c..000000000000 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ /dev/null @@ -1,290 +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 "ShapeToolbarController.hxx" - -#include <osl/mutex.hxx> -#include <cppuhelper/supportsservice.hxx> -#include <vcl/svapp.hxx> -#include <vcl/toolbox.hxx> -#include <toolkit/helper/vclunohelper.hxx> -#include <svx/svxids.hrc> -#include <svx/tbxcustomshapes.hxx> -#include <comphelper/propertysequence.hxx> - -using namespace com::sun::star; - -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; - -namespace chart -{ - -OUString ShapeToolbarController::getImplementationName() throw (uno::RuntimeException, std::exception) -{ - return getImplementationName_Static(); -} - -OUString ShapeToolbarController::getImplementationName_Static() throw (uno::RuntimeException) -{ - return OUString( "com.sun.star.comp.chart2.ShapeToolbarController" ); -} - -Sequence< OUString > ShapeToolbarController::getSupportedServiceNames_Static() throw (uno::RuntimeException) -{ - Sequence< OUString > aSupported(1); - aSupported.getArray()[0] = "com.sun.star.chart2.ShapeToolbarController"; - return aSupported; -} - -sal_Bool ShapeToolbarController::supportsService( const OUString& ServiceName ) throw (uno::RuntimeException, std::exception) -{ - return cppu::supportsService( this, ServiceName ); -} - -Sequence< OUString > ShapeToolbarController::getSupportedServiceNames() throw (uno::RuntimeException, std::exception) -{ - return getSupportedServiceNames_Static(); -} - -ShapeToolbarController::ShapeToolbarController( const Reference< uno::XComponentContext >& xContext ) - :m_pToolbarController( NULL ) - ,m_nToolBoxId( 1 ) - ,m_nSlotId( 0 ) -{ - osl_atomic_increment( &m_refCount ); - m_xContext = xContext; - osl_atomic_decrement( &m_refCount ); -} - -ShapeToolbarController::~ShapeToolbarController() -{ -} - -// ::com::sun::star::uno::XInterface -uno::Any ShapeToolbarController::queryInterface( const uno::Type& rType ) throw (uno::RuntimeException, std::exception) -{ - uno::Any aReturn = ToolboxController::queryInterface( rType ); - if ( !aReturn.hasValue() ) - { - aReturn = ShapeToolbarController_Base::queryInterface( rType ); - } - return aReturn; -} - -void ShapeToolbarController::acquire() throw () -{ - ToolboxController::acquire(); -} - -void ShapeToolbarController::release() throw () -{ - ToolboxController::release(); -} - -// ::com::sun::star::lang::XInitialization -void ShapeToolbarController::initialize( const Sequence< uno::Any >& rArguments ) throw (uno::Exception, uno::RuntimeException, std::exception) -{ - ToolboxController::initialize( rArguments ); - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard( m_aMutex ); - - VclPtr< ToolBox > pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); - if ( pToolBox ) - { - const sal_uInt16 nCount = pToolBox->GetItemCount(); - for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos ) - { - const sal_uInt16 nItemId = pToolBox->GetItemId( nPos ); - if ( pToolBox->GetItemCommand( nItemId ) == m_aCommandURL ) - { - m_nToolBoxId = nItemId; - break; - } - } - if ( m_aCommandURL == ".uno:BasicShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:BasicShapes", sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_BASIC; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ); - } - else if ( m_aCommandURL == ".uno:SymbolShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:SymbolShapes", sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_SYMBOL; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ); - } - else if ( m_aCommandURL == ".uno:ArrowShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:ArrowShapes", sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_ARROW; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox); - } - else if ( m_aCommandURL == ".uno:FlowChartShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:FlowChartShapes", sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_FLOWCHART; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ); - } - else if ( m_aCommandURL == ".uno:CalloutShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:CalloutShapes", sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_CALLOUT; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ); - } - else if ( m_aCommandURL == ".uno:StarShapes" ) - { - m_aStates.insert( TCommandState::value_type( ".uno:StarShapes" , sal_True ) ); - m_nSlotId = SID_DRAWTBX_CS_STAR; - m_pToolbarController = new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ); - } - - for ( TCommandState::iterator aIter( m_aStates.begin() ); aIter != m_aStates.end(); ++aIter ) - { - addStatusListener( aIter->first ); - } - - if ( m_pToolbarController.is() ) - { - m_pToolbarController->initialize( rArguments ); - } - - // check if paste special is allowed, when not don't add DROPDOWN - pToolBox->SetItemBits( m_nToolBoxId, pToolBox->GetItemBits( m_nToolBoxId ) | ToolBoxItemBits::DROPDOWN ); - } -} - -// ::com::sun::star::frame::XStatusListener -void ShapeToolbarController::statusChanged( const frame::FeatureStateEvent& Event ) throw ( uno::RuntimeException, std::exception ) -{ - ::osl::MutexGuard aGuard( m_aMutex ); - TCommandState::iterator aFind = m_aStates.find( Event.FeatureURL.Complete ); - if ( aFind != m_aStates.end() ) - { - aFind->second = Event.IsEnabled; - if ( m_pToolbarController.is() ) - { - bool bCheckmark = false; - ToolBox& rTb = m_pToolbarController->GetToolBox(); - - for ( sal_uInt16 i = 0; i < rTb.GetItemCount(); ++i ) - { - sal_uInt16 nId = rTb.GetItemId( i ); - if ( nId == 0 ) - { - continue; - } - OUString aCmd = rTb.GetItemCommand( nId ); - if ( aCmd == Event.FeatureURL.Complete ) - { - rTb.EnableItem( nId, Event.IsEnabled ); - if ( Event.State >>= bCheckmark ) - { - rTb.CheckItem( nId, bCheckmark ); - } - else - { - OUString aItemText; - if ( Event.State >>= aItemText ) - { - rTb.SetItemText( nId, aItemText ); - } - } - } - } - } - } -} - -// ::com::sun::star::frame::XToolbarController -Reference< awt::XWindow > ShapeToolbarController::createPopupWindow() throw (uno::RuntimeException, std::exception) -{ - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard( m_aMutex ); - - Reference< awt::XWindow > xRet; - if ( m_pToolbarController.is() ) - { - xRet = m_pToolbarController->createPopupWindow(); - } - - return xRet; -} - -void ShapeToolbarController::execute( sal_Int16 KeyModifier ) throw (uno::RuntimeException, std::exception) -{ - auto aArgs(::comphelper::InitPropertySequence({ - { "KeyModifier", uno::makeAny(KeyModifier) } - })); - dispatchCommand( m_aCommandURL, aArgs ); -} - -// ::com::sun::star::frame::XSubToolbarController -sal_Bool ShapeToolbarController::opensSubToolbar() throw (uno::RuntimeException, std::exception) -{ - return ( m_nSlotId == SID_DRAWTBX_CS_BASIC || - m_nSlotId == SID_DRAWTBX_CS_SYMBOL || - m_nSlotId == SID_DRAWTBX_CS_ARROW || - m_nSlotId == SID_DRAWTBX_CS_FLOWCHART || - m_nSlotId == SID_DRAWTBX_CS_CALLOUT || - m_nSlotId == SID_DRAWTBX_CS_STAR ); -} - -OUString ShapeToolbarController::getSubToolbarName() throw (uno::RuntimeException, std::exception) -{ - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard(m_aMutex); - if ( m_pToolbarController.is() ) - { - return m_pToolbarController->getSubToolbarName(); - } - return OUString(); -} - -void ShapeToolbarController::functionSelected( const OUString& rCommand ) throw (uno::RuntimeException, std::exception) -{ - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard( m_aMutex ); - if ( m_pToolbarController.is() ) - { - m_aCommandURL = rCommand; - m_pToolbarController->functionSelected( rCommand ); - } -} - -void ShapeToolbarController::updateImage() throw (uno::RuntimeException, std::exception) -{ - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard( m_aMutex ); - if ( m_pToolbarController.is() ) - { - m_pToolbarController->updateImage(); - } -} - -} // namespace chart - -extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL -com_sun_star_comp_chart2_ShapeToolbarController_get_implementation(css::uno::XComponentContext *context, - css::uno::Sequence<css::uno::Any> const &) -{ - return cppu::acquire(new ::chart::ShapeToolbarController(context)); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/controller/main/ShapeToolbarController.hxx b/chart2/source/controller/main/ShapeToolbarController.hxx deleted file mode 100644 index f067e401ccb0..000000000000 --- a/chart2/source/controller/main/ShapeToolbarController.hxx +++ /dev/null @@ -1,94 +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 . - */ -#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_SHAPETOOLBARCONTROLLER_HXX -#define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_SHAPETOOLBARCONTROLLER_HXX - -#include <sal/config.h> - -#include <map> - -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/frame/XSubToolbarController.hpp> - -#include <cppuhelper/implbase2.hxx> -#include <rtl/ref.hxx> -#include <svtools/toolboxcontroller.hxx> - -class SfxToolBoxControl; - -namespace chart -{ - -typedef ::cppu::ImplHelper2 < ::com::sun::star::lang::XServiceInfo, - ::com::sun::star::frame::XSubToolbarController> ShapeToolbarController_Base; - -typedef rtl::Reference<SfxToolBoxControl> TToolbarHelper; - -class ShapeToolbarController : public ::svt::ToolboxController - ,public ShapeToolbarController_Base -{ - typedef std::map<OUString, sal_Bool> TCommandState; - TCommandState m_aStates; - TToolbarHelper m_pToolbarController; - sal_uInt16 m_nToolBoxId; - sal_uInt16 m_nSlotId; - ShapeToolbarController( const ShapeToolbarController& ) SAL_DELETED_FUNCTION; - void operator =( const ShapeToolbarController& ) SAL_DELETED_FUNCTION; - -public: - explicit ShapeToolbarController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); - virtual ~ShapeToolbarController(); - - // ::com::sun::star::uno::XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL acquire() throw () SAL_OVERRIDE; - virtual void SAL_CALL release() throw () SAL_OVERRIDE; - - // ::com::sun::star::lang::XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // needed by registration - static OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static() throw(::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // ::com::sun::star::lang::XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // ::com::sun::star::frame::XStatusListener - virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // ::com::sun::star::frame::XToolbarController - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL execute( sal_Int16 KeyModifier ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // ::com::sun::star::frame::XSubToolbarController - virtual sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL functionSelected( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -}; - -} // namespace chart - -#endif // INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_SHAPETOOLBARCONTROLLER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 74e72a9cf136..197910160c33 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -151,6 +151,7 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/uielement/statusbarmerger \ framework/source/uielement/statusbarwrapper \ framework/source/uielement/statusindicatorinterfacewrapper \ + framework/source/uielement/subtoolbarcontroller \ framework/source/uielement/togglebuttontoolbarcontroller \ framework/source/uielement/toolbarmanager \ framework/source/uielement/toolbarmerger \ diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx index d2313f4e750f..d63bdc201882 100644 --- a/framework/inc/uifactory/factoryconfiguration.hxx +++ b/framework/inc/uifactory/factoryconfiguration.hxx @@ -46,7 +46,7 @@ class ConfigurationAccess_ControllerFactory : // interfaces public ::cppu::WeakImplHelper1< ::com::sun::star::container::XContainerListener> { public: - ConfigurationAccess_ControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const OUString& _sRoot,bool _bAskValue = false ); + ConfigurationAccess_ControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, const OUString& _sRoot ); virtual ~ConfigurationAccess_ControllerFactory(); void readConfigurationData(); @@ -56,7 +56,6 @@ public: OUString getValueFromCommandModule( const OUString& rCommandURL, const OUString& rModule ) const; void addServiceToCommandModule( const OUString& rCommandURL, const OUString& rModule, const OUString& rServiceSpecifier ); void removeServiceFromCommandModule( const OUString& rCommandURL, const OUString& rModule ); - inline bool hasValue() const { return m_bAskValue; } // container.XContainerListener virtual void SAL_CALL elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -98,7 +97,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xConfigAccess; ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener > m_xConfigAccessListener; bool m_bConfigAccessInitialized; - bool m_bAskValue; }; } // namespace framework diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx new file mode 100644 index 000000000000..2b6e307f5b31 --- /dev/null +++ b/framework/source/uielement/subtoolbarcontroller.cxx @@ -0,0 +1,458 @@ +/* -*- 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 <comphelper/propertysequence.hxx> +#include <cppuhelper/implbase.hxx> +#include <cppuhelper/supportsservice.hxx> +#include <cppuhelper/weakref.hxx> +#include <framework/imageproducer.hxx> +#include <svtools/toolboxcontroller.hxx> +#include <toolkit/helper/vclunohelper.hxx> +#include <tools/gen.hxx> +#include <vcl/svapp.hxx> +#include <vcl/toolbox.hxx> + +#include <com/sun/star/awt/XDockableWindow.hpp> +#include <com/sun/star/frame/XSubToolbarController.hpp> +#include <com/sun/star/frame/status/ItemStatus.hpp> +#include <com/sun/star/frame/status/Visibility.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/ui/theUIElementFactoryManager.hpp> + +typedef cppu::ImplInheritanceHelper< svt::ToolboxController, + css::frame::XSubToolbarController, + css::awt::XDockableWindowListener, + css::lang::XServiceInfo > ToolBarBase; + +class SubToolBarController : public ToolBarBase +{ + OUString m_aSubTbName; + OUString m_aLastCommand; + css::uno::Reference< css::ui::XUIElement > m_xUIElement; + void disposeUIElement(); +public: + explicit SubToolBarController( const css::uno::Sequence< css::uno::Any >& rxArgs ); + virtual ~SubToolBarController(); + + // XStatusListener + virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& Event ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XToolbarController + virtual void SAL_CALL execute( sal_Int16 nKeyModifier ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Reference< css::awt::XWindow > SAL_CALL createPopupWindow() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XSubToolbarController + virtual sal_Bool SAL_CALL opensSubToolbar() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual OUString SAL_CALL getSubToolbarName() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL functionSelected( const OUString& rCommand ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL updateImage() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XDockableWindowListener + virtual void SAL_CALL startDocking( const css::awt::DockingEvent& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::awt::DockingData SAL_CALL docking( const css::awt::DockingEvent& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL endDocking( const css::awt::EndDockingEvent& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL prepareToggleFloatingMode( const css::lang::EventObject& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL toggleFloatingMode( const css::lang::EventObject& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL closed( const css::lang::EventObject& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual void SAL_CALL endPopupMode( const css::awt::EndPopupModeEvent& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XEventListener + virtual void SAL_CALL disposing( const css::lang::EventObject& e ) throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XUpdatable + virtual void SAL_CALL update() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XComponent + virtual void SAL_CALL dispose() throw ( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw ( css::uno::RuntimeException ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw ( css::uno::RuntimeException ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( css::uno::RuntimeException ) SAL_OVERRIDE; +}; + +SubToolBarController::SubToolBarController( const css::uno::Sequence< css::uno::Any >& rxArgs ) +{ + css::beans::PropertyValue aPropValue; + for ( sal_Int32 i = 0; i < rxArgs.getLength(); ++i ) + { + rxArgs[i] >>= aPropValue; + if ( aPropValue.Name == "Value" ) + { + OUString aValue; + aPropValue.Value >>= aValue; + m_aSubTbName = aValue.getToken(0, ';'); + m_aLastCommand = aValue.getToken(1, ';'); + break; + } + } +} + +SubToolBarController::~SubToolBarController() +{ + disposeUIElement(); + m_xUIElement = 0; +} + +void SubToolBarController::disposeUIElement() +{ + if ( m_xUIElement.is() ) + { + css::uno::Reference< css::lang::XComponent > xComponent( m_xUIElement, css::uno::UNO_QUERY ); + xComponent->dispose(); + } +} + +void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& Event ) + throw ( css::uno::RuntimeException, std::exception ) +{ + SolarMutexGuard aSolarMutexGuard; + + if ( m_bDisposed ) + return; + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + pToolBox->EnableItem( nId, Event.IsEnabled ); + ToolBoxItemBits nItemBits = pToolBox->GetItemBits( nId ); + nItemBits &= ~ToolBoxItemBits::CHECKABLE; + TriState eTri = TRISTATE_FALSE; + + bool bValue; + OUString aStrValue; + css::frame::status::ItemStatus aItemState; + css::frame::status::Visibility aItemVisibility; + + if ( Event.State >>= bValue ) + { + // Boolean, treat it as checked/unchecked + pToolBox->SetItemBits( nId, nItemBits ); + pToolBox->CheckItem( nId, bValue ); + if ( bValue ) + eTri = TRISTATE_TRUE; + nItemBits |= ToolBoxItemBits::CHECKABLE; + } + else if ( Event.State >>= aStrValue ) + { + pToolBox->SetItemText( nId, aStrValue ); + } + else if ( Event.State >>= aItemState ) + { + eTri = TRISTATE_INDET; + nItemBits |= ToolBoxItemBits::CHECKABLE; + } + else if ( Event.State >>= aItemVisibility ) + { + pToolBox->ShowItem( nId, aItemVisibility.bVisible ); + } + + pToolBox->SetItemState( nId, eTri ); + pToolBox->SetItemBits( nId, nItemBits ); + } +} + +void SubToolBarController::execute( sal_Int16 nKeyModifier ) + throw ( css::uno::RuntimeException, std::exception ) +{ + if ( !m_aLastCommand.isEmpty() ) + { + auto aArgs( comphelper::InitPropertySequence( { + { "KeyModifier", css::uno::makeAny( nKeyModifier ) } + } ) ); + dispatchCommand( m_aLastCommand, aArgs ); + } +} + +css::uno::Reference< css::awt::XWindow > SubToolBarController::createPopupWindow() + throw ( css::uno::RuntimeException, std::exception ) +{ + SolarMutexGuard aGuard; + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + css::uno::Reference< css::frame::XFrame > xFrame ( getFrameInterface() ); + + // create element with factory + static css::uno::WeakReference< css::ui::XUIElementFactoryManager > xWeakUIElementFactory; + css::uno::Reference< css::ui::XUIElement > xUIElement; + css::uno::Reference< css::ui::XUIElementFactoryManager > xUIElementFactory; + + xUIElementFactory = xWeakUIElementFactory; + if ( !xUIElementFactory.is() ) + { + xUIElementFactory = css::ui::theUIElementFactoryManager::get( m_xContext ); + xWeakUIElementFactory = xUIElementFactory; + } + + auto aPropSeq( comphelper::InitPropertySequence( { + { "Frame", css::uno::makeAny( xFrame ) }, + { "Persistent", css::uno::makeAny( false ) }, + { "PopupMode", css::uno::makeAny( true ) } + } ) ); + + try + { + xUIElement = xUIElementFactory->createUIElement( "private:resource/toolbar/" + m_aSubTbName, aPropSeq ); + } + catch ( css::container::NoSuchElementException& ) + {} + catch ( css::lang::IllegalArgumentException& ) + {} + + if ( xUIElement.is() ) + { + css::uno::Reference< css::awt::XWindow > xParent = xFrame->getContainerWindow(); + css::uno::Reference< css::awt::XWindow > xSubToolBar( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); + if ( xSubToolBar.is() ) + { + css::uno::Reference< css::awt::XDockableWindow > xDockWindow( xSubToolBar, css::uno::UNO_QUERY ); + xDockWindow->addDockableWindowListener( css::uno::Reference< css::awt::XDockableWindowListener >( + static_cast< OWeakObject * >( this ), css::uno::UNO_QUERY ) ); + xDockWindow->enableDocking( sal_True ); + + // keep reference to UIElement to avoid its destruction + disposeUIElement(); + m_xUIElement = xUIElement; + + vcl::Window* pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar ); + if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX ) + { + ToolBox* pToolBar = static_cast< ToolBox* >( pTbxWindow ); + pToolBar->SetParent( pToolBox ); + // calc and set size for popup mode + Size aSize = pToolBar->CalcPopupWindowSizePixel(); + pToolBar->SetSizePixel( aSize ); + // open subtoolbox in popup mode + vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pToolBar ); + } + } + } + } + return css::uno::Reference< css::awt::XWindow >(); +} + +sal_Bool SubToolBarController::opensSubToolbar() + throw ( css::uno::RuntimeException, std::exception ) +{ + return sal_True; +} + +OUString SubToolBarController::getSubToolbarName() + throw ( css::uno::RuntimeException, std::exception ) +{ + return m_aSubTbName; +} + +void SubToolBarController::functionSelected( const OUString& rCommand ) + throw ( css::uno::RuntimeException, std::exception ) +{ + if ( !m_aLastCommand.isEmpty() ) + { + m_aLastCommand = rCommand; + updateImage(); + } +} + +void SubToolBarController::updateImage() + throw ( css::uno::RuntimeException, std::exception ) +{ + SolarMutexGuard aGuard; + if ( !m_aLastCommand.isEmpty() ) + { + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + Image aImage = framework::GetImageFromURL( getFrameInterface(), m_aLastCommand, pToolBox->GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE ); + if ( !!aImage ) + pToolBox->SetItemImage( nId, aImage ); + } + } +} + +void SubToolBarController::startDocking( const css::awt::DockingEvent& ) + throw ( css::uno::RuntimeException, std::exception ) +{ +} + +css::awt::DockingData SubToolBarController::docking( const css::awt::DockingEvent& ) + throw ( css::uno::RuntimeException, std::exception ) +{ + return css::awt::DockingData(); +} + +void SubToolBarController::endDocking( const css::awt::EndDockingEvent& ) + throw ( css::uno::RuntimeException, std::exception ) +{ +} + +sal_Bool SubToolBarController::prepareToggleFloatingMode( const css::lang::EventObject& ) + throw ( css::uno::RuntimeException, std::exception ) +{ + return sal_False; +} + +void SubToolBarController::toggleFloatingMode( const css::lang::EventObject& ) + throw ( css::uno::RuntimeException, std::exception ) +{ +} + +void SubToolBarController::closed( const css::lang::EventObject& ) + throw ( css::uno::RuntimeException, std::exception ) +{ +} + +void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e ) + throw ( css::uno::RuntimeException, std::exception ) +{ + SolarMutexGuard aGuard; + + OUString aSubToolBarResName; + if ( m_xUIElement.is() ) + { + css::uno::Reference< css::beans::XPropertySet > xPropSet( m_xUIElement, css::uno::UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + xPropSet->getPropertyValue("ResourceURL") >>= aSubToolBarResName; + } + catch ( css::beans::UnknownPropertyException& ) + {} + catch ( css::lang::WrappedTargetException& ) + {} + } + disposeUIElement(); + } + m_xUIElement = 0; + + // if the toolbar was teared-off recreate it and place it at the given position + if( e.bTearoff ) + { + css::uno::Reference< css::ui::XUIElement > xUIElement; + css::uno::Reference< css::frame::XLayoutManager > xLayoutManager = getLayoutManager(); + + if ( !xLayoutManager.is() ) + return; + + xLayoutManager->createElement( aSubToolBarResName ); + xUIElement = xLayoutManager->getElement( aSubToolBarResName ); + if ( xUIElement.is() ) + { + css::uno::Reference< css::awt::XWindow > xParent = getFrameInterface()->getContainerWindow(); + css::uno::Reference< css::awt::XWindow > xSubToolBar( xUIElement->getRealInterface(), css::uno::UNO_QUERY ); + css::uno::Reference< css::beans::XPropertySet > xProp( xUIElement, css::uno::UNO_QUERY ); + if ( xSubToolBar.is() && xProp.is() ) + { + OUString aPersistentString( "Persistent" ); + try + { + vcl::Window* pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar ); + if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX ) + { + css::uno::Any a = xProp->getPropertyValue( aPersistentString ); + xProp->setPropertyValue( aPersistentString, css::uno::makeAny( false ) ); + + xLayoutManager->hideElement( aSubToolBarResName ); + xLayoutManager->floatWindow( aSubToolBarResName ); + + xLayoutManager->setElementPos( aSubToolBarResName, e.FloatingPosition ); + xLayoutManager->showElement( aSubToolBarResName ); + + xProp->setPropertyValue("Persistent", a ); + } + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) + {} + } + } + } +} + +void SubToolBarController::disposing( const css::lang::EventObject& e ) + throw ( css::uno::RuntimeException, std::exception ) +{ + svt::ToolboxController::disposing( e ); +} + +void SubToolBarController::update() + throw ( css::uno::RuntimeException, std::exception ) +{ + svt::ToolboxController::update(); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + if ( m_aLastCommand.isEmpty() ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWNONLY ); + else + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ToolBoxItemBits::DROPDOWN ); + } + updateImage(); +} + +void SubToolBarController::dispose() + throw ( css::uno::RuntimeException, std::exception ) +{ + if ( m_bDisposed ) + return; + + svt::ToolboxController::dispose(); + disposeUIElement(); + m_xUIElement = 0; +} + +OUString SubToolBarController::getImplementationName() + throw ( css::uno::RuntimeException ) +{ + return OUString( "com.sun.star.comp.framework.SubToolBarController" ); +} + +sal_Bool SubToolBarController::supportsService( const OUString& rServiceName ) + throw ( css::uno::RuntimeException ) +{ + return cppu::supportsService( this, rServiceName ); +} + +css::uno::Sequence< OUString > SubToolBarController::getSupportedServiceNames() + throw ( css::uno::RuntimeException ) +{ + css::uno::Sequence< OUString > aRet( 1 ); + aRet[0] = "com.sun.star.frame.ToolbarController"; + return aRet; +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_framework_SubToolBarController_get_implementation( + css::uno::XComponentContext*, + css::uno::Sequence<css::uno::Any>& rxArgs ) +{ + return cppu::acquire( new SubToolBarController( rxArgs ) ); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx index 3f69ae5b299e..ca432e11e303 100644 --- a/framework/source/uifactory/factoryconfiguration.cxx +++ b/framework/source/uifactory/factoryconfiguration.cxx @@ -54,14 +54,13 @@ OUString getHashKeyFromStrings( const OUString& aCommandURL, const OUString& aMo // XInterface, XTypeProvider -ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( const Reference< XComponentContext >& rxContext, const OUString& _sRoot,bool _bAskValue ) : +ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( const Reference< XComponentContext >& rxContext, const OUString& _sRoot ) : m_aPropCommand( "Command" ), m_aPropModule( "Module" ), m_aPropController( "Controller" ), m_aPropValue( "Value" ), m_sRoot(_sRoot), - m_bConfigAccessInitialized( false ), - m_bAskValue(_bAskValue) + m_bConfigAccessInitialized( false ) { m_xConfigProvider = configuration::theDefaultProvider::get( rxContext ); } @@ -276,8 +275,7 @@ bool ConfigurationAccess_ControllerFactory::impl_getElementProps( const Any& aEl xPropertySet->getPropertyValue( m_aPropCommand ) >>= aCommand; xPropertySet->getPropertyValue( m_aPropModule ) >>= aModule; xPropertySet->getPropertyValue( m_aPropController ) >>= aServiceSpecifier; - if ( m_bAskValue ) - xPropertySet->getPropertyValue( m_aPropValue ) >>= aValue; + xPropertySet->getPropertyValue( m_aPropValue ) >>= aValue; } catch ( const com::sun::star::beans::UnknownPropertyException& ) { diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx index 7ff63a55e24a..c962987aa069 100644 --- a/framework/source/uifactory/uicontrollerfactory.cxx +++ b/framework/source/uifactory/uicontrollerfactory.cxx @@ -147,8 +147,7 @@ throw (Exception, RuntimeException, std::exception) Sequence< Any > aNewArgs( Arguments ); sal_Int32 nAppendIndex = aNewArgs.getLength(); - bool bHasValue = m_pConfigAccess->hasValue(); - aNewArgs.realloc( aNewArgs.getLength() + (bHasValue ? 2 : 1) ); + aNewArgs.realloc( aNewArgs.getLength() + 2 ); // Append the command URL to the Arguments sequence so that one controller can be // used for more than one command URL. @@ -156,15 +155,12 @@ throw (Exception, RuntimeException, std::exception) aPropValue.Value <<= ServiceSpecifier; aNewArgs[nAppendIndex] <<= aPropValue; - if ( bHasValue ) - { - // Append the optional value argument. It's an empty string if no additional info - // is provided to the controller. - OUString aValue = m_pConfigAccess->getValueFromCommandModule( ServiceSpecifier, aPropName ); - aPropValue.Name = aPropValueName; - aPropValue.Value <<= aValue; - aNewArgs[nAppendIndex+1] <<= aPropValue; - } + // Append the optional value argument. It's an empty string if no additional info + // is provided to the controller. + OUString aValue = m_pConfigAccess->getValueFromCommandModule( ServiceSpecifier, aPropName ); + aPropValue.Name = aPropValueName; + aPropValue.Value <<= aValue; + aNewArgs[nAppendIndex+1] <<= aPropValue; { OUString aServiceName; diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 6541f1406f3f..477d524cac34 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -196,4 +196,8 @@ 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"/> + </implementation> </component> diff --git a/include/svx/tbxcustomshapes.hxx b/include/svx/tbxcustomshapes.hxx deleted file mode 100644 index 2d55c8a49ba2..000000000000 --- a/include/svx/tbxcustomshapes.hxx +++ /dev/null @@ -1,59 +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 . - */ -#ifndef INCLUDED_SVX_TBXCUSTOMSHAPES_HXX -#define INCLUDED_SVX_TBXCUSTOMSHAPES_HXX - -#include <sfx2/tbxctrl.hxx> -#include <svx/svxdllapi.h> - -/************************************************************************* -|* -|* SvxTbxCtlCustomShapes -|* -\************************************************************************/ - -class SVX_DLLPUBLIC SvxTbxCtlCustomShapes : public SfxToolBoxControl -{ -public: - virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE; - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) SAL_OVERRIDE; - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; - - SFX_DECL_TOOLBOX_CONTROL(); - - SvxTbxCtlCustomShapes( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SvxTbxCtlCustomShapes() {} - - //interface XSubToolbarController: - virtual sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL functionSelected( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - -private: - OUString m_aSubTbName; - OUString m_aSubTbxResName; - OUString m_aCommand; -}; - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 74acecb4a710..165f8638d654 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -341,70 +341,88 @@ <value>com.sun.star.comp.chart.ElementSelectorToolbarController</value> </prop> </node> - <node oor:name="com.sun.star.chart2.BasicShapesToolbarController" oor:op="replace"> + <node oor:name="BasicShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:BasicShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>basicshapes;.uno:BasicShapes.diamond</value> </prop> </node> - <node oor:name="com.sun.star.chart2.SymbolShapesToolbarController" oor:op="replace"> + <node oor:name="SymbolShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:SymbolShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>symbolshapes;.uno:SymbolShapes.smiley</value> </prop> </node> - <node oor:name="com.sun.star.chart2.ArrowShapesToolbarController" oor:op="replace"> + <node oor:name="ArrowShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:ArrowShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>arrowshapes;.uno:ArrowShapes.left-right-arrow</value> </prop> </node> - <node oor:name="com.sun.star.chart2.FlowChartShapesToolbarController" oor:op="replace"> + <node oor:name="FlowChartShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:FlowChartShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>flowchartshapes;.uno:FlowChartShapes.flowchart-internal-storage</value> </prop> </node> - <node oor:name="com.sun.star.chart2.CalloutShapesToolbarController" oor:op="replace"> + <node oor:name="CalloutShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:CalloutShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>calloutshapes;.uno:CalloutShapes.round-rectangular-callout</value> </prop> </node> - <node oor:name="com.sun.star.chart2.StarShapesToolbarController" oor:op="replace"> + <node oor:name="StarShapesToolbarController" oor:op="replace"> <prop oor:name="Command"> <value>.uno:StarShapes</value> </prop> <prop oor:name="Module"> - <value>com.sun.star.chart2.ChartDocument</value> + <value/> </prop> <prop oor:name="Controller"> - <value>com.sun.star.comp.chart2.ShapeToolbarController</value> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>starshapes;.uno:StarShapes.star5</value> </prop> </node> <node oor:name="com.sun.star.svx.FindTextToolboxController" oor:op="replace"> @@ -517,72 +535,6 @@ <value>com.sun.star.report.ReportToolboxController</value> </prop> </node> - <node oor:name="c7" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:BasicShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> - <node oor:name="c8" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:SymbolShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> - <node oor:name="c9" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:ArrowShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> - <node oor:name="c10" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:FlowChartShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> - <node oor:name="c11" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:CalloutShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> - <node oor:name="c12" oor:op="replace" install:module="reportbuilder"> - <prop oor:name="Command"> - <value>.uno:StarShapes</value> - </prop> - <prop oor:name="Module"> - <value>com.sun.star.report.ReportDefinition</value> - </prop> - <prop oor:name="Controller"> - <value>com.sun.star.report.ReportToolboxController</value> - </prop> - </node> <node oor:name="c14" oor:op="replace" install:module="reportbuilder"> <prop oor:name="Command"> <value>.uno:CharFontName</value> diff --git a/reportdesign/inc/pch/precompiled_rptui.hxx b/reportdesign/inc/pch/precompiled_rptui.hxx index d1d7c32023dd..00268a8a1ea2 100644 --- a/reportdesign/inc/pch/precompiled_rptui.hxx +++ b/reportdesign/inc/pch/precompiled_rptui.hxx @@ -257,7 +257,6 @@ #include <svx/svxdlg.hxx> #include <svx/tbcontrl.hxx> #include <svx/tbxcolorupdate.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/unopage.hxx> #include <svx/unoprov.hxx> #include <svx/unoshape.hxx> diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx index 9c9e84474477..390c9b99c259 100644 --- a/reportdesign/source/ui/misc/toolboxcontroller.cxx +++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx @@ -39,7 +39,6 @@ #include <editeng/fhgtitem.hxx> #include <svx/tbcontrl.hxx> #include <editeng/colritem.hxx> -#include <svx/tbxcustomshapes.hxx> #include <cppuhelper/supportsservice.hxx> @@ -140,37 +139,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments break; } } - if ( m_aCommandURL == ".uno:BasicShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:BasicShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_BASIC,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:SymbolShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:SymbolShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_SYMBOL,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:ArrowShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:ArrowShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_ARROW,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:FlowChartShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:FlowChartShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_FLOWCHART,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:CalloutShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:CalloutShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_CALLOUT,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:StarShapes" ) - { - m_aStates.insert(TCommandState::value_type(OUString(".uno:StarShapes"),sal_True)); - m_pToolbarController = new SvxTbxCtlCustomShapes(m_nSlotId = SID_DRAWTBX_CS_STAR,m_nToolBoxId,*pToolBox); - } - else if ( m_aCommandURL == ".uno:CharFontName" ) + if ( m_aCommandURL == ".uno:CharFontName" ) { m_aStates.insert(TCommandState::value_type(OUString(".uno:CharFontName"),sal_True)); m_pToolbarController = new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox); @@ -208,9 +177,6 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event if ( m_pToolbarController.is() ) { // All other status events will be processed here - bool bSetCheckmark = false; - bool bCheckmark = false; - //m_pToolbarController->GetToolBox().Enable(Event.IsEnabled); ToolBox& rTb = m_pToolbarController->GetToolBox(); for ( sal_uInt16 i = 0; i < rTb.GetItemCount(); i++ ) { @@ -223,20 +189,6 @@ void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event { // Enable/disable item rTb.EnableItem( nId, Event.IsEnabled ); - - // Checkmark - if ( Event.State >>= bCheckmark ) - bSetCheckmark = true; - - if ( bSetCheckmark ) - rTb.CheckItem( nId, bCheckmark ); - else - { - OUString aItemText; - - if ( Event.State >>= aItemText ) - rTb.SetItemText( nId, aItemText ); - } } } @@ -289,21 +241,11 @@ sal_Bool SAL_CALL OToolboxController::opensSubToolbar() throw (uno::RuntimeExcep OUString SAL_CALL OToolboxController::getSubToolbarName() throw (uno::RuntimeException, std::exception) { - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard(m_aMutex); - if ( m_pToolbarController.is() ) - return m_pToolbarController->getSubToolbarName(); return OUString(); } -void SAL_CALL OToolboxController::functionSelected( const OUString& rCommand ) throw (uno::RuntimeException, std::exception) +void SAL_CALL OToolboxController::functionSelected( const OUString& /*rCommand*/ ) throw (uno::RuntimeException, std::exception) { - SolarMutexGuard aSolarMutexGuard; - ::osl::MutexGuard aGuard(m_aMutex); - if ( m_pToolbarController.is() ) - { - m_pToolbarController->functionSelected(m_aCommandURL = rCommand); - } } void SAL_CALL OToolboxController::updateImage( ) throw (uno::RuntimeException, std::exception) diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index d2b620fe20a9..646f9690aa8a 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -814,7 +814,6 @@ #include <svx/tbxalign.hxx> #include <svx/tbxcolor.hxx> #include <svx/tbxctl.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/txenctab.hxx> #include <svx/unoapi.hxx> #include <svx/unofill.hxx> diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index f303727de1b6..47b0534b835b 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -34,7 +34,6 @@ #include <avmedia/mediatoolbox.hxx> #include <comphelper/types.hxx> #include <svx/fontworkgallery.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/ParaLineSpacingPopup.hxx> #include <svtools/parhtml.hxx> @@ -161,12 +160,6 @@ void ScDLL::Init() // SvxToolboxController SvxTbxCtlDraw ::RegisterControl(SID_INSERT_DRAW, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_BASIC, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_SYMBOL, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_ARROW, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_FLOWCHART, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_CALLOUT, pMod); - SvxTbxCtlCustomShapes ::RegisterControl(SID_DRAWTBX_CS_STAR, pMod); SvxTbxCtlAlign ::RegisterControl(SID_OBJECT_ALIGN, pMod); SvxFillToolBoxControl ::RegisterControl(0, pMod); SvxLineStyleToolBoxControl ::RegisterControl(0, pMod); diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 3429aeec4660..e52dda083ba8 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -753,7 +753,6 @@ #include <svx/sxmsuitm.hxx> #include <svx/tabline.hxx> #include <svx/tbcontrl.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/unoapi.hxx> #include <svx/unofill.hxx> #include <svx/unomodel.hxx> diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 1a4c79712532..4b499455d61f 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -85,7 +85,6 @@ #include <svx/SvxColorChildWindow.hxx> #include <svx/SvxShapeTypes.hxx> #include <svx/tbcontrl.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/verttexttbxctrl.hxx> #include <svx/xmlsecctrl.hxx> #include <svx/zoomctrl.hxx> @@ -177,13 +176,6 @@ void SdDLL::RegisterControllers() SdTbxControl::RegisterControl( SID_DRAWTBX_CONNECTORS, pMod ); SdTbxControl::RegisterControl( SID_DRAWTBX_INSERT, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_BASIC, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_SYMBOL, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_ARROW, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_FLOWCHART, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod ); - SdTbxCtlDiaPages::RegisterControl( SID_PAGES_PER_ROW, pMod ); SdTbxCtlGlueEscDir::RegisterControl( SID_GLUE_ESCDIR, pMod ); diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx index bf49a373fa80..af30ec286d9b 100644 --- a/sd/source/ui/func/fuconcs.cxx +++ b/sd/source/ui/func/fuconcs.cxx @@ -43,7 +43,6 @@ #include <editeng/adjustitem.hxx> #include <svx/xtable.hxx> #include <svx/sdasitm.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/svdoashp.hxx> #include <svx/sdtagitm.hxx> diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 535dd54b503d..607c54dbb8a9 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -33,7 +33,6 @@ #include "optsitem.hxx" #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> -#include <svx/tbxcustomshapes.hxx> #include <avmedia/mediaplayer.hxx> #include "app.hrc" diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx index 75d0c1781a48..0ac29d473859 100644 --- a/sd/source/ui/view/drvwshrg.cxx +++ b/sd/source/ui/view/drvwshrg.cxx @@ -29,7 +29,6 @@ #include <sfx2/objface.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> #include <svx/f3dchild.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/svxids.hrc> #include <svx/hyperdlg.hxx> diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 44ea48a62320..48e5e0c0c789 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -103,7 +103,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/customshapes/EnhancedCustomShapeEngine \ svx/source/customshapes/EnhancedCustomShapeFontWork \ svx/source/customshapes/EnhancedCustomShapeHandle \ - svx/source/customshapes/tbxcustomshapes \ svx/source/dialog/_bmpmask \ svx/source/dialog/charmap \ svx/source/dialog/connctrl \ diff --git a/svx/source/customshapes/tbxcustomshapes.cxx b/svx/source/customshapes/tbxcustomshapes.cxx deleted file mode 100644 index 7042e7024be2..000000000000 --- a/svx/source/customshapes/tbxcustomshapes.cxx +++ /dev/null @@ -1,157 +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 <string> - -#include <svx/svxids.hrc> -#include <svl/eitem.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/viewsh.hxx> -#include <sfx2/viewfrm.hxx> -#include <vcl/toolbox.hxx> -#include <osl/mutex.hxx> - -#include <sfx2/imagemgr.hxx> -#include <vcl/svapp.hxx> -#include "svx/tbxcustomshapes.hxx" - -SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlCustomShapes, SfxBoolItem); - -SvxTbxCtlCustomShapes::SvxTbxCtlCustomShapes( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - m_aSubTbxResName( "private:resource/toolbar/" ) -{ - switch( nSlotId ) - { - default : - DBG_ASSERT( false, "SvxTbxCtlCustomShapes: unknown slot executed. ?" ); - //fall-through - case SID_DRAWTBX_CS_BASIC : - { - m_aCommand = ".uno:BasicShapes.diamond"; - m_aSubTbName = "basicshapes"; - } - break; - - case SID_DRAWTBX_CS_SYMBOL : - { - m_aCommand = ".uno:SymbolShapes.smiley"; - m_aSubTbName = "symbolshapes"; - } - break; - - case SID_DRAWTBX_CS_ARROW : - { - m_aCommand = ".uno:ArrowShapes.left-right-arrow"; - m_aSubTbName = "arrowshapes"; - } - break; - case SID_DRAWTBX_CS_FLOWCHART : - { - m_aCommand = ".uno:FlowChartShapes.flowchart-internal-storage"; - m_aSubTbName = "flowchartshapes"; - } - break; - case SID_DRAWTBX_CS_CALLOUT : - { - m_aCommand = ".uno:CalloutShapes.round-rectangular-callout"; - m_aSubTbName = "calloutshapes"; - } - break; - case SID_DRAWTBX_CS_STAR : - { - m_aCommand = ".uno:StarShapes.star5"; - m_aSubTbName = "starshapes"; - } - break; - } - m_aSubTbxResName += m_aSubTbName; - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); - rTbx.Invalidate(); -} - -// Notification when the application status has changed -void SvxTbxCtlCustomShapes::StateChanged( sal_uInt16 nSID, SfxItemState eState, - const SfxPoolItem* pState ) -{ - SfxToolBoxControl::StateChanged( nSID, eState, pState ); -} - -// Here is the window created -// The location of the Toolbox is queried through GetToolBox() -// rItemRect are the screen coordinates -VclPtr<SfxPopupWindow> SvxTbxCtlCustomShapes::CreatePopupWindow() -{ - createAndPositionSubToolBar( m_aSubTbxResName ); - return NULL; -} - - - -void SvxTbxCtlCustomShapes::Select(sal_uInt16 nSelectModifier) -{ - if ( !m_aCommand.isEmpty() ) - { - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aParamSeq( 1 ); - aParamSeq[0].Name = "KeyModifier"; - aParamSeq[0].Value <<= static_cast< sal_Int16 >( nSelectModifier ); - Dispatch( m_aCommand, aParamSeq ); - } -} - - -sal_Bool SAL_CALL SvxTbxCtlCustomShapes::opensSubToolbar() throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - // We control a sub-toolbar therefore we have to return true. - return sal_True; -} - -OUString SAL_CALL SvxTbxCtlCustomShapes::getSubToolbarName() throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - // Provide the controlled sub-toolbar name, so we are notified whenever - // this toolbar executes a function. - return m_aSubTbName; -} - -void SAL_CALL SvxTbxCtlCustomShapes::functionSelected( const OUString& rCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - // remember the new command - m_aCommand = rCommand; - - // Our sub-toolbar wants to execute a function. - // We have to change the image of our toolbar button to reflect the new function. - updateImage(); -} - -void SAL_CALL SvxTbxCtlCustomShapes::updateImage( ) throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - // We should update the button image of our parent (toolbar). - // Use the stored command to set the correct current image. - SolarMutexGuard aGuard; - if ( !m_aCommand.isEmpty() ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface()); - Image aImage = GetImage( xFrame, m_aCommand, hasBigImages() ); - if ( !!aImage ) - GetToolBox().SetItemImage( GetId(), aImage ); - } -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 576c7214205a..d26b462cef7d 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -953,7 +953,6 @@ #include <svx/tbxalign.hxx> #include <svx/tbxcolor.hxx> #include <svx/tbxctl.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/unoapi.hxx> #include <svx/unobrushitemhelper.hxx> #include <svx/unofill.hxx> diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index f945531e79c0..ba06d42122e4 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -47,7 +47,6 @@ #include <svx/tbxcolor.hxx> #include <svx/clipboardctl.hxx> #include <svx/lboxctrl.hxx> -#include <svx/tbxcustomshapes.hxx> #include <svx/imapdlg.hxx> #include <svx/srchdlg.hxx> #include <svx/hyperdlg.hxx> @@ -297,13 +296,6 @@ void SwDLL::RegisterControls() SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod ); svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_BASIC, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_SYMBOL, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_ARROW, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_FLOWCHART, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod ); - SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod ); - SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod ); diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 460a68bd7dc8..d63451dadc41 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -29,7 +29,6 @@ #include <svl/srchitem.hxx> #include <svx/extrusionbar.hxx> #include <svx/fontworkbar.hxx> -#include <svx/tbxcustomshapes.hxx> #include <uitool.hxx> #include <dcontact.hxx> #include <textboxhelper.hxx> |