summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r--vcl/source/window/toolbox2.cxx73
1 files changed, 0 insertions, 73 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 12239a5b6891..af98244747df 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -374,79 +374,6 @@ void ToolBox::Select()
pWrapper->GetFloatingWindow()->EndPopupMode();
}
-void ToolBox::InsertItem( const ResId& rResId )
-{
- RscToolboxItemFlags nObjMask;
-
- // create item
- ImplToolItem aItem;
-
- GetRes( rResId.SetRT( RSC_TOOLBOXITEM ) );
- nObjMask = (RscToolboxItemFlags)ReadLongRes();
-
- if ( nObjMask & RscToolboxItemFlags::Id )
- aItem.mnId = sal::static_int_cast<sal_uInt16>(ReadLongRes());
- else
- aItem.mnId = 1;
-
- if ( nObjMask & RscToolboxItemFlags::Type )
- aItem.meType = (ToolBoxItemType)ReadLongRes();
-
- if ( nObjMask & RscToolboxItemFlags::Status )
- aItem.mnBits = (ToolBoxItemBits)ReadLongRes();
-
- if( nObjMask & RscToolboxItemFlags::HelpId )
- aItem.maHelpId = ReadByteStringRes();
-
- if ( nObjMask & RscToolboxItemFlags::Text )
- {
- aItem.maText = ReadStringRes();
- aItem.maText = MnemonicGenerator::EraseAllMnemonicChars(aItem.maText);
- }
-
- if ( nObjMask & RscToolboxItemFlags::Disable )
- aItem.mbEnabled = ReadShortRes() == 0;
-
- if ( nObjMask & RscToolboxItemFlags::Hide )
- aItem.mbVisible = ReadShortRes() == 0;
-
- if ( nObjMask & RscToolboxItemFlags::Command )
- aItem.maCommandStr = ReadStringRes();
-
- // Try to load an image from the image list
- if (aItem.mnId)
- {
- aItem.maImage = maImageList.GetImage( aItem.mnId );
- aItem.maImageOriginal = aItem.maImage;
- }
-
- // if this is a ButtonItem, check ID
- bool bNewCalc;
- if ( aItem.meType != ToolBoxItemType::BUTTON )
- {
- bNewCalc = false;
- aItem.mnId = 0;
- }
- else
- {
- bNewCalc = true;
-
- SAL_WARN_IF( !aItem.mnId, "vcl", "ToolBox::InsertItem(): ItemId == 0" );
- SAL_WARN_IF( GetItemPos( aItem.mnId ) != TOOLBOX_ITEM_NOTFOUND, "vcl", "ToolBox::InsertItem(): ItemId already exists" );
- }
-
- // create item and add to list
- mpData->m_aItems.push_back( aItem );
- mpData->ImplClearLayoutData();
-
- // recalculate ToolBox and redraw
- ImplInvalidate( bNewCalc );
-
- // Notify
- sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(mpData->m_aItems.size() - 1);
- CallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) );
-}
-
void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nBits, sal_uInt16 nPos )
{
SAL_WARN_IF( !nItemId, "vcl", "ToolBox::InsertItem(): ItemId == 0" );