[Libreoffice-commits] core.git: 3 commits - include/xmloff sd/source xmloff/source

David Tardon dtardon at redhat.com
Tue Nov 15 18:59:49 UTC 2016


 include/xmloff/shapeexport.hxx     |    1 -
 sd/source/ui/unoidl/unoobj.cxx     |   12 +++---------
 xmloff/source/draw/shapeexport.cxx |    7 +++----
 3 files changed, 6 insertions(+), 14 deletions(-)

New commits:
commit 34ba29887fe2ad47c5a8663bbdc511d46ab732b2
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Nov 14 16:35:50 2016 +0100

    replace explicit delete and simplify
    
    Change-Id: I750a965195aef32b29bb98725fd1c74c876b051d

diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 83db0e6..ac8f484 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -19,6 +19,7 @@
 
 #include <sal/config.h>
 
+#include <memory>
 #include <utility>
 
 #include <com/sun/star/style/XStyle.hpp>
@@ -904,15 +905,8 @@ bool SdXShape::IsEmptyPresObj() const
         if( pTextObj == nullptr )
             return true;
 
-        OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
-        if( pParaObj )
-        {
-            delete pParaObj;
-        }
-        else
-        {
-            return true;
-        }
+        const std::unique_ptr<OutlinerParaObject> pParaObj(pTextObj->GetEditOutlinerParaObject());
+        return !pParaObj;
     }
 
     return false;
commit 0d97ac5ae3e92b1b04339e60e66ca8cb41a19609
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Nov 14 15:25:28 2016 +0100

    fix typo
    
    Change-Id: I2dd093a12518c2c23d9f1610fb8a4b45a94656ab

diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 3f269ef..a6656c7 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1471,7 +1471,7 @@ bool XMLShapeExport::ImpExportPresentationAttributes( const uno::Reference< bean
         uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
 
 
-        // is empty pes shape?
+        // is empty pres. shape?
         if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject"))
         {
             xPropSet->getPropertyValue("IsEmptyPresentationObject") >>= bIsEmpty;
commit 4ead110a8c574379545f9cf1d4a914c7bb43bc2a
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Nov 14 15:24:32 2016 +0100

    remove prop. name variable
    
    It is not used consistently anyway.
    
    Change-Id: Ia842668dfb36dc2a8fbf3b938758b81c78d5c868

diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index ce74b19..56588fa 100644
--- a/include/xmloff/shapeexport.hxx
+++ b/include/xmloff/shapeexport.hxx
@@ -186,7 +186,6 @@ private:
     const OUString                         msPrintable;
     const OUString                         msVisible;
 
-    const OUString                         msEmptyPres;
     const OUString                         msModel;
     const OUString                         msStartShape;
     const OUString                         msEndShape;
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index a22ee35..3f269ef 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -155,7 +155,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
     msZIndex( "ZOrder" ),
     msPrintable( "Printable" ),
     msVisible( "Visible" ),
-    msEmptyPres( "IsEmptyPresentationObject" ),
     msModel( "Model" ),
     msStartShape( "StartShape" ),
     msEndShape( "EndShape" ),
@@ -308,9 +307,9 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
         {
             uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
 
-            if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(msEmptyPres) )
+            if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject") )
             {
-                uno::Any aAny = xPropSet->getPropertyValue(msEmptyPres);
+                uno::Any aAny = xPropSet->getPropertyValue("IsEmptyPresentationObject");
                 aAny >>= bIsEmptyPresObj;
             }
 


More information about the Libreoffice-commits mailing list