summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-07-06 11:19:24 +0000
committerOliver Bolte <obo@openoffice.org>2004-07-06 11:19:24 +0000
commit9a6ce4e8d6e9d10d6c5398a4aa13afdc14cf3205 (patch)
tree4a9c6ea15473cad374dfdaa5d6aa9b3afc64c914
parent2bcb4158b3111d50e88f583ae289076fde1e5867 (diff)
INTEGRATION: CWS docking1 (1.7.40); FILE MERGED
2004/05/06 12:00:15 cd 1.7.40.2: #i26252# Fixed several problems with non-defined enum-slots and added subtoolbar creation 2004/04/25 05:42:51 cd 1.7.40.1: #i26252# Transition of toolbar controllers
-rw-r--r--basctl/source/basicide/tbxctl.cxx34
1 files changed, 24 insertions, 10 deletions
diff --git a/basctl/source/basicide/tbxctl.cxx b/basctl/source/basicide/tbxctl.cxx
index 19954bfcf321..6ad0ae24fc96 100644
--- a/basctl/source/basicide/tbxctl.cxx
+++ b/basctl/source/basicide/tbxctl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tbxctl.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2004-01-06 17:14:02 $
+ * last change: $Author: obo $ $Date: 2004-07-06 12:19:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -70,15 +70,17 @@
#include <iderid.hxx>
#include <tbxctl.hrc>
#include <idetemp.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <svtools/aeitem.hxx>
-SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxEnumItem )
+SFX_IMPL_TOOLBOX_CONTROL( TbxControls, SfxAllEnumItem )
/*************************************************************************
|*
|* WorkWindow Alignment
|*
\************************************************************************/
-
+/*
IMPL_LINK( PopupWindowTbx, SelectHdl, void*, EMPTYARG )
{
if ( IsInPopupMode() )
@@ -134,15 +136,15 @@ void PopupWindowTbx::Update()
PopupWindowTbx::~PopupWindowTbx()
{
}
-
+*/
/*************************************************************************
|*
|* Klasse fuer Toolbox
|*
\************************************************************************/
-TbxControls::TbxControls( USHORT nId, ToolBox& rTbx, SfxBindings& rBind ) :
- SfxToolBoxControl( nId, rTbx, rBind )
+TbxControls::TbxControls( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+ SfxToolBoxControl( nSlotId, nId, rTbx )
{
nLastSlot = USHRT_MAX;
@@ -201,8 +203,14 @@ void TbxControls::StateChanged( USHORT nSID, SfxItemState eState,
}
if( nTemp )
{
- Image aImage = GetBindings().GetImageManager()->GetImage( nTemp );
- GetToolBox().SetItemImage( SID_CHOOSE_CONTROLS, aImage );
+ rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
+ aSlotURL += rtl::OUString::valueOf( sal_Int32( nTemp ));
+ Image aImage = GetImage( m_xFrame,
+ aSlotURL,
+ hasBigImages(),
+ GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ ToolBox& rBox = GetToolBox();
+ rBox.SetItemImage(GetId(), aImage);
nLastSlot = nLastEnum;
}
}
@@ -231,6 +239,12 @@ void TbxControls::Select( USHORT nModifier )
\************************************************************************/
SfxPopupWindow* TbxControls::CreatePopupWindow()
{
+ if ( GetSlotId() == SID_CHOOSE_CONTROLS )
+ {
+ rtl::OUString aSubToolBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcontrolsbar" ));
+ createAndPositionSubToolBar( aSubToolBarResName );
+ }
+/*
if (GetId() == SID_CHOOSE_CONTROLS)
{
PopupWindowTbx *pWin =
@@ -246,7 +260,7 @@ SfxPopupWindow* TbxControls::CreatePopupWindow()
pWin->Show();
return(pWin);
}
-
+*/
return(0);
}