summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-27 09:22:10 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-27 09:23:27 +0200
commit6d77d7db8704327071b3d46508310c8453cf1cd1 (patch)
treeb8982a1ee3420ebea29e499be81910af31cd9cb2 /writerfilter
parente06e2cb18874987d2dafd4faa0a8b71fc0aa6453 (diff)
writerfilter: use std::unique_ptr<> in DomainMapper
Change-Id: I569add9792d533bd3bcda5d5cb4023b37bd3f1ed
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx8
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx6
2 files changed, 6 insertions, 8 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 6a4a85a2ddfb..25c3cd543fb4 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -189,8 +189,6 @@ DomainMapper::~DomainMapper()
(void)rEx;
}
- delete m_pImpl;
-
#ifdef DEBUG_WRITERFILTER
TagLogger::getInstance().endDocument();
#endif
@@ -1092,7 +1090,7 @@ sal_Int32 lcl_getCurrentNumberingProperty(
}
// In rtl-paragraphs the meaning of left/right are to be exchanged
-static bool ExchangeLeftRight(const PropertyMapPtr& rContext, DomainMapper_Impl* m_pImpl)
+static bool ExchangeLeftRight(const PropertyMapPtr& rContext, DomainMapper_Impl& rImpl)
{
bool bExchangeLeftRight = false;
boost::optional<PropertyMap::Property> aPropPara = rContext->getProperty(PROP_WRITING_MODE);
@@ -1105,7 +1103,7 @@ static bool ExchangeLeftRight(const PropertyMapPtr& rContext, DomainMapper_Impl*
else
{
// check if there RTL <bidi> in default style for the paragraph
- StyleSheetEntryPtr pTable = m_pImpl->GetStyleSheetTable()->FindDefaultParaStyle();
+ StyleSheetEntryPtr pTable = rImpl.GetStyleSheetTable()->FindDefaultParaStyle();
if ( pTable )
{
boost::optional<PropertyMap::Property> aPropStyle = pTable->pProperties->getProperty(PROP_WRITING_MODE);
@@ -1170,7 +1168,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
switch(nSprmId)
{
case NS_ooxml::LN_CT_PPrBase_jc:
- handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, m_pImpl ));
+ handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, *m_pImpl ));
break;
case NS_ooxml::LN_CT_PPrBase_keepLines:
rContext->Insert(PROP_PARA_SPLIT, uno::makeAny(nIntValue == 0));
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index 0e30f228ea70..0cd287825193 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -26,7 +26,7 @@
#include <map>
#include <vector>
-#include <boost/scoped_ptr.hpp>
+#include <memory>
namespace com{ namespace sun {namespace star{
namespace beans{
@@ -72,7 +72,7 @@ enum SprmType
class DomainMapper : public LoggedProperties, public LoggedTable,
public BinaryObj, public LoggedStream
{
- DomainMapper_Impl *m_pImpl;
+ std::unique_ptr<DomainMapper_Impl> m_pImpl;
public:
DomainMapper(const css::uno::Reference<css::uno::XComponentContext>& xContext,
@@ -169,7 +169,7 @@ private:
static css::style::TabAlign getTabAlignFromValue(const sal_Int32 nIntValue);
static sal_Unicode getFillCharFromValue(const sal_Int32 nIntValue);
bool mbIsSplitPara;
- boost::scoped_ptr< GraphicZOrderHelper > zOrderHelper;
+ std::unique_ptr< GraphicZOrderHelper > zOrderHelper;
};
} // namespace dmapper