diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-03 08:56:35 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:27 -0400 |
commit | 3f6d4de28cf5abd7ab043c1009c4b45028a78a1d (patch) | |
tree | 46ce20f4fdf696fa7462d4f1f07f3c1a3ab2b250 /editeng | |
parent | 933268b50345016918aa07a4c93ad956472f40ef (diff) |
loplugin:unuseddefaultparams in editeng
(cherry picked from commit b76842f63b19e9855fbdfee7c201ff73672464b6)
Change-Id: I1dc0ba262c06bd69cf92aae20b344fe23f460f55
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleParaManager.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 21 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/eehtml.cxx | 15 | ||||
-rw-r--r-- | editeng/source/editeng/eehtml.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 21 | ||||
-rw-r--r-- | editeng/source/items/numitem.cxx | 7 | ||||
-rw-r--r-- | editeng/source/items/paperinf.cxx | 6 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 7 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 5 | ||||
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 12 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 37 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 4 | ||||
-rw-r--r-- | editeng/source/rtf/rtfitem.cxx | 8 | ||||
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 12 | ||||
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 4 |
18 files changed, 70 insertions, 116 deletions
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx index 30fbdb56dd1b..92b9f8ff3201 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 { WeakPara::HardRefType 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 dd01b1a073bb..ce83201e7a9e 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -552,10 +552,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 @@ -800,9 +800,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) @@ -874,9 +874,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) @@ -909,9 +909,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) @@ -2735,10 +2735,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 0868b4c29928..8404c995cd90 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -396,7 +396,7 @@ bool EditTextObject::Store( SvStream& rOStream ) const return rOStream.GetError() == 0; } -EditTextObject* EditTextObject::Create( SvStream& rIStream, SfxItemPool* pGlobalTextObjectPool ) +EditTextObject* EditTextObject::Create( SvStream& rIStream ) { sal_Size nStartPos = rIStream.Tell(); @@ -417,7 +417,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 584634c9c435..01461cbdb2fa 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 726a44421eb3..854380ebb2cf 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -766,7 +766,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() ) ) @@ -797,9 +797,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 639b6442c5df..ff47c698c5dd 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; @@ -1005,7 +1005,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 4c94f4f392c2..de9961bf93b6 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1398,7 +1398,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 ); @@ -1424,10 +1424,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 ); } @@ -1466,7 +1466,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 ); @@ -1479,7 +1479,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; @@ -2037,7 +2037,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() ) { @@ -2059,10 +2059,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 ); @@ -4277,10 +4274,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 678f4b3c305e..31a17578ef29 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -808,7 +808,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() ) ) @@ -854,10 +854,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 31e39bc4b1f0..efea3fa9fb01 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 72a9aa16a40a..8593ed0518fa 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 folloeing !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 3ae486dade19..d428dd85428f 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 29796786fce0..9b37632c0f98 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1372,9 +1372,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 a4e9d40dbe3a..ed9e44481f0c 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 71131fdcde78..ef7eb81bb171 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -651,7 +651,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(), @@ -743,15 +743,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" } @@ -811,12 +805,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) |