summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-19 10:52:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-19 11:23:57 +0000
commit778e9a65bf5af07c4caeff969a0324e43a78e66b (patch)
treea5204f0d3eaf2f512a627eeb9e74d42e7e80b54f /xmlscript
parent541c4c4509863beb7babe361b31e27f7295e3069 (diff)
new loplugin: find write-only fields
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xml_helper/xml_impctx.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx
index 694b8ed83dd7..c24312532ade 100644
--- a/xmlscript/source/xml_helper/xml_impctx.cxx
+++ b/xmlscript/source/xml_helper/xml_impctx.cxx
@@ -327,7 +327,6 @@ class ExtendedAttributes :
{
sal_Int32 m_nAttributes;
sal_Int32 * m_pUids;
- OUString * m_pPrefixes;
OUString * m_pLocalNames;
OUString * m_pQNames;
OUString * m_pValues;
@@ -337,7 +336,7 @@ class ExtendedAttributes :
public:
inline ExtendedAttributes(
sal_Int32 nAttributes,
- sal_Int32 * pUids, OUString * pPrefixes,
+ sal_Int32 * pUids,
OUString * pLocalNames, OUString * pQNames,
Reference< xml::sax::XAttributeList > const & xAttributeList,
DocumentHandlerImpl * pHandler );
@@ -374,13 +373,12 @@ public:
inline ExtendedAttributes::ExtendedAttributes(
sal_Int32 nAttributes,
- sal_Int32 * pUids, OUString * pPrefixes,
+ sal_Int32 * pUids,
OUString * pLocalNames, OUString * pQNames,
Reference< xml::sax::XAttributeList > const & xAttributeList,
DocumentHandlerImpl * pHandler )
: m_nAttributes( nAttributes )
, m_pUids( pUids )
- , m_pPrefixes( pPrefixes )
, m_pLocalNames( pLocalNames )
, m_pQNames( pQNames )
, m_pValues( new OUString[ nAttributes ] )
@@ -399,7 +397,6 @@ ExtendedAttributes::~ExtendedAttributes() throw ()
m_pHandler->release();
delete [] m_pUids;
- delete [] m_pPrefixes;
delete [] m_pLocalNames;
delete [] m_pQNames;
delete [] m_pValues;
@@ -577,10 +574,11 @@ void DocumentHandlerImpl::startElement(
pUids[ nPos ] = getUidByPrefix( pPrefixes[ nPos ] );
}
}
+ delete[] pPrefixes;
// ownership of arrays belongs to attribute list
xAttributes = static_cast< xml::input::XAttributes * >(
new ExtendedAttributes(
- nAttribs, pUids, pPrefixes, pLocalNames, pQNames,
+ nAttribs, pUids, pLocalNames, pQNames,
xAttribs, this ) );
getElementName( rQElementName, &nUid, &aLocalName );