Kaydet (Commit) cf269216 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

fdo#80280 Don't add items with no bitmaps

Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530
üst 7ad6eb2c
...@@ -4887,17 +4887,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow, ...@@ -4887,17 +4887,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window *pWindow,
if ( graphics.getLength() > 0 ) if ( graphics.getLength() > 0 )
{ {
Image img = Image( graphics[ 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() ) if ( xGraphic.is() )
xGraphic->acquire(); xGraphic->acquire();
pTbSymbol->SetItemData( pTbSymbol->SetItemData(
nId, static_cast< void * > ( xGraphic.get() ) ); nId, static_cast< void * > ( xGraphic.get() ) );
++nId; ++nId;
}
} }
++pConstIter; ++pConstIter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment