dbaccess/source/ui/inc/sbamultiplex.hxx |    9 +++++++--
 sw/source/filter/ww8/docxsdrexport.cxx  |   13 ++++++++-----
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 4de30fa7fd6abb5c2ea2b63a0e306954f7acc1b1
Author: Caolán McNamara <[email protected]>
Date:   Thu Feb 6 09:40:48 2014 +0000

    Resolves: fdo#74499 crash on writing .docx
    
    Change-Id: If2d46e26ec6ffead1e283479c516131a2b66f50d

diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index b340083..d0deeb5 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -812,13 +812,16 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* 
pParentFrame, int nAnchorId)
                          FSEND);
 
     uno::Any aRotation ;
+    uno::Reference< drawing::XShape > xShape;
     const SdrObject* pSdrObj = rFrmFmt.FindRealSdrObject();
-    uno::Reference< drawing::XShape > 
xShape(((SdrObject*)pSdrObj)->getUnoShape(), uno::UNO_QUERY);
+    if (pSdrObj)
+        xShape = uno::Reference< drawing::XShape 
>(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY);
     uno::Reference< beans::XPropertySet > xPropertySet(xShape, uno::UNO_QUERY);
-    uno::Reference< beans::XPropertySetInfo > xPropSetInfo = 
xPropertySet->getPropertySetInfo();
+    uno::Reference< beans::XPropertySetInfo > xPropSetInfo;
+    if (xPropertySet.is())
+        xPropSetInfo = xPropertySet->getPropertySetInfo();
     sal_Int32 nRotation = 0;
-
-    if (xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
+    if (xPropSetInfo.is() && 
xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
     {
         uno::Sequence< beans::PropertyValue > propList;
         xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
@@ -858,7 +861,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* 
pParentFrame, int nAnchorId)
                          FSEND);
     pFS->endElementNS(XML_a, XML_xfrm);
     OUString shapeType = "rect";
-    if (xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
+    if (xPropSetInfo.is() && 
xPropSetInfo->hasPropertyByName("FrameInteropGrabBag"))
     {
         uno::Sequence< beans::PropertyValue > propList;
         xPropertySet->getPropertyValue("FrameInteropGrabBag") >>= propList;
commit a98a4f13e1c94c876613a4b9a95e38aed6ab2eaf
Author: Caolán McNamara <[email protected]>
Date:   Thu Feb 6 09:29:52 2014 +0000

    coverity#1158200 Dereference null return value
    
    Change-Id: I9d8215f2fc2ab93a0d4315a8ad71b64560b6d732

diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx 
b/dbaccess/source/ui/inc/sbamultiplex.hxx
index 9a09a88..8499f65 100644
--- a/dbaccess/source/ui/inc/sbamultiplex.hxx
+++ b/dbaccess/source/ui/inc/sbamultiplex.hxx
@@ -273,9 +273,14 @@ namespace dbaui
     {                                                                          
             \
         sal_Int32 nLen = 0;                                                    
             \
         ::com::sun::star::uno::Sequence< OUString > aContained = 
m_aListeners.getContainedTypes();   \
-        const OUString* pContained = aContained.getConstArray();               
      \
+        const OUString* pContained = aContained.getConstArray();               
             \
         for (   sal_Int32 i=0; i<aContained.getLength(); ++i, ++pContained)    
             \
-            nLen += m_aListeners.getContainer(*pContained)->getLength();       
             \
+        {                                                                      
             \
+            ::cppu::OInterfaceContainerHelper* pListeners = 
m_aListeners.getContainer(*pContained);  \
+            if (!pListeners)                                                   
             \
+                continue;                                                      
             \
+            nLen += pListeners->getLength();                                   
             \
+        }                                                                      
             \
         return nLen;                                                           
             \
     }                                                                          
             \
                                                                                
             \
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to