summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-07-16 23:16:06 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2015-07-16 23:42:26 +0300
commit4f1a8f697e05bc4fb52be7a84a3307d595b4c09b (patch)
treed7ac4628080ec09bed1ecb05ee3bc471e5ecd029 /sd
parent8ccea9c7d661da42d3e5a3f459f8f568990e8fac (diff)
Convert Alignment button to the generic controller
Change-Id: I76ead43fa1cfe7ba1b62d2b13c4f4d7658a9f290
Diffstat (limited to 'sd')
-rw-r--r--sd/sdi/_drvwsh.sdi3
-rw-r--r--sd/source/ui/app/sddll.cxx1
-rw-r--r--sd/source/ui/app/tbxww.cxx7
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/view/drviews7.cxx6
-rw-r--r--sd/source/ui/view/drviewsa.cxx42
-rw-r--r--sd/source/ui/view/drviewsc.cxx14
-rw-r--r--sd/source/ui/view/drviewse.cxx1
-rw-r--r--sd/source/ui/view/drviewsj.cxx3
9 files changed, 27 insertions, 52 deletions
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 );