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

loplugin:unusedfields in editeng..filter

Change-Id: I42e41ec69667a5560c5f31c85eb05074666a7bab
Reviewed-on: https://gerrit.libreoffice.org/54455Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 59f398e9
......@@ -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;
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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()
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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));
......
......@@ -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;
......
......@@ -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
......
......@@ -372,7 +372,6 @@ private:
double mnDocXScale;
double mnDocYScale;
sal_uInt16 mnWhiteBackgroundShapeId;
sal_uInt16 mnPageButtonId;
VclPtrInstance<VirtualDevice> mpVDev;
......
......@@ -114,8 +114,6 @@ DXFGroupReader::DXFGroupReader(SvStream & rIStream)
, S()
, I(0)
{
rIS.Seek(STREAM_SEEK_TO_END);
nFileSize=rIS.Tell();
rIS.Seek(0);
}
......
......@@ -71,8 +71,6 @@ private:
sal_uInt16 nLastG;
sal_uLong nGCount;
sal_uLong nFileSize;
OString S;
union {
double F;
......
......@@ -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;
......
......@@ -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;
}
};
......
......@@ -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);
......
......@@ -724,7 +724,6 @@ class PPTExtParaProv
public:
bool bStyles;
bool bGraphics;
DffRecordManager aExtendedPresRules;
o3tl::enumarray<TSS_Type, PPTExtParaSheet> aExtParaSheet;
......
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