diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-28 09:58:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-28 12:15:10 +0100 |
commit | b9183166214c0f461b6fefb34bbf4a57ea878bdf (patch) | |
tree | 0627d5f2c435c0e214c4c49f161f753eb5cce50d /editeng/source | |
parent | 64d4f117447d990ed3215b0dd619e07de26ce417 (diff) |
loplugin:passstuffbyref improved return in editeng
Change-Id: I6aba5b79e588f28529052ddb30ad51807d73cfe5
Reviewed-on: https://gerrit.libreoffice.org/47120
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 16 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/eerdll.cxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/eertfpar.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 4 | ||||
-rw-r--r-- | editeng/source/outliner/outlin2.cxx | 13 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 6 |
8 files changed, 25 insertions, 24 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index db6c7710dc38..2a3ccb3d52bb 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -167,7 +167,7 @@ void EditEngine::SetRefMapMode( const MapMode& rMapMode ) pImpEditEngine->SetRefMapMode( rMapMode ); } -MapMode EditEngine::GetRefMapMode() +MapMode const & EditEngine::GetRefMapMode() { return pImpEditEngine->GetRefMapMode(); } @@ -177,7 +177,7 @@ void EditEngine::SetBackgroundColor( const Color& rColor ) pImpEditEngine->SetBackgroundColor( rColor ); } -Color EditEngine::GetBackgroundColor() const +Color const & EditEngine::GetBackgroundColor() const { return pImpEditEngine->GetBackgroundColor(); } @@ -1519,7 +1519,7 @@ void EditEngine::SetNotifyHdl( const Link<EENotify&,void>& rLink ) pImpEditEngine->SetNotifyHdl( rLink ); } -Link<EENotify&,void> EditEngine::GetNotifyHdl() const +Link<EENotify&,void> const & EditEngine::GetNotifyHdl() const { return pImpEditEngine->GetNotifyHdl(); } @@ -1529,7 +1529,7 @@ void EditEngine::SetStatusEventHdl( const Link<EditStatus&, void>& rLink ) pImpEditEngine->SetStatusEventHdl( rLink ); } -Link<EditStatus&, void> EditEngine::GetStatusEventHdl() const +Link<EditStatus&, void> const & EditEngine::GetStatusEventHdl() const { return pImpEditEngine->GetStatusEventHdl(); } @@ -1636,7 +1636,7 @@ void EditEngine::SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) pImpEditEngine->SetModifyHdl( rLink ); } -Link<LinkParamNone*,void> EditEngine::GetModifyHdl() const +Link<LinkParamNone*,void> const & EditEngine::GetModifyHdl() const { return pImpEditEngine->GetModifyHdl(); } @@ -2154,7 +2154,7 @@ void EditEngine::SetSpeller( Reference< XSpellChecker1 > const &xSpeller ) pImpEditEngine->SetSpeller( xSpeller ); } -Reference< XSpellChecker1 > EditEngine::GetSpeller() +Reference< XSpellChecker1 > const & EditEngine::GetSpeller() { return pImpEditEngine->GetSpeller(); } @@ -2719,7 +2719,7 @@ void EditEngine::SetBeginDropHdl( const Link<EditView*,void>& rLink ) pImpEditEngine->SetBeginDropHdl( rLink ); } -Link<EditView*,void> EditEngine::GetBeginDropHdl() const +Link<EditView*,void> const & EditEngine::GetBeginDropHdl() const { return pImpEditEngine->GetBeginDropHdl(); } @@ -2730,7 +2730,7 @@ void EditEngine::SetEndDropHdl( const Link<EditView*,void>& rLink ) pImpEditEngine->SetEndDropHdl( rLink ); } -Link<EditView*,void> EditEngine::GetEndDropHdl() const +Link<EditView*,void> const & EditEngine::GetEndDropHdl() const { return pImpEditEngine->GetEndDropHdl(); } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 5a852f003605..a7000ce5e5a9 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -660,7 +660,7 @@ void EditView::SetBackgroundColor( const Color& rColor ) pImpEditView->SetBackgroundColor( rColor ); } -Color EditView::GetBackgroundColor() const +Color const & EditView::GetBackgroundColor() const { return pImpEditView->GetBackgroundColor(); } diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index f6b43af56221..9033db06b84d 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -216,7 +216,7 @@ editeng::SharedVclResources::SharedVclResources() editeng::SharedVclResources::~SharedVclResources() { m_pVirDev.disposeAndClear(); } -VclPtr<VirtualDevice> editeng::SharedVclResources::GetVirtualDevice() +VclPtr<VirtualDevice> const & editeng::SharedVclResources::GetVirtualDevice() { return m_pVirDev; } std::shared_ptr<editeng::SharedVclResources> EditDLL::GetSharedVclResources() diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index a308ff5ad3da..c289bb8422df 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -61,7 +61,7 @@ public: virtual SvParserState CallParser() override; - EditPaM GetCurPaM() const { return aCurSel.Max(); } + EditPaM const & GetCurPaM() const { return aCurSel.Max(); } }; typedef tools::SvRef<EditRTFParser> EditRTFParserRef; diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 06fec2bc7e6a..698f16b60f3e 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -824,7 +824,7 @@ public: void SetText( const EditTextObject& rTextObject ); EditSelection InsertText( const EditTextObject& rTextObject, EditSelection aSel ); - EditSelection MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView ); + EditSelection const & MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView ); EditSelection MoveParagraphs( Range aParagraphs, sal_Int32 nNewPos, EditView* pCurView ); @@ -1039,7 +1039,7 @@ public: void SetAddExtLeading( bool b ); bool IsAddExtLeading() const { return bAddExtLeading; } - static std::shared_ptr<SvxForbiddenCharactersTable> GetForbiddenCharsTable(); + static std::shared_ptr<SvxForbiddenCharactersTable> const & GetForbiddenCharsTable(); static void SetForbiddenCharsTable( const std::shared_ptr<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 5d2b0d27e8a3..138e429a70f7 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -755,7 +755,7 @@ void ImpEditEngine::ParaAttribsChanged( ContentNode const * pNode ) // Cursor movements -EditSelection ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView ) +EditSelection const & ImpEditEngine::MoveCursor( const KeyEvent& rKeyEvent, EditView* pEditView ) { // Actually, only necessary for up/down, but whatever. CheckIdleFormatter(); @@ -4337,7 +4337,7 @@ void ImpEditEngine::IndentBlock( EditView* pEditView, bool bRight ) } } -std::shared_ptr<SvxForbiddenCharactersTable> ImpEditEngine::GetForbiddenCharsTable() +std::shared_ptr<SvxForbiddenCharactersTable> const & ImpEditEngine::GetForbiddenCharsTable() { return EditDLL::Get().GetGlobalData()->GetForbiddenCharsTable(); } diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx index 737f47a74b18..b14c9e70d5ce 100644 --- a/editeng/source/outliner/outlin2.cxx +++ b/editeng/source/outliner/outlin2.cxx @@ -72,7 +72,7 @@ bool Outliner::IsUndoEnabled() const return pEditEngine->IsUndoEnabled(); } -MapMode Outliner::GetRefMapMode() const +MapMode const & Outliner::GetRefMapMode() const { return pEditEngine->GetRefMapMode(); } @@ -87,7 +87,7 @@ void Outliner::SetBackgroundColor( const Color& rColor ) pEditEngine->SetBackgroundColor( rColor ); } -Color Outliner::GetBackgroundColor() const +Color const & Outliner::GetBackgroundColor() const { return pEditEngine->GetBackgroundColor(); } @@ -113,7 +113,7 @@ void Outliner::SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) pEditEngine->SetModifyHdl( rLink ); } -Link<LinkParamNone*,void> Outliner::GetModifyHdl() const +Link<LinkParamNone*,void> const & Outliner::GetModifyHdl() const { return pEditEngine->GetModifyHdl(); } @@ -133,7 +133,7 @@ void Outliner::SetStatusEventHdl( const Link<EditStatus&, void>& rLink ) pEditEngine->SetStatusEventHdl( rLink ); } -Link<EditStatus&, void> Outliner::GetStatusEventHdl() const +Link<EditStatus&, void> const & Outliner::GetStatusEventHdl() const { return pEditEngine->GetStatusEventHdl(); } @@ -163,7 +163,7 @@ void Outliner::SetWordDelimiters( const OUString& rDelimiters ) pEditEngine->SetWordDelimiters( rDelimiters ); } -OUString Outliner::GetWordDelimiters() const +OUString const & Outliner::GetWordDelimiters() const { return pEditEngine->GetWordDelimiters(); } @@ -393,7 +393,8 @@ void Outliner::SetSpeller( Reference< XSpellChecker1 > const &xSpeller ) { pEditEngine->SetSpeller( xSpeller ); } -Reference< XSpellChecker1 > Outliner::GetSpeller() + +Reference< XSpellChecker1 > const & Outliner::GetSpeller() { return pEditEngine->GetSpeller(); } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 1e2740734e3b..5706eada0f87 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -571,7 +571,7 @@ void OutlinerView::AdjustHeight( long nDY ) pEditView->MoveParagraphs( nDY ); } -tools::Rectangle OutlinerView::GetVisArea() const +tools::Rectangle const & OutlinerView::GetVisArea() const { return pEditView->GetVisArea(); } @@ -1244,7 +1244,7 @@ void OutlinerView::SetOutputArea( const tools::Rectangle& rRect ) pEditView->SetOutputArea( rRect ); } -tools::Rectangle OutlinerView::GetOutputArea() const +tools::Rectangle const & OutlinerView::GetOutputArea() const { return pEditView->GetOutputArea(); } @@ -1403,7 +1403,7 @@ void OutlinerView::RegisterViewShell(OutlinerViewShell* pViewShell) pEditView->RegisterViewShell(pViewShell); } -Color OutlinerView::GetBackgroundColor() +Color const & OutlinerView::GetBackgroundColor() { return pEditView->GetBackgroundColor(); } |