summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-28 11:27:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-29 14:37:12 +0200
commit17c936bca548acc93d6b2e70593bc711c0e6b8a4 (patch)
treeaf43f36650ea199297988d705903d32501452605
parentd4992bb36efb15da91a70e86e68a80f13b97e947 (diff)
loplugin:unusedfields-in-constructor in various
Change-Id: Ie0fb647938e3cf730976fb2e435b92bfd67ef645 Reviewed-on: https://gerrit.libreoffice.org/54998 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--comphelper/source/misc/syntaxhighlight.cxx4
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx9
-rw-r--r--cppuhelper/source/propertysetmixin.cxx5
-rw-r--r--include/comphelper/syntaxhighlight.hxx1
-rw-r--r--include/oox/export/shapes.hxx1
-rw-r--r--lotuswordpro/source/filter/bento.hxx5
-rw-r--r--oox/source/export/shapes.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlComponent.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlComponent.hxx1
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx1
-rw-r--r--reportdesign/source/filter/xml/xmlExport.hxx1
-rw-r--r--svx/source/svdraw/svdopath.cxx3
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.cxx1
-rw-r--r--writerfilter/source/ooxml/OOXMLPropertySet.hxx1
14 files changed, 12 insertions, 26 deletions
diff --git a/comphelper/source/misc/syntaxhighlight.cxx b/comphelper/source/misc/syntaxhighlight.cxx
index c63fdd5bf7d7..76c8dfa862d3 100644
--- a/comphelper/source/misc/syntaxhighlight.cxx
+++ b/comphelper/source/misc/syntaxhighlight.cxx
@@ -687,9 +687,9 @@ void SyntaxHighlighter::Tokenizer::getHighlightPortions(const OUString& rLine,
SyntaxHighlighter::SyntaxHighlighter(HighlighterLanguage language):
- eLanguage(language), m_tokenizer(new SyntaxHighlighter::Tokenizer(language))
+ m_tokenizer(new SyntaxHighlighter::Tokenizer(language))
{
- switch (eLanguage)
+ switch (language)
{
case HighlighterLanguage::Basic:
m_tokenizer->setKeyWords( strListBasicKeyWords,
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 7444c06c0012..8292935e976f 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -815,7 +815,6 @@ namespace cppcanvas
rendering::RenderState maState;
const tools::TextLineInfo maTextLineInfo;
::basegfx::B2DSize maLinesOverallSize;
- const double mnLineWidth;
uno::Reference< rendering::XPolyPolygon2D > mxTextLines;
const ::basegfx::B2DSize maReliefOffset;
const ::Color maReliefColor;
@@ -841,7 +840,6 @@ namespace cppcanvas
maState(),
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
maLinesOverallSize(),
- mnLineWidth( getLineWidth( rVDev, rState, maStringContext ) ),
mxTextLines(),
maReliefOffset( rReliefOffset ),
maReliefColor( rReliefColor ),
@@ -849,10 +847,11 @@ namespace cppcanvas
maShadowColor( rShadowColor ),
maTextDirection( rState.textDirection )
{
+ const double nLineWidth(getLineWidth( rVDev, rState, maStringContext ));
initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
rCanvas,
- mnLineWidth,
+ nLineWidth,
maTextLineInfo );
init( maState, mxFont,
@@ -881,7 +880,6 @@ namespace cppcanvas
maState(),
maTextLineInfo( tools::createTextLineInfo( rVDev, rState ) ),
maLinesOverallSize(),
- mnLineWidth( getLineWidth( rVDev, rState, maStringContext ) ),
mxTextLines(),
maReliefOffset( rReliefOffset ),
maReliefColor( rReliefColor ),
@@ -889,10 +887,11 @@ namespace cppcanvas
maShadowColor( rShadowColor ),
maTextDirection( rState.textDirection )
{
+ const double nLineWidth( getLineWidth( rVDev, rState, maStringContext ) );
initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
rCanvas,
- mnLineWidth,
+ nLineWidth,
maTextLineInfo );
init( maState, mxFont,
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index 88e104d90453..84f2432b7db7 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -406,7 +406,6 @@ private:
bool isDefaulted, bool wrapOptional);
css::uno::Reference< css::uno::XComponentContext > const & m_context;
- css::uno::Sequence< rtl::OUString > m_absentOptional;
css::uno::Type m_type;
css::uno::Reference< css::reflection::XIdlClass > m_idlClass;
};
@@ -417,7 +416,7 @@ PropertySetMixinImpl::Impl::Impl(
css::uno::Sequence< rtl::OUString > const & absentOptional,
css::uno::Type const & type):
implements(theImplements), disposed(false), m_context(context),
- m_absentOptional(absentOptional), m_type(type)
+ m_type(type)
{
assert(context.is());
assert(
@@ -444,7 +443,7 @@ PropertySetMixinImpl::Impl::Impl(
nullptr, anyEx );
}
std::vector< rtl::OUString > handleNames;
- initProperties(ifc, m_absentOptional, &handleNames);
+ initProperties(ifc, absentOptional, &handleNames);
std::vector< rtl::OUString >::size_type size = handleNames.size();
assert(size <= SAL_MAX_INT32);
handleMap.realloc(static_cast< sal_Int32 >(size));
diff --git a/include/comphelper/syntaxhighlight.hxx b/include/comphelper/syntaxhighlight.hxx
index c8faf2211bfc..22f1338ea12f 100644
--- a/include/comphelper/syntaxhighlight.hxx
+++ b/include/comphelper/syntaxhighlight.hxx
@@ -69,7 +69,6 @@ class COMPHELPER_DLLPUBLIC SyntaxHighlighter
{
class Tokenizer;
- HighlighterLanguage eLanguage;
std::unique_ptr<Tokenizer> m_tokenizer;
SyntaxHighlighter(const SyntaxHighlighter&) = delete;
diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx
index 5c1d7d860ca7..6e5839d93bdc 100644
--- a/include/oox/export/shapes.hxx
+++ b/include/oox/export/shapes.hxx
@@ -114,7 +114,6 @@ protected:
private:
sal_Int32 mnXmlNamespace;
- Fraction maFraction;
MapMode maMapModeSrc, maMapModeDest;
std::shared_ptr<URLTransformer> mpURLTransformer;
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index 4608b9b21996..dd1692af1ce7 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -309,11 +309,11 @@ class CBenValueSegment : public CUtListElmt
public: // Internal methods
CBenValueSegment(CBenValue * pValue, BenContainerPos Pos,
size_t Size) : CUtListElmt(&pValue->GetValueSegments())
- { cpValue = pValue; cImmediate = false; cPos = Pos;
+ { cImmediate = false; cPos = Pos;
cSize = Size; }
CBenValueSegment(CBenValue * pValue, const void * pImmData,
unsigned short Size) : CUtListElmt(&pValue->GetValueSegments())
- { cpValue = pValue; cImmediate = true;
+ { cImmediate = true;
std::memcpy(cImmData, pImmData, Size); cSize = Size; }
bool IsImmediate() { return cImmediate; }
BenContainerPos GetPosition() { return cPos; }
@@ -321,7 +321,6 @@ public: // Internal methods
BenByte * GetImmediateData() { return cImmData; }
private: // Data
- CBenValue * cpValue;
bool cImmediate;
union
{
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index c52c6a62b3cb..c8e93211d6a5 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -368,9 +368,8 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap
, mnShapeIdMax( 1 )
, mnPictureIdMax( 1 )
, mnXmlNamespace( nXmlNamespace )
- , maFraction( 1, 576 )
, maMapModeSrc( MapUnit::Map100thMM )
- , maMapModeDest( MapUnit::MapInch, Point(), maFraction, maFraction )
+ , maMapModeDest( MapUnit::MapInch, Point(), Fraction( 1, 576 ), Fraction( 1, 576 ) )
, mpShapeMap( pShapeMap ? pShapeMap : &maShapeMap )
{
mpURLTransformer.reset(new URLTransformer);
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx
index ef17c7b4748f..9bff778bfa6d 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -71,8 +71,6 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport
m_xComponent->setName(sValue);
break;
case XML_TOK_TEXT_STYLE_NAME:
- m_sTextStyleName = sValue;
- break;
case XML_TOK_TRANSFORM:
break;
default:
diff --git a/reportdesign/source/filter/xml/xmlComponent.hxx b/reportdesign/source/filter/xml/xmlComponent.hxx
index 1ab4d2c8e986..be6822fa9cd2 100644
--- a/reportdesign/source/filter/xml/xmlComponent.hxx
+++ b/reportdesign/source/filter/xml/xmlComponent.hxx
@@ -29,7 +29,6 @@ namespace rptxml
class OXMLComponent final : public SvXMLImportContext
{
css::uno::Reference< css::report::XReportComponent > m_xComponent;
- OUString m_sTextStyleName;
OXMLComponent(const OXMLComponent&);
OXMLComponent& operator =(const OXMLComponent&);
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 54620e910d53..29028f1459af 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -263,7 +263,6 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin
GetNamespaceMap_().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
m_sTableStyle = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TABLE, GetXMLToken(XML_STYLE_NAME) );
- m_sColumnStyle = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TABLE, GetXMLToken(XML_COLUMN) );
m_sCellStyle = GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_REPORT, GetXMLToken(XML_STYLE_NAME) );
diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx
index 41315bcd2906..07bdc342e811 100644
--- a/reportdesign/source/filter/xml/xmlExport.hxx
+++ b/reportdesign/source/filter/xml/xmlExport.hxx
@@ -100,7 +100,6 @@ private:
OUString m_sTableStyle;
OUString m_sCellStyle;
- OUString m_sColumnStyle;
rtl::Reference < SvXMLExportPropertyMapper> m_xTableStylesExportPropertySetMapper;
rtl::Reference < SvXMLExportPropertyMapper> m_xCellStylesExportPropertySetMapper;
rtl::Reference < SvXMLExportPropertyMapper> m_xColumnStylesExportPropertySetMapper;
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index c1ff60b573cd..b61e88ae1a43 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -81,7 +81,6 @@ struct ImpSdrPathDragData : public SdrDragStatUserData
sal_uInt16 nPoly; // number of the polygon in the PolyPolygon
sal_uInt16 nPnt; // number of point in the above polygon
sal_uInt16 nPointCount; // number of points of the polygon
- sal_uInt16 nPntMax; // maximum index
bool bBegPnt; // dragged point is first point of a Polyline
bool bEndPnt; // dragged point is finishing point of a Polyline
sal_uInt16 nPrevPnt; // index of previous point
@@ -120,7 +119,6 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
, nPoly(0)
, nPnt(0)
, nPointCount(0)
- , nPntMax(0)
, bBegPnt(false)
, bEndPnt(false)
, nPrevPnt(0)
@@ -166,6 +164,7 @@ ImpSdrPathDragData::ImpSdrPathDragData(const SdrPathObj& rPO, const SdrHdl& rHdl
}
else
{
+ sal_uInt16 nPntMax = 0; // maximum index
bValid=false;
bClosed=rPO.IsClosed(); // closed object?
nPoly=static_cast<sal_uInt16>(rHdl.GetPolyNum()); // number of the polygon in the PolyPolygon
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index 82ccae8cab37..cf61d8596458 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -331,7 +331,6 @@ OOXMLValue * OOXMLInputStreamValue::clone() const
OOXMLPropertySet::OOXMLPropertySet()
{
- maType = "OOXMLPropertySet";
}
OOXMLPropertySet::~OOXMLPropertySet()
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index 327d3dd09a32..07b5abfaf40d 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -141,7 +141,6 @@ public:
typedef std::shared_ptr<OOXMLPropertySet> Pointer_t;
private:
OOXMLProperties_t mProperties;
- OString maType;
void add(const OOXMLProperty::Pointer_t& pProperty);
public:
OOXMLPropertySet();