Kaydet (Commit) 50bb5edd authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

loplugin:constantparam in editeng

Change-Id: If8342112e0657014266133954269b9396085a27d
Reviewed-on: https://gerrit.libreoffice.org/23807Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst db43ef00
......@@ -2496,7 +2496,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
nFontHeight = nYStep * 15 / 10;
aStdFont.SetFontSize(Size( 0, nFontHeight ));
SvxNodeNum aNum(sal_uInt8(0));
SvxNodeNum aNum;
sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart();
if (bPosition)
......
......@@ -486,7 +486,7 @@ void EditView::Redo()
pImpEditView->pEditEngine->Redo( this );
}
sal_uInt32 EditView::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, bool bSelect, SvKeyValueIterator* pHTTPHeaderAttrs )
sal_uInt32 EditView::Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs )
{
EditSelection aOldSel( pImpEditView->GetEditSelection() );
pImpEditView->DrawSelection();
......@@ -494,11 +494,6 @@ sal_uInt32 EditView::Read( SvStream& rInput, const OUString& rBaseURL, EETextFor
EditPaM aEndPaM = pImpEditView->pEditEngine->pImpEditEngine->Read( rInput, rBaseURL, eFormat, aOldSel, pHTTPHeaderAttrs );
pImpEditView->pEditEngine->pImpEditEngine->UndoActionEnd( EDITUNDO_READ );
EditSelection aNewSel( aEndPaM, aEndPaM );
if ( bSelect )
{
aOldSel.Adjust( pImpEditView->pEditEngine->GetEditDoc() );
aNewSel.Min() = aOldSel.Min();
}
pImpEditView->SetEditSelection( aNewSel );
bool bGotoCursor = pImpEditView->DoAutoScroll();
......
......@@ -1160,10 +1160,10 @@ void OutlinerView::SwitchOffBulletsNumbering(
void OutlinerView::RemoveAttribsKeepLanguages( bool bRemoveParaAttribs )
{
RemoveAttribs( bRemoveParaAttribs, 0, true /*keep language attribs*/ );
RemoveAttribs( bRemoveParaAttribs, true /*keep language attribs*/ );
}
void OutlinerView::RemoveAttribs( bool bRemoveParaAttribs, sal_uInt16 nWhich, bool bKeepLanguages )
void OutlinerView::RemoveAttribs( bool bRemoveParaAttribs, bool bKeepLanguages )
{
bool bUpdate = pOwner->GetUpdateMode();
pOwner->SetUpdateMode( false );
......@@ -1171,7 +1171,7 @@ void OutlinerView::RemoveAttribs( bool bRemoveParaAttribs, sal_uInt16 nWhich, bo
if (bKeepLanguages)
pEditView->RemoveAttribsKeepLanguages( bRemoveParaAttribs );
else
pEditView->RemoveAttribs( bRemoveParaAttribs, nWhich );
pEditView->RemoveAttribs( bRemoveParaAttribs );
if ( bRemoveParaAttribs )
{
// Loop through all paragraphs and set indentation and level
......@@ -1388,7 +1388,7 @@ sal_uLong OutlinerView::Read( SvStream& rInput, const OUString& rBaseURL, EEText
ESelection aOldSel = pEditView->GetSelection();
aOldSel.Adjust();
sal_uLong nRet = pEditView->Read( rInput, rBaseURL, eFormat, false/*bSelect*/, pHTTPHeaderAttrs );
sal_uLong nRet = pEditView->Read( rInput, rBaseURL, eFormat, pHTTPHeaderAttrs );
long nParaDiff = pEditView->GetEditEngine()->GetParagraphCount() - nOldParaCount;
sal_Int32 nChangesStart = aOldSel.nStartPara;
......
......@@ -527,7 +527,7 @@ void SvxAccessibleTextAdapter::SetParaAttribs( sal_Int32 nPara, const SfxItemSet
mpTextForwarder->SetParaAttribs( nPara, rSet );
}
void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_uInt16 )
void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& )
{
}
......
......@@ -112,9 +112,9 @@ void SvxEditEngineForwarder::SetParaAttribs( sal_Int32 nPara, const SfxItemSet&
rEditEngine.SetParaAttribs( nPara, rSet );
}
void SvxEditEngineForwarder::RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich )
void SvxEditEngineForwarder::RemoveAttribs( const ESelection& rSelection )
{
rEditEngine.RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, nWhich );
rEditEngine.RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, 0 );
}
SfxItemPool* SvxEditEngineForwarder::GetPool() const
......
......@@ -180,9 +180,9 @@ void SvxOutlinerForwarder::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rS
const_cast<SfxItemSet*>(&rSet)->SetParent( pOldParent );
}
void SvxOutlinerForwarder::RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich )
void SvxOutlinerForwarder::RemoveAttribs( const ESelection& rSelection )
{
rOutliner.RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, nWhich );
rOutliner.RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, 0 );
}
SfxItemPool* SvxOutlinerForwarder::GetPool() const
......
......@@ -2185,7 +2185,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextBase::appendTextPortion(
// set properties for the new text portion
ESelection aSel( nPara, nStart, nPara, nEnd );
pTextForwarder->RemoveAttribs( aSel, 0 );
pTextForwarder->RemoveAttribs( aSel );
pEditSource->UpdateData();
SfxItemSet aItemSet( *pTextForwarder->GetEmptyItemSetPtr() );
......@@ -2415,7 +2415,7 @@ void SvxDummyTextSource::SetParaAttribs( sal_Int32, const SfxItemSet& )
{
}
void SvxDummyTextSource::RemoveAttribs( const ESelection& , sal_uInt16 )
void SvxDummyTextSource::RemoveAttribs( const ESelection& )
{
}
......
......@@ -177,7 +177,7 @@ public:
void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
void RemoveAttribsKeepLanguages( bool bRemoveParaAttribs = false );
sal_uInt32 Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, bool bSelect = false, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
sal_uInt32 Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat eFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
void SetBackgroundColor( const Color& rColor );
Color GetBackgroundColor() const;
......
......@@ -320,7 +320,7 @@ class SvxNodeNum
bool bStartNum; // Restart numbering
public:
explicit inline SvxNodeNum( sal_uInt8 nLevel = SVX_NO_NUM, sal_uInt16 nSetVal = USHRT_MAX );
explicit inline SvxNodeNum( sal_uInt16 nSetVal = USHRT_MAX );
inline SvxNodeNum& operator=( const SvxNodeNum& rCpy );
sal_uInt8 GetLevel() const { return nMyLevel; }
......@@ -330,8 +330,8 @@ public:
sal_uInt16* GetLevelVal() { return nLevelVal; }
};
SvxNodeNum::SvxNodeNum( sal_uInt8 nLevel, sal_uInt16 nSetVal )
: nSetValue( nSetVal ), nMyLevel( nLevel ), bStartNum( false )
SvxNodeNum::SvxNodeNum( sal_uInt16 nSetVal )
: nSetValue( nSetVal ), nMyLevel( 0 ), bStartNum( false )
{
memset( nLevelVal, 0, sizeof( nLevelVal ) );
}
......
......@@ -308,7 +308,7 @@ public:
void SetSelection( const ESelection& );
void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const;
void RemoveAttribs( bool bRemoveParaAttribs = false, sal_uInt16 nWhich = 0, bool bKeepLanguages = false );
void RemoveAttribs( bool bRemoveParaAttribs = false, bool bKeepLanguages = false );
void RemoveAttribsKeepLanguages( bool bRemoveParaAttribs );
bool HasSelection() const;
......
......@@ -39,7 +39,7 @@ public:
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) override;
virtual void RemoveAttribs( const ESelection& rSelection ) override;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const override;
sal_uInt16 CalcEditEngineIndex( sal_Int32 nPara, sal_Int32 nLogicalIndex );
......
......@@ -140,12 +140,12 @@ public:
virtual ~SvxTextForwarder();
virtual sal_Int32 GetParagraphCount() const = 0;
virtual sal_Int32 GetTextLen( sal_Int32 nParagraph ) const = 0;
virtual sal_Int32 GetTextLen( sal_Int32 nParagraph ) const = 0;
virtual OUString GetText( const ESelection& rSel ) const = 0;
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const = 0;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const = 0;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) = 0;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) = 0;
virtual void RemoveAttribs( const ESelection& rSelection ) = 0;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const = 0;
virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0;
......
......@@ -41,7 +41,7 @@ public:
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) override;
virtual void RemoveAttribs( const ESelection& rSelection ) override;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const override;
virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const override;
......
......@@ -59,7 +59,7 @@ public:
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) override;
virtual void RemoveAttribs( const ESelection& rSelection ) override;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const override;
virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const override;
......
......@@ -182,7 +182,7 @@ public:
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) override;
virtual void RemoveAttribs( const ESelection& rSelection ) override;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const override;
SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const override;
......
......@@ -1029,11 +1029,11 @@ SfxItemPool* SmTextForwarder::GetPool() const
return pEditEngine ? pEditEngine->GetEmptyItemSet().GetPool() : nullptr;
}
void SmTextForwarder::RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich )
void SmTextForwarder::RemoveAttribs( const ESelection& rSelection )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
if (pEditEngine)
pEditEngine->RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, nWhich );
pEditEngine->RemoveAttribs( rSelection, false/*bRemoveParaAttribs*/, 0 );
}
void SmTextForwarder::GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const
......
......@@ -196,7 +196,7 @@ public:
virtual SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ) const override;
virtual SfxItemSet GetParaAttribs( sal_Int32 nPara ) const override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
virtual void RemoveAttribs( const ESelection& rSelection, sal_uInt16 nWhich ) override;
virtual void RemoveAttribs( const ESelection& rSelection ) override;
virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList ) const override;
virtual SfxItemState GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const override;
......
......@@ -100,7 +100,7 @@ namespace accessibility
}
SfxItemSet GetParaAttribs( sal_Int32 /*nPara*/ ) const override { return GetAttribs(ESelection()); }
void SetParaAttribs( sal_Int32 /*nPara*/, const SfxItemSet& /*rSet*/ ) override {}
void RemoveAttribs( const ESelection& /*rSelection*/, sal_uInt16 /*nWhich*/ ) override {}
void RemoveAttribs( const ESelection& /*rSelection*/ ) override {}
void GetPortions( sal_Int32 /*nPara*/, std::vector<sal_Int32>& /*rList*/ ) const override {}
SfxItemState GetItemState( const ESelection& /*rSel*/, sal_uInt16 /*nWhich*/ ) const override { return SfxItemState::UNKNOWN; }
......
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