sd/source/ui/view/Outliner.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 43a6def48f425361d79dff46dca41685d5ee03fa Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Wed May 27 14:27:30 2020 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue Jun 2 09:21:26 2020 +0200 sd: some style fixes in Outliner.cxx Also no need to reset the mpImpl in destructor when it will be reset and destroyed in the next step anyway. Change-Id: I5027f962efc4159e61aa7eda26619db2e3b9434c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95309 Tested-by: Tomaž Vajngerl <qui...@gmail.com> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 0b3080229963..9276e8ad1cea 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -211,7 +211,6 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode ) /// Nothing spectacular in the destructor. SdOutliner::~SdOutliner() { - mpImpl.reset(); } /** Prepare find&replace or spellchecking. This distinguishes between three @@ -467,7 +466,9 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) const SvxSearchCmd nCommand (mpSearchItem->GetCommand()); if (nCommand == SvxSearchCmd::FIND_ALL || nCommand == SvxSearchCmd::REPLACE_ALL) + { bEndOfSearch = SearchAndReplaceAll (); + } else { RememberStartPosition (); @@ -562,6 +563,7 @@ void SdOutliner::Initialize (bool bDirectionIsForward) bool SdOutliner::SearchAndReplaceAll() { bool bRet = true; + // Save the current position to be restored after having replaced all // matches. RememberStartPosition (); @@ -745,13 +747,13 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti pOutlinerView = mpImpl->GetOutlinerView(); } - if (pViewShell != nullptr) + if (pViewShell) { mpView = pViewShell->GetView(); mpWindow = pViewShell->GetActiveWindow(); pOutlinerView->SetWindow(mpWindow); - if( nullptr != dynamic_cast< const sd::DrawViewShell *>( pViewShell.get() )) + if (nullptr != dynamic_cast<const sd::DrawViewShell*>(pViewShell.get())) { // When replacing we first check if there is a selection // indicating a match. If there is then replace it. The @@ -774,7 +776,7 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti { ProvideNextTextObject (); - if ( ! mbEndOfSearch) + if (!mbEndOfSearch) { // Remember the current position as the last one with a // text object. @@ -796,7 +798,7 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti } } } - else if( nullptr != dynamic_cast< const sd::OutlineViewShell *>( pViewShell.get() )) + else if (nullptr != dynamic_cast<const sd::OutlineViewShell*>(pViewShell.get())) { mpDrawDocument->GetDocSh()->SetWaitCursor(false); // The following loop is executed more than once only when a _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits