From 284ca1a5840c5fcbf4f9d1eff02ae607cdc2c222 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 28 May 2016 14:38:03 +0200 Subject: Convert RSC_TOOLBOX to scoped enum and drop unused (in .src files) constants Change-Id: I1ef085d128893dc3234592e248451f248efb08ba Reviewed-on: https://gerrit.libreoffice.org/25581 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/window/toolbox.cxx | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) (limited to 'vcl/source') diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 8cb37f236f34..3cb978abb14d 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1542,41 +1542,18 @@ void ToolBox::ImplLoadRes( const ResId& rResId ) DockingWindow::ImplLoadRes( rResId ); - sal_uLong nObjMask; + RscToolboxFlags nObjMask = (RscToolboxFlags)ReadLongRes(); - nObjMask = ReadLongRes(); - - if ( nObjMask & RSC_TOOLBOX_BUTTONTYPE ) + if ( nObjMask & RscToolboxFlags::ButtonType ) SetButtonType( (ButtonType)ReadLongRes() ); - if ( nObjMask & RSC_TOOLBOX_ALIGN ) + if ( nObjMask & RscToolboxFlags::Align ) SetAlign( (WindowAlign)ReadLongRes() ); - if ( nObjMask & RSC_TOOLBOX_LINECOUNT ) + if ( nObjMask & RscToolboxFlags::LineCount ) SetLineCount( sal::static_int_cast(ReadLongRes()) ); - if ( nObjMask & RSC_TOOLBOX_CUSTOMIZE ) - { - bool bCust = ReadShortRes(); - EnableCustomize( bCust ); - } - - if ( nObjMask & RSC_TOOLBOX_MENUSTRINGS ) - { - bool bCust = ReadShortRes(); - EnableMenuStrings( bCust ); - } - - if ( nObjMask & RSC_TOOLBOX_FLOATLINES ) - SetFloatingLines( ReadShortRes() ); - - if ( nObjMask & RSC_TOOLBOX_ITEMIMAGELIST ) - { - maImageList = ImageList( ResId( static_cast(GetClassRes()), *pMgr ) ); - IncrementRes( GetObjSizeRes( static_cast(GetClassRes()) ) ); - } - - if ( nObjMask & RSC_TOOLBOX_ITEMLIST ) + if ( nObjMask & RscToolboxFlags::ItemList ) { sal_uLong nEle = ReadLongRes(); -- cgit