lotuswordpro/inc/xfilter/xfcellstyle.hxx             |    4 +-
 lotuswordpro/inc/xfilter/xfframestyle.hxx            |    2 -
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx           |    2 -
 lotuswordpro/inc/xfilter/xfpagemaster.hxx            |    2 -
 lotuswordpro/inc/xfilter/xfparastyle.hxx             |    2 -
 lotuswordpro/inc/xfilter/xftablestyle.hxx            |    2 -
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx    |   12 +++---
 lotuswordpro/source/filter/lwpbackgroundstuff.hxx    |    2 -
 lotuswordpro/source/filter/lwpcelllayout.cxx         |   12 +++---
 lotuswordpro/source/filter/lwpframelayout.cxx        |   12 +++---
 lotuswordpro/source/filter/lwplayout.cxx             |   15 +++----
 lotuswordpro/source/filter/lwplayout.hxx             |    4 +-
 lotuswordpro/source/filter/lwppagelayout.cxx         |   36 +++++++++----------
 lotuswordpro/source/filter/lwppara.cxx               |    4 +-
 lotuswordpro/source/filter/lwptablelayout.cxx        |   12 +++---
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx   |   20 ++++------
 lotuswordpro/source/filter/xfilter/xfframestyle.cxx  |    4 +-
 lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx |    4 +-
 lotuswordpro/source/filter/xfilter/xfpagemaster.cxx  |    4 +-
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx   |    4 +-
 lotuswordpro/source/filter/xfilter/xftablestyle.cxx  |    4 +-
 21 files changed, 80 insertions(+), 83 deletions(-)

New commits:
commit 6e32cf8b654abc103f3f742b7b7ae0fff0e64f69
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Mar 6 09:46:35 2018 +0000

    ofz: memory leak
    
    Change-Id: Ida561d59f5fbd2b4dff5d0ef355a21a344a2afd2
    Reviewed-on: https://gerrit.libreoffice.org/50808
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index 6dc5724e7784..82730ed4005f 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -124,7 +124,7 @@ public:
     /**
      * descr:   set cell background image.
      */
-    void    SetBackImage(XFBGImage *pImage);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     virtual enumXFStyle GetStyleFamily() override;
 
@@ -139,7 +139,7 @@ private:
 
     double      m_fTextIndent;
     XFColor     m_aBackColor;
-    XFBGImage   *m_pBackImage;
+    std::unique_ptr<XFBGImage> m_xBackImage;
     XFMargins   m_aMargin;
     XFPadding   m_aPadding;
     rtl::Reference<XFFont> m_pFont;
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx 
b/lotuswordpro/inc/xfilter/xfframestyle.hxx
index 6fa40fe0bca0..20ec941fa6de 100644
--- a/lotuswordpro/inc/xfilter/xfframestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -115,7 +115,7 @@ public:
     /**
      * @descr:  set the background image of the frame.
      */
-    void    SetBackImage(XFBGImage *iamge);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     /**
      * @descr:  set the background color of the frame.
diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx 
b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
index 3207694bcb51..6bc8dd6f1977 100644
--- a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
@@ -107,7 +107,7 @@ public:
      */
     void    SetBorders(XFBorders *pBorders);
 
-    void    SetBackImage(XFBGImage *image);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     /**
      * @descr   Set header background color.
diff --git a/lotuswordpro/inc/xfilter/xfpagemaster.hxx 
b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
index 1de301d54125..ee326a88ab2c 100644
--- a/lotuswordpro/inc/xfilter/xfpagemaster.hxx
+++ b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
@@ -96,7 +96,7 @@ public:
 
     void    SetBackColor(XFColor color);
 
-    void    SetBackImage(XFBGImage *image);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     void    SetColumns(XFColumns *pColumns);
 
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx 
b/lotuswordpro/inc/xfilter/xfparastyle.hxx
index 2efced099158..051901381734 100644
--- a/lotuswordpro/inc/xfilter/xfparastyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -190,7 +190,7 @@ public:
      * @descr   Set background image of the paragraph.
      * @param   image the background image to set.
      */
