diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-27 14:49:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-28 07:08:47 +0000 |
commit | 89687d651eabcf64816c1b25defe38c7b68dd468 (patch) | |
tree | aa7e6f0848424d408a992815feab4f3e6ee6495d /sd/source/ui/annotations | |
parent | 24360897c05da1ff7c4854ba192eb98466f4499b (diff) |
loplugin:expandablemethods in sd
Change-Id: I87a537928bdf42285448bba7cb50c497f2637c3c
Reviewed-on: https://gerrit.libreoffice.org/30330
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanagerimpl.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.hxx | 2 |
4 files changed, 10 insertions, 25 deletions
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 76703f876a2e..1eda7533e41f 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1092,17 +1092,22 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex) return Color(COL_WHITE); } -SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward ) +SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForward ) { if( pPage == nullptr ) - return bForeward ? GetFirstPage() : GetLastPage(); + { + if (bForward) + return mpDoc->GetSdPage(0, PageKind::Standard ); // first page + else + return mpDoc->GetMasterSdPage( mpDoc->GetMasterSdPageCount(PageKind::Standard) - 1, PageKind::Standard ); // last page + } sal_uInt16 nPageNum = (pPage->GetPageNum() - 1) >> 1; // first all non master pages if( !pPage->IsMasterPage() ) { - if( bForeward ) + if( bForward ) { if( nPageNum >= mpDoc->GetSdPageCount(PageKind::Standard)-1 ) { @@ -1122,7 +1127,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward ) } else { - if( bForeward ) + if( bForward ) { if( nPageNum >= mpDoc->GetMasterSdPageCount(PageKind::Standard)-1 ) { @@ -1144,17 +1149,6 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward ) } } -SdPage* AnnotationManagerImpl::GetFirstPage() -{ - // return first drawing page - return mpDoc->GetSdPage(0, PageKind::Standard ); -} - -SdPage* AnnotationManagerImpl::GetLastPage() -{ - return mpDoc->GetMasterSdPage( mpDoc->GetMasterSdPageCount(PageKind::Standard) - 1, PageKind::Standard ); -} - SdPage* AnnotationManagerImpl::GetCurrentPage() { if (mrBase.GetMainViewShell().get()) diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx index 920111e38fb5..04ceb976e5c0 100644 --- a/sd/source/ui/annotations/annotationmanagerimpl.hxx +++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx @@ -103,8 +103,6 @@ public: void DisposeTags(); SdPage* GetNextPage( SdPage* pPage, bool bForeward ); - SdPage* GetFirstPage(); - SdPage* GetLastPage(); SdPage* GetCurrentPage(); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 5666ff46af84..4e7dfc1fa6f1 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -353,7 +353,7 @@ void AnnotationWindow::InitControls() Invalidate(); - SetLanguage(GetLanguage()); + SetLanguage(SvxLanguageItem( Doc()->GetLanguage( EE_CHAR_LANGUAGE ), SID_ATTR_LANGUAGE )); mpMeta->Show(); mpVScrollbar->Show(); @@ -494,11 +494,6 @@ IMPL_LINK(AnnotationWindow, ScrollHdl, ScrollBar*, pScroll, void) getView()->Scroll( 0, nDiff ); } -SvxLanguageItem AnnotationWindow::GetLanguage() -{ - return SvxLanguageItem( Doc()->GetLanguage( EE_CHAR_LANGUAGE ), SID_ATTR_LANGUAGE ); -} - TextApiObject* getTextApiObject( const Reference< XAnnotation >& xAnnotation ) { if( xAnnotation.is() ) diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index f99a6f02cedf..3643a070b36b 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -100,8 +100,6 @@ class AnnotationWindow : public FloatingWindow void StartEdit(); - SvxLanguageItem GetLanguage(); - void setAnnotation( const css::uno::Reference< css::office::XAnnotation >& xAnnotation ); void ExecuteSlot( sal_uInt16 nSID ); |