summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-11-18 01:24:31 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2014-11-18 12:36:04 +0200
commitcf26921658c0905a4d2dda13f91e3db99c76ade6 (patch)
tree63d545b08317a37ef0babd4ea169362eb62d30ff /cui/source
parent7ad6eb2c9b0b6e7f6d3993d293d8ee0cf3dcbc7f (diff)
fdo#80280 Don't add items with no bitmaps
Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfg.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index b00dcd0f97d0..b015f0835f45 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -4887,17 +4887,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
if ( graphics.getLength() > 0 )
{
Image img = Image( graphics[ 0 ] );
- pTbSymbol->InsertItem( nId, img, pConstIter->first );
+ if ( !img.GetBitmapEx().IsEmpty() )
+ {
+ pTbSymbol->InsertItem( nId, img, pConstIter->first );
- uno::Reference< graphic::XGraphic > xGraphic = graphics[ 0 ];
+ uno::Reference< graphic::XGraphic > xGraphic = graphics[ 0 ];
- if ( xGraphic.is() )
- xGraphic->acquire();
+ if ( xGraphic.is() )
+ xGraphic->acquire();
- pTbSymbol->SetItemData(
- nId, static_cast< void * > ( xGraphic.get() ) );
+ pTbSymbol->SetItemData(
+ nId, static_cast< void * > ( xGraphic.get() ) );
- ++nId;
+ ++nId;
+ }
}
++pConstIter;