-    void    SetBackImage(XFBGImage *image);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     /**
      * descr    You can only set one break property for every para style 
object.
diff --git a/lotuswordpro/inc/xfilter/xftablestyle.hxx 
b/lotuswordpro/inc/xfilter/xftablestyle.hxx
index 55b318c4f0a9..7fff8c45e6ad 100644
--- a/lotuswordpro/inc/xfilter/xftablestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xftablestyle.hxx
@@ -84,7 +84,7 @@ public:
 
     void    SetBackColor(XFColor const & color);
 
-    void    SetBackImage(XFBGImage *pImage);
+    void    SetBackImage(std::unique_ptr<XFBGImage>& rImage);
 
     virtual void    ToXml(IXFStream *pStrm) override;
 
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx 
b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
index 6aecf25ddcaf..3120e3927bb7 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
@@ -101,12 +101,12 @@ LwpColor* LwpBackgroundStuff::GetFillColor()
     return &m_aFillColor;
 }
 
-XFBGImage* LwpBackgroundStuff::GetFillPattern()
+std::unique_ptr<XFBGImage> LwpBackgroundStuff::GetFillPattern()
 {
     // not pattern fill?
     if (!IsPatternFill())
     {
-        return nullptr;
+        return std::unique_ptr<XFBGImage>();
     }
 
     // get pattern array from pattern table
@@ -151,15 +151,15 @@ XFBGImage* LwpBackgroundStuff::GetFillPattern()
     memcpy(pImageBuff, aPicMemStream.GetData(), nSize);
 
     // create XFBGImage object.
-    XFBGImage* pXFBGImage = new XFBGImage();
-    pXFBGImage->SetImageData(pImageBuff, nSize);
+    std::unique_ptr<XFBGImage> xXFBGImage(new XFBGImage);
+    xXFBGImage->SetImageData(pImageBuff, nSize);
 
     delete [] pImageBuff;
     pImageBuff = nullptr;
 
-    pXFBGImage->SetRepeate();
+    xXFBGImage->SetRepeate();
 
-    return pXFBGImage;
+    return xXFBGImage;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx 
b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
index ee2c4af4d5ec..e5bd1ad94b7b 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
@@ -150,7 +150,7 @@ private:
 public:
     void    Read(LwpObjectStream *pStrm);
     LwpColor* GetFillColor();
-    XFBGImage* GetFillPattern();
+    std::unique_ptr<XFBGImage> GetFillPattern();
 
     bool IsTransparent() { return (m_nID == BACK_TRANSPARENT); }
     bool IsPatternFill() { return (m_nID > 2 && m_nID < 72); }
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx 
b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 94acf950984b..db9279df6aa0 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -209,10 +209,10 @@ void LwpCellLayout::ApplyBorders(XFCellStyle *pCellStyle)
  */
 void LwpCellLayout::ApplyWatermark(XFCellStyle *pCellStyle)
 {
-    XFBGImage* pBGImage = GetXFBGImage();
-    if(pBGImage)
+    std::unique_ptr<XFBGImage> xBGImage(GetXFBGImage());
+    if (xBGImage)
     {
-        pCellStyle->SetBackImage(pBGImage);
+        pCellStyle->SetBackImage(xBGImage);
     }
 }
 
