Kaydet (Commit) c9611c5e authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:unusedfields in l10ntools..sax

Change-Id: I6e4ff4853c3995072b020af54549dc81303a4fde
Reviewed-on: https://gerrit.libreoffice.org/68225
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst d3d86186
......@@ -27,6 +27,7 @@
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <com/sun/star/linguistic2/XLinguServiceEventBroadcaster.hpp>
#include <linguistic/lngdllapi.h>
#include <rtl/ref.hxx>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
......@@ -148,8 +149,7 @@ public:
class LNG_DLLPUBLIC PropertyHelper_Thesaurus
{
PropertyHelper_Thes* pInst;
css::uno::Reference< css::beans::XPropertyChangeListener > xPropHelper;
rtl::Reference< PropertyHelper_Thes > mxPropHelper;
// disallow use of copy-constructor and assignment-operator
PropertyHelper_Thesaurus( const PropertyHelper_Thes & ) = delete;
......@@ -209,8 +209,7 @@ public:
class LNG_DLLPUBLIC PropertyHelper_Spelling
{
PropertyHelper_Spell* pInst;
css::uno::Reference< css::beans::XPropertyChangeListener > xPropHelper;
rtl::Reference< PropertyHelper_Spell > mxPropHelper;
// disallow use of copy-constructor and assignment-operator
PropertyHelper_Spelling( const PropertyHelper_Spell & ) = delete;
......@@ -279,8 +278,7 @@ public:
class LNG_DLLPUBLIC PropertyHelper_Hyphenation
{
PropertyHelper_Hyphen* pInst;
css::uno::Reference< css::beans::XPropertyChangeListener > xPropHelper;
rtl::Reference< PropertyHelper_Hyphen > mxPropHelper;
// disallow use of copy-constructor and assignment-operator
PropertyHelper_Hyphenation( const PropertyHelper_Hyphen & ) = delete;
......
......@@ -206,8 +206,6 @@ class XMLElement : public XMLParentNode
private:
OString m_sElementName;
std::unique_ptr<XMLAttributeList> m_pAttributes;
OString m_sId;
OString m_sLanguageId;
protected:
void Print(XMLNode *pCur, OStringBuffer& rBuffer, bool bRootelement) const;
......@@ -237,9 +235,6 @@ public:
/// Return a Unicode String representation of this object
OString ToOString();
void SetId ( OString const & sTheId ) { m_sId = sTheId; }
void SetLanguageId ( OString const & sLangId ) { m_sLanguageId = sLangId; }
};
/** Holds character data
......
......@@ -472,8 +472,6 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur )
sLanguage=(*pElement->GetAttributeList())[ j ]->GetValue();
}
}
pElement->SetLanguageId( sLanguage );
pElement->SetId( sTmpStrVal );
}
if ( bInsert && ( m_aNodes_localize.find( sName ) != m_aNodes_localize.end() ) )
......@@ -555,16 +553,12 @@ XMLElement::XMLElement(
)
: XMLParentNode( pParent )
, m_sElementName( rName )
, m_sId(OString())
, m_sLanguageId(OString())
{
}
XMLElement::XMLElement(const XMLElement& rObj)
: XMLParentNode( rObj )
, m_sElementName( rObj.m_sElementName )
, m_sId( rObj.m_sId )
, m_sLanguageId( rObj.m_sLanguageId )
{
if ( rObj.m_pAttributes )
{
......@@ -580,8 +574,6 @@ XMLElement& XMLElement::operator=(const XMLElement& rObj)
{
XMLParentNode::operator=(rObj);
m_sElementName = rObj.m_sElementName;
m_sId = rObj.m_sId;
m_sLanguageId = rObj.m_sLanguageId;
if ( m_pAttributes )
{
......@@ -608,7 +600,6 @@ void XMLElement::AddAttribute( const OString &rAttribute, const OString &rValue
void XMLElement::ChangeLanguageTag( const OString &rValue )
{
SetLanguageId(rValue);
if ( m_pAttributes )
{
bool bWasSet = false;
......@@ -635,7 +626,6 @@ void XMLElement::ChangeLanguageTag( const OString &rValue )
{
XMLElement* pElem = static_cast< XMLElement* >(pNode);
pElem->ChangeLanguageTag( rValue );
pElem->SetLanguageId(rValue);
pElem = nullptr;
pNode = nullptr;
}
......
......@@ -654,8 +654,7 @@ PropertyHelper_Thesaurus::PropertyHelper_Thesaurus(
const css::uno::Reference< css::uno::XInterface > &rxSource,
css::uno::Reference< css::linguistic2::XLinguProperties > const &rxPropSet )
{
pInst = new PropertyHelper_Thes( rxSource, rxPropSet );
xPropHelper = pInst;
mxPropHelper = new PropertyHelper_Thes( rxSource, rxPropSet );
}
PropertyHelper_Thesaurus::~PropertyHelper_Thesaurus()
......@@ -664,25 +663,24 @@ PropertyHelper_Thesaurus::~PropertyHelper_Thesaurus()
void PropertyHelper_Thesaurus::AddAsPropListener()
{
pInst->AddAsPropListener();
mxPropHelper->AddAsPropListener();
}
void PropertyHelper_Thesaurus::RemoveAsPropListener()
{
pInst->RemoveAsPropListener();
mxPropHelper->RemoveAsPropListener();
}
void PropertyHelper_Thesaurus::SetTmpPropVals( const css::beans::PropertyValues &rPropVals )
{
pInst->SetTmpPropVals( rPropVals );
mxPropHelper->SetTmpPropVals( rPropVals );
}
PropertyHelper_Hyphenation::PropertyHelper_Hyphenation(
const css::uno::Reference< css::uno::XInterface > &rxSource,
css::uno::Reference< css::linguistic2::XLinguProperties > const &rxPropSet)
{
pInst = new PropertyHelper_Hyphen( rxSource, rxPropSet );
xPropHelper = pInst;
mxPropHelper = new PropertyHelper_Hyphen( rxSource, rxPropSet );
}
PropertyHelper_Hyphenation::~PropertyHelper_Hyphenation()
......@@ -691,52 +689,51 @@ PropertyHelper_Hyphenation::~PropertyHelper_Hyphenation()
void PropertyHelper_Hyphenation::AddAsPropListener()
{
pInst->AddAsPropListener();
mxPropHelper->AddAsPropListener();
}
void PropertyHelper_Hyphenation::RemoveAsPropListener()
{
pInst->RemoveAsPropListener();
mxPropHelper->RemoveAsPropListener();
}
void PropertyHelper_Hyphenation::SetTmpPropVals( const css::beans::PropertyValues &rPropVals )
{
pInst->SetTmpPropVals( rPropVals );
mxPropHelper->SetTmpPropVals( rPropVals );
}
sal_Int16 PropertyHelper_Hyphenation::GetMinLeading() const
{
return pInst->GetMinLeading();
return mxPropHelper->GetMinLeading();
}
sal_Int16 PropertyHelper_Hyphenation::GetMinTrailing() const
{
return pInst->GetMinTrailing();
return mxPropHelper->GetMinTrailing();
}
sal_Int16 PropertyHelper_Hyphenation::GetMinWordLength() const
{
return pInst->GetMinWordLength();
return mxPropHelper->GetMinWordLength();
}
bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >& rxListener )
{
return pInst->addLinguServiceEventListener( rxListener );
return mxPropHelper->addLinguServiceEventListener( rxListener );
}
bool PropertyHelper_Hyphenation::removeLinguServiceEventListener(
const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >& rxListener )
{
return pInst->removeLinguServiceEventListener( rxListener );
return mxPropHelper->removeLinguServiceEventListener( rxListener );
}
PropertyHelper_Spelling::PropertyHelper_Spelling(
const css::uno::Reference< css::uno::XInterface > &rxSource,
css::uno::Reference< css::linguistic2::XLinguProperties > const &rxPropSet )
{
pInst = new PropertyHelper_Spell( rxSource, rxPropSet );
xPropHelper = pInst;
mxPropHelper = new PropertyHelper_Spell( rxSource, rxPropSet );
}
PropertyHelper_Spelling::~PropertyHelper_Spelling()
......@@ -745,46 +742,46 @@ PropertyHelper_Spelling::~PropertyHelper_Spelling()
void PropertyHelper_Spelling::AddAsPropListener()
{
pInst->AddAsPropListener();
mxPropHelper->AddAsPropListener();
}
void PropertyHelper_Spelling::RemoveAsPropListener()
{
pInst->RemoveAsPropListener();
mxPropHelper->RemoveAsPropListener();
}
void PropertyHelper_Spelling::SetTmpPropVals( const css::beans::PropertyValues &rPropVals )
{
pInst->SetTmpPropVals( rPropVals );
mxPropHelper->SetTmpPropVals( rPropVals );
}
bool PropertyHelper_Spelling::IsSpellUpperCase() const
{
return pInst->IsSpellUpperCase();
return mxPropHelper->IsSpellUpperCase();
}
bool PropertyHelper_Spelling::IsSpellWithDigits() const
{
return pInst->IsSpellWithDigits();
return mxPropHelper->IsSpellWithDigits();
}
bool PropertyHelper_Spelling::IsSpellCapitalization() const
{
return pInst->IsSpellCapitalization();
return mxPropHelper->IsSpellCapitalization();
}
bool PropertyHelper_Spelling::addLinguServiceEventListener(
const css::uno::Reference<
css::linguistic2::XLinguServiceEventListener >& rxListener )
{
return pInst->addLinguServiceEventListener( rxListener );
return mxPropHelper->addLinguServiceEventListener( rxListener );
}
bool PropertyHelper_Spelling::removeLinguServiceEventListener(
const css::uno::Reference<
css::linguistic2::XLinguServiceEventListener >& rxListener )
{
return pInst->removeLinguServiceEventListener( rxListener );
return mxPropHelper->removeLinguServiceEventListener( rxListener );
}
} // namespace linguistic
......
......@@ -136,7 +136,7 @@ void OControlStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
if( IsXMLToken(rLocalName, XML_DATA_STYLE_NAME ) )
m_sDataStyleName = rValue;
else if ( IsXMLToken(rLocalName, XML_MASTER_PAGE_NAME ) )
sPageStyle = rValue;
;
else
XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue );
}
......
......@@ -39,7 +39,6 @@ namespace rptxml
class OControlStyleContext : public XMLPropStyleContext
{
OUString m_sDataStyleName;
OUString sPageStyle;
SvXMLStylesContext* pStyles;
// std::vector<ScXMLMapContent> aMaps;
sal_Int32 m_nNumberFormat;
......
......@@ -350,7 +350,6 @@ ORptFilter::ORptFilter( const uno::Reference< XComponentContext >& _rxContext, S
m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap(true, false);
m_xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, false);
m_xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, false);
m_xTableStylesPropertySetMapper = new XMLTextPropertySetMapper( TextPropMap::TABLE_DEFAULTS, false );
}
......
......@@ -85,7 +85,6 @@ private:
rtl::Reference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper;
rtl::Reference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper;
rtl::Reference < XMLPropertySetMapper > m_xRowStylesPropertySetMapper;
rtl::Reference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper;
Reference<XReportDefinition> m_xReportDefinition;
std::shared_ptr<rptui::OReportModel> m_pReportModel;
......
......@@ -176,8 +176,6 @@ public: // module scope
bool bExceptionWasThrown;
bool bRTExceptionWasThrown;
Locale locale;
public:
SaxExpatParser_Impl()
: m_bEnableDoS(false)
......@@ -512,9 +510,9 @@ void SaxExpatParser::setEntityResolver(const css::uno::Reference < XEntityResolv
}
void SaxExpatParser::setLocale( const Locale & locale )
void SaxExpatParser::setLocale( const Locale & )
{
m_pImpl->locale = locale;
// not implemented
}
// XServiceInfo
......
......@@ -124,9 +124,7 @@ struct ParserData
css::uno::Reference< css::xml::sax::XFastTokenHandler > mxTokenHandler;
FastTokenHandlerBase* mpTokenHandler;
css::uno::Reference< css::xml::sax::XErrorHandler > mxErrorHandler;
css::uno::Reference< css::xml::sax::XEntityResolver > mxEntityResolver;
css::uno::Reference< css::xml::sax::XFastNamespaceHandler >mxNamespaceHandler;
css::lang::Locale maLocale;
ParserData();
};
......@@ -228,11 +226,7 @@ public:
/// @throws css::uno::RuntimeException
void setErrorHandler( const css::uno::Reference< css::xml::sax::XErrorHandler >& Handler );
/// @throws css::uno::RuntimeException
void setEntityResolver( const css::uno::Reference< css::xml::sax::XEntityResolver >& Resolver );
/// @throws css::uno::RuntimeException
void setNamespaceHandler( const css::uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler);
/// @throws css::uno::RuntimeException
void setLocale( const css::lang::Locale& rLocale );
// called by the C callbacks of the expat parser
void callbackStartElement( const xmlChar *localName , const xmlChar* prefix, const xmlChar* URI,
......@@ -917,16 +911,6 @@ void FastSaxParserImpl::setErrorHandler(const Reference< XErrorHandler > & Handl
maData.mxErrorHandler = Handler;
}
void FastSaxParserImpl::setEntityResolver(const Reference < XEntityResolver > & Resolver)
{
maData.mxEntityResolver = Resolver;
}
void FastSaxParserImpl::setLocale( const lang::Locale & Locale )
{
maData.maLocale = Locale;
}
void FastSaxParserImpl::setNamespaceHandler( const Reference< XFastNamespaceHandler >& Handler )
{
maData.mxNamespaceHandler = Handler;
......@@ -1400,14 +1384,14 @@ void FastSaxParser::setErrorHandler( const uno::Reference< xml::sax::XErrorHandl
mpImpl->setErrorHandler(Handler);
}
void FastSaxParser::setEntityResolver( const uno::Reference< xml::sax::XEntityResolver >& Resolver )
void FastSaxParser::setEntityResolver( const uno::Reference< xml::sax::XEntityResolver >& )
{
mpImpl->setEntityResolver(Resolver);
// not implemented
}
void FastSaxParser::setLocale( const lang::Locale& rLocale )
void FastSaxParser::setLocale( const lang::Locale& )
{
mpImpl->setLocale(rLocale);
// not implemented
}
void FastSaxParser::setNamespaceHandler( const uno::Reference< css::xml::sax::XFastNamespaceHandler >& Handler)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment