diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2015-07-16 23:16:06 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2015-07-16 23:42:26 +0300 |
commit | 4f1a8f697e05bc4fb52be7a84a3307d595b4c09b (patch) | |
tree | d7ac4628080ec09bed1ecb05ee3bc471e5ecd029 | |
parent | 8ccea9c7d661da42d3e5a3f459f8f568990e8fac (diff) |
Convert Alignment button to the generic controller
Change-Id: I76ead43fa1cfe7ba1b62d2b13c4f4d7658a9f290
-rw-r--r-- | include/svx/tbxalign.hxx | 47 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 14 | ||||
-rw-r--r-- | sc/inc/pch/precompiled_sc.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 2 | ||||
-rw-r--r-- | sd/sdi/_drvwsh.sdi | 3 | ||||
-rw-r--r-- | sd/source/ui/app/sddll.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/app/tbxww.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsa.cxx | 42 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsc.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsj.cxx | 3 | ||||
-rw-r--r-- | svx/Library_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbxalign.cxx | 105 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_sw.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 2 |
17 files changed, 41 insertions, 211 deletions
diff --git a/include/svx/tbxalign.hxx b/include/svx/tbxalign.hxx deleted file mode 100644 index 8c8c0e421a93..000000000000 --- a/include/svx/tbxalign.hxx +++ /dev/null @@ -1,47 +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_TBXALIGN_HXX -#define INCLUDED_SVX_TBXALIGN_HXX - -#include <sfx2/tbxctrl.hxx> -#include <svx/svxdllapi.h> - - -class SVX_DLLPUBLIC SvxTbxCtlAlign: public SfxToolBoxControl -{ -public: - 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; - - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; - - SFX_DECL_TOOLBOX_CONTROL(); - - SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SvxTbxCtlAlign() {} -private: - OUString m_aSubTbName; - OUString m_aSubTbResName; - 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 c91995fbd8af..554ecedfba0f 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -187,6 +187,20 @@ </node> </node> <node oor:name="ToolBar"> + <node oor:name="AlignmentControl" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:ObjectAlign</value> + </prop> + <prop oor:name="Module"> + <value/> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>alignmentbar;.uno:ObjectAlignLeft</value> + </prop> + </node> <node oor:name="GraphicFilterControl" oor:op="replace"> <prop oor:name="Command"> <value>.uno:GraphicFilterToolbox</value> diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index 689eb50a7b96..0557c2ebef13 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -810,7 +810,6 @@ #include <svx/sxcecitm.hxx> #include <svx/sxciaitm.hxx> #include <svx/tbcontrl.hxx> -#include <svx/tbxalign.hxx> #include <svx/tbxcolor.hxx> #include <svx/tbxctl.hxx> #include <svx/txenctab.hxx> diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 3f5e98384a23..33e035ec361f 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -66,7 +66,6 @@ // Controls -#include <svx/tbxalign.hxx> #include <svx/tbxctl.hxx> #include <svx/fillctrl.hxx> #include <svx/linectrl.hxx> @@ -157,7 +156,6 @@ void ScDLL::Init() // SvxToolboxController SvxTbxCtlDraw ::RegisterControl(SID_INSERT_DRAW, pMod); - SvxTbxCtlAlign ::RegisterControl(SID_OBJECT_ALIGN, pMod); SvxFillToolBoxControl ::RegisterControl(0, pMod); SvxLineStyleToolBoxControl ::RegisterControl(0, pMod); SvxLineWidthToolBoxControl ::RegisterControl(0, pMod); diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 827bdff668e4..2a721d8a7038 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -1265,9 +1265,8 @@ interface DrawView StateMethod = GetMenuState ; ] - TbxImageItem ObjectAlign SID_OBJECT_ALIGN // ole : no, status : ? + SfxVoidItem ObjectAlign SID_OBJECT_ALIGN // ole : no, status : ? [ - ExecMethod = FuSupport ; StateMethod = GetMenuState ; GroupId = GID_DOCUMENT ; Cachable , Export ; diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 0a499e8ca947..8fb1907793e4 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -161,7 +161,6 @@ void SdDLL::RegisterControllers() SfxModule* pMod = SD_MOD(); // ToolBoxControls registrieren - SdTbxControl::RegisterControl( SID_OBJECT_ALIGN, pMod ); SdTbxControl::RegisterControl( SID_ZOOM_TOOLBOX, pMod ); SdTbxControl::RegisterControl( SID_OBJECT_CHOOSE_MODE, pMod ); SdTbxControl::RegisterControl( SID_POSITION, pMod ); diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index 69a8e4e03fff..ee3392332f75 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -62,10 +62,6 @@ VclPtr<SfxPopupWindow> SdTbxControl::CreatePopupWindow() OUStringBuffer aTbxResName( "private:resource/toolbar/" ); switch( GetSlotId() ) { - case SID_OBJECT_ALIGN: - aTbxResName.appendAscii( "alignmentbar" ); - aToolBarResStr = aTbxResName.makeStringAndClear(); - break; case SID_ZOOM_TOOLBOX: aTbxResName.appendAscii( "zoombar" ); aToolBarResStr = aTbxResName.makeStringAndClear(); @@ -156,8 +152,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId, if( nSId != SID_ZOOM_TOOLBOX && nSId != SID_DRAWTBX_INSERT && - nSId != SID_POSITION && - nSId != SID_OBJECT_ALIGN ) + nSId != SID_POSITION ) { if( nSId != SID_OBJECT_CHOOSE_MODE && rTbx.IsItemChecked( SID_OBJECT_CHOOSE_MODE ) ) diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 66a6e868b90e..c5c89ba48715 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -66,7 +66,7 @@ class DrawViewShell public SfxListener { public: - static const int SLOTARRAY_COUNT = 24; + static const int SLOTARRAY_COUNT = 22; TYPEINFO_OVERRIDE(); SFX_DECL_INTERFACE(SD_IF_SDDRAWVIEWSHELL) diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 8b6d968a3bcb..c8311e908230 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -292,8 +292,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) if( nSId != SID_ZOOM_TOOLBOX && nSId != SID_DRAWTBX_INSERT && - nSId != SID_POSITION && - nSId != SID_OBJECT_ALIGN ) + nSId != SID_POSITION ) { if( nId != SID_OBJECT_CHOOSE_MODE ) rSet.Put( TbxImageItem( SID_OBJECT_CHOOSE_MODE, 0 ) ); @@ -1365,7 +1364,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) if( xSlideshow.is() && xSlideshow->isRunning() ) { - rSet.ClearItem(SID_OBJECT_ALIGN); rSet.ClearItem(SID_ZOOM_TOOLBOX); rSet.ClearItem(SID_OBJECT_CHOOSE_MODE); rSet.ClearItem(SID_DRAWTBX_TEXT); @@ -1379,7 +1377,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.ClearItem(SID_DRAWTBX_INSERT); rSet.ClearItem(SID_INSERTFILE); rSet.ClearItem(SID_OBJECT_ROTATE); - rSet.ClearItem(SID_OBJECT_ALIGN); rSet.ClearItem(SID_POSITION); rSet.ClearItem(SID_FM_CONFIG); rSet.ClearItem(SID_ANIMATION_EFFECTS); @@ -1400,7 +1397,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_DRAWTBX_INSERT); rSet.DisableItem(SID_INSERTFILE); rSet.DisableItem(SID_OBJECT_ROTATE); - rSet.DisableItem(SID_OBJECT_ALIGN); rSet.DisableItem(SID_POSITION); rSet.DisableItem(SID_FM_CONFIG); rSet.DisableItem(SID_ANIMATION_EFFECTS); diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index a1b332e0e3c7..2176907053b4 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -224,28 +224,26 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) mpSlotArray = new sal_uInt16[ SLOTARRAY_COUNT ]; mpSlotArray[ 0 ] = SID_OBJECT_CHOOSE_MODE; mpSlotArray[ 1 ] = SID_OBJECT_ROTATE; - mpSlotArray[ 2 ] = SID_OBJECT_ALIGN; - mpSlotArray[ 3 ] = SID_OBJECT_ALIGN_LEFT; - mpSlotArray[ 4 ] = SID_ZOOM_TOOLBOX; - mpSlotArray[ 5 ] = SID_ZOOM_TOOLBOX; - mpSlotArray[ 6 ] = SID_DRAWTBX_TEXT; - mpSlotArray[ 7 ] = SID_ATTR_CHAR; - mpSlotArray[ 8 ] = SID_DRAWTBX_RECTANGLES; - mpSlotArray[ 9 ] = SID_DRAW_RECT; - mpSlotArray[ 10 ] = SID_DRAWTBX_ELLIPSES; - mpSlotArray[ 11 ] = SID_DRAW_ELLIPSE; - mpSlotArray[ 12 ] = SID_DRAWTBX_LINES; - mpSlotArray[ 13 ] = SID_DRAW_FREELINE_NOFILL; - mpSlotArray[ 14 ] = SID_DRAWTBX_3D_OBJECTS; - mpSlotArray[ 15 ] = SID_3D_CUBE; - mpSlotArray[ 16 ] = SID_DRAWTBX_INSERT; - mpSlotArray[ 17 ] = SID_INSERT_DIAGRAM; - mpSlotArray[ 18 ] = SID_POSITION; - mpSlotArray[ 19 ] = SID_FRAME_TO_TOP; - mpSlotArray[ 20 ] = SID_DRAWTBX_CONNECTORS; - mpSlotArray[ 21 ] = SID_TOOL_CONNECTOR; - mpSlotArray[ 22 ] = SID_DRAWTBX_ARROWS; - mpSlotArray[ 23 ] = SID_LINE_ARROW_END; + mpSlotArray[ 2 ] = SID_ZOOM_TOOLBOX; + mpSlotArray[ 3 ] = SID_ZOOM_TOOLBOX; + mpSlotArray[ 4 ] = SID_DRAWTBX_TEXT; + mpSlotArray[ 5 ] = SID_ATTR_CHAR; + mpSlotArray[ 6 ] = SID_DRAWTBX_RECTANGLES; + mpSlotArray[ 7 ] = SID_DRAW_RECT; + mpSlotArray[ 8 ] = SID_DRAWTBX_ELLIPSES; + mpSlotArray[ 9 ] = SID_DRAW_ELLIPSE; + mpSlotArray[ 10 ] = SID_DRAWTBX_LINES; + mpSlotArray[ 11 ] = SID_DRAW_FREELINE_NOFILL; + mpSlotArray[ 12 ] = SID_DRAWTBX_3D_OBJECTS; + mpSlotArray[ 13 ] = SID_3D_CUBE; + mpSlotArray[ 14 ] = SID_DRAWTBX_INSERT; + mpSlotArray[ 15 ] = SID_INSERT_DIAGRAM; + mpSlotArray[ 16 ] = SID_POSITION; + mpSlotArray[ 17 ] = SID_FRAME_TO_TOP; + mpSlotArray[ 18 ] = SID_DRAWTBX_CONNECTORS; + mpSlotArray[ 19 ] = SID_TOOL_CONNECTOR; + mpSlotArray[ 20 ] = SID_DRAWTBX_ARROWS; + mpSlotArray[ 21 ] = SID_LINE_ARROW_END; SetPool( &GetDoc()->GetPool() ); diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index d3508a692f97..0bacea5cb1db 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -73,17 +73,6 @@ sal_uInt16 DrawViewShell::GetIdBySubId( sal_uInt16 nSId ) } break; - case SID_OBJECT_ALIGN_LEFT: - case SID_OBJECT_ALIGN_CENTER: - case SID_OBJECT_ALIGN_RIGHT: - case SID_OBJECT_ALIGN_UP: - case SID_OBJECT_ALIGN_MIDDLE: - case SID_OBJECT_ALIGN_DOWN: - { - nMappedSId = SID_OBJECT_ALIGN; - } - break; - case SID_FRAME_TO_TOP: case SID_MOREFRONT: case SID_MOREBACK: @@ -277,9 +266,6 @@ void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, bool bPermanent ) nId = GetArrayId( SID_POSITION ) + 1; rSet.Put( TbxImageItem( SID_POSITION, mpSlotArray[nId] ) ); - - nId = GetArrayId( SID_OBJECT_ALIGN ) + 1; - rSet.Put( TbxImageItem( SID_OBJECT_ALIGN, mpSlotArray[nId] ) ); } else { diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 516f4877852f..84208f1aaa3d 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -728,7 +728,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) // execute slots of ToolboxController mapped case SID_OBJECT_CHOOSE_MODE: case SID_POSITION: - case SID_OBJECT_ALIGN: case SID_ZOOM_TOOLBOX: case SID_DRAWTBX_TEXT: case SID_DRAWTBX_RECTANGLES: diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 10a3f5ad403b..f239c3687909 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -227,6 +227,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) if(pObj->ISA(E3dCompoundObject)) { + rSet.DisableItem( SID_OBJECT_ALIGN ); rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); @@ -414,6 +415,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) if(bE3dCompoundObject) { + rSet.DisableItem( SID_OBJECT_ALIGN ); rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); @@ -471,6 +473,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) rSet.DisableItem( SID_DELETE ); rSet.DisableItem( SID_ATTR_TRANSFORM ); + rSet.DisableItem( SID_OBJECT_ALIGN ); rSet.DisableItem( SID_OBJECT_ALIGN_LEFT ); rSet.DisableItem( SID_OBJECT_ALIGN_CENTER ); rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT ); diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index a890ed7b51fd..22216d627cc7 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -227,7 +227,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/tbxctrls/linectrl \ svx/source/tbxctrls/tbunocontroller \ svx/source/tbxctrls/tbunosearchcontrollers \ - svx/source/tbxctrls/tbxalign \ svx/source/tbxctrls/tbxcolor \ svx/source/tbxctrls/tbxdrctl \ svx/source/tbxctrls/verttexttbxctrl \ diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx deleted file mode 100644 index def2b2e2b00f..000000000000 --- a/svx/source/tbxctrls/tbxalign.cxx +++ /dev/null @@ -1,105 +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 <svl/aeitem.hxx> - -#include <svx/dialmgr.hxx> -#include <svx/dialogs.hrc> - -#include "svx/tbxalign.hxx" -#include <sfx2/imagemgr.hxx> -#include <vcl/svapp.hxx> -#include <osl/mutex.hxx> - -#include <sfx2/app.hxx> -#include <vcl/toolbox.hxx> - -SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlAlign, SfxAllEnumItem); - -/* - * Klasse fuer SwToolbox - */ -SvxTbxCtlAlign::SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ) - , m_aSubTbName( "alignmentbar" ) - , m_aSubTbResName( "private:resource/toolbar/alignmentbar" ) -{ - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); - rTbx.Invalidate(); - - m_aCommand = m_aCommandURL; -} - -/* - * Hier wird das Fenster erzeugt - * Lage der Toolbox mit GetToolBox() abfragbar - * rItemRect sind die Screen-Koordinaten - */ - -VclPtr<SfxPopupWindow> SvxTbxCtlAlign::CreatePopupWindow() -{ - SolarMutexGuard aGuard; - if ( GetSlotId() == SID_OBJECT_ALIGN ) - createAndPositionSubToolBar( m_aSubTbResName ); - return NULL; -} - - -// XSubToolbarController - - -sal_Bool SAL_CALL SvxTbxCtlAlign::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 SvxTbxCtlAlign::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. - SolarMutexGuard aGuard; - return m_aSubTbName; -} - -void SAL_CALL SvxTbxCtlAlign::functionSelected( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) -{ - // remember the new command - m_aCommand = aCommand; - - // 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 SvxTbxCtlAlign::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 d26b462cef7d..1540a5e547e2 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -950,7 +950,6 @@ #include <svx/sxciaitm.hxx> #include <svx/sxenditm.hxx> #include <svx/tbcontrl.hxx> -#include <svx/tbxalign.hxx> #include <svx/tbxcolor.hxx> #include <svx/tbxctl.hxx> #include <svx/unoapi.hxx> diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index ec9a7588e8ea..523651690cc0 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -42,7 +42,6 @@ #include <svx/layctrl.hxx> #include <svx/fontwork.hxx> #include <SwSpellDialogChildWindow.hxx> -#include <svx/tbxalign.hxx> #include <svx/grafctrl.hxx> #include <svx/tbxcolor.hxx> #include <svx/clipboardctl.hxx> @@ -286,7 +285,6 @@ void SwDLL::RegisterControls() SfxRecentFilesToolBoxControl::RegisterControl( FN_OPEN_FILE, pMod ); SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod ); - SvxTbxCtlAlign::RegisterControl(SID_OBJECT_ALIGN, pMod ); SwTbxAnchor::RegisterControl(FN_TOOL_ANCHOR, pMod ); SwTbxFieldCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod ); SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod ); |