[Libreoffice-commits] core.git: 4 commits - framework/source include/svx officecfg/registry sc/inc sc/sdi sc/source sd/inc sd/sdi sd/source svx/Library_svx.mk svx/source sw/inc sw/source
Maxim Monastirsky
momonasmon at gmail.com
Thu Jul 16 13:43:25 PDT 2015
framework/source/uielement/subtoolbarcontroller.cxx | 5
include/svx/fontworkgallery.hxx | 11 -
include/svx/tbxalign.hxx | 47 ----
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 28 ++
sc/inc/pch/precompiled_sc.hxx | 2
sc/sdi/drawsh.sdi | 2
sc/source/ui/app/scdll.cxx | 4
sc/source/ui/drawfunc/drawsh2.cxx | 1
sd/inc/pch/precompiled_sd.hxx | 1
sd/sdi/_drvwsh.sdi | 3
sd/source/ui/app/sddll.cxx | 3
sd/source/ui/app/tbxww.cxx | 7
sd/source/ui/inc/DrawViewShell.hxx | 2
sd/source/ui/view/drviews7.cxx | 6
sd/source/ui/view/drviewsa.cxx | 42 +---
sd/source/ui/view/drviewsc.cxx | 14 -
sd/source/ui/view/drviewse.cxx | 1
sd/source/ui/view/drviewsj.cxx | 3
svx/Library_svx.mk | 1
svx/source/tbxctrls/fontworkgallery.cxx | 30 --
svx/source/tbxctrls/tbxalign.cxx | 105 ----------
sw/inc/pch/precompiled_sw.hxx | 1
sw/source/uibase/app/swmodule.cxx | 4
23 files changed, 57 insertions(+), 266 deletions(-)
New commits:
commit 4f1a8f697e05bc4fb52be7a84a3307d595b4c09b
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 23:16:06 2015 +0300
Convert Alignment button to the generic controller
Change-Id: I76ead43fa1cfe7ba1b62d2b13c4f4d7658a9f290
diff --git a/include/svx/tbxalign.hxx b/include/svx/tbxalign.hxx
deleted file mode 100644
index 8c8c0e4..0000000
--- 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 c91995f..554eced 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 689eb50..0557c2e 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 3f5e983..33e035e 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 827bdff..2a721d8 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 0a499e8..8fb1907 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 69a8e4e..ee33923 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 66a6e86..c5c89ba 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 8b6d968..c8311e9 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 a1b332e..2176907 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 d3508a6..0bacea5 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 516f487..84208f1 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 10a3f5a..f239c36 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 a890ed7..22216d6 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 def2b2e..0000000
--- 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 d26b462..1540a5e 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 ec9a758..5236516 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 );
commit 8ccea9c7d661da42d3e5a3f459f8f568990e8fac
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 17:44:56 2015 +0300
sc: Disable the alignment group button
... when all its items are disabled. That's the same
behavior now as in Writer.
Change-Id: Ic74d0737ae7cc709a64524c1aa43783af8f4fbcc
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 7fb2639..2801b17 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -125,7 +125,7 @@ interface TableDraw
Export = FALSE ;
// PseudoPrefix = SID_OBJECT_ALIGN;
ExecMethod = ExecDrawFunc ;
- StateMethod = NoState ;
+ StateMethod = GetDrawFuncState ;
GroupId = GID_FORMAT ;
FastCall , Cachable ;
ToolBoxConfig ;
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index bed8407..e01639d 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -164,6 +164,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
rSet.DisableItem( SID_OBJECT_ALIGN_UP );
rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
+ rSet.DisableItem( SID_OBJECT_ALIGN );
// pseudo slots for Format menu
rSet.DisableItem( SID_ALIGN_ANY_LEFT );
commit de48b8af6ddf272bf37be1574630986a302fd5c8
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 16:56:28 2015 +0300
Ignore string status updates completely
See no benefit of it here, and also it has some unexpected
results with some commands that have enum commands, and
use a string item to update the currently selected item.
Change-Id: Iae54c4e1fb7a3aa5a7c1a03904fb3629ed63c8f0
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index 3a16760..63a0984 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -137,7 +137,6 @@ void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& E
TriState eTri = TRISTATE_FALSE;
bool bValue;
- OUString aStrValue;
css::frame::status::ItemStatus aItemState;
css::frame::status::Visibility aItemVisibility;
@@ -150,10 +149,6 @@ void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& E
eTri = TRISTATE_TRUE;
nItemBits |= ToolBoxItemBits::CHECKABLE;
}
- else if ( Event.State >>= aStrValue )
- {
- pToolBox->SetItemText( nId, aStrValue );
- }
else if ( Event.State >>= aItemState )
{
eTri = TRISTATE_INDET;
commit b1d4af61c68be8dcda6fa97aa6cef97e77d77c23
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 16:43:30 2015 +0300
Convert FontWorkShapeTypeControl to the generic controller
Change-Id: I7824136aa2780c4062a66f7a5284a342862f319a
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index fa71862..b415f35 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -48,17 +48,6 @@ class SfxBindings;
namespace svx
{
-class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkShapeTypeControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
- virtual ~FontWorkShapeTypeControl();
-
- virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE;
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
-};
-
class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public ModalDialog
{
VclPtr<MetricField> m_pMtrScale;
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 46f5d96..c91995f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -411,6 +411,20 @@
<value>com.sun.star.comp.svx.FontworkCharacterSpacingController</value>
</prop>
</node>
+ <node oor:name="FontworkShapeTypeControl" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:FontworkShapeType</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>fontworkshapetype</value>
+ </prop>
+ </node>
<node oor:name="c3" oor:op="replace">
<prop oor:name="Command">
<value>.uno:ChartElementSelector</value>
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 646f969..689eb50 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -731,7 +731,6 @@
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
#include <svx/fontworkbar.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/framelinkarray.hxx>
#include <svx/gallery.hxx>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index e920cc5..3f5e983 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -33,7 +33,6 @@
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
#include <comphelper/types.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svtools/parhtml.hxx>
@@ -217,7 +216,6 @@ void ScDLL::Init()
// CustomShape extrusion controller
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
// Child Windows
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 0f87ab5..0bf4d96 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -648,7 +648,6 @@
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
#include <svx/fontworkbar.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/gallery.hxx>
#include <svx/galleryitem.hxx>
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 70c9178..0a499e8 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -69,7 +69,6 @@
#include <svx/fntctl.hxx>
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svx/grafctrl.hxx>
@@ -250,7 +249,6 @@ void SdDLL::RegisterControllers()
SvxClipBoardControl::RegisterControl( SID_PASTE_UNFORMATTED, pMod );
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod);
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index bae32a4..191c9a8 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -260,36 +260,6 @@ IMPL_LINK_NOARG(FontWorkGalleryDialog, DoubleClickFavoriteHdl)
-SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem );
-FontWorkShapeTypeControl::FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
-{
- rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
- rTbx.Invalidate();
-}
-
-
-
-FontWorkShapeTypeControl::~FontWorkShapeTypeControl()
-{
-}
-
-
-
-VclPtr<SfxPopupWindow> FontWorkShapeTypeControl::CreatePopupWindow()
-{
- OUString aSubTbxResName( "private:resource/toolbar/fontworkshapetype" );
- createAndPositionSubToolBar( aSubTbxResName );
- return NULL;
-}
-
-
-
-void FontWorkShapeTypeControl::Select(sal_uInt16 /*nSelectModifier*/)
-{
-
-}
-
class FontworkAlignmentWindow : public ToolbarMenu
{
public:
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 7d01854..ec9a758 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -50,7 +50,6 @@
#include <svx/imapdlg.hxx>
#include <svx/srchdlg.hxx>
#include <svx/hyperdlg.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/modctrl.hxx>
#include <com/sun/star/scanner/ScannerManager.hpp>
#include <com/sun/star/container/XSet.hpp>
@@ -294,7 +293,6 @@ void SwDLL::RegisterControls()
svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod);
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEASDOC, pMod );
SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
More information about the Libreoffice-commits
mailing list