summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-04 14:07:10 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-05 06:26:05 +0000
commit50bb5eddaac2b16f387ba610cdcfd934269dc73c (patch)
tree26f385d94ab4651eb19fb8fbc5b9253743ce6b91 /editeng
parentdb43ef00c12bc0f7fefd6d028c9a2ed8f771cd47 (diff)
loplugin:constantparam in editeng
Change-Id: If8342112e0657014266133954269b9396085a27d Reviewed-on: https://gerrit.libreoffice.org/23807 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editview.cxx7
-rw-r--r--editeng/source/outliner/outlvw.cxx8
-rw-r--r--editeng/source/uno/unoedprx.cxx2
-rw-r--r--editeng/source/uno/unofored.cxx4
-rw-r--r--editeng/source/uno/unoforou.cxx4
-rw-r--r--editeng/source/uno/unotext.cxx4
6 files changed, 12 insertions, 17 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index af172944b8d5..8c89c96cccb9 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -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();
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index cd855b7a03c5..c4891e228286 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -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;
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 1cb0e017ae53..d5d6b18bfe64 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -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& )
{
}
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 03b290c988bd..47f7afd5a734 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -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
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 9646a98d1ee7..dfa76ffb80cd 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -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
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 9b253bc30d16..2c5a1a19375a 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -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& )
{
}