@@ -223,10 +223,10 @@ void LwpCellLayout::ApplyWatermark(XFCellStyle 
*pCellStyle)
  */
 void LwpCellLayout::ApplyPatternFill(XFCellStyle* pCellStyle)
 {
-    XFBGImage* pXFBGImage = GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetFillPattern());
+    if (xXFBGImage)
     {
-        pCellStyle->SetBackImage(pXFBGImage);
+        pCellStyle->SetBackImage(xXFBGImage);
     }
 }
 
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx 
b/lotuswordpro/source/filter/lwpframelayout.cxx
index ab51c1527d6c..419e790cb462 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -531,10 +531,10 @@ void LwpFrame::ApplyPosType(XFFrameStyle* pFrameStyle)
 */
 void LwpFrame::ApplyWatermark(XFFrameStyle *pFrameStyle)
 {
-    XFBGImage* pBGImage = m_pLayout->GetXFBGImage();
-    if(pBGImage)
+    std::unique_ptr<XFBGImage> xBGImage(m_pLayout->GetXFBGImage());
+    if (xBGImage)
     {
-        pFrameStyle->SetBackImage(pBGImage);
+        pFrameStyle->SetBackImage(xBGImage);
         //set watermark transparent
         rtl::Reference<LwpVirtualLayout> 
xWaterMarkLayout(m_pLayout->GetWaterMarkLayout());
         LwpMiddleLayout* pLay = 
dynamic_cast<LwpMiddleLayout*>(xWaterMarkLayout.get());
@@ -553,10 +553,10 @@ void LwpFrame::ApplyWatermark(XFFrameStyle *pFrameStyle)
  */
 void LwpFrame::ApplyPatternFill(XFFrameStyle* pFrameStyle)
 {
-    XFBGImage* pXFBGImage = m_pLayout->GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(m_pLayout->GetFillPattern());
+    if (xXFBGImage)
     {
-        pFrameStyle->SetBackImage(pXFBGImage);
+        pFrameStyle->SetBackImage(xXFBGImage);
     }
 }
 
diff --git a/lotuswordpro/source/filter/lwplayout.cxx 
b/lotuswordpro/source/filter/lwplayout.cxx
index 235a4515c6fa..5f24dfa64932 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -1100,7 +1100,7 @@ bool LwpMiddleLayout::IsPatternFill()
 * @descr:   Get the fill pattern style. Data are saved in a XFBGImage object
 * @return:  the fill pattern style.
 */
-XFBGImage* LwpMiddleLayout::GetFillPattern()
+std::unique_ptr<XFBGImage> LwpMiddleLayout::GetFillPattern()
 {
     LwpBackgroundStuff* pBackgroundStuff = GetBackgroundStuff();
     if (pBackgroundStuff)
@@ -1108,8 +1108,7 @@ XFBGImage* LwpMiddleLayout::GetFillPattern()
         return pBackgroundStuff->GetFillPattern();
     }
 
-    return nullptr;
-
+    return std::unique_ptr<XFBGImage>();
 }
 
 /**
@@ -1360,8 +1359,10 @@ rtl::Reference<LwpVirtualLayout> 
LwpMiddleLayout::GetWaterMarkLayout()
 * @descr:   Create and reture xfbgimage object for watermark
 *
 */
-XFBGImage* LwpMiddleLayout::GetXFBGImage()
+std::unique_ptr<XFBGImage> LwpMiddleLayout::GetXFBGImage()
 {
+    std::unique_ptr<XFBGImage> xXFBGImage;
+
     rtl::Reference<LwpVirtualLayout> xWaterMarkLayout(GetWaterMarkLayout());
     LwpMiddleLayout* pLay = 
dynamic_cast<LwpMiddleLayout*>(xWaterMarkLayout.get());
     if(pLay)
@@ -1370,8 +1371,7 @@ XFBGImage* LwpMiddleLayout::GetXFBGImage()
         LwpGraphicObject* pGrfObj = 
dynamic_cast<LwpGraphicObject*>(pLay->GetContent().obj().get());
         if(pGrfObj)
         {
-            std::unique_ptr<XFBGImage> xXFBGImage(new XFBGImage);
-
+            xXFBGImage.reset(new XFBGImage);
             if(pGrfObj->IsLinked())
             {
                 //set file link
@@ -1405,10 +1405,9 @@ XFBGImage* LwpMiddleLayout::GetXFBGImage()
                     xXFBGImage->SetStretch();
                 }
             }
-            return xXFBGImage.release();
         }
     }
-    return nullptr;
+    return xXFBGImage;
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwplayout.hxx 
b/lotuswordpro/source/filter/lwplayout.hxx
index 94adf4ee6813..4ec293c06cbb 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -360,7 +360,7 @@ public:
     virtual bool HonorProtection() override;
     virtual bool IsProtected() override;
     rtl::Reference<LwpVirtualLayout> GetWaterMarkLayout();
-    XFBGImage* GetXFBGImage();
+    std::unique_ptr<XFBGImage> GetXFBGImage();
     bool GetUsePrinterSettings();
 
     LwpLayoutScale* GetLayoutScale(){return 
dynamic_cast<LwpLayoutScale*>(m_LayScale.obj().get());}
@@ -378,7 +378,7 @@ public:
     LwpPoint GetOrigin();
 
     bool IsPatternFill();
