summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-13 09:35:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-13 10:26:35 +0100
commitead34a4d34db05d5718d96b66f5e39d886c8b699 (patch)
tree9748f73bd8664b529bdbddbf8c6dd5b8e96d6100 /sw
parent26b7ff2b6cc4def8ff7b02e223961534ba88e654 (diff)
no need to store reference to Import here
can just cast the parent member Change-Id: I990bd4da3afbd78da819038c7907c28de87faaaf Reviewed-on: https://gerrit.libreoffice.org/82567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 1940ebfea478..2f835bd606a3 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -29,7 +29,7 @@ using namespace ::xmloff::token;
class SvXMLSectionListContext : public SvXMLImportContext
{
private:
- SwXMLSectionList & m_rImport;
+ SwXMLSectionList & GetImport() { return static_cast<SwXMLSectionList&>(SvXMLImportContext::GetImport()); }
public:
SvXMLSectionListContext(SwXMLSectionList& rImport);
@@ -42,12 +42,11 @@ public:
class SwXMLParentContext : public SvXMLImportContext
{
private:
- SwXMLSectionList & m_rImport;
+ SwXMLSectionList & GetImport() { return static_cast<SwXMLSectionList&>(SvXMLImportContext::GetImport()); }
public:
SwXMLParentContext(SwXMLSectionList& rImport)
: SvXMLImportContext(rImport)
- , m_rImport(rImport)
{
}
@@ -65,11 +64,11 @@ public:
Element == XML_ELEMENT(TEXT, XML_INSERTION) ||
Element == XML_ELEMENT(TEXT, XML_DELETION))
{
- return new SvXMLSectionListContext(m_rImport);
+ return new SvXMLSectionListContext(GetImport());
}
else
{
- return new SwXMLParentContext(m_rImport);
+ return new SwXMLParentContext(GetImport());
}
}
};
@@ -102,8 +101,7 @@ SvXMLImportContext * SwXMLSectionList::CreateFastContext(
}
SvXMLSectionListContext::SvXMLSectionListContext( SwXMLSectionList& rImport )
- : SvXMLImportContext ( rImport ),
- m_rImport(rImport)
+ : SvXMLImportContext ( rImport )
{
}
@@ -124,10 +122,10 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SvXMLSectionListContext:
if (aIter.getToken() == (XML_NAMESPACE_TEXT | XML_NAME))
sName = aIter.toString();
if ( !sName.isEmpty() )
- m_rImport.m_rSectionList.push_back(sName);
+ GetImport().m_rSectionList.push_back(sName);
}
- pContext = new SvXMLSectionListContext(m_rImport);
+ pContext = new SvXMLSectionListContext(GetImport());
return pContext;
}