summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/lwptablelayout.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/lwptablelayout.cxx')
-rw-r--r--lotuswordpro/source/filter/lwptablelayout.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index 76f681a7a88b..c9acba7407e3 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -82,6 +82,7 @@
#include "xfilter/xffloatframe.hxx"
#include "lwpframelayout.hxx"
#include "xfilter/xfparastyle.hxx"
+#include <memory>
LwpSuperTableLayout::LwpSuperTableLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
: LwpPlacableLayout(objHdr, pStrm)
@@ -560,7 +561,7 @@ void LwpTableLayout::RegisterColumns()
sal_uInt16 nCols = m_nCols;
m_pColumns = new LwpColumnLayout *[nCols];
- sal_Bool * pWidthCalculated = new sal_Bool[nCols];
+ std::unique_ptr<bool[]> pWidthCalculated( new bool[nCols] );
for(sal_uInt16 i=0;i<nCols; i++)
{
pWidthCalculated[i] = false;
@@ -581,7 +582,6 @@ void LwpTableLayout::RegisterColumns()
auto nColId = pColumnLayout->GetColumnID();
if (nColId >= nCols)
{
- delete [] pWidthCalculated;
throw std::range_error("corrupt LwpTableLayout");
}
m_pColumns[nColId] = pColumnLayout;
@@ -642,7 +642,6 @@ void LwpTableLayout::RegisterColumns()
}
}
}
- delete [] pWidthCalculated;
}
/**
* @short register all row styles