-    XFBGImage* GetFillPattern();
+    std::unique_ptr<XFBGImage> GetFillPattern();
 
     //Check whether there are contents in the layout
     virtual bool HasContent() override;
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx 
b/lotuswordpro/source/filter/lwppagelayout.cxx
index e63691d7b59b..de414e5ed50c 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -162,10 +162,10 @@ void LwpPageLayout::ParseGeometry(XFPageMaster* pm1)
 */
 void LwpPageLayout::ParseWaterMark(XFPageMaster *pm1)
 {
-    XFBGImage* pXFBGImage = GetXFBGImage();
-    if(pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
+    if (xXFBGImage)
     {
-        pm1->SetBackImage(pXFBGImage);
+        pm1->SetBackImage(xXFBGImage);
     }
 }
 
@@ -214,10 +214,10 @@ void LwpPageLayout::ParseShadow(XFPageMaster *pm1)
 */
 void LwpPageLayout::ParsePatternFill(XFPageMaster* pm1)
 {
-    XFBGImage* pXFBGImage = GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetFillPattern());
+    if (xXFBGImage)
     {
-        pm1->SetBackImage(pXFBGImage);
+        pm1->SetBackImage(xXFBGImage);
     }
 }
 /**
@@ -834,10 +834,10 @@ void LwpHeaderLayout::ParseShadow(XFHeaderStyle* 
pHeaderStyle)
 */
 void LwpHeaderLayout::ParsePatternFill(XFHeaderStyle* pHeaderStyle)
 {
-    XFBGImage* pXFBGImage = GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetFillPattern());
+    if (xXFBGImage)
     {
-        pHeaderStyle->SetBackImage(pXFBGImage);
+        pHeaderStyle->SetBackImage(xXFBGImage);
     }
 }
 /**
@@ -867,10 +867,10 @@ void LwpHeaderLayout::ParseBackColor(XFHeaderStyle* 
pHeaderStyle)
 
 void LwpHeaderLayout::ParseWaterMark(XFHeaderStyle * pHeaderStyle)
 {
-    XFBGImage* pXFBGImage = GetXFBGImage();
-    if(pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
+    if (xXFBGImage)
     {
-        pHeaderStyle->SetBackImage(pXFBGImage);
+        pHeaderStyle->SetBackImage(xXFBGImage);
     }
 }
 //End by
@@ -995,10 +995,10 @@ void LwpFooterLayout::ParseShadow(XFFooterStyle* 
pFooterStyle)
 */
 void LwpFooterLayout::ParsePatternFill(XFFooterStyle* pFooterStyle)
 {
-    XFBGImage* pXFBGImage = GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetFillPattern());
+    if (xXFBGImage)
     {
-        pFooterStyle->SetBackImage(pXFBGImage);
+        pFooterStyle->SetBackImage(xXFBGImage);
     }
 }
 /**
@@ -1053,10 +1053,10 @@ void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1)
 
 void LwpFooterLayout::ParseWaterMark(XFFooterStyle * pFooterStyle)
 {
-    XFBGImage* pXFBGImage = GetXFBGImage();
-    if(pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetXFBGImage());
+    if (xXFBGImage)
     {
-        pFooterStyle->SetBackImage(pXFBGImage);
+        pFooterStyle->SetBackImage(xXFBGImage);
     }
 }
 
diff --git a/lotuswordpro/source/filter/lwppara.cxx 
b/lotuswordpro/source/filter/lwppara.cxx
index 0175e54ae08a..b0b16f5f48e3 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -409,8 +409,8 @@ void LwpPara::RegisterStyle()
                     {
                         if (rBGStuff.IsPatternFill())
                         {
-                            XFBGImage* pXFBGImage = rBGStuff.GetFillPattern();
-                            xOverStyle->SetBackImage(pXFBGImage);
+                            std::unique_ptr<XFBGImage> 
xXFBGImage(rBGStuff.GetFillPattern());
+                            xOverStyle->SetBackImage(xXFBGImage);
                         }
                         else
                         {
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx 
b/lotuswordpro/source/filter/lwptablelayout.cxx
index f12203db0c60..c4a24347b0c4 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -277,10 +277,10 @@ void LwpSuperTableLayout::ApplyShadow(XFTableStyle 
*pTableStyle)
  */
 void LwpSuperTableLayout::ApplyPatternFill(XFTableStyle* pTableStyle)
 {
-    XFBGImage* pXFBGImage = GetFillPattern();
-    if (pXFBGImage)
+    std::unique_ptr<XFBGImage> xXFBGImage(GetFillPattern());
+    if (xXFBGImage)
     {
-        pTableStyle->SetBackImage(pXFBGImage);
+        pTableStyle->SetBackImage(xXFBGImage);
     }
 }
 
