summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-12 10:19:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-12 11:38:00 +0100
commit4cc4df51d962a9631da282d18e59aada35788a72 (patch)
tree74beec2853ce383da0afa8c89c22cd5292d97f14 /vcl/source
parent2811e4215abb998ebea65512d8dcd86697e3301e (diff)
no toolboxes are loaded from .src anymore
Change-Id: Ia2eabf157845b9b6b00b745332a558ffdd1e0ec7
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/toolbox.cxx54
-rw-r--r--vcl/source/window/toolbox2.cxx73
2 files changed, 0 insertions, 127 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index d55926e2db70..0ac14181e319 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1537,38 +1537,6 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
}
}
-void ToolBox::ImplLoadRes( const ResId& rResId )
-{
- ResMgr* pMgr = rResId.GetResMgr();
- if( ! pMgr )
- return;
-
- DockingWindow::ImplLoadRes( rResId );
-
- RscToolboxFlags nObjMask = (RscToolboxFlags)ReadLongRes();
-
- if ( nObjMask & RscToolboxFlags::ButtonType )
- SetButtonType( (ButtonType)ReadLongRes() );
-
- if ( nObjMask & RscToolboxFlags::Align )
- SetAlign( (WindowAlign)ReadLongRes() );
-
- if ( nObjMask & RscToolboxFlags::LineCount )
- SetLineCount( sal::static_int_cast<sal_uInt16>(ReadLongRes()) );
-
- if ( nObjMask & RscToolboxFlags::ItemList )
- {
- sal_uLong nEle = ReadLongRes();
-
- // insert item
- for ( sal_uLong i = 0; i < nEle; i++ )
- {
- InsertItem( ResId( static_cast<RSHEADER_TYPE *>(GetClassRes()), *pMgr ) );
- IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE *>(GetClassRes()) ) );
- }
- }
-}
-
void ToolBox::doDeferredInit(WinBits nBits)
{
VclPtr<vcl::Window> pParent = mpDialogParent;
@@ -1584,28 +1552,6 @@ ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) :
ImplInit( pParent, nStyle );
}
-ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId ) :
- DockingWindow( WINDOW_TOOLBOX )
-{
- SAL_INFO( "vcl.window", "vcl: ToolBox::ToolBox( vcl::Window* pParent, const ResId& rResId )" );
- ImplInitToolBoxData();
-
- rResId.SetRT( RSC_TOOLBOX );
- WinBits nStyle = ImplInitRes( rResId );
- ImplInit( pParent, nStyle );
- ImplLoadRes( rResId );
-
- // calculate size of floating windows and switch if the
- // toolbox is initially in floating mode
- if ( ImplIsFloatingMode() )
- mbHorz = true;
- else
- Resize();
-
- if ( !(nStyle & WB_HIDE) )
- Show();
-}
-
ToolBox::ToolBox(vcl::Window* pParent, const OString& rID,
const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
: DockingWindow(WINDOW_TOOLBOX)
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" );