summaryrefslogtreecommitdiff
path: root/editeng
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
parent4dedf654d83ddc22c93d98fe6c7225b8e1e416bd (diff)
loplugin:unuseddefaultparams in editeng
Change-Id: I1dc0ba262c06bd69cf92aae20b344fe23f460f55
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleParaManager.cxx5
-rw-r--r--editeng/source/editeng/editeng.cxx21
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/eehtml.cxx15
-rw-r--r--editeng/source/editeng/eehtml.hxx2
-rw-r--r--editeng/source/editeng/impedit.cxx6
-rw-r--r--editeng/source/editeng/impedit.hxx10
-rw-r--r--editeng/source/editeng/impedit2.cxx21
-rw-r--r--editeng/source/items/numitem.cxx7
-rw-r--r--editeng/source/items/paperinf.cxx6
-rw-r--r--editeng/source/items/paraitem.cxx7
-rw-r--r--editeng/source/misc/svxacorr.cxx5
-rw-r--r--editeng/source/outliner/outlin2.cxx12
-rw-r--r--editeng/source/outliner/outliner.cxx37
-rw-r--r--editeng/source/outliner/outlvw.cxx8
-rw-r--r--editeng/source/rtf/rtfitem.cxx8
-rw-r--r--editeng/source/rtf/svxrtf.cxx12
-rw-r--r--editeng/source/uno/unoedprx.cxx4
18 files changed, 72 insertions, 118 deletions
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index f57576f0b2d5..4fbcd90109a9 100644
--- a/editeng/source/accessibility/AccessibleParaManager.cxx
+++ b/editeng/source/accessibility/AccessibleParaManager.cxx
@@ -96,8 +96,7 @@ namespace accessibility
void AccessibleParaManager::FireEvent( sal_Int32 nPara,
const sal_Int16 nEventId,
- const uno::Any& rNewValue,
- const uno::Any& rOldValue ) const
+ const uno::Any& rNewValue ) const
{
DBG_ASSERT( 0 <= nPara && maChildren.size() > static_cast<size_t>(nPara),
"AccessibleParaManager::FireEvent: invalid index" );
@@ -106,7 +105,7 @@ namespace accessibility
{
auto maChild( GetChild( nPara ).first.get() );
if( maChild.is() )
- maChild->FireEvent( nEventId, rNewValue, rOldValue );
+ maChild->FireEvent( nEventId, rNewValue, css::uno::Any() );
}
}
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index efcf60790b61..d69a1af45f82 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -551,10 +551,10 @@ OUString EditEngine::GetText( LineEnd eEnd ) const
return pImpEditEngine->GetEditDoc().GetText( eEnd );
}
-OUString EditEngine::GetText( const ESelection& rESelection, const LineEnd eEnd ) const
+OUString EditEngine::GetText( const ESelection& rESelection ) const
{
EditSelection aSel( pImpEditEngine->CreateSel( rESelection ) );
- return pImpEditEngine->GetSelected( aSel, eEnd );
+ return pImpEditEngine->GetSelected( aSel );
}
sal_uInt32 EditEngine::GetTextLen() const
@@ -799,9 +799,9 @@ EditSelection EditEngine::InsertText(
return pImpEditEngine->InsertText(rxDataObj, rBaseURL, rPaM, bUseSpecial);
}
-EditPaM EditEngine::EndOfWord(const EditPaM& rPaM, sal_Int16 nWordType)
+EditPaM EditEngine::EndOfWord(const EditPaM& rPaM)
{
- return pImpEditEngine->EndOfWord(rPaM, nWordType);
+ return pImpEditEngine->EndOfWord(rPaM);
}
EditPaM EditEngine::GetPaM(const Point& aDocPos, bool bSmart)
@@ -873,9 +873,9 @@ const ParaPortionList& EditEngine::GetParaPortions() const
}
void EditEngine::SeekCursor(
- ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut, sal_uInt16 nIgnoreWhich)
+ ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut)
{
- pImpEditEngine->SeekCursor(pNode, nPos, rFont, pOut, nIgnoreWhich);
+ pImpEditEngine->SeekCursor(pNode, nPos, rFont, pOut);
}
EditPaM EditEngine::DeleteSelection(const EditSelection& rSel)
@@ -908,9 +908,9 @@ void EditEngine::SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, s
pImpEditEngine->SetAttribs(rSel, rSet, nSpecial);
}
-OUString EditEngine::GetSelected(const EditSelection& rSel, const LineEnd eParaSep) const
+OUString EditEngine::GetSelected(const EditSelection& rSel) const
{
- return pImpEditEngine->GetSelected(rSel, eParaSep);
+ return pImpEditEngine->GetSelected(rSel);
}
EditPaM EditEngine::DeleteSelected(const EditSelection& rSel)
@@ -2732,10 +2732,9 @@ void EditEngine::CallImportHandler(ImportInfo& rInfo)
pImpEditEngine->aImportHdl.Call(rInfo);
}
-EditPaM EditEngine::InsertParaBreak(
- const EditSelection& rEditSelection, bool bKeepEndingAttribs)
+EditPaM EditEngine::InsertParaBreak(const EditSelection& rEditSelection)
{
- return pImpEditEngine->ImpInsertParaBreak(rEditSelection, bKeepEndingAttribs);
+ return pImpEditEngine->ImpInsertParaBreak(rEditSelection);
}
EditPaM EditEngine::InsertLineBreak(const EditSelection& rEditSelection)
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 77783c9b1e4a..eadcd4cfb471 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -369,7 +369,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
rOStream.Seek( nEndPos );
}
-EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool )
+EditTextObject* EditTextObject::Create( SvStream& rIStream )
{
sal_Size nStartPos = rIStream.Tell();
@@ -390,7 +390,7 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobal
if ( rIStream.GetError() )
return nullptr;
- EditTextObject* pTxtObj = new EditTextObject(pGlobalTextObjectPool);
+ EditTextObject* pTxtObj = new EditTextObject(nullptr);
pTxtObj->CreateData(rIStream);
// Make sure that the stream is left at the correct place.
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 0d060ce98f66..d250b7800673 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -521,20 +521,17 @@ void EditHTMLParser::ImpInsertParaBreak()
aCurSel = mpEditEngine->InsertParaBreak(aCurSel);
}
-void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel )
+void EditHTMLParser::ImpSetAttribs( const SfxItemSet& rItems )
{
// pSel, when character attributes, otherwise paragraph attributes for
// the current paragraph.
- DBG_ASSERT( pSel || ( aCurSel.Min().GetNode() == aCurSel.Max().GetNode() ), "ImpInsertAttribs: Selection?" );
+ DBG_ASSERT( aCurSel.Min().GetNode() == aCurSel.Max().GetNode(), "ImpInsertAttribs: Selection?" );
- EditPaM aStartPaM( pSel ? pSel->Min() : aCurSel.Min() );
- EditPaM aEndPaM( pSel ? pSel->Max() : aCurSel.Max() );
+ EditPaM aStartPaM( aCurSel.Min() );
+ EditPaM aEndPaM( aCurSel.Max() );
- if ( !pSel )
- {
- aStartPaM.SetIndex( 0 );
- aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
- }
+ aStartPaM.SetIndex( 0 );
+ aEndPaM.SetIndex( aEndPaM.GetNode()->Len() );
if (mpEditEngine->IsImportHandlerSet())
{
diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx
index 92c2582e68cf..66af55ee2a32 100644
--- a/editeng/source/editeng/eehtml.hxx
+++ b/editeng/source/editeng/eehtml.hxx
@@ -62,7 +62,7 @@ private:
void ImpInsertParaBreak();
void ImpInsertText( const OUString& rText );
- void ImpSetAttribs( const SfxItemSet& rItems, EditSelection* pSel = nullptr );
+ void ImpSetAttribs( const SfxItemSet& rItems );
void ImpSetStyleSheet( sal_uInt16 nHeadingLevel );
protected:
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 77c0a72fd3cd..b3b09d726242 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -719,7 +719,7 @@ void ImpEditView::CalcAnchorPoint()
}
}
-void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 nShowCursorFlags )
+void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
{
// No ShowCursor in an empty View ...
if ( ( aOutArea.Left() >= aOutArea.Right() ) && ( aOutArea.Top() >= aOutArea.Bottom() ) )
@@ -750,9 +750,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16
const ParaPortion* pParaPortion = pEditEngine->GetParaPortions()[nPara];
- nShowCursorFlags |= nExtraCursorFlags;
-
- nShowCursorFlags |= GETCRSR_TXTONLY;
+ sal_uInt16 nShowCursorFlags = nExtraCursorFlags | GETCRSR_TXTONLY;
// Use CursorBidiLevel 0/1 in meaning of
// 0: prefer portion end, normal mode
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 5449e447884b..a9f4ba69fcdc 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -347,7 +347,7 @@ public:
void CalcAnchorPoint();
void RecalcOutputArea();
- void ShowCursor( bool bGotoCursor, bool bForceVisCursor, sal_uInt16 nShowCursorFlags = 0 );
+ void ShowCursor( bool bGotoCursor, bool bForceVisCursor );
Pair Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck = ScrollRangeCheck::NoNegative );
void SetInsertMode( bool bInsert );
@@ -566,7 +566,7 @@ private:
EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection, bool bKeepEndingAttribs = true );
EditPaM ImpInsertText(const EditSelection& aCurEditSelection, const OUString& rStr);
EditPaM ImpInsertFeature(const EditSelection& rCurSel, const SfxPoolItem& rItem);
- void ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditUndoRemoveChars* pCurUndo = nullptr );
+ void ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars );
void ImpRemoveParagraph( sal_Int32 nPara );
EditSelection ImpMoveParagraphs( Range aParagraphs, sal_Int32 nNewPos );
@@ -597,9 +597,9 @@ private:
static EditPaM CursorEndOfParagraph( const EditPaM& rPaM );
EditPaM CursorStartOfDoc();
EditPaM CursorEndOfDoc();
- EditPaM WordLeft( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditPaM WordLeft( const EditPaM& rPaM );
EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- EditPaM StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
+ EditPaM StartOfWord( const EditPaM& rPaM );
EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES );
EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, bool bAcceptStartOfWord = true );
EditSelection SelectSentence( const EditSelection& rCurSel ) const;
@@ -1006,7 +1006,7 @@ public:
void SetAddExtLeading( bool b );
bool IsAddExtLeading() const { return bAddExtLeading; }
- rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable( bool bGetInternal = true ) const;
+ rtl::Reference<SvxForbiddenCharactersTable> GetForbiddenCharsTable() const;
static void SetForbiddenCharsTable( rtl::Reference<SvxForbiddenCharactersTable> xForbiddenChars );
/** sets a link that is called at the beginning of a drag operation at an edit view */
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index f40a2b8d5839..b96977f6fc7d 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1396,7 +1396,7 @@ EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView )
return GetPaM( aBottomRight );
}
-EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
+EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM )
{
const sal_Int32 nCurrentPos = rPaM.GetIndex();
EditPaM aNewPaM( rPaM );
@@ -1422,10 +1422,10 @@ EditPaM ImpEditEngine::WordLeft( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary =
- _xBI->getWordBoundary(aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, nWordType, true);
+ _xBI->getWordBoundary(aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
if ( aBoundary.startPos >= nCurrentPos )
aBoundary = _xBI->previousWord(
- aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, nWordType);
+ aNewPaM.GetNode()->GetString(), nCurrentPos, aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES);
aNewPaM.SetIndex( ( aBoundary.startPos != (-1) ) ? aBoundary.startPos : 0 );
}
@@ -1464,7 +1464,7 @@ EditPaM ImpEditEngine::WordRight( const EditPaM& rPaM, sal_Int16 nWordType )
return aNewPaM;
}
-EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
+EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM )
{
EditPaM aNewPaM( rPaM );
@@ -1477,7 +1477,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM, sal_Int16 nWordType )
uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() );
i18n::Boundary aBoundary = _xBI->getWordBoundary(
- rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, nWordType, true);
+ rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true);
aNewPaM.SetIndex( aBoundary.startPos );
return aNewPaM;
@@ -2035,7 +2035,7 @@ SvxCellVerJustify ImpEditEngine::GetVerJustification( sal_Int32 nPara ) const
}
// Text changes
-void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditUndoRemoveChars* pCurUndo )
+void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -2057,10 +2057,7 @@ void ImpEditEngine::ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars, EditU
break; // for
}
}
- if ( pCurUndo && ( CreateEditPaM( pCurUndo->GetEPaM() ) == rPaM ) )
- pCurUndo->GetStr() += aStr;
- else
- InsertUndo(new EditUndoRemoveChars(pEditEngine, CreateEPaM(rPaM), aStr));
+ InsertUndo(new EditUndoRemoveChars(pEditEngine, CreateEPaM(rPaM), aStr));
}
aEditDoc.RemoveChars( rPaM, nChars );
@@ -4275,10 +4272,10 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, bool bRight )
}
}
-rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable( bool bGetInternal ) const
+rtl::Reference<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable() const
{
rtl::Reference<SvxForbiddenCharactersTable> xF = xForbiddenCharsTable;
- if ( !xF.is() && bGetInternal )
+ if ( !xF.is() )
xF = EE_DLL().GetGlobalData()->GetForbiddenCharsTable();
return xF;
}
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 40bdebb0717a..44205833db53 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -828,7 +828,7 @@ void SvxNumRule::SetLevel(sal_uInt16 nLevel, const SvxNumberFormat* pFmt)
}
}
-OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings ) const
+OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum ) const
{
OUString aStr;
if( SVX_NO_NUM > rNum.GetLevel() && !( SVX_NO_NUMLEVEL & rNum.GetLevel() ) )
@@ -874,10 +874,7 @@ OUString SvxNumRule::MakeNumString( const SvxNodeNum& rNum, bool bInclStrings )
}
}
- if( bInclStrings )
- {
- aStr = rMyNFmt.GetPrefix() + aStr + rMyNFmt.GetSuffix();
- }
+ aStr = rMyNFmt.GetPrefix() + aStr + rMyNFmt.GetSuffix();
}
return aStr;
}
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index 345bc6c8b61c..118d532d3a1c 100644
--- a/editeng/source/items/paperinf.cxx
+++ b/editeng/source/items/paperinf.cxx
@@ -93,11 +93,11 @@ Paper SvxPaperInfo::GetSvxPaper( const Size &rSize, MapUnit eUnit, bool bSloppy
}
-long SvxPaperInfo::GetSloppyPaperDimension( long nSize, MapUnit eUnit )
+long SvxPaperInfo::GetSloppyPaperDimension( long nSize )
{
- nSize = eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, eUnit, MAP_100TH_MM);
+ nSize = OutputDevice::LogicToLogic(nSize, MAP_TWIP, MAP_100TH_MM);
nSize = PaperInfo::sloppyFitPageDimension(nSize);
- return eUnit == MAP_100TH_MM ? nSize : OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, eUnit);
+ return OutputDevice::LogicToLogic(nSize, MAP_100TH_MM, MAP_TWIP);
}
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 6f5d4b52c295..c60dff652299 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -1130,17 +1130,16 @@ bool SvxTabStopItem::Insert( const SvxTabStop& rTab )
return maTabStops.insert( rTab ).second;
}
-void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart,
- sal_uInt16 nEnd )
+void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart )
{
- for( sal_uInt16 i = nStart; i < nEnd && i < pTabs->Count(); i++ )
+ for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ )
{
const SvxTabStop& rTab = (*pTabs)[i];
sal_uInt16 nTabPos = GetPos(rTab);
if(SVX_TAB_NOTFOUND != nTabPos)
Remove(nTabPos);
}
- for( sal_uInt16 i = nStart; i < nEnd && i < pTabs->Count(); i++ )
+ for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ )
{
maTabStops.insert( (*pTabs)[i] );
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 3d98c2d666e1..156f6a9766c2 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -716,8 +716,7 @@ bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
- sal_Int32 , sal_Int32 nEndPos,
- LanguageType eLang )
+ sal_Int32 , sal_Int32 nEndPos )
{
// Condition:
// at the beginning: _ or * after Space with the following !Space
@@ -733,7 +732,7 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rT
bool bAlphaNum = false;
sal_Int32 nPos = nEndPos;
sal_Int32 nFndPos = -1;
- CharClass& rCC = GetCharClass( eLang );
+ CharClass& rCC = GetCharClass( LANGUAGE_SYSTEM );
while( nPos )
{
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();
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index ae2eaddc6036..510eba5b6d74 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -94,10 +94,10 @@ inline const SvxEscapementItem& GetEscapement(const SfxItemSet& rSet,sal_uInt16
inline const SvxLineSpacingItem& GetLineSpacing(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
{ return static_cast<const SvxLineSpacingItem&>(rSet.Get( nId,bInP)); }
// frm
-inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
- { return static_cast<const SvxLRSpaceItem&>(rSet.Get( nId,bInP)); }
-inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId,bool bInP=true)
- { return static_cast<const SvxULSpaceItem&>(rSet.Get( nId,bInP)); }
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_uInt16 nId)
+ { return static_cast<const SvxLRSpaceItem&>(rSet.Get( nId)); }
+inline const SvxULSpaceItem& GetULSpace(const SfxItemSet& rSet,sal_uInt16 nId)
+ { return static_cast<const SvxULSpaceItem&>(rSet.Get( nId)); }
void SvxRTFParser::SetScriptAttr( RTF_CharTypeDef eType, SfxItemSet& rSet,
SfxPoolItem& rItem )
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 592eb4ab93cd..be4305b10e49 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -653,7 +653,7 @@ util::DateTime SvxRTFParser::GetDateTimeStamp( )
return aDT;
}
-void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
+void SvxRTFParser::ReadInfo()
{
int _nOpenBrakets = 1; // the first was already detected earlier!!
DBG_ASSERT(m_xDocProps.is(),
@@ -745,15 +745,9 @@ void SvxRTFParser::ReadInfo( const sal_Char* pChkForVerNo )
case RTF_NOFCHARS:
NextToken( nToken );
break;
-
-// default:
}
}
- if( pChkForVerNo &&
- sComment == OUString::createFromAscii( pChkForVerNo ) )
- nVersionNo = nVersNo;
-
SkipToken(); // the closing brace is evaluated "above"
}
@@ -813,12 +807,12 @@ const vcl::Font& SvxRTFParser::GetFont( sal_uInt16 nId )
return *pDfltFont;
}
-SvxRTFItemStackType* SvxRTFParser::_GetAttrSet( bool const bCopyAttr )
+SvxRTFItemStackType* SvxRTFParser::_GetAttrSet()
{
SvxRTFItemStackType* pAkt = aAttrStack.empty() ? nullptr : aAttrStack.back();
SvxRTFItemStackType* pNew;
if( pAkt )
- pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, bCopyAttr );
+ pNew = new SvxRTFItemStackType( *pAkt, *pInsPos, false/*bCopyAttr*/ );
else
pNew = new SvxRTFItemStackType( *pAttrPool, &aWhichMap[0],
*pInsPos );
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 3d83bf8fa7c4..5126b6d29927 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -99,13 +99,13 @@ public:
void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; }
sal_Int32 GetFieldOffset() const { return mnFieldOffset; }
sal_Int32 GetFieldLen() const { return mnFieldLen; }
- void AreInField( bool bInField = true ) { mbInField = bInField; }
+ void AreInField() { mbInField = true; }
bool InField() const { return mbInField; }
void SetBulletOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnBulletOffset = nOffset; mnBulletLen = nLen; }
sal_Int32 GetBulletOffset() const { return mnBulletOffset; }
sal_Int32 GetBulletLen() const { return mnBulletLen; }
- void AreInBullet( bool bInBullet = true ) { mbInBullet = bInBullet; }
+ void AreInBullet() { mbInBullet = true; }
bool InBullet() const { return mbInBullet; }
/// returns false if the given range is non-editable (e.g. contains bullets or _parts_ of fields)