@@ -321,10 +321,10 @@ void LwpSuperTableLayout::ApplyBackColor(XFTableStyle 
*pTableStyle)
  */
 void LwpSuperTableLayout::ApplyWatermark(XFTableStyle *pTableStyle)
 {
-    XFBGImage* pBGImage = GetXFBGImage();
-    if(pBGImage)
+    std::unique_ptr<XFBGImage> xBGImage(GetXFBGImage());
+    if (xBGImage)
     {
-        pTableStyle->SetBackImage(pBGImage);
+        pTableStyle->SetBackImage(xBGImage);
     }
 }
 /**
diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
index 7366bc71a22d..c89578be07b1 100644
--- a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
@@ -66,7 +66,6 @@ XFCellStyle::XFCellStyle()
     : m_eHoriAlign(enumXFAlignNone)
     , m_eVertAlign(enumXFAlignNone)
     , m_fTextIndent(0)
-    , m_pBackImage(nullptr)
     , m_pBorders(nullptr)
     , m_bWrapText(false)
 {}
@@ -92,10 +91,9 @@ void    XFCellStyle::SetBackColor(XFColor const & color)
     m_aBackColor = color;
 }
 
-void    XFCellStyle::SetBackImage(XFBGImage *pImage)
+void    XFCellStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    delete m_pBackImage;
-    m_pBackImage = pImage;
+    m_xBackImage = std::move(rImage);
 }
 
 void    XFCellStyle::SetBorders(XFBorders *pBorders)
@@ -175,16 +173,16 @@ bool    XFCellStyle::Equal(IXFStyle *pStyle)
         return false;
 
     //if there is backimage
-    if( m_pBackImage )
+    if (m_xBackImage)
     {
-        if( !pOther->m_pBackImage )
+        if( !pOther->m_xBackImage )
             return false;
-        if( !m_pBackImage->Equal(pOther) )
+        if( !m_xBackImage->Equal(pOther) )
             return false;
     }
     else
     {
-        if( pOther->m_pBackImage )
+        if( pOther->m_xBackImage )
             return false;
     }
 
@@ -243,7 +241,7 @@ void XFCellStyle::ToXml(IXFStream *pStrm)
         m_pBorders->ToXml(pStrm);
 
     //background color:
-    if( m_aBackColor.IsValid() && !m_pBackImage )
+    if( m_aBackColor.IsValid() && !m_xBackImage )
     {
         pAttrList->AddAttribute("fo:background-color", m_aBackColor.ToString() 
);
     }
@@ -253,8 +251,8 @@ void XFCellStyle::ToXml(IXFStream *pStrm)
 
     pStrm->StartElement("style:properties");
 
-    if( m_pBackImage )
-        m_pBackImage->ToXml(pStrm);
+    if( m_xBackImage )
+        m_xBackImage->ToXml(pStrm);
 
     pStrm->EndElement("style:properties");
 
diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
index f40ee4651540..51e715f6a134 100644
--- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -95,9 +95,9 @@ void    XFFrameStyle::SetShadow(XFShadow *pShadow)
     m_pShadow.reset(pShadow);
 }
 
-void    XFFrameStyle::SetBackImage(XFBGImage *image)
+void    XFFrameStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    m_pBGImage.reset(image);
+    m_pBGImage = std::move(rImage);
 }
 
 enumXFStyle XFFrameStyle::GetStyleFamily()
diff --git a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
index d2afc95ecc67..f8c17cd2d316 100644
--- a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
@@ -108,9 +108,9 @@ void    XFHeaderStyle::SetBorders(XFBorders *pBorders)
     m_pBorders.reset(pBorders);
 }
 
-void    XFHeaderStyle::SetBackImage(XFBGImage *image)
+void    XFHeaderStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    m_pBGImage.reset( image );
+    m_pBGImage = std::move(rImage);
 }
 
 void    XFHeaderStyle::SetBackColor(XFColor color)
diff --git a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx 
b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
index ba69c6419912..62f2c38538da 100644
--- a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
@@ -125,9 +125,9 @@ void    XFPageMaster::SetBackColor(XFColor color)
     m_aBackColor = color;
 }
 
-void    XFPageMaster::SetBackImage(XFBGImage *image)
+void    XFPageMaster::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    m_pBGImage.reset( image );
+    m_pBGImage = std::move(rImage);
 }
 
 void    XFPageMaster::SetColumns(XFColumns *pColumns)
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx 
b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
index 9336e5374c55..0f8369d629d5 100644
--- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
@@ -224,9 +224,9 @@ void    XFParaStyle::SetBackColor(XFColor const & color)
     m_nFlag |= XFPARA_FLAG_BACKCOLOR;
 }
 
-void    XFParaStyle::SetBackImage(XFBGImage *image)
+void    XFParaStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    m_pBGImage.reset( image );
+    m_pBGImage = std::move(rImage);
 }
 
 void    XFParaStyle::SetBorders(XFBorders *pBorders)
diff --git a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx 
b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
index 0679e41de26f..cc6cdbcfab9a 100644
--- a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
@@ -70,9 +70,9 @@ XFTableStyle::~XFTableStyle()
 {
 }
 
-void    XFTableStyle::SetBackImage(XFBGImage *pImage)
+void    XFTableStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
 {
-    m_pBGImage.reset( pImage );
+    m_pBGImage = std::move(rImage);
 }
 
 enumXFStyle XFTableStyle::GetStyleFamily()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to