summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-05 21:24:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-06 09:06:20 +0100
commit3870de04eaed80d9eca22dc9cce2973b7ea4c649 (patch)
tree19bde25eeee8d5f6bf824f48e9ace4be2ec85ea8 /vcl
parent924eff5cf02844ae35d0345fe361be4323371b50 (diff)
drop now unused BitmapItem rsc fields
Change-Id: I02ed667a3573b3374fce069be0d32dbd91292e49
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/menu.cxx17
-rw-r--r--vcl/source/window/toolbox2.cxx13
2 files changed, 4 insertions, 26 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 120ff9ff9426..a13bc63bafcc 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -446,22 +446,9 @@ void Menu::InsertItem( const ResId& rResId )
aText = ReadStringRes();
// create item
- if ( nObjMask & RscMenuItem::Bitmap )
- {
- if ( !bSep )
- {
- Bitmap aBmp( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *pMgr ) );
- Image const aImg(aBmp);
- if ( !aText.isEmpty() )
- InsertItem( nItemId, aText, aImg, nStatus );
- else
- InsertItem( nItemId, aImg, nStatus );
- }
- IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
- }
- else if ( !bSep )
+ if (!bSep)
InsertItem(nItemId, aText, nStatus);
- if ( bSep )
+ else
InsertSeparator();
OUString aHelpText;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f35f2cd82146..12239a5b6891 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -377,7 +377,6 @@ void ToolBox::Select()
void ToolBox::InsertItem( const ResId& rResId )
{
RscToolboxItemFlags nObjMask;
- bool bImage = false; // has image
// create item
ImplToolItem aItem;
@@ -405,14 +404,6 @@ void ToolBox::InsertItem( const ResId& rResId )
aItem.maText = MnemonicGenerator::EraseAllMnemonicChars(aItem.maText);
}
- if ( nObjMask & RscToolboxItemFlags::Bitmap )
- {
- Bitmap aBmp = Bitmap( ResId( static_cast<RSHEADER_TYPE*>(GetClassRes()), *rResId.GetResMgr() ) );
- IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
- aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR );
- aItem.maImageOriginal = aItem.maImage;
- bImage = true;
- }
if ( nObjMask & RscToolboxItemFlags::Disable )
aItem.mbEnabled = ReadShortRes() == 0;
@@ -422,8 +413,8 @@ void ToolBox::InsertItem( const ResId& rResId )
if ( nObjMask & RscToolboxItemFlags::Command )
aItem.maCommandStr = ReadStringRes();
- // if no image is loaded, try to load one from the image list
- if ( !bImage && aItem.mnId )
+ // Try to load an image from the image list
+ if (aItem.mnId)
{
aItem.maImage = maImageList.GetImage( aItem.mnId );
aItem.maImageOriginal = aItem.maImage;