diff options
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 42 | ||||
-rw-r--r-- | sc/Library_sc.mk | 1 | ||||
-rw-r--r-- | sc/sdi/scalc.sdi | 4 | ||||
-rw-r--r-- | sc/sdi/tabvwsh.sdi | 4 | ||||
-rw-r--r-- | sc/source/ui/app/scdll.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/cctrl/tbinsert.cxx | 106 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 6 | ||||
-rw-r--r-- | sc/source/ui/inc/tbinsert.hxx | 44 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 35 | ||||
-rw-r--r-- | sw/inc/view.hxx | 4 | ||||
-rw-r--r-- | sw/sdi/_viewsh.sdi | 4 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 4 | ||||
-rw-r--r-- | sw/sdi/viewsh.sdi | 1 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/inc/workctrl.hxx | 20 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/workctrl.cxx | 89 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 24 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 30 |
19 files changed, 49 insertions, 378 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu index 165f8638d654..03f10ac14888 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -176,6 +176,48 @@ </node> </node> <node oor:name="ToolBar"> + <node oor:name="InsertControl" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:InsertCtrl</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>insertbar;.uno:InsertGraphic</value> + </prop> + </node> + <node oor:name="InsertObjectControl" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:InsertObjCtrl</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>insertobjectbar;.uno:InsertObject</value> + </prop> + </node> + <node oor:name="InsertCellControl" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:InsCellsCtrl</value> + </prop> + <prop oor:name="Module"> + <value>com.sun.star.sheet.SpreadsheetDocument</value> + </prop> + <prop oor:name="Controller"> + <value>com.sun.star.comp.framework.SubToolBarController</value> + </prop> + <prop oor:name="Value"> + <value>insertcellsbar;.uno:InsertCellsDown</value> + </prop> + </node> <node oor:name="c1" oor:op="replace"> <prop oor:name="Command"> <value>.uno:DBNewForm</value> diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index c0644f865917..3fa8c746f180 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -381,7 +381,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/cctrl/checklistmenu \ sc/source/ui/cctrl/dpcontrol \ sc/source/ui/cctrl/popmenu \ - sc/source/ui/cctrl/tbinsert \ sc/source/ui/cctrl/tbzoomsliderctrl \ sc/source/ui/condformat/condformatdlg \ sc/source/ui/condformat/condformatdlgentry \ diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index aa9d0da8a10e..482107e0d4bd 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -3931,7 +3931,7 @@ SfxVoidItem InputLineMatrix FID_INPUTLINE_MATRIX ] -SfxUInt16Item InsCellsCtrl SID_TBXCTL_INSCELLS +SfxVoidItem InsCellsCtrl SID_TBXCTL_INSCELLS [ /* flags: */ @@ -4209,7 +4209,7 @@ SfxVoidItem InsertContents FID_INS_CELL_CONTENTS ] -SfxUInt16Item InsertCtrl SID_TBXCTL_INSERT +SfxVoidItem InsertCtrl SID_TBXCTL_INSERT [ /* flags: */ diff --git a/sc/sdi/tabvwsh.sdi b/sc/sdi/tabvwsh.sdi index d2ff98931277..eeb9019ff362 100644 --- a/sc/sdi/tabvwsh.sdi +++ b/sc/sdi/tabvwsh.sdi @@ -267,8 +267,8 @@ shell ScTabViewShell SID_STATUS_PAGESTYLE [ ExecMethod = Execute; StateMethod = GetState; ] - SID_TBXCTL_INSERT [ ExecMethod = ExecTbx; StateMethod = GetTbxState; ] - SID_TBXCTL_INSCELLS [ ExecMethod = ExecTbx; StateMethod = GetTbxState; ] + SID_TBXCTL_INSERT [] + SID_TBXCTL_INSCELLS [] } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 47b0534b835b..6095a1b3310b 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -85,7 +85,6 @@ #include <svx/lboxctrl.hxx> #include <svx/verttexttbxctrl.hxx> #include <svx/formatpaintbrushctrl.hxx> -#include "tbinsert.hxx" #include "tbzoomsliderctrl.hxx" #include <svx/zoomsliderctrl.hxx> @@ -154,8 +153,6 @@ void ScDLL::Init() SfxRecentFilesToolBoxControl::RegisterControl(SID_OPEN_CALC, pMod); // Own Controller - ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSERT, pMod); - ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSCELLS, pMod); ScZoomSliderControl ::RegisterControl(SID_PREVIEW_SCALINGFACTOR, pMod); // SvxToolboxController diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx deleted file mode 100644 index 049949cc1a69..000000000000 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ /dev/null @@ -1,106 +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 <svl/intitem.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/viewsh.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/imagemgr.hxx> -#include <vcl/toolbox.hxx> - -#include "tbinsert.hxx" -#include "global.hxx" -#include "scmod.hxx" -#include "scresid.hxx" -#include "sc.hrc" - -SFX_IMPL_TOOLBOX_CONTROL( ScTbxInsertCtrl, SfxUInt16Item); - -// ToolBox - Controller - -ScTbxInsertCtrl::ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - nLastSlotId(0) -{ - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); -} - -ScTbxInsertCtrl::~ScTbxInsertCtrl() -{ -} - -void ScTbxInsertCtrl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, - const SfxPoolItem* pState ) -{ - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SfxItemState::DISABLED) ); - - if( eState == SfxItemState::DEFAULT ) - { - - const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); - if(pItem) - { - nLastSlotId = pItem->GetValue(); - sal_uInt16 nImageId = nLastSlotId ? nLastSlotId : GetSlotId(); - OUString aSlotURL( "slot:" ); - aSlotURL += OUString::number( nImageId); - Image aImage = GetImage( m_xFrame, - aSlotURL, - hasBigImages() - ); - GetToolBox().SetItemImage(GetId(), aImage); - } - } -} - -VclPtr<SfxPopupWindow> ScTbxInsertCtrl::CreatePopupWindow() -{ - sal_uInt16 nSlotId = GetSlotId(); - if (nSlotId == SID_TBXCTL_INSERT) - { - OUString aInsertBarResStr( "private:resource/toolbar/insertbar" ); - createAndPositionSubToolBar( aInsertBarResStr ); - } - else if (nSlotId == SID_TBXCTL_INSCELLS) - { - OUString aInsertCellsBarResStr( "private:resource/toolbar/insertcellsbar" ); - createAndPositionSubToolBar( aInsertCellsBarResStr ); - } - return NULL; -} - -void ScTbxInsertCtrl::Select( sal_uInt16 /*nSelectModifier*/ ) -{ - SfxViewShell* pCurSh( SfxViewShell::Current() ); - SfxDispatcher* pDispatch( 0 ); - - if ( pCurSh ) - { - SfxViewFrame* pViewFrame = pCurSh->GetViewFrame(); - if ( pViewFrame ) - pDispatch = pViewFrame->GetDispatcher(); - } - - if ( pDispatch ) - pDispatch->Execute(nLastSlotId); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 1d7998945954..3a2536d7f9c4 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -92,9 +92,6 @@ enum ObjectSelectionType class ScTabViewShell: public SfxViewShell, public ScDBFunc { private: - static sal_uInt16 nInsertCtrlState; - static sal_uInt16 nInsCellsCtrlState; - SvxHtmlOptions aHTMLOpt; ObjectSelectionType eCurOST; sal_uInt16 nDrawSfxId; @@ -276,9 +273,6 @@ public: void ExecImageMap( SfxRequest& rReq ); void GetImageMapState( SfxItemSet& rSet ); - void ExecTbx( SfxRequest& rReq ); - static void GetTbxState( SfxItemSet& rSet ); - void ExecuteSave( SfxRequest& rReq ); void GetSaveState( SfxItemSet& rSet ); void ExecSearch( SfxRequest& rReq ); diff --git a/sc/source/ui/inc/tbinsert.hxx b/sc/source/ui/inc/tbinsert.hxx deleted file mode 100644 index 07b6201db668..000000000000 --- a/sc/source/ui/inc/tbinsert.hxx +++ /dev/null @@ -1,44 +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_SC_SOURCE_UI_INC_TBINSERT_HXX -#define INCLUDED_SC_SOURCE_UI_INC_TBINSERT_HXX - -#include <sfx2/tbxctrl.hxx> - -class ScTbxInsertCtrl : public SfxToolBoxControl -{ - sal_uInt16 nLastSlotId; - virtual void Select( sal_uInt16 nSelectModifier ) SAL_OVERRIDE; - -public: - SFX_DECL_TOOLBOX_CONTROL(); - - ScTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rBox ); - virtual ~ScTbxInsertCtrl(); - - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; - virtual void StateChanged( sal_uInt16 nSID, - SfxItemState eState, - const SfxPoolItem* pState ) SAL_OVERRIDE; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index cb57e3b442e0..8890c4b8c713 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -102,11 +102,6 @@ extern SfxViewShell* pScActiveViewShell; // global.cxx using namespace com::sun::star; -// STATIC DATA ----------------------------------------------------------- - -sal_uInt16 ScTabViewShell::nInsertCtrlState = SID_INSERT_GRAPHIC; -sal_uInt16 ScTabViewShell::nInsCellsCtrlState = 0; - void ScTabViewShell::Activate(bool bMDI) { SfxViewShell::Activate(bMDI); @@ -1830,34 +1825,4 @@ ScNavigatorSettings* ScTabViewShell::GetNavigatorSettings() return pNavSettings; } -void ScTabViewShell::ExecTbx( SfxRequest& rReq ) -{ - const SfxItemSet* pReqArgs = rReq.GetArgs(); - sal_uInt16 nSlot = rReq.GetSlot(); - const SfxPoolItem* pItem = NULL; - if ( pReqArgs ) - pReqArgs->GetItemState( nSlot, true, &pItem ); - - switch ( nSlot ) - { - case SID_TBXCTL_INSERT: - if ( pItem ) - nInsertCtrlState = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - break; - case SID_TBXCTL_INSCELLS: - if ( pItem ) - nInsCellsCtrlState = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - break; - default: - OSL_FAIL("Slot im Wald"); - } - GetViewFrame()->GetBindings().Invalidate( nSlot ); -} - -void ScTabViewShell::GetTbxState( SfxItemSet& rSet ) -{ - rSet.Put( SfxUInt16Item( SID_TBXCTL_INSERT, nInsertCtrlState ) ); - rSet.Put( SfxUInt16Item( SID_TBXCTL_INSCELLS, nInsCellsCtrlState ) ); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 2a21a2065da3..6df748b1c034 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -156,10 +156,6 @@ class SW_DLLPUBLIC SwView: public SfxViewShell static VclPtr<SvxSearchDialog> m_pSrchDlg; static SvxSearchItem *m_pSrchItem; - static sal_uInt16 m_nInsertCtrlState; - static sal_uInt16 m_nWebInsertCtrlState; - static sal_uInt16 m_nInsertObjectCtrlState; - static sal_uInt16 m_nInsertFieldCtrlState; static sal_uInt16 m_nMoveType; // for buttons below the scrollbar (viewmdi) static sal_Int32 m_nActMark; // current jump mark for unknown mark diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index 5e35f90c7f54..51d593748e33 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -531,10 +531,8 @@ interface BaseTextEditView ] FN_INSERT_CTRL [ - ExecMethod = Execute ; - StateMethod = GetState ; Export = FALSE; - ] + ] SID_ATTR_DEFTABSTOP [ diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 03b94c1f28ae..201c7b079160 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -3710,7 +3710,7 @@ SfxStringItem InsertSection FN_INSERT_REGION GroupId = GID_INSERT; ] -SfxImageItem InsertCtrl FN_INSERT_CTRL +SfxVoidItem InsertCtrl FN_INSERT_CTRL [ /* flags: */ @@ -4133,7 +4133,7 @@ SfxVoidItem InsertNeutralParagraph FN_NUM_BULLET_NONUM GroupId = GID_ENUMERATION; ] -SfxImageItem InsertObjCtrl FN_INSERT_OBJ_CTRL +SfxVoidItem InsertObjCtrl FN_INSERT_OBJ_CTRL [ /* flags: */ diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index db75fc1203e5..567d70476e5a 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -46,7 +46,6 @@ interface TextEditView : BaseTextEditView // Slots, which are not needed in the WebDocShell FN_INSERT_OBJ_CTRL [ - ExecMethod = Execute ; StateMethod = GetState ; Export = FALSE ; DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR"; diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index ba06d42122e4..611f0fc75f80 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -290,8 +290,6 @@ void SwDLL::RegisterControls() SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod ); SvxTbxCtlAlign::RegisterControl(SID_OBJECT_ALIGN, pMod ); SwTbxAnchor::RegisterControl(FN_TOOL_ANCHOR, pMod ); - SwTbxInsertCtrl::RegisterControl(FN_INSERT_CTRL, pMod ); - SwTbxInsertCtrl::RegisterControl(FN_INSERT_OBJ_CTRL, pMod ); SwTbxFieldCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod ); SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod ); svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod); diff --git a/sw/source/uibase/inc/workctrl.hxx b/sw/source/uibase/inc/workctrl.hxx index 910dcb26f7e2..31bf9736d2b5 100644 --- a/sw/source/uibase/inc/workctrl.hxx +++ b/sw/source/uibase/inc/workctrl.hxx @@ -52,26 +52,6 @@ class SwView; #define NID_TABLE_FORMULA_ERROR 20019 #define NID_COUNT 20 -class SwTbxInsertCtrl : public SfxToolBoxControl -{ - sal_uInt16 nLastSlotId; - - virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE; - -public: - SFX_DECL_TOOLBOX_CONTROL(); - - SwTbxInsertCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SwTbxInsertCtrl(); - - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; - virtual void StateChanged( sal_uInt16 nSID, - SfxItemState eState, - const SfxPoolItem* pState ) SAL_OVERRIDE; - - virtual void SAL_CALL update() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -}; - class SwTbxAutoTextCtrl : public SfxToolBoxControl { PopupMenu* pPopup; diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx index c56f9cbdf180..99d1cfd8ca9c 100644 --- a/sw/source/uibase/ribbar/workctrl.cxx +++ b/sw/source/uibase/ribbar/workctrl.cxx @@ -64,98 +64,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; -SFX_IMPL_TOOLBOX_CONTROL( SwTbxInsertCtrl, SfxImageItem); SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxVoidItem ); SFX_IMPL_TOOLBOX_CONTROL( SwTbxFieldCtrl, SfxBoolItem ); -SwTbxInsertCtrl::SwTbxInsertCtrl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM) -{ - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) ); -} - -SwTbxInsertCtrl::~SwTbxInsertCtrl() -{ -} - -void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException, std::exception) -{ - ToolBox& rTbx = GetToolBox(); - OUString aSlotURL = "slot:" + OUString::number( nLastSlotId); - Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); - - rTbx.SetItemImage(GetId(), aImage); - rTbx.Invalidate(); - - SfxToolBoxControl::update(); -} - -void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, - SfxItemState eState, - const SfxPoolItem* pState ) -{ - sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SfxItemState::DISABLED) ); - - if( eState == SfxItemState::DEFAULT ) - { - const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState ); - if(pItem) - { - nLastSlotId = pItem->GetValue(); - if( nLastSlotId ) - nId = nLastSlotId; - - OUString aSlotURL = "slot:" + OUString::number( nId); - ToolBox& rBox = GetToolBox(); - Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); - rBox.SetItemImage(GetId(), aImage); - rBox.SetItemImageMirrorMode( GetId(), false ); - rBox.SetItemImageAngle( GetId(), pItem->GetRotation() ); - rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() ); - } - } - -} - -VclPtr<SfxPopupWindow> SwTbxInsertCtrl::CreatePopupWindow() -{ - if(GetSlotId() == FN_INSERT_CTRL) - { - OUString aToolBarResStr( "private:resource/toolbar/insertbar" ); - createAndPositionSubToolBar( aToolBarResStr ); - } - else /* FN_INSERT_OBJ_CTRL */ - { - OUString aToolBarResStr( "private:resource/toolbar/insertobjectbar" ); - createAndPositionSubToolBar( aToolBarResStr ); - } - return NULL; -} - -void SwTbxInsertCtrl::Select( sal_uInt16 /*nSelectModifier*/ ) -{ - if( nLastSlotId ) - { - SfxViewShell* pCurSh( SfxViewShell::Current() ); - SfxDispatcher* pDispatch( 0 ); - - if ( pCurSh ) - { - SfxViewFrame* pViewFrame = pCurSh->GetViewFrame(); - if ( pViewFrame ) - pDispatch = pViewFrame->GetDispatcher(); - } - - if ( pDispatch ) - pDispatch->Execute(nLastSlotId); - } -} - SwTbxAutoTextCtrl::SwTbxAutoTextCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index e19673c65228..4125a91ce739 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -128,10 +128,6 @@ bool bDocSzUpdated = true; SvxSearchItem* SwView::m_pSrchItem = 0; -sal_uInt16 SwView::m_nInsertCtrlState = FN_INSERT_TABLE; -sal_uInt16 SwView::m_nWebInsertCtrlState = FN_INSERT_TABLE; -sal_uInt16 SwView::m_nInsertObjectCtrlState = SID_INSERT_DIAGRAM; - bool SwView::m_bExtra = false; bool SwView::m_bFound = false; bool SwView::m_bJustOpened = false; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a65b79af64ff..e47987fa2194 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -991,30 +991,6 @@ void SwView::Execute(SfxRequest &rReq) m_pShell->ExecuteSlot(rReq); } break; - case FN_INSERT_CTRL: - case FN_INSERT_OBJ_CTRL: - { - if(pArgs && SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem)) - { - const sal_uInt16 nValue = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); - switch ( nSlot ) - { - case FN_INSERT_CTRL: - { - bool bWeb = 0 != PTR_CAST(SwWebView, this); - if(bWeb) - SwView::m_nWebInsertCtrlState = nValue; - else - SwView::m_nInsertCtrlState = nValue; - } - break; - case FN_INSERT_OBJ_CTRL: SwView::m_nInsertObjectCtrlState = nValue ;break; - } - - } - GetViewFrame()->GetBindings().Invalidate( nSlot ); - } - break; #if defined WNT || defined UNX case SID_TWAIN_SELECT: case SID_TWAIN_TRANSFER: diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index aabd463de92d..a7d2c16a8539 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -191,42 +191,12 @@ void SwView::GetState(SfxItemSet &rSet) rSet.DisableItem(nWhich); } break; - case FN_INSERT_CTRL: - { - SfxImageItem aImgItem(nWhich, bWeb ? SwView::m_nWebInsertCtrlState : SwView::m_nInsertCtrlState); - SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() ); - const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() ); - if(pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION )) - { - if(m_pWrtShell->IsInVerticalText()) - aImgItem.SetRotation(2700); - if(m_pWrtShell->IsInRightToLeftText()) - aImgItem.SetMirrored(true); - } - rSet.Put(aImgItem); - } - break; - case FN_INSERT_OBJ_CTRL: if( bWeb || m_pWrtShell->CrsrInsideInputField() ) { rSet.DisableItem(nWhich); } - else - { - SfxImageItem aImgItem(nWhich, SwView::m_nInsertObjectCtrlState); - SfxSlotPool& rPool = SfxSlotPool::GetSlotPool( GetViewFrame() ); - const SfxSlot* pSlot = rPool.GetSlot( aImgItem.GetValue() ); - if(pSlot && pSlot->IsMode( SfxSlotMode::IMAGEROTATION )) - { - if (m_pWrtShell->IsInVerticalText()) - aImgItem.SetRotation(2700); - if (m_pWrtShell->IsInRightToLeftText()) - aImgItem.SetMirrored(true); - } - rSet.Put(aImgItem); - } break; case FN_UPDATE_TOX: |