diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2015-07-14 16:37:10 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2015-07-15 01:26:23 +0300 |
commit | d311b65f277cce83557dd59f95e9295bc7781cee (patch) | |
tree | 6315890674545acad9a50d2ac93b4389f4ed0c96 | |
parent | 489af4ed790a233c94051d2f08e51d7c44ddba37 (diff) |
Convert optimize table button to the generic controller
Change-Id: I6b9089daaa2bb7d0dfc1072296fc51401e5fc88a
-rw-r--r-- | include/svx/subtoolboxcontrol.hxx | 47 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 14 | ||||
-rw-r--r-- | sd/inc/pch/precompiled_sd.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/app/sddll.cxx | 2 | ||||
-rw-r--r-- | svx/Library_svx.mk | 1 | ||||
-rw-r--r-- | svx/sdi/svx.sdi | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/subtoolboxcontrol.cxx | 55 | ||||
-rw-r--r-- | sw/Library_sw.mk | 1 | ||||
-rw-r--r-- | sw/sdi/swriter.sdi | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/inc/tblctrl.hxx | 39 | ||||
-rw-r--r-- | sw/source/uibase/ribbar/tblctrl.cxx | 50 |
12 files changed, 16 insertions, 201 deletions
diff --git a/include/svx/subtoolboxcontrol.hxx b/include/svx/subtoolboxcontrol.hxx deleted file mode 100644 index 17555e1f72fb..000000000000 --- a/include/svx/subtoolboxcontrol.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_SUBTOOLBOXCONTROL_HXX -#define INCLUDED_SVX_SUBTOOLBOXCONTROL_HXX - -#include <svx/svxdllapi.h> -#include <sfx2/tbxctrl.hxx> - - - - - -class SVX_DLLPUBLIC SvxSubToolBoxControl : public SfxToolBoxControl -{ - -public: - SFX_DECL_TOOLBOX_CONTROL(); - - SvxSubToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SvxSubToolBoxControl(); - - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; -}; - - - - -#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 03f10ac14888..8d96dc6f597e 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -176,6 +176,20 @@ </node> </node> <node oor:name="ToolBar"> + <node oor:name="OptimizeTableControl" oor:op="replace"> + <prop oor:name="Command"> + <value>.uno:OptimizeTable</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>optimizetablebar</value> + </prop> + </node> <node oor:name="InsertControl" oor:op="replace"> <prop oor:name="Command"> <value>.uno:InsertCtrl</value> diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index e52dda083ba8..0f87ab526620 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -707,7 +707,6 @@ #include <svx/sidebar/SelectionAnalyzer.hxx> #include <svx/sphere3d.hxx> #include <svx/srchdlg.hxx> -#include <svx/subtoolboxcontrol.hxx> #include <svx/svdattr.hxx> #include <svx/svddef.hxx> #include <svx/svddrgmt.hxx> diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 4b499455d61f..928db7b0d7f9 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -81,7 +81,6 @@ #include <svx/modctrl.hxx> #include <svx/pszctrl.hxx> #include <svx/srchdlg.hxx> -#include <svx/subtoolboxcontrol.hxx> #include <svx/SvxColorChildWindow.hxx> #include <svx/SvxShapeTypes.hxx> #include <svx/tbcontrl.hxx> @@ -262,7 +261,6 @@ void SdDLL::RegisterControllers() SvxFrameLineStyleToolBoxControl::RegisterControl(SID_FRAME_LINESTYLE, pMod ); SvxColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod ); SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod ); - SvxSubToolBoxControl::RegisterControl(SID_OPTIMIZE_TABLE, pMod); } void SdDLL::Init() diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 48e5e0c0c789..a890ed7b51fd 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -225,7 +225,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/tbxctrls/layctrl \ svx/source/tbxctrls/lboxctrl \ svx/source/tbxctrls/linectrl \ - svx/source/tbxctrls/subtoolboxcontrol \ svx/source/tbxctrls/tbunocontroller \ svx/source/tbxctrls/tbunosearchcontrollers \ svx/source/tbxctrls/tbxalign \ diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index ec3bbec8d89c..51072b6cb437 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -15154,7 +15154,7 @@ SfxVoidItem SplitCell SID_TABLE_SPLIT_CELLS GroupId = GID_TABLE; ] -SfxUInt16Item OptimizeTable SID_OPTIMIZE_TABLE +SfxVoidItem OptimizeTable SID_OPTIMIZE_TABLE [ /* flags: */ diff --git a/svx/source/tbxctrls/subtoolboxcontrol.cxx b/svx/source/tbxctrls/subtoolboxcontrol.cxx deleted file mode 100644 index 95227cad8695..000000000000 --- a/svx/source/tbxctrls/subtoolboxcontrol.cxx +++ /dev/null @@ -1,55 +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/intitem.hxx> - -#include <vcl/toolbox.hxx> -#include <sfx2/app.hxx> -#include <svx/subtoolboxcontrol.hxx> -#include <svx/svxids.hrc> - - -SFX_IMPL_TOOLBOX_CONTROL( SvxSubToolBoxControl, SfxUInt16Item ); - -SvxSubToolBoxControl::SvxSubToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) -: SfxToolBoxControl( nSlotId, nId, rTbx ) -{ - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) ); -} - -SvxSubToolBoxControl::~SvxSubToolBoxControl() -{ -} - -VclPtr<SfxPopupWindow> SvxSubToolBoxControl::CreatePopupWindow() -{ - const sal_Char* pResource = 0; - switch( GetSlotId() ) - { - case SID_OPTIMIZE_TABLE: - pResource = "private:resource/toolbar/optimizetablebar"; - break; - } - - if( pResource ) - createAndPositionSubToolBar( OUString::createFromAscii( pResource ) ); - return NULL; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index ea8368719f7b..1654395a0124 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -643,7 +643,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/ribbar/drawbase \ sw/source/uibase/ribbar/dselect \ sw/source/uibase/ribbar/inputwin \ - sw/source/uibase/ribbar/tblctrl \ sw/source/uibase/ribbar/tbxanchr \ sw/source/uibase/ribbar/workctrl \ sw/source/uibase/shells/annotsh \ diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 201c7b079160..6ecfbb873736 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -5954,7 +5954,7 @@ SfxBoolItem OnlineAutoFormat FN_AUTOFORMAT_AUTO GroupId = GID_FORMAT; ] -SfxUInt16Item OptimizeTable FN_OPTIMIZE_TABLE +SfxVoidItem OptimizeTable FN_OPTIMIZE_TABLE [ /* flags: */ diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 611f0fc75f80..2136bf7f3ae6 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -94,7 +94,6 @@ #include <tmplctrl.hxx> #include <viewlayoutctrl.hxx> #include <svx/zoomsliderctrl.hxx> -#include <tblctrl.hxx> #include <zoomctrl.hxx> #include <wordcountctrl.hxx> #include <workctrl.hxx> @@ -342,8 +341,6 @@ void SwDLL::RegisterControls() SvxModifyControl::RegisterControl( SID_DOC_MODIFIED, pMod ); SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod ); - SwTableOptimizeCtrl::RegisterControl(FN_OPTIMIZE_TABLE, pMod); - SvxIMapDlgChildWindow::RegisterChildWindow( false, pMod ); SvxSearchDialogWrapper::RegisterChildWindow( false, pMod ); SvxHlinkDlgWrapper::RegisterChildWindow( false, pMod ); diff --git a/sw/source/uibase/inc/tblctrl.hxx b/sw/source/uibase/inc/tblctrl.hxx deleted file mode 100644 index 3528a343ed2b..000000000000 --- a/sw/source/uibase/inc/tblctrl.hxx +++ /dev/null @@ -1,39 +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_SW_SOURCE_UIBASE_INC_TBLCTRL_HXX -#define INCLUDED_SW_SOURCE_UIBASE_INC_TBLCTRL_HXX - -#include <sfx2/tbxctrl.hxx> - -class SwTableOptimizeCtrl : public SfxToolBoxControl -{ - -public: - SFX_DECL_TOOLBOX_CONTROL(); - - SwTableOptimizeCtrl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); - virtual ~SwTableOptimizeCtrl(); - - virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE; - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/ribbar/tblctrl.cxx b/sw/source/uibase/ribbar/tblctrl.cxx deleted file mode 100644 index d5927051f237..000000000000 --- a/sw/source/uibase/ribbar/tblctrl.cxx +++ /dev/null @@ -1,50 +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/intitem.hxx> - -#include <vcl/toolbox.hxx> -#include <sfx2/app.hxx> - -#include "cmdid.h" -#include "swtypes.hxx" -#include "tblctrl.hxx" - -SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item ); - -SwTableOptimizeCtrl::SwTableOptimizeCtrl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ) -{ - rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) ); -} - -SwTableOptimizeCtrl::~SwTableOptimizeCtrl() -{ -} - -VclPtr<SfxPopupWindow> SwTableOptimizeCtrl::CreatePopupWindow() -{ - createAndPositionSubToolBar("private:resource/toolbar/optimizetablebar"); - return NULL; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |