summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-04-10 10:37:48 +0200
committerJan Holesovsky <kendy@suse.cz>2013-04-10 10:39:54 +0200
commit5d67919a5810cf05d6fe53dc14f2b1f073c56719 (patch)
tree3fbb79de1d0a547e5d720df47903e52e264e1b84 /framework/source
parent99d851b3e2b9f41a6616813cbf7a681aa842615e (diff)
Kill the ToolBar class, move the needed bits directly to ToolBox.
Change-Id: I6aaa396931ce613be64026b53372dc24c6189724
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx4
-rw-r--r--framework/source/uielement/addonstoolbarwrapper.cxx6
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/imagebuttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx8
-rw-r--r--framework/source/uielement/toolbar.cxx59
-rw-r--r--framework/source/uielement/toolbarmanager.cxx6
-rw-r--r--framework/source/uielement/toolbarwrapper.cxx6
14 files changed, 19 insertions, 91 deletions
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 4e897c0521ba..b0992eeac48d 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -20,7 +20,6 @@
#include <uielement/addonstoolbarmanager.hxx>
#include <uielement/toolbarmerger.hxx>
-#include <uielement/toolbar.hxx>
#include <uielement/generictoolbarcontroller.hxx>
#include <threadhelp/resetableguard.hxx>
#include "services.h"
@@ -55,6 +54,7 @@
#include <vcl/menu.hxx>
#include <vcl/syswin.hxx>
#include <vcl/taskpanelist.hxx>
+#include <vcl/toolbox.hxx>
//_________________________________________________________________________________________________________________
// namespaces
@@ -78,7 +78,7 @@ static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator";
AddonsToolBarManager::AddonsToolBarManager( const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& rFrame,
const OUString& rResourceName,
- ToolBar* pToolBar ) :
+ ToolBox* pToolBar ) :
ToolBarManager( rxContext, rFrame, rResourceName, pToolBar )
{
m_pToolBar->SetMenuType( TOOLBOX_MENUTYPE_CLIPPEDITEMS );
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx
index 75a9fb2a0e82..2921b020ab84 100644
--- a/framework/source/uielement/addonstoolbarwrapper.cxx
+++ b/framework/source/uielement/addonstoolbarwrapper.cxx
@@ -24,8 +24,6 @@
#include <uielement/rootitemcontainer.hxx>
#include <uielement/addonstoolbarmanager.hxx>
-#include <uielement/toolbar.hxx>
-
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -108,7 +106,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
if ( xFrame.is() && m_aConfigData.getLength() > 0 )
{
// Create VCL based toolbar which will be filled with settings data
- ToolBar* pToolBar = 0;
+ ToolBox* pToolBar = 0;
AddonsToolBarManager* pToolBarManager = 0;
{
SolarMutexGuard aSolarMutexGuard;
@@ -117,7 +115,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
{
sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
- pToolBar = new ToolBar( pWindow, nStyles );
+ pToolBar = new ToolBox( pWindow, nStyles );
pToolBarManager = new AddonsToolBarManager( comphelper::getComponentContext(m_xServiceManager), xFrame, m_aResourceURL, pToolBar );
m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
}
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx
index cd827d7eebcb..0b8ffb186c7c 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/buttontoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -42,6 +40,7 @@
#include <vcl/graph.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/toolbox.hxx>
#include <svtools/miscopt.hxx>
using namespace ::com::sun::star;
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index ceb614c0ed2f..de69836e1b8f 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/comboboxtoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index d5960f8f9b68..589bfd8a4107 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/complextoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -37,6 +35,7 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
+#include <vcl/toolbox.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::awt;
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 69b52f2f2516..fc9ff2f094b6 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/dropdownboxtoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -34,6 +32,7 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
+#include <vcl/toolbox.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::awt;
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index 53afe0f28674..a0ead9aaaae0 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/edittoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -34,6 +32,7 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
+#include <vcl/toolbox.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 6d44e91b4cae..a76686066fe5 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -20,8 +20,6 @@
#include "uielement/generictoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index 2b01e9297ecd..a6ba09b092df 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -21,7 +21,6 @@
#include "uielement/imagebuttontoolbarcontroller.hxx"
#include <framework/addonsoptions.hxx>
-#include "uielement/toolbar.hxx"
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -40,6 +39,7 @@
#include <vcl/graph.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/toolbox.hxx>
#include <svtools/miscopt.hxx>
using namespace ::com::sun::star;
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index 9da2523b2743..ea55937d94c0 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -23,8 +23,6 @@
#include "uielement/spinfieldtoolbarcontroller.hxx"
-#include "uielement/toolbar.hxx"
-
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
@@ -37,6 +35,7 @@
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
+#include <vcl/toolbox.hxx>
#ifdef WINNT
#include <systools/win32/snprintf.h>
#endif
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index dfa24230d05b..9a766a14b48f 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -21,15 +21,14 @@
#include "uielement/togglebuttontoolbarcontroller.hxx"
#include <framework/addonsoptions.hxx>
-#include "uielement/toolbar.hxx"
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XControlNotificationListener.hpp>
-#include "com/sun/star/util/XMacroExpander.hpp"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "com/sun/star/beans/XPropertySet.hpp"
+#include <com/sun/star/util/XMacroExpander.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <rtl/uri.hxx>
#include <osl/mutex.hxx>
@@ -41,6 +40,7 @@
#include <vcl/graph.hxx>
#include <vcl/bitmap.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/toolbox.hxx>
#include <svtools/miscopt.hxx>
using namespace ::com::sun::star;
diff --git a/framework/source/uielement/toolbar.cxx b/framework/source/uielement/toolbar.cxx
deleted file mode 100644
index 4e71b6a3e166..000000000000
--- a/framework/source/uielement/toolbar.cxx
+++ /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 .
- */
-
-#include <uielement/toolbar.hxx>
-#include <uielement/toolbarmanager.hxx>
-#include <rtl/logfile.hxx>
-
-namespace framework
-{
-
-ToolBar::ToolBar( Window* pParent, WinBits nWinBits ) :
- ToolBox( pParent, nWinBits )
-{
-}
-
-ToolBar::~ToolBar()
-{
-}
-
-void ToolBar::Command( const CommandEvent& rCEvt )
-{
- if ( m_aCommandHandler.IsSet() )
- m_aCommandHandler.Call( (void *)( &rCEvt ));
- ToolBox::Command( rCEvt );
-}
-
-void ToolBar::StateChanged( StateChangedType nType )
-{
- ToolBox::StateChanged( nType );
- if ( m_aStateChangedHandler.IsSet() )
- m_aStateChangedHandler.Call( &nType );
-}
-
-void ToolBar::DataChanged( const DataChangedEvent& rDCEvt )
-{
- ToolBox::DataChanged( rDCEvt );
- if ( m_aDataChangedHandler.IsSet() )
- m_aDataChangedHandler.Call( (void*)&rDCEvt );
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 85de30c0542d..ae5fafbb8b9c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -19,7 +19,6 @@
#include <uielement/toolbarmanager.hxx>
-#include <uielement/toolbar.hxx>
#include <uielement/generictoolbarcontroller.hxx>
#include <threadhelp/resetableguard.hxx>
#include "services.h"
@@ -68,6 +67,7 @@
#include <vcl/menu.hxx>
#include <vcl/syswin.hxx>
#include <vcl/taskpanelist.hxx>
+#include <vcl/toolbox.hxx>
#include <rtl/logfile.hxx>
#include <svtools/menuoptions.hxx>
#include <boost/bind.hpp>
@@ -201,7 +201,7 @@ DEFINE_XTYPEPROVIDER_6 ( ToolBarManager
ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext,
const Reference< XFrame >& rFrame,
const OUString& rResourceName,
- ToolBar* pToolBar ) :
+ ToolBox* pToolBar ) :
ThreadHelpBase( &Application::GetSolarMutex() ),
OWeakObject(),
m_bDisposed( false ),
@@ -751,7 +751,7 @@ void ToolBarManager::setToolBarImage(const Image& _aImage,const CommandToInfoMap
{
const ::std::vector< sal_uInt16 >& _rIDs = _pIter->second.aIds;
m_pToolBar->SetItemImage( _pIter->second.nId, _aImage );
- ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBar::SetItemImage,m_pToolBar,_1,_aImage));
+ ::std::for_each(_rIDs.begin(),_rIDs.end(),::boost::bind(&ToolBox::SetItemImage,m_pToolBar,_1,_aImage));
}
void SAL_CALL ToolBarManager::elementReplaced( const ::com::sun::star::ui::ConfigurationEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index 2dbaa1d7e44a..6c40103b0c93 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -24,8 +24,6 @@
#include <uielement/rootitemcontainer.hxx>
#include <uielement/toolbarmanager.hxx>
-#include <uielement/toolbar.hxx>
-
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XSystemDependentMenuPeer.hpp>
@@ -144,7 +142,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th
if ( xFrame.is() && m_xConfigSource.is() )
{
// Create VCL based toolbar which will be filled with settings data
- ToolBar* pToolBar = 0;
+ ToolBox* pToolBar = 0;
ToolBarManager* pToolBarManager = 0;
{
SolarMutexGuard aSolarMutexGuard;
@@ -153,7 +151,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th
{
sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
- pToolBar = new ToolBar( pWindow, nStyles );
+ pToolBar = new ToolBox( pWindow, nStyles );
pToolBarManager = new ToolBarManager( comphelper::getComponentContext(m_xServiceFactory), xFrame, m_aResourceURL, pToolBar );
m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
pToolBar->WillUsePopupMode( bPopupMode );