summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-16 16:22:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-05-17 08:40:39 +0200
commit82afd77a00c036f106a3aa5fb3402c92e10e2aa4 (patch)
tree2a07561d945b920c18f9e9b7fb5bde3eaf648945 /editeng
parent59f398e934541e05dc9b77c1191227f8c68ea037 (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>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/editobj2.hxx2
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx12
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.hxx4
-rw-r--r--editeng/source/uno/unotext2.cxx37
6 files changed, 23 insertions, 38 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 );