summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-05-25 23:19:05 +0200
committerMichael Stahl <mstahl@redhat.com>2016-05-25 23:47:22 +0200
commit1029b6cb067eb8cb8c2c00663f4403f9e13fde05 (patch)
treef336245cb08df81487836b86977a1e52f973d283 /sw
parent66e798dda73b66471940ee99298ba4069345630a (diff)
sw: replace boost::shared_array with std::shared_ptr
Change-Id: I99eec60db7f6d586b3b424661e03a7891422ab2e
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx11
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx4
2 files changed, 8 insertions, 7 deletions
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 8d985ccfd0af..d5b24b21d5ff 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -24,6 +24,7 @@
#include <cstdio>
#include <osl/endian.h>
#include <rtl/ustrbuf.hxx>
+#include <o3tl/make_shared.hxx>
#include <tools/stream.hxx>
namespace ww8
@@ -35,14 +36,14 @@ namespace ww8
{
sal_Size nRemainingSize = rSt.remainingSize();
nSize = std::min<sal_uInt32>(nRemainingSize, nSize);
- mp_data.reset(new sal_uInt8[nSize]);
- mn_size = rSt.Read(mp_data.get(), nSize);
+ m_pData = o3tl::make_shared_array<sal_uInt8>(nSize);
+ mn_size = rSt.Read(m_pData.get(), nSize);
}
OSL_ENSURE(mn_size == nSize, "short read in WW8Struct::WW8Struct");
}
WW8Struct::WW8Struct(WW8Struct * pStruct, sal_uInt32 nPos, sal_uInt32 nSize)
- : mp_data(pStruct->mp_data), mn_offset(pStruct->mn_offset + nPos)
+ : m_pData(pStruct->m_pData), mn_offset(pStruct->mn_offset + nPos)
, mn_size(nSize)
{
}
@@ -57,7 +58,7 @@ namespace ww8
if (nOffset < mn_size)
{
- nResult = mp_data[mn_offset + nOffset];
+ nResult = m_pData.get()[mn_offset + nOffset];
}
return nResult;
@@ -79,7 +80,7 @@ namespace ww8
nCount = nAvailable;
#if defined OSL_LITENDIAN
aResult = OUString(reinterpret_cast<const sal_Unicode *>(
- mp_data.get() + nStartOff), nCount);
+ m_pData.get() + nStartOff), nCount);
#else
OUStringBuffer aBuf;
for (sal_uInt32 i = 0; i < nCount; ++i)
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 744e4d9d085f..e6f4cf23820c 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -22,7 +22,7 @@
#include <memory>
#include <vector>
-#include <boost/shared_array.hpp>
+
#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <IDocumentExternalData.hxx>
@@ -34,7 +34,7 @@ namespace ww8
class WW8Struct : public ::sw::ExternalData
{
- boost::shared_array<sal_uInt8> mp_data;
+ std::shared_ptr<sal_uInt8> m_pData;
sal_uInt32 mn_offset;
sal_uInt32 mn_size;