diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-25 15:53:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-27 06:08:51 +0000 |
commit | a7ea18ffe715776cb0e2b39e98569c75605ee332 (patch) | |
tree | 1e32da87f2ad0e8d111ba8ed99180bb6b4cf2a77 /sw/source/uibase | |
parent | eca5ea9f79181d45cd7fbabe2313617d3025818a (diff) |
loplugin:expandablemethods in sw
Change-Id: Ibc9edc28f4041235ab30c026bd3774bd74b7e960
Reviewed-on: https://gerrit.libreoffice.org/30287
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 11 | ||||
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 15 | ||||
-rw-r--r-- | sw/source/uibase/inc/srcedtw.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/lingu/hhcwrp.cxx | 7 |
4 files changed, 8 insertions, 27 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index f4fd1bbb44f0..2c1fd60a5d28 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -493,7 +493,8 @@ bool SwPostItMgr::CalcRects() // show notes in right order in navigator //prevent Anchors during layout to overlap, e.g. when moving a frame - Sort(); + if (mvPostItFields.size()>1 ) + mvPostItFields.sort(comp_pos); // sort the items into the right page vector, so layout can be done by page for(std::list<SwSidebarItem*>::iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) @@ -1513,14 +1514,6 @@ void SwPostItMgr::Show() LayoutPostIts(); } -void SwPostItMgr::Sort() -{ - if (mvPostItFields.size()>1 ) - { - mvPostItFields.sort(comp_pos); - } -} - SwSidebarWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const { for(const_iterator i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 8f2e3bff6c09..1e7da99e0b69 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -671,15 +671,6 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara ) } } -void SwSrcEditWindow::DoDelayedSyntaxHighlight( sal_uInt16 nPara ) -{ - if ( !m_bHighlighting ) - { - m_aSyntaxLineTable.insert( nPara ); - m_aSyntaxIdle.Start(); - } -} - void SwSrcEditWindow::ImpDoHighlight( const OUString& rSource, sal_uInt16 nLineOff ) { TextPortions aPortionList; @@ -762,7 +753,11 @@ void SwSrcEditWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) case TEXT_HINT_PARAINSERTED: case TEXT_HINT_PARACONTENTCHANGED: - DoDelayedSyntaxHighlight(static_cast<sal_uInt16>(pTextHint->GetValue())); + if ( !m_bHighlighting ) + { + m_aSyntaxLineTable.insert( static_cast<sal_uInt16>(pTextHint->GetValue()) ); + m_aSyntaxIdle.Start(); + } break; } } diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index ca5aa38d1535..d3b4f8b6d423 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -139,8 +139,6 @@ public: void SetReadonly(bool bSet){m_bReadonly = bSet;} bool IsReadonly(){return m_bReadonly;} - void DoDelayedSyntaxHighlight( sal_uInt16 nPara ); - void SetStartLine(sal_uInt16 nLine){m_nStartLine = nLine;} virtual void Command( const CommandEvent& rCEvt ) override; diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index eccab27dc41d..6d3bef97ef4e 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -638,7 +638,7 @@ bool SwHHCWrapper::ConvNext_impl( ) else if ( m_bStartDone && m_bEndDone ) { // body region done, ask about special region - if( HasOtherCnt_impl() ) + if( !m_bIsSelection && m_rWrtShell.HasOtherCnt() ) { ConvStart_impl( m_pConvArgs, SvxSpellArea::Other ); m_bIsOtherContent = bGoOn = true; @@ -679,11 +679,6 @@ bool SwHHCWrapper::FindConvText_impl() return bFound; } -bool SwHHCWrapper::HasOtherCnt_impl() -{ - return !m_bIsSelection && m_rWrtShell.HasOtherCnt(); -} - void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ *pConversionArgs, SvxSpellArea eArea ) { m_bIsDrawObj = SvxSpellArea::Other == eArea; |