summaryrefslogtreecommitdiff
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-03 08:56:35 +0200
committerNoel Grandin <noel@peralex.com>2016-03-03 09:42:49 +0200
commitb76842f63b19e9855fbdfee7c201ff73672464b6 (patch)
tree4f536710463b12facc661a90ddbd5993b538bb6f /editeng/source/outliner
parent4dedf654d83ddc22c93d98fe6c7225b8e1e416bd (diff)
loplugin:unuseddefaultparams in editeng
Change-Id: I1dc0ba262c06bd69cf92aae20b344fe23f460f55
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outlin2.cxx12
-rw-r--r--editeng/source/outliner/outliner.cxx37
-rw-r--r--editeng/source/outliner/outlvw.cxx8
3 files changed, 16 insertions, 41 deletions
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 10e7a8f8fabe..ea85f5507c63 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -178,9 +178,9 @@ void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
pEditEngine->Draw( pOutDev, rOutRect );
}
-void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOrientation )
+void Outliner::Draw( OutputDevice* pOutDev, const Point& rStartPos )
{
- pEditEngine->Draw( pOutDev, rStartPos, nOrientation );
+ pEditEngine->Draw( pOutDev, rStartPos );
}
void Outliner::SetPaperSize( const Size& rSize )
@@ -328,9 +328,9 @@ sal_Int32 Outliner::GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const
return pEditEngine->GetLineLen( nParagraph, nLine );
}
-sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine )
+sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph )
{
- return pEditEngine->GetLineHeight( nParagraph, nLine );
+ return pEditEngine->GetLineHeight( nParagraph );
}
void Outliner::RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich )
@@ -486,9 +486,9 @@ void Outliner::QuickInsertLineBreak( const ESelection& rSel )
pEditEngine->QuickInsertLineBreak( rSel );
}
-void Outliner::QuickFormatDoc( bool bFull )
+void Outliner::QuickFormatDoc()
{
- pEditEngine->QuickFormatDoc( bFull );
+ pEditEngine->QuickFormatDoc();
}
void Outliner::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY )
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 0b96792963a4..e858c089fbbe 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -229,24 +229,11 @@ void Outliner::Init( sal_uInt16 nMode )
EnableUndo(bWasUndoEnabled);
}
-void Outliner::SetMaxDepth( sal_Int16 nDepth, bool bCheckParagraphs )
+void Outliner::SetMaxDepth( sal_Int16 nDepth )
{
if( nMaxDepth != nDepth )
{
nMaxDepth = std::min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
-
- if( bCheckParagraphs )
- {
- sal_Int32 nParagraphs = pParaList->GetParagraphCount();
- for ( sal_Int32 nPara = 0; nPara < nParagraphs; nPara++ )
- {
- Paragraph* pPara = pParaList->GetParagraph( nPara );
- if( pPara && pPara->GetDepth() > nMaxDepth )
- {
- SetDepth( pPara, nMaxDepth );
- }
- }
- }
}
}
@@ -506,7 +493,7 @@ void Outliner::SetText( const OUString& rText, Paragraph* pPara )
// pView == 0 -> Ignore tabs
-bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView)
+bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara )
{
bool bConverted = false;
@@ -565,13 +552,7 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara,EditView* pView)
if ( aDelSel.HasRange() )
{
- if ( pView )
- {
- pView->SetSelection( aDelSel );
- pView->DeleteSelected();
- }
- else
- pEditEngine->QuickDelete( aDelSel );
+ pEditEngine->QuickDelete( aDelSel );
}
const SfxInt16Item& rLevel = static_cast<const SfxInt16Item&>( pEditEngine->GetParaAttrib( nPara, EE_PARA_OUTLLEVEL ) );
@@ -709,14 +690,12 @@ void Outliner::ImplCheckNumBulletItem( sal_Int32 nPara )
pPara->aBulSize.Width() = -1;
}
-void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle )
+void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara )
{
DBG_ASSERT( ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) || ( ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEVIEW ), "SetLevelDependendStyleSheet: Wrong Mode!" );
- SfxStyleSheet* pStyle = pLevelStyle;
- if ( !pStyle )
- pStyle = GetStyleSheet( nPara );
+ SfxStyleSheet* pStyle = GetStyleSheet( nPara );
if ( pStyle )
{
@@ -743,7 +722,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet*
}
}
-void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo, bool bUndoAction )
+void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUndo )
{
DBG_ASSERT( ( nDepth >= nMinDepth ) && ( nDepth <= nMaxDepth ), "ImplInitDepth - Depth is invalid!" );
@@ -762,8 +741,6 @@ void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUnd
pEditEngine->SetUpdateMode( false );
bool bUndo = bCreateUndo && IsUndoEnabled();
- if ( bUndo && bUndoAction )
- UndoActionStart( OLUNDO_DEPTH );
SfxItemSet aAttrs( pEditEngine->GetParaAttribs( nPara ) );
aAttrs.Put( SfxInt16Item( EE_PARA_OUTLLEVEL, nDepth ) );
@@ -774,8 +751,6 @@ void Outliner::ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, bool bCreateUnd
if ( bUndo )
{
InsertUndo( new OutlinerUndoChangeDepth( this, nPara, nOldDepth, nDepth ) );
- if ( bUndoAction )
- UndoActionEnd( OLUNDO_DEPTH );
}
pEditEngine->SetUpdateMode( bUpdate );
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 5a6c9f0e1314..ffefab17fd8e 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1269,9 +1269,9 @@ OUString OutlinerView::GetSelected() const
return pEditView->GetSelected();
}
-void OutlinerView::StartSpeller( bool bMultiDoc )
+void OutlinerView::StartSpeller()
{
- pEditView->StartSpeller( bMultiDoc );
+ pEditView->StartSpeller();
}
EESpellState OutlinerView::StartThesaurus()
@@ -1371,9 +1371,9 @@ sal_uInt16 OutlinerView::GetInvalidateMore() const
}
-bool OutlinerView::IsCursorAtWrongSpelledWord( bool bMarkIfWrong )
+bool OutlinerView::IsCursorAtWrongSpelledWord()
{
- return pEditView->IsCursorAtWrongSpelledWord( bMarkIfWrong );
+ return pEditView->IsCursorAtWrongSpelledWord();
}