diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 15 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 10 | ||||
-rw-r--r-- | editeng/source/outliner/paralist.cxx | 12 | ||||
-rw-r--r-- | editeng/source/outliner/paralist.hxx | 2 |
7 files changed, 18 insertions, 29 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index eb3a7f2417b7..58463e6fee62 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -929,7 +929,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo sal_uInt16 nId = aPopupMenu.Execute( pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose ); if ( nId == MN_IGNORE ) { - OUString aWord = pImpEditView->SpellIgnoreOrAddWord( false ); + OUString aWord = pImpEditView->SpellIgnoreWord(); if ( pCallBack ) { SpellCallbackInfo aInf( SpellCallbackCommand::IGNOREWORD, aWord ); diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index b3b09d726242..6b1bd6f9a0b5 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1233,7 +1233,7 @@ bool ImpEditView::IsWrongSpelledWord( const EditPaM& rPaM, bool bMarkIfWrong ) return bIsWrong; } -OUString ImpEditView::SpellIgnoreOrAddWord( bool bAdd ) +OUString ImpEditView::SpellIgnoreWord() { OUString aWord; if ( pEditEngine->pImpEditEngine->GetSpeller().is() ) @@ -1255,16 +1255,9 @@ OUString ImpEditView::SpellIgnoreOrAddWord( bool bAdd ) if ( !aWord.isEmpty() ) { - if ( bAdd ) - { - OSL_FAIL( "Sorry, AddWord not implemented" ); - } - else // Ignore - { - Reference< XDictionary > xDic( SvxGetIgnoreAllList(), UNO_QUERY ); - if (xDic.is()) - xDic->add( aWord, sal_False, OUString() ); - } + Reference< XDictionary > xDic( SvxGetIgnoreAllList(), UNO_QUERY ); + if (xDic.is()) + xDic->add( aWord, sal_False, OUString() ); EditDoc& rDoc = pEditEngine->GetEditDoc(); sal_Int32 nNodes = rDoc.Count(); for ( sal_Int32 n = 0; n < nNodes; n++ ) diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index fa309f881e9a..bfbe38eee157 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -373,7 +373,7 @@ public: void libreOfficeKitCallback(int nType, const char* pPayload) const; bool IsWrongSpelledWord( const EditPaM& rPaM, bool bMarkIfWrong ); - OUString SpellIgnoreOrAddWord( bool bAdd ); + OUString SpellIgnoreWord(); const SvxFieldItem* GetField( const Point& rPos, sal_Int32* pPara, sal_Int32* pPos ) const; void DeleteSelected(); diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index ea85f5507c63..89831ef5459a 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -153,9 +153,9 @@ bool Outliner::UpdateFields() return pEditEngine->UpdateFields(); } -void Outliner::RemoveFields( bool bKeepFieldText, std::function<bool ( const SvxFieldData* )> isFieldData ) +void Outliner::RemoveFields( std::function<bool ( const SvxFieldData* )> isFieldData ) { - pEditEngine->RemoveFields( bKeepFieldText, isFieldData ); + pEditEngine->RemoveFields( true/*bKeepFieldText*/, isFieldData ); } void Outliner::SetWordDelimiters( const OUString& rDelimiters ) diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 64d29cd311b7..f14053b73f34 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -580,7 +580,7 @@ void Outliner::SetText( const OutlinerParaObject& rPObj ) bFirstParaIsEmpty = false; - pParaList->Clear( true ); + pParaList->Clear(); for( sal_Int32 nCurPara = 0; nCurPara < rPObj.Count(); nCurPara++ ) { Paragraph* pPara = new Paragraph( rPObj.GetParagraphData(nCurPara)); @@ -610,7 +610,7 @@ void Outliner::AddText( const OutlinerParaObject& rPObj ) sal_Int32 nPara; if( bFirstParaIsEmpty ) { - pParaList->Clear( true ); + pParaList->Clear(); pEditEngine->SetText(rPObj.GetTextObject()); nPara = 0; } @@ -1103,7 +1103,7 @@ sal_uLong Outliner::Read( SvStream& rInput, const OUString& rBaseURL, sal_uInt16 bFirstParaIsEmpty = false; sal_Int32 nParas = pEditEngine->GetParagraphCount(); - pParaList->Clear( true ); + pParaList->Clear(); for ( sal_Int32 n = 0; n < nParas; n++ ) { Paragraph* pPara = new Paragraph( 0 ); @@ -1284,7 +1284,7 @@ Outliner::Outliner(SfxItemPool* pPool, sal_uInt16 nMode) Outliner::~Outliner() { - pParaList->Clear( true ); + pParaList->Clear(); delete pParaList; delete pEditEngine; } @@ -1914,7 +1914,7 @@ void Outliner::Clear() { ImplBlockInsertionCallbacks( true ); pEditEngine->Clear(); - pParaList->Clear( true ); + pParaList->Clear(); pParaList->Append( new Paragraph( nMinDepth )); bFirstParaIsEmpty = true; ImplBlockInsertionCallbacks( false ); diff --git a/editeng/source/outliner/paralist.cxx b/editeng/source/outliner/paralist.cxx index 3912f5804850..c50e576d6096 100644 --- a/editeng/source/outliner/paralist.cxx +++ b/editeng/source/outliner/paralist.cxx @@ -96,15 +96,11 @@ void Paragraph::SetParaIsNumberingRestart( bool bParaIsNumberingRestart ) mnNumberingStartValue = -1; } -void ParagraphList::Clear( bool bDestroyParagraphs ) +void ParagraphList::Clear() { - if ( bDestroyParagraphs ) - { - std::vector<Paragraph*>::iterator iter; - for (iter = maEntries.begin(); iter != maEntries.end(); ++iter) - delete *iter; - } - + std::vector<Paragraph*>::iterator iter; + for (iter = maEntries.begin(); iter != maEntries.end(); ++iter) + delete *iter; maEntries.clear(); } diff --git a/editeng/source/outliner/paralist.hxx b/editeng/source/outliner/paralist.hxx index 848dbafc8764..a4e6ebb7be6b 100644 --- a/editeng/source/outliner/paralist.hxx +++ b/editeng/source/outliner/paralist.hxx @@ -32,7 +32,7 @@ class Paragraph; class ParagraphList { public: - void Clear( bool bDestroyParagraphs ); + void Clear(); sal_Int32 GetParagraphCount() const { |