[Libreoffice-commits] core.git: 2 commits - lotuswordpro/inc lotuswordpro/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 7 10:40:18 UTC 2019
lotuswordpro/inc/lwptools.hxx | 4 +-
lotuswordpro/inc/xfilter/xfframestyle.hxx | 2 -
lotuswordpro/inc/xfilter/xfheaderstyle.hxx | 2 -
lotuswordpro/inc/xfilter/xfpagemaster.hxx | 2 -
lotuswordpro/source/filter/localtime.cxx | 5 +--
lotuswordpro/source/filter/lwpcelllayout.cxx | 6 +--
lotuswordpro/source/filter/lwpframelayout.cxx | 4 +-
lotuswordpro/source/filter/lwpfribmark.cxx | 8 ++--
lotuswordpro/source/filter/lwplayout.cxx | 4 +-
lotuswordpro/source/filter/lwplayout.hxx | 2 -
lotuswordpro/source/filter/lwppagelayout.cxx | 12 +++----
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx | 30 +++++++-----------
lotuswordpro/source/filter/lwptools.cxx | 10 ++----
lotuswordpro/source/filter/tocread.cxx | 18 ++++------
lotuswordpro/source/filter/xfilter/xfframestyle.cxx | 4 +-
lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx | 4 +-
lotuswordpro/source/filter/xfilter/xfpagemaster.cxx | 6 +--
17 files changed, 54 insertions(+), 69 deletions(-)
New commits:
commit c4331c0b6a12b541a5adee6374f9acf70c3dd6fd
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jan 7 08:25:56 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jan 7 11:40:09 2019 +0100
use unique_ptr in LwpTools::GetSystemDateStyle
Change-Id: I6ea90be5736982422aaa45c7147beec1cfd5430b
Reviewed-on: https://gerrit.libreoffice.org/65918
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/lotuswordpro/inc/lwptools.hxx b/lotuswordpro/inc/lwptools.hxx
index a0ec4bae29cc..3013c20435da 100644
--- a/lotuswordpro/inc/lwptools.hxx
+++ b/lotuswordpro/inc/lwptools.hxx
@@ -101,8 +101,8 @@ public:
static OUString convertToFileUrl(const OString& fileName);
static OUString DateTimeToOUString(const LtTm& dt);
- static XFDateStyle* GetSystemDateStyle(bool bLongFormat);
- static XFTimeStyle* GetSystemTimeStyle();
+ static std::unique_ptr<XFDateStyle> GetSystemDateStyle(bool bLongFormat);
+ static std::unique_ptr<XFTimeStyle> GetSystemTimeStyle();
};
inline double LwpTools::ConvertFromUnits(sal_Int32 nUnits)
diff --git a/lotuswordpro/source/filter/localtime.cxx b/lotuswordpro/source/filter/localtime.cxx
index 39b6e0212058..9532cbbdcba8 100644
--- a/lotuswordpro/source/filter/localtime.cxx
+++ b/lotuswordpro/source/filter/localtime.cxx
@@ -56,6 +56,7 @@
#include <localtime.hxx>
#include <limits.h>
#include <unicode/timezone.h>
+#include <memory>
const long DAY_SEC =24 * 60 * 60;
const long YEAR_SEC = 365 * DAY_SEC;
@@ -174,9 +175,9 @@ bool LtgLocalTime(long rtime,LtTm& rtm)
if ((rtime > 3 * DAY_SEC)&&(rtime < LONG_MAX - 3 * DAY_SEC))
{
- icu::TimeZone* pLocalZone = icu::TimeZone::createDefault();
+ std::unique_ptr<icu::TimeZone> pLocalZone(icu::TimeZone::createDefault());
long offset = (pLocalZone->getRawOffset())/1000;
- delete pLocalZone;
+ pLocalZone.reset();
long ltime = rtime + offset;
return LtgGmTime(ltime,rtm);
}
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx
index 307b3e6f0df9..878b37d3d28e 100644
--- a/lotuswordpro/source/filter/lwpfribmark.cxx
+++ b/lotuswordpro/source/filter/lwpfribmark.cxx
@@ -398,11 +398,11 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
{
if (sFormula == "%FLSystemShortDate")
{
- pDateStyle.reset( LwpTools::GetSystemDateStyle(false) );
+ pDateStyle = LwpTools::GetSystemDateStyle(false);
}
else if (sFormula == "%FLSystemLongDate")
{
- pDateStyle.reset( LwpTools::GetSystemDateStyle(true) );
+ pDateStyle = LwpTools::GetSystemDateStyle(true);
}
else if (sFormula == "%FLISODate1" || sFormula == "%FLYYYY/MM/DD" )
{
@@ -868,7 +868,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
//TIME
else if (sFormula == "%FLSystemTime")
{
- pTimeStyle.reset(LwpTools::GetSystemTimeStyle());
+ pTimeStyle = LwpTools::GetSystemTimeStyle();
}
else if (sFormula == "%FLISOTime1" || sFormula == "%FLH:mm:SS")
{
@@ -1018,7 +1018,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
{
if (sFormula == "%Da")
{
- pDateStyle.reset(LwpTools::GetSystemDateStyle(false));
+ pDateStyle = LwpTools::GetSystemDateStyle(false);
}
else if (sFormula == "%DB" || sFormula == "%Db")
{
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index 0f5ae98e7496..bd8ad0e067ba 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -233,7 +233,7 @@ OUString LwpTools::DateTimeToOUString(const LtTm &dt)
/**
* @descr get the system date format
*/
-XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
+std::unique_ptr<XFDateStyle> LwpTools::GetSystemDateStyle(bool bLongFormat)
{
icu::DateFormat::EStyle style;
if (bLongFormat)
@@ -268,7 +268,7 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
// we parse pattern string letter by letter and get the time format.
UChar cSymbol;
UChar cTmp;
- XFDateStyle* pDateStyle = new XFDateStyle;
+ std::unique_ptr<XFDateStyle> pDateStyle(new XFDateStyle);
for (int32_t i=0;i<nLengthNeed;)
{
@@ -594,7 +594,6 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
{
if ((cSymbol>='A' && cSymbol<='Z') || (cSymbol>='a' && cSymbol<='z') )
{
- delete pDateStyle;
return nullptr;
}
else//TEXT
@@ -628,7 +627,7 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
/**
* @descr get the system time format
*/
-XFTimeStyle* LwpTools::GetSystemTimeStyle()
+std::unique_ptr<XFTimeStyle> LwpTools::GetSystemTimeStyle()
{
//1 get locale for system
icu::Locale aLocale( LanguageTagIcu::getIcuLocale( Application::GetSettings().GetLanguageTag()));
@@ -658,7 +657,7 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle()
// for time format ,for there is not date info,we can only parse the letter representing time.
UChar cSymbol;
UChar cTmp;
- XFTimeStyle* pTimeStyle = new XFTimeStyle;
+ std::unique_ptr<XFTimeStyle> pTimeStyle(new XFTimeStyle);
for (int32_t i=0;i<nLengthNeed;)
{
@@ -817,7 +816,6 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle()
{
if ((cSymbol>='A' && cSymbol<='Z') || (cSymbol>='a' && cSymbol<='z') )
{
- delete pTimeStyle;
return nullptr;
}
else//TEXT
commit 05f12ce00f03be685df9a392001c2ae5f3258edf
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jan 7 08:36:45 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jan 7 11:39:58 2019 +0100
use unique_ptr in lotuswordpro
Change-Id: I49ae12639d1a5adab25407115cf65ebcfe3936c9
Reviewed-on: https://gerrit.libreoffice.org/65920
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx b/lotuswordpro/inc/xfilter/xfframestyle.hxx
index 20ec941fa6de..0af5e546637d 100644
--- a/lotuswordpro/inc/xfilter/xfframestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -100,7 +100,7 @@ public:
/**
* @descr: set the border property of the frame.
*/
- void SetBorders(XFBorders *pBorders);
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
/**
* @descr: set the column property of the frame.
diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
index 6bc8dd6f1977..7e5a3bda9e92 100644
--- a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
@@ -105,7 +105,7 @@ public:
/**
* @descr Set header borders.
*/
- void SetBorders(XFBorders *pBorders);
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
void SetBackImage(std::unique_ptr<XFBGImage>& rImage);
diff --git a/lotuswordpro/inc/xfilter/xfpagemaster.hxx b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
index ee326a88ab2c..40d19074af58 100644
--- a/lotuswordpro/inc/xfilter/xfpagemaster.hxx
+++ b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
@@ -90,7 +90,7 @@ public:
void SetPageUsage(enumXFPageUsage usage);
- void SetBorders(XFBorders *pBorders);
+ void SetBorders(std::unique_ptr<XFBorders> pBorders);
void SetShadow(XFShadow *pShadow);
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 2d25248c6af7..373656132adb 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -438,7 +438,7 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
LwpCellLayout * pLeftNeighbour = GetCellByRowCol(nRow, GetLeftColID(nCol), pTableLayout);
if (pLeftNeighbour)
{
- XFBorders * pNeighbourBorders = pLeftNeighbour->GetXFBorders();
+ std::unique_ptr<XFBorders> pNeighbourBorders = pLeftNeighbour->GetXFBorders();
if (pNeighbourBorders)
{
XFBorder& rRightBorder = pNeighbourBorders->GetRight();
@@ -449,7 +449,6 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
// we should not ignored it
bNoLeftBorder = true;
}
- delete pNeighbourBorders;
}
}
@@ -457,7 +456,7 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
LwpCellLayout * pBelowNeighbour = GetCellByRowCol(GetBelowRowID(nRow), nCol, pTableLayout);
if (pBelowNeighbour) //&& (eType == enumRightNotLastCellBorder || eType == enumLeftNotLastCellBorder) )
{
- XFBorders * pBelowBorders = pBelowNeighbour->GetXFBorders();
+ std::unique_ptr<XFBorders> pBelowBorders = pBelowNeighbour->GetXFBorders();
if (pBelowBorders)
{
XFBorder& rTopBorder = pBelowBorders->GetTop();
@@ -468,7 +467,6 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
// we should not ignored it
bNoBottomBorder = true;
}
- delete pBelowBorders;
}
}
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index 5aa92128f6d8..3e6d9580f4e6 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -346,10 +346,10 @@ void LwpFrame::ApplyPadding(XFFrameStyle *pFrameStyle)
*/
void LwpFrame::ApplyBorders(XFFrameStyle *pFrameStyle)
{
- XFBorders* pBordres = m_pLayout->GetXFBorders();
+ std::unique_ptr<XFBorders> pBordres = m_pLayout->GetXFBorders();
if(pBordres)
{
- pFrameStyle->SetBorders(pBordres);
+ pFrameStyle->SetBorders(std::move(pBordres));
}
}
/**
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx
index ce17fab7970f..bcc9482dc0ea 100644
--- a/lotuswordpro/source/filter/lwplayout.cxx
+++ b/lotuswordpro/source/filter/lwplayout.cxx
@@ -843,7 +843,7 @@ LwpBackgroundStuff* LwpMiddleLayout::GetBackgroundStuff()
/**
* @descr: create xfborder.
*/
-XFBorders* LwpMiddleLayout::GetXFBorders()
+std::unique_ptr<XFBorders> LwpMiddleLayout::GetXFBorders()
{
LwpBorderStuff* pBorderStuff = GetBorderStuff();
if(pBorderStuff&&pBorderStuff->GetSide() != 0)
@@ -861,7 +861,7 @@ XFBorders* LwpMiddleLayout::GetXFBorders()
LwpParaStyle::ApplySubBorder(pBorderStuff, nC, xXFBorders.get());
}
}
- return xXFBorders.release();
+ return xXFBorders;
}
return nullptr;
}
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx
index 1e07f4b1ae14..5cb97064cbf3 100644
--- a/lotuswordpro/source/filter/lwplayout.hxx
+++ b/lotuswordpro/source/filter/lwplayout.hxx
@@ -352,7 +352,7 @@ public:
LwpBackgroundStuff* GetBackgroundStuff();
LwpLayoutGeometry* GetGeometry();
enumXFTextDir GetTextDirection();
- XFBorders* GetXFBorders();
+ std::unique_ptr<XFBorders> GetXFBorders();
LwpColor* GetBackColor();
virtual bool IsAutoGrow() override;
virtual bool IsAutoGrowUp() override;
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index 2ce6bc94afe7..16173371c0d8 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -189,10 +189,10 @@ void LwpPageLayout::ParseColumns(XFPageMaster * pm1)
*/
void LwpPageLayout::ParseBorders(XFPageMaster *pm1)
{
- XFBorders* pBordres = GetXFBorders();
+ std::unique_ptr<XFBorders> pBordres = GetXFBorders();
if(pBordres)
{
- pm1->SetBorders(pBordres);
+ pm1->SetBorders(std::move(pBordres));
}
}
@@ -813,10 +813,10 @@ void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1)
void LwpHeaderLayout::ParseBorder(XFHeaderStyle* pHeaderStyle)
{
- XFBorders* pBordres = GetXFBorders();
+ std::unique_ptr<XFBorders> pBordres = GetXFBorders();
if(pBordres)
{
- pHeaderStyle->SetBorders(pBordres);
+ pHeaderStyle->SetBorders(std::move(pBordres));
}
}
@@ -975,10 +975,10 @@ void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle)
void LwpFooterLayout::ParseBorder(XFFooterStyle* pFooterStyle)
{
- XFBorders* pBordres = GetXFBorders();
+ std::unique_ptr<XFBorders> pBordres = GetXFBorders();
if(pBordres)
{
- pFooterStyle->SetBorders(pBordres);
+ pFooterStyle->SetBorders(std::move(pBordres));
}
}
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index e77c45138649..036f0ea7209d 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -319,7 +319,7 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
unsigned char recType(0);
m_pStream->ReadUChar(recType);
- LwpDrawObj* pDrawObj = nullptr;
+ std::unique_ptr<LwpDrawObj> pDrawObj;
XFFrame* pRetObjct = nullptr;
switch(recType)
@@ -327,52 +327,52 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
case OT_PERPLINE://fall-through
case OT_LINE:
{
- pDrawObj = new LwpDrawLine(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawLine(m_pStream, &m_aTransformData));
break;
}
case OT_POLYLINE:
{
- pDrawObj = new LwpDrawPolyLine(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawPolyLine(m_pStream, &m_aTransformData));
break;
}
case OT_POLYGON:
{
- pDrawObj = new LwpDrawPolygon(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawPolygon(m_pStream, &m_aTransformData));
pDrawObj->SetObjectType(OT_POLYGON);
break;
}
case OT_SQUARE://fall-through
case OT_RECT:
{
- pDrawObj = new LwpDrawRectangle(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawRectangle(m_pStream, &m_aTransformData));
break;
}
case OT_RNDSQUARE://fall-through
case OT_RNDRECT:
{
- pDrawObj = new LwpDrawRectangle(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawRectangle(m_pStream, &m_aTransformData));
pDrawObj->SetObjectType(OT_RNDRECT);
break;
}
case OT_CIRCLE://fall-through
case OT_OVAL:
{
- pDrawObj = new LwpDrawEllipse(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawEllipse(m_pStream, &m_aTransformData));
break;
}
case OT_ARC:
{
- pDrawObj = new LwpDrawArc(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawArc(m_pStream, &m_aTransformData));
break;
}
case OT_TEXT:
{
- pDrawObj = new LwpDrawTextBox(m_pStream);
+ pDrawObj.reset(new LwpDrawTextBox(m_pStream));
break;
}
case OT_TEXTART:
{
- pDrawObj = new LwpDrawTextArt(m_pStream, &m_aTransformData);
+ pDrawObj.reset(new LwpDrawTextArt(m_pStream, &m_aTransformData));
pDrawObj->SetObjectType(OT_TEXTART);
break;
}
@@ -380,7 +380,7 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
{
m_pStream->SeekRel(2);
// read out the object header
- pDrawObj = new LwpDrawGroup(m_pStream);
+ pDrawObj.reset(new LwpDrawGroup(m_pStream));
pRetObjct = CreateDrawGroupObject();
@@ -396,7 +396,7 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
break;
}
case OT_BITMAP:
- pDrawObj = new LwpDrawBitmap(m_pStream);
+ pDrawObj.reset(new LwpDrawBitmap(m_pStream));
pDrawObj->SetObjectType(OT_BITMAP);
break;
}
@@ -407,12 +407,6 @@ XFFrame* LwpSdwGroupLoaderV0102::CreateDrawObject()
pRetObjct = pDrawObj->CreateXFDrawObject();
}
- if (pDrawObj)
- {
- delete pDrawObj;
- pDrawObj = nullptr;
- }
-
return pRetObjct;
}
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index baf84184319b..8cc0d7cdb9ab 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -271,23 +271,21 @@ CBenTOCReader::ReadTOC()
#define STACK_BUFFER_SIZE 256
char sStackBuffer[STACK_BUFFER_SIZE];
- char * sAllocBuffer;
+ std::unique_ptr<char[]> sAllocBuffer;
char * sBuffer;
if (Length > STACK_BUFFER_SIZE)
{
- sBuffer = new char[Length];
- sAllocBuffer = sBuffer;
+ sAllocBuffer.reset(new char[Length]);
+ sBuffer = sAllocBuffer.get();
}
else
{
sBuffer = sStackBuffer;
- sAllocBuffer = nullptr;
}
if ((Err = cpContainer->ReadKnownSize(sBuffer, Length)) !=
BenErr_OK)
{
- delete[] sAllocBuffer;
return Err;
}
@@ -297,7 +295,6 @@ CBenTOCReader::ReadTOC()
if (FindNamedObject(&cpContainer->GetNamedObjects(),
sName, &pPrevNamedObjectListElmt) != nullptr)
{
- delete[] sAllocBuffer;
return BenErr_DuplicateName;
}
@@ -305,11 +302,10 @@ CBenTOCReader::ReadTOC()
if (PropertyID == BEN_PROPID_GLOBAL_PROPERTY_NAME)
pObject = new CBenPropertyName(cpContainer, ObjectID,
- pPrevObject, sName, pPrevNamedObjectListElmt);
- else pObject = new CBenTypeName(cpContainer, ObjectID,
- pPrevObject, sName, pPrevNamedObjectListElmt);
-
- delete[] sAllocBuffer;
+ pPrevObject, sName, pPrevNamedObjectListElmt);
+ else
+ pObject = new CBenTypeName(cpContainer, ObjectID,
+ pPrevObject, sName, pPrevNamedObjectListElmt);
}
else if (PropertyID == BEN_PROPID_OBJ_REFERENCES)
{
diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
index 51e715f6a134..472e11072c8a 100644
--- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -80,9 +80,9 @@ XFFrameStyle::~XFFrameStyle()
{
}
-void XFFrameStyle::SetBorders(XFBorders *pBorders)
+void XFFrameStyle::SetBorders(std::unique_ptr<XFBorders> pBorders)
{
- m_pBorders.reset(pBorders);
+ m_pBorders = std::move(pBorders);
}
void XFFrameStyle::SetColumns(XFColumns *pColumns)
diff --git a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
index f8c17cd2d316..eb061b6d55af 100644
--- a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
@@ -103,9 +103,9 @@ void XFHeaderStyle::SetShadow(XFShadow *pShadow)
m_pShadow.reset( pShadow );
}
-void XFHeaderStyle::SetBorders(XFBorders *pBorders)
+void XFHeaderStyle::SetBorders(std::unique_ptr<XFBorders> pBorders)
{
- m_pBorders.reset(pBorders);
+ m_pBorders = std::move(pBorders);
}
void XFHeaderStyle::SetBackImage(std::unique_ptr<XFBGImage>& rImage)
diff --git a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
index 62f2c38538da..ca5d1adbb84f 100644
--- a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
@@ -106,11 +106,9 @@ void XFPageMaster::SetMargins(double left, double right,double top, double bo
m_aMargin.SetBottom(bottom);
}
-void XFPageMaster::SetBorders(XFBorders *pBorders)
+void XFPageMaster::SetBorders(std::unique_ptr<XFBorders> pBorders)
{
- if( pBorders == m_pBorders.get() )
- return;
- m_pBorders.reset( pBorders );
+ m_pBorders = std::move( pBorders );
}
void XFPageMaster::SetShadow(XFShadow *pShadow)
More information about the Libreoffice-commits
mailing list