[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source

Maxim Monastirsky momonasmon at gmail.com
Tue Nov 25 03:25:12 PST 2014


 cui/source/customize/cfg.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit e7f67732cfb9904b7667cf3e32097ea2c6ea0597
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Tue Nov 18 01:24:31 2014 +0200

    fdo#80280 Don't add items with no bitmaps
    
    (cherry picked from commit cf26921658c0905a4d2dda13f91e3db99c76ade6)
    
    Conflicts:
    	cui/source/customize/cfg.cxx
    
    Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530
    Reviewed-on: https://gerrit.libreoffice.org/13068
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 18181ee..6c64a2dd 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -4907,17 +4907,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
         if ( graphics.getLength() > 0 )
         {
             Image img = Image( graphics[ 0 ] );
-            aTbSymbol.InsertItem( nId, img, pConstIter->first );
+            if ( !img.GetBitmapEx().IsEmpty() )
+            {
+                aTbSymbol.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();
 
-            aTbSymbol.SetItemData(
-                nId, static_cast< void * > ( xGraphic.get() ) );
+                aTbSymbol.SetItemData(
+                    nId, static_cast< void * > ( xGraphic.get() ) );
 
-            ++nId;
+                ++nId;
+            }
         }
 
         ++pConstIter;


More information about the Libreoffice-commits mailing list