diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-16 16:22:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-17 08:40:39 +0200 |
commit | 82afd77a00c036f106a3aa5fb3402c92e10e2aa4 (patch) | |
tree | 2a07561d945b920c18f9e9b7fb5bde3eaf648945 | |
parent | 59f398e934541e05dc9b77c1191227f8c68ea037 (diff) |
loplugin:unusedfields in editeng..filter
Change-Id: I42e41ec69667a5560c5f31c85eb05074666a7bab
Reviewed-on: https://gerrit.libreoffice.org/54455
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editobj2.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/SvXMLAutoCorrectImport.cxx | 12 | ||||
-rw-r--r-- | editeng/source/misc/SvXMLAutoCorrectImport.hxx | 4 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 37 | ||||
-rw-r--r-- | extensions/source/bibliography/general.cxx | 3 | ||||
-rw-r--r-- | extensions/source/bibliography/general.hxx | 1 | ||||
-rw-r--r-- | filter/source/flash/swfwriter.cxx | 4 | ||||
-rw-r--r-- | filter/source/flash/swfwriter.hxx | 1 | ||||
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfgrprd.cxx | 2 | ||||
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfgrprd.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 5 | ||||
-rw-r--r-- | include/editeng/editstat.hxx | 5 | ||||
-rw-r--r-- | include/editeng/unotext.hxx | 3 | ||||
-rw-r--r-- | include/filter/msfilter/svdfppt.hxx | 1 |
16 files changed, 28 insertions, 60 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index b76e99ea4d95..dbba13a7a3bf 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -502,10 +502,8 @@ EditEngineItemPool* getEditEngineItemPool(SfxItemPool* pPool) EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* pP ) : mpFront(pFront) { - nVersion = 0; nMetric = 0xFFFF; nUserType = OutlinerMode::DontKnow; - nObjSettings = 0; pPortionInfo = nullptr; // #i101239# ensure target is a EditEngineItemPool, else @@ -540,10 +538,8 @@ EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, SfxItemPool* pP EditTextObjectImpl::EditTextObjectImpl( EditTextObject* pFront, const EditTextObjectImpl& r ) : mpFront(pFront) { - nVersion = r.nVersion; nMetric = r.nMetric; nUserType = r.nUserType; - nObjSettings = r.nObjSettings; bVertical = r.bVertical; bIsTopToBottomVert = r.bIsTopToBottomVert; nScriptType = r.nScriptType; diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index 26576d4fdb1b..b30fadb3fe63 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -186,9 +186,7 @@ private: SfxItemPool* pPool; std::unique_ptr<XParaPortionList> pPortionInfo; - sal_uInt32 nObjSettings; sal_uInt16 nMetric; - sal_uInt16 nVersion; OutlinerMode nUserType; SvtScriptType nScriptType; diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index d336fc860758..5343877fc203 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -1068,7 +1068,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo if ( pCallBack ) { - SpellCallbackInfo aInf( ( nId == MN_WORDLANGUAGE ) ? SpellCallbackCommand::WORDLANGUAGE : SpellCallbackCommand::PARALANGUAGE, nLangToUse ); + SpellCallbackInfo aInf( ( nId == MN_WORDLANGUAGE ) ? SpellCallbackCommand::WORDLANGUAGE : SpellCallbackCommand::PARALANGUAGE ); pCallBack->Call( aInf ); } SetSelection( aOldSel ); diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx index 14d1461022d5..efd340efb055 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx @@ -72,8 +72,7 @@ SvXMLWordListContext::~SvXMLWordListContext() SvXMLWordContext::SvXMLWordContext( SvXMLAutoCorrectImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) : - SvXMLImportContext ( rImport ), - rLocalRef(rImport) + SvXMLImportContext ( rImport ) { OUString sWrong, sRight; if ( xAttrList.is() && xAttrList->hasAttribute( SvXMLAutoCorrectToken::ABBREVIATED_NAME ) ) @@ -89,14 +88,14 @@ SvXMLWordContext::SvXMLWordContext( if( !bOnlyTxt ) { const OUString sLongSave( sRight ); - if( !rLocalRef.rAutoCorrect.GetLongText( sWrong, sRight ) && + if( !rImport.rAutoCorrect.GetLongText( sWrong, sRight ) && !sLongSave.isEmpty() ) { sRight = sLongSave; bOnlyTxt = true; } } - rLocalRef.pAutocorr_List->LoadEntry( sWrong, sRight, bOnlyTxt ); + rImport.pAutocorr_List->LoadEntry( sWrong, sRight, bOnlyTxt ); } SvXMLWordContext::~SvXMLWordContext() @@ -147,8 +146,7 @@ SvXMLExceptionListContext::~SvXMLExceptionListContext() SvXMLExceptionContext::SvXMLExceptionContext( SvXMLExceptionListImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) : - SvXMLImportContext ( rImport ), - rLocalRef(rImport) + SvXMLImportContext ( rImport ) { OUString sWord; if( xAttrList.is() && xAttrList->hasAttribute( SvXMLAutoCorrectToken::ABBREVIATED_NAME ) ) @@ -157,7 +155,7 @@ SvXMLExceptionContext::SvXMLExceptionContext( if (sWord.isEmpty()) return; - rLocalRef.rList.insert( sWord ); + rImport.rList.insert( sWord ); } SvXMLExceptionContext::~SvXMLExceptionContext() diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.hxx b/editeng/source/misc/SvXMLAutoCorrectImport.hxx index d27785bf9b43..34ec61ed323d 100644 --- a/editeng/source/misc/SvXMLAutoCorrectImport.hxx +++ b/editeng/source/misc/SvXMLAutoCorrectImport.hxx @@ -62,8 +62,6 @@ public: class SvXMLWordContext : public SvXMLImportContext { -private: - SvXMLAutoCorrectImport & rLocalRef; public: SvXMLWordContext ( SvXMLAutoCorrectImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); @@ -105,8 +103,6 @@ public: class SvXMLExceptionContext : public SvXMLImportContext { -private: - SvXMLExceptionListImport & rLocalRef; public: SvXMLExceptionContext ( SvXMLExceptionListImport& rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 09c178e8c434..43d803c3d340 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -40,8 +40,7 @@ using namespace ::com::sun::star; SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase& _rText, const ESelection& rSel ) throw() -: mrText( _rText ), - maSelection( rSel ) +: mrText( _rText ) { mxParentText = const_cast<SvxUnoTextBase*>(&_rText); if( mrText.GetEditSource() ) @@ -49,16 +48,16 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase mnNextParagraph = 0; for( sal_Int32 currentPara = 0; currentPara < mrText.GetEditSource()->GetTextForwarder()->GetParagraphCount(); currentPara++ ) { - if( currentPara>=maSelection.nStartPara && currentPara<=maSelection.nEndPara ) + if( currentPara>=rSel.nStartPara && currentPara<=rSel.nEndPara ) { const SvxUnoTextRangeBaseVec& rRanges( mpEditSource->getRanges() ); SvxUnoTextContent* pContent = nullptr; sal_Int32 nStartPos = 0; sal_Int32 nEndPos = mrText.GetEditSource()->GetTextForwarder()->GetTextLen( currentPara ); - if( currentPara == maSelection.nStartPara ) - nStartPos = std::max(nStartPos, maSelection.nStartPos); - if( currentPara == maSelection.nEndPara ) - nEndPos = std::min(nEndPos, maSelection.nEndPos); + if( currentPara == rSel.nStartPara ) + nStartPos = std::max(nStartPos, rSel.nStartPos); + if( currentPara == rSel.nEndPara ) + nEndPos = std::min(nEndPos, rSel.nEndPos); ESelection aCurrentParaSel = ESelection( currentPara, nStartPos, currentPara, nEndPos ); for (auto const& elemRange : rRanges) { @@ -377,17 +376,15 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames() // class SvxUnoTextRangeEnumeration -SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rText, sal_Int32 nPara, const ESelection& rSel) -: mxParentText( const_cast<SvxUnoTextBase*>(&rText) ), - mrParentText( rText ), +SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rParentText, sal_Int32 nPara, const ESelection& rSel) +: mxParentText( const_cast<SvxUnoTextBase*>(&rParentText) ), mnParagraph( nPara ), - mnNextPortion( 0 ), - mnSel( rSel ) + mnNextPortion( 0 ) { - if (rText.GetEditSource()) - mpEditSource = rText.GetEditSource()->Clone(); + if (rParentText.GetEditSource()) + mpEditSource = rParentText.GetEditSource()->Clone(); - if( mpEditSource && mpEditSource->GetTextForwarder() && (mnParagraph == mnSel.nStartPara && mnParagraph == mnSel.nEndPara) ) + if( mpEditSource && mpEditSource->GetTextForwarder() && (mnParagraph == rSel.nStartPara && mnParagraph == rSel.nEndPara) ) { std::vector<sal_Int32> aPortions; mpEditSource->GetTextForwarder()->GetPortions( nPara, aPortions ); @@ -396,14 +393,14 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rTe sal_uInt16 nStartPos = 0; if ( aPortionIndex > 0 ) nStartPos = aPortions.at( aPortionIndex - 1 ); - if( nStartPos > mnSel.nEndPos ) + if( nStartPos > rSel.nEndPos ) continue; sal_uInt16 nEndPos = aPortions.at( aPortionIndex ); - if( nEndPos < mnSel.nStartPos ) + if( nEndPos < rSel.nStartPos ) continue; - nStartPos = std::max<int>(nStartPos, mnSel.nStartPos); - nEndPos = std::min<sal_uInt16>(nEndPos, mnSel.nEndPos); + nStartPos = std::max<int>(nStartPos, rSel.nStartPos); + nEndPos = std::min<sal_uInt16>(nEndPos, rSel.nEndPos); ESelection aSel( mnParagraph, nStartPos, mnParagraph, nEndPos ); const SvxUnoTextRangeBaseVec& rRanges( mpEditSource->getRanges() ); @@ -418,7 +415,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rTe } if( pRange == nullptr ) { - pRange = new SvxUnoTextRange( mrParentText, true ); + pRange = new SvxUnoTextRange( rParentText, true ); pRange->SetSelection( aSel ); } maPortions.emplace_back(pRange ); diff --git a/extensions/source/bibliography/general.cxx b/extensions/source/bibliography/general.cxx index 2d5594c478e0..bc86e4fa9d35 100644 --- a/extensions/source/bibliography/general.cxx +++ b/extensions/source/bibliography/general.cxx @@ -167,7 +167,6 @@ void BibPosListener::disposing(const lang::EventObject& /*Source*/) BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan): TabPage(pParent, "GeneralPage", "modules/sbibliography/ui/generalpage.ui"), BibShortCutHandler( this ), - sErrorPrefix(BibResId(ST_ERROR_PREFIX)), mxBibGeneralPageFocusListener(new BibGeneralPageFocusListener(this)), pDatMan(pMan) { @@ -332,7 +331,7 @@ BibGeneralPage::BibGeneralPage(vcl::Window* pParent, BibDataManager* pMan): xFormCtrl->activateTabOrder(); if(!sTableErrorString.isEmpty()) - sTableErrorString = sErrorPrefix + sTableErrorString; + sTableErrorString = BibResId(ST_ERROR_PREFIX) + sTableErrorString; SetText(BibResId(ST_TYPE_TITLE)); diff --git a/extensions/source/bibliography/general.hxx b/extensions/source/bibliography/general.hxx index 13a457e4dc01..791b66ff26dd 100644 --- a/extensions/source/bibliography/general.hxx +++ b/extensions/source/bibliography/general.hxx @@ -109,7 +109,6 @@ class BibGeneralPage : public TabPage, public BibShortCutHandler css::uno::Reference< css::awt::XWindow > aControls[ FIELD_COUNT ]; - OUString sErrorPrefix; OUString sTableErrorString; OUString sTypeColumnName; diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 366b156eb7f6..b2e22b9685c0 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -63,7 +63,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int tools::Rectangle aRect( 0, 0, static_cast<long>( mnDocWidth * mnDocXScale ), static_cast<long>( mnDocHeight * mnDocYScale ) ); tools::Polygon aPoly( aRect ); FillStyle aFill = FillStyle( COL_WHITE ); - mnWhiteBackgroundShapeId = defineShape( aPoly, aFill ); + sal_uInt16 nWhiteBackgroundShapeId = defineShape( aPoly, aFill ); ::basegfx::B2DHomMatrix m; // #i73264# mnPageButtonId = createID(); @@ -72,7 +72,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int // button records mpTag->addUI8( 0x08 ); // only hit state - mpTag->addUI16( mnWhiteBackgroundShapeId ); // shape id of background rectangle + mpTag->addUI16( nWhiteBackgroundShapeId ); // shape id of background rectangle mpTag->addUI16( 0 ); // depth for button DANGER! mpTag->addMatrix( m ); // identity matrix mpTag->addUI8( 0 ); // empty color transform diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index 61972b30b9d3..e5453c6b5882 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -372,7 +372,6 @@ private: double mnDocXScale; double mnDocYScale; - sal_uInt16 mnWhiteBackgroundShapeId; sal_uInt16 mnPageButtonId; VclPtrInstance<VirtualDevice> mpVDev; diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx index c7fbd2cfd65a..3ae2f7db8b5c 100644 --- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx @@ -114,8 +114,6 @@ DXFGroupReader::DXFGroupReader(SvStream & rIStream) , S() , I(0) { - rIS.Seek(STREAM_SEEK_TO_END); - nFileSize=rIS.Tell(); rIS.Seek(0); } diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx index 97a023420e74..4ed4450d0017 100644 --- a/filter/source/graphicfilter/idxf/dxfgrprd.hxx +++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx @@ -71,8 +71,6 @@ private: sal_uInt16 nLastG; sal_uLong nGCount; - sal_uLong nFileSize; - OString S; union { double F; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index c9e26c9e64c6..3aaf6c44dcba 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3236,8 +3236,7 @@ bool PPTExtParaProv::GetGraphic( sal_uInt32 nInstance, Graphic& rGraph ) const } PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const DffRecordHeader* pHd ) : - bStyles ( false ), - bGraphics ( false ) + bStyles ( false ) { sal_uInt32 nOldPos = rSt.Tell(); @@ -3304,8 +3303,6 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const if (!aBuGraAtomHd.SeekToEndOfRecord(rSt)) break; } - if ( !aBuGraList.empty() ) - bGraphics = true; } break; diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx index c6b099d2202a..a88b00d15c7b 100644 --- a/include/editeng/editstat.hxx +++ b/include/editeng/editstat.hxx @@ -140,19 +140,16 @@ struct SpellCallbackInfo { SpellCallbackCommand nCommand; OUString aWord; - LanguageType eLanguage; SpellCallbackInfo( SpellCallbackCommand nCMD, const OUString& rWord ) : aWord( rWord ) { nCommand = nCMD; - eLanguage = LANGUAGE_DONTKNOW; } - SpellCallbackInfo( SpellCallbackCommand nCMD, LanguageType eLang ) + SpellCallbackInfo( SpellCallbackCommand nCMD ) { nCommand = nCMD; - eLanguage = eLang; } }; diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx index 3c94d3675e61..07b1171e59f9 100644 --- a/include/editeng/unotext.hxx +++ b/include/editeng/unotext.hxx @@ -593,7 +593,6 @@ private: std::unique_ptr<SvxEditSource> mpEditSource; sal_Int32 mnNextParagraph; const SvxUnoTextBase& mrText; - const ESelection maSelection; std::vector< rtl::Reference<SvxUnoTextContent> > maContents; public: @@ -611,11 +610,9 @@ class SvxUnoTextRangeEnumeration : public ::cppu::WeakAggImplHelper1< css::conta private: std::unique_ptr<SvxEditSource> mpEditSource; css::uno::Reference< css::text::XText > mxParentText; - const SvxUnoTextBase& mrParentText; sal_Int32 mnParagraph; std::vector< rtl::Reference<SvxUnoTextRange> > maPortions; sal_uInt16 mnNextPortion; - const ESelection mnSel; public: SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rText, sal_Int32 nPara, const ESelection& rSel); diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index 3ce61ea3d0b4..7dc6082fb931 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -724,7 +724,6 @@ class PPTExtParaProv public: bool bStyles; - bool bGraphics; DffRecordManager aExtendedPresRules; o3tl::enumarray<TSS_Type, PPTExtParaSheet> aExtParaSheet; |