svx/source/unodraw/unoshap2.cxx |   21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

New commits:
commit 77c55e962140d0c822f05a5d972c450e807ab220
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Tue Jun 7 16:24:42 2016 +0200

    Any::getValue always returns non-null
    
    What this code looks like it wants to do is check whether rValue is either a
    Sequence<sal_Int8> or else a Reference to XBitmap or XGraphic.  It was
    introduced with 1ffd7e1accbee482d4bb6698d4ad145d8a6a780d "INTEGRATION: CWS
    impresstables2" which mentions "fixed merge error" multiple times in the 
commit
    message.
    
    Change-Id: I81467074efb433e0b52eb82e2c81d4b5890e67e9

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 1bf2fa4..e1543e5 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1414,21 +1414,18 @@ bool SvxGraphicObject::setPropertyValueImpl( const 
OUString& rName, const SfxIte
     {
     case OWN_ATTR_VALUE_FILLBITMAP:
     {
-        if( rValue.getValue() )
+        if( rValue.getValueType() == cppu::UnoType<uno::Sequence< sal_Int8 
>>::get() )
         {
-            if( rValue.getValueType() == cppu::UnoType<uno::Sequence< sal_Int8 
>>::get() )
-            {
-                uno::Sequence<sal_Int8> const * pSeq( 
static_cast<uno::Sequence<sal_Int8> const *>(rValue.getValue()) );
-                SvMemoryStream  aMemStm;
-                Graphic         aGraphic;
+            uno::Sequence<sal_Int8> const * pSeq( 
static_cast<uno::Sequence<sal_Int8> const *>(rValue.getValue()) );
+            SvMemoryStream  aMemStm;
+            Graphic         aGraphic;
 
-                aMemStm.SetBuffer( const_cast<css::uno::Sequence<sal_Int8> 
*>(pSeq)->getArray(), pSeq->getLength(), pSeq->getLength() );
+            aMemStm.SetBuffer( const_cast<css::uno::Sequence<sal_Int8> 
*>(pSeq)->getArray(), pSeq->getLength(), pSeq->getLength() );
 
-                if( GraphicConverter::Import( aMemStm, aGraphic ) == 
ERRCODE_NONE )
-                {
-                    
static_cast<SdrGrafObj*>(mpObj.get())->SetGraphic(aGraphic);
-                    bOk = true;
-                }
+            if( GraphicConverter::Import( aMemStm, aGraphic ) == ERRCODE_NONE )
+            {
+                static_cast<SdrGrafObj*>(mpObj.get())->SetGraphic(aGraphic);
+                bOk = true;
             }
         }
         else if( (rValue.getValueType() == cppu::UnoType<awt::XBitmap>::get()) 
|| (rValue.getValueType() == cppu::UnoType<graphic::XGraphic>::get()))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to