[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Apr 4 03:09:16 PDT 2015


 writerfilter/source/rtftok/rtfvalue.cxx |   76 ++++++++++++++++----------------
 1 file changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 7f4405faf74eb7294921fc20c0acd18f11d03ef3
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Apr 4 11:05:51 2015 +0200

    Use std::make_shared<>
    
    Change-Id: Ifc728dc0b42d713a5eaa2fc22d3e71c6aa4f196d
    Reviewed-on: https://gerrit.libreoffice.org/15146
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 72b1207..e0bc59a 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -27,131 +27,131 @@ RTFValue::RTFValue(int nValue, const OUString& sValue,
                    const RTFShape& aShape)
     : m_nValue(nValue),
       m_sValue(sValue),
+      m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
+      m_pSprms(std::make_shared<RTFSprms>(rSprms)),
       m_xShape(xShape),
       m_xStream(xStream),
       m_xObject(xObject),
-      m_bForceString(bForceString)
+      m_bForceString(bForceString),
+      m_pShape(std::make_shared<RTFShape>(aShape))
 {
-    m_pAttributes.reset(new RTFSprms(rAttributes));
-    m_pSprms.reset(new RTFSprms(rSprms));
-    m_pShape.reset(new RTFShape(aShape));
 }
 
 RTFValue::RTFValue()
     : m_nValue(0),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(int nValue)
     : m_nValue(nValue),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(),
       m_bForceString(false)
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
     m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(const OUString& sValue, bool bForce)
     : m_nValue(),
       m_sValue(sValue),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(),
-      m_bForceString(bForce)
+      m_bForceString(bForce),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(RTFSprms rAttributes)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms(rAttributes));
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(RTFSprms rAttributes, RTFSprms rSprms)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>(rAttributes)),
+      m_pSprms(std::make_shared<RTFSprms>(rSprms)),
       m_xShape(),
       m_xStream(),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms(rAttributes));
-    m_pSprms.reset(new RTFSprms(rSprms));
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(uno::Reference<drawing::XShape> const& xShape)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(xShape),
       m_xStream(),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(uno::Reference<io::XInputStream> const& xStream)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(xStream),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(uno::Reference<embed::XEmbeddedObject> const& xObject)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(xObject),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>())
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape());
 }
 
 RTFValue::RTFValue(const RTFShape& aShape)
     : m_nValue(),
       m_sValue(),
+      m_pAttributes(std::make_shared<RTFSprms>()),
+      m_pSprms(std::make_shared<RTFSprms>()),
       m_xShape(),
       m_xStream(),
       m_xObject(),
-      m_bForceString(false)
+      m_bForceString(false),
+      m_pShape(std::make_shared<RTFShape>(aShape))
 {
-    m_pAttributes.reset(new RTFSprms());
-    m_pSprms.reset(new RTFSprms());
-    m_pShape.reset(new RTFShape(aShape));
 }
 
 RTFValue::~RTFValue()


More information about the Libreoffice-commits mailing list