[Libreoffice-commits] core.git: 2 commits - sd/source unoxml/inc unoxml/source uui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Aug 13 06:34:58 UTC 2018


 sd/source/filter/eppt/eppt.cxx                          |   14 +++---------
 sd/source/filter/eppt/eppt.hxx                          |    4 +--
 sd/source/filter/eppt/epptooxml.hxx                     |    2 -
 sd/source/filter/eppt/pptx-epptooxml.cxx                |    6 +----
 sd/source/filter/html/htmlex.cxx                        |    6 +----
 sd/source/filter/html/htmlex.hxx                        |    2 -
 sd/source/ui/func/fumorph.cxx                           |   18 +++++++---------
 sd/source/ui/inc/OutlineView.hxx                        |    2 -
 sd/source/ui/inc/SlideSorter.hxx                        |    2 -
 sd/source/ui/inc/fumorph.hxx                            |    2 -
 sd/source/ui/inc/slideshow.hxx                          |    2 -
 sd/source/ui/slideshow/slideshow.cxx                    |   11 ++++-----
 sd/source/ui/slidesorter/shell/SlideSorter.cxx          |    4 ---
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |    4 +--
 sd/source/ui/view/DocumentRenderer.cxx                  |    7 +-----
 sd/source/ui/view/drviews2.cxx                          |    4 ---
 sd/source/ui/view/outlnvsh.cxx                          |    4 ++-
 sd/source/ui/view/outlview.cxx                          |    3 --
 unoxml/inc/eventdispatcher.hxx                          |    2 -
 unoxml/source/events/eventdispatcher.cxx                |   11 ++++-----
 uui/source/iahndl-authentication.cxx                    |    4 ---
 uui/source/iahndl.hxx                                   |    2 -
 22 files changed, 47 insertions(+), 69 deletions(-)

New commits:
commit 7a5d2b3cdb448998e6aef1f12f0a70c400a434d2
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Aug 11 13:54:31 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 13 08:34:49 2018 +0200

    loplugin:returnconstant in unoxml,uui
    
    Change-Id: Iac240f59acf8404fe5439a7e450c048df0d7a54e
    Reviewed-on: https://gerrit.libreoffice.org/58879
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/unoxml/inc/eventdispatcher.hxx b/unoxml/inc/eventdispatcher.hxx
index ee8bec567590..be6a7206e7cb 100644
--- a/unoxml/inc/eventdispatcher.hxx
+++ b/unoxml/inc/eventdispatcher.hxx
@@ -69,7 +69,7 @@ public:
         const OUString& aType,
         const css::uno::Reference< css::xml::dom::events::XEvent >& xEvent);
 
-    bool dispatchEvent(
+    void dispatchEvent(
         DOM::CDocument & rDocument,
         ::osl::Mutex & rMutex,
         xmlNodePtr const pNode,
diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx
index 85f6df5b9c14..ff5ce7aa8889 100644
--- a/unoxml/source/events/eventdispatcher.cxx
+++ b/unoxml/source/events/eventdispatcher.cxx
@@ -102,7 +102,7 @@ namespace DOM { namespace events {
         }
     }
 
-    bool CEventDispatcher::dispatchEvent(
+    void CEventDispatcher::dispatchEvent(
             DOM::CDocument & rDocument, ::osl::Mutex & rMutex,
             xmlNodePtr const pNode, Reference<XNode> const& xNode,
             Reference< XEvent > const& i_xEvent) const
@@ -117,7 +117,7 @@ namespace DOM { namespace events {
         }
 
         if (captureListeners.empty() && targetListeners.empty())
-            return true;
+            return;
 
         CEvent *pEvent = nullptr; // pointer to internal event representation
 
@@ -222,7 +222,7 @@ namespace DOM { namespace events {
             {
                 pEvent->m_currentTarget = rinode->first;
                 callListeners(captureListeners, rinode->second, aType, xEvent);
-                if  (pEvent->m_canceled) return true;
+                if  (pEvent->m_canceled) return;
                 ++rinode;
             }
 
@@ -232,7 +232,7 @@ namespace DOM { namespace events {
             pEvent->m_phase = PhaseType_AT_TARGET;
             pEvent->m_currentTarget = inode->first;
             callListeners(targetListeners, inode->second, aType, xEvent);
-            if  (pEvent->m_canceled) return true;
+            if  (pEvent->m_canceled) return;
             // bubbeling phase
             ++inode;
             if (i_xEvent->getBubbles()) {
@@ -242,12 +242,11 @@ namespace DOM { namespace events {
                     pEvent->m_currentTarget = inode->first;
                     callListeners(targetListeners,
                             inode->second, aType, xEvent);
-                    if  (pEvent->m_canceled) return true;
+                    if  (pEvent->m_canceled) return;
                     ++inode;
                 }
             }
         }
-        return true;
     }
 }}
 
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 5aedeba76a04..d151a36138e7 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -724,7 +724,7 @@ UUIInteractionHelper::handlePasswordRequest(
     return false;
 }
 
-bool
+void
 UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions,
         OUString & url,
         uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations )
@@ -741,8 +741,6 @@ UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions,
         xAuthFallback->setCode(dlg.GetCode());
         xAuthFallback->select( );
     }
-
-    return true;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 056b66103ad3..9bb7fda8909b 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -235,7 +235,7 @@ private:
                 const OUString& i_rServiceName
             ) const;
 
-    bool
+    void
     handleAuthFallbackRequest(
             OUString & instructions,
             OUString & url,
commit 412215fbc5a71afff7ee3b539852ed92c55e11bc
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sat Aug 11 13:54:12 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Aug 13 08:34:36 2018 +0200

    loplugin:returnconstant in sd
    
    Change-Id: Ie48caf16bae9f85b61dd9614199f1b2d75783e6e
    Reviewed-on: https://gerrit.libreoffice.org/58878
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index cef343773891..7fb0e3df3e59 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -160,11 +160,9 @@ void PPTWriter::exportPPTPost( )
 
     ImplWriteVBA();
 
-    if ( !ImplWriteAtomEnding() )
-        return;
+    ImplWriteAtomEnding();
 
-    if ( !ImplCreateDocumentSummaryInformation() )
-        return;
+    ImplCreateDocumentSummaryInformation();
 
     mbStatus = true;
 };
@@ -507,7 +505,7 @@ bool PPTWriter::ImplCreateCurrentUserStream()
     return true;
 };
 
-bool PPTWriter::ImplCreateDocumentSummaryInformation()
+void PPTWriter::ImplCreateDocumentSummaryInformation()
 {
     uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
         mXModel, uno::UNO_QUERY_THROW);
@@ -553,8 +551,6 @@ bool PPTWriter::ImplCreateDocumentSummaryInformation()
                     nullptr, &aGuidSeq, &aHyperSeq );
         }
     }
-
-    return true;
 }
 
 void PPTWriter::ImplWriteExtParaHeader( SvMemoryStream& rSt, sal_uInt32 nRef, sal_uInt32 nInstance, sal_uInt32 nSlideId )
@@ -1332,7 +1328,7 @@ void PPTWriter::ImplWriteOLE( )
 
 // write PersistantTable and UserEditAtom
 
-bool PPTWriter::ImplWriteAtomEnding()
+void PPTWriter::ImplWriteAtomEnding()
 {
 
 #define EPP_LastViewTypeSlideView   1
@@ -1436,8 +1432,6 @@ bool PPTWriter::ImplWriteAtomEnding()
            .WriteUInt32( nPersistEntrys )           // max persists written, Seed value for persist object id management
            .WriteInt16( EPP_LastViewTypeSlideView ) // last view type
            .WriteInt16( 0x12 );                     // padword
-
-    return true;
 }
 
 // - exported function -
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index 04f11675a6fd..7699c09158fe 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -167,7 +167,7 @@ class PPTWriter final : public PPTWriterBase, public PPTExBulletProvider
 
     private:
 
-        bool                ImplCreateDocumentSummaryInformation();
+        void                ImplCreateDocumentSummaryInformation();
         bool                ImplCreateCurrentUserStream();
         static void         ImplCreateHeaderFooterStrings( SvStream& rOut,
                                 css::uno::Reference< css::beans::XPropertySet > const & rXPagePropSet );
@@ -180,7 +180,7 @@ class PPTWriter final : public PPTWriterBase, public PPTExBulletProvider
         void                ImplWriteBackground( css::uno::Reference< css::beans::XPropertySet > const & rXBackgroundPropSet );
         void                ImplWriteVBA();
         void                ImplWriteOLE();
-        bool                ImplWriteAtomEnding();
+        void                ImplWriteAtomEnding();
 
         void                ImplFlipBoundingBox( EscherPropertyContainer& rPropOpt );
         bool                ImplGetText();
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 8784ae49c18a..29ffca5604d9 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -97,7 +97,7 @@ private:
     virtual bool ImplCreateDocument() override;
     virtual bool ImplCreateMainNotes() override;
     virtual ::oox::ole::VbaProject* implCreateVbaProject() const override;
-    bool WriteNotesMaster();
+    void WriteNotesMaster();
 
     static void WriteAnimateTo( const ::sax_fastparser::FSHelperPtr& pFS, const css::uno::Any& rValue, const OUString& rAttributeName );
     static void WriteAnimateValues( const ::sax_fastparser::FSHelperPtr& pFS, const css::uno::Reference< css::animations::XAnimate >& rXAnimate );
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index e08c30087ac5..6c2a645b39dc 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2858,7 +2858,7 @@ bool PowerPointExport::ImplCreateDocument()
     return true;
 }
 
-bool PowerPointExport::WriteNotesMaster()
+void PowerPointExport::WriteNotesMaster()
 {
     SAL_INFO("sd.eppt", "write Notes master\n---------------");
 
@@ -2921,14 +2921,12 @@ bool PowerPointExport::WriteNotesMaster()
     pFS->endElementNS(XML_p, XML_notesMaster);
 
     SAL_INFO("sd.eppt", "----------------");
-
-    return true;
 }
 
 bool PowerPointExport::ImplCreateMainNotes()
 {
     if (mbCreateNotes)
-        return WriteNotesMaster();
+        WriteNotesMaster();
 
     return true;
 }
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 7dc109a52249..0c0616558fa9 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -785,8 +785,7 @@ void HtmlExport::ExportHtml()
             if( !CreateContentPage() )
                 break;
 
-        if( !CreateBitmaps() )
-            break;
+        CreateBitmaps();
 
         mpDocSh->SetWaitCursor( false );
         ResetProgress();
@@ -2661,7 +2660,7 @@ OUString HtmlExport::CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const
 }
 
 // export navigation graphics from button set
-bool HtmlExport::CreateBitmaps()
+void HtmlExport::CreateBitmaps()
 {
     if(mnButtonThema != -1 && mpButtonSet.get() )
     {
@@ -2678,7 +2677,6 @@ bool HtmlExport::CreateBitmaps()
             mpButtonSet->exportButton( mnButtonThema, aFull, GetButtonName(nButton) );
         }
     }
-    return true;
 }
 
 // creates the <body> tag, including the specified color attributes
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index e83621ae8c69..3bb86385e868 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -151,7 +151,7 @@ class HtmlExport final
     bool    CreateHtmlForPresPages();
     bool    CreateContentPage();
     void    CreateFileNames();
-    bool    CreateBitmaps();
+    void    CreateBitmaps();
     bool    CreateOutlinePages();
     bool    CreateFrames();
     bool    CreateNotesPages();
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index d69085ed82a6..f05b6055de57 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -161,15 +161,14 @@ void FuMorph::DoExecute( SfxRequest& )
                     aPolyPoly2.setB2DPolygon(a, aSub2);
                 }
 
-                if(ImpMorphPolygons(aPolyPoly1, aPolyPoly2, pDlg->GetFadeSteps(), aPolyPolyList))
-                {
-                    OUString aString(mpView->GetDescriptionOfMarkedObjects());
-                    aString += " " + SdResId(STR_UNDO_MORPHING);
+                ImpMorphPolygons(aPolyPoly1, aPolyPoly2, pDlg->GetFadeSteps(), aPolyPolyList);
 
-                    mpView->BegUndo(aString);
-                    ImpInsertPolygons(aPolyPolyList, pDlg->IsAttributeFade(), pObj1, pObj2);
-                    mpView->EndUndo();
-                }
+                OUString aString(mpView->GetDescriptionOfMarkedObjects());
+                aString += " " + SdResId(STR_UNDO_MORPHING);
+
+                mpView->BegUndo(aString);
+                ImpInsertPolygons(aPolyPolyList, pDlg->IsAttributeFade(), pObj1, pObj2);
+                mpView->EndUndo();
 
                 for(basegfx::B2DPolyPolygon * p : aPolyPolyList) {
                     delete p;
@@ -480,7 +479,7 @@ void FuMorph::ImpInsertPolygons(
 /**
  * create morphed PolyPolygons
  */
-bool FuMorph::ImpMorphPolygons(
+void FuMorph::ImpMorphPolygons(
     const ::basegfx::B2DPolyPolygon& rPolyPoly1,
     const ::basegfx::B2DPolyPolygon& rPolyPoly2,
     const sal_uInt16 nSteps,
@@ -511,7 +510,6 @@ bool FuMorph::ImpMorphPolygons(
             rPolyPolyList3D.push_back( pNewPolyPoly2D );
         }
     }
-    return true;
 }
 
 } // end of namespace sd
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index d8bff6a69059..c22b782a6407 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -111,7 +111,7 @@ public:
 
     sal_uLong         GetPaperWidth() { return mnPaperWidth;}
 
-    bool          PrepareClose();
+    void              PrepareClose();
 
     virtual void    GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const override;
     virtual bool    SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false) override;
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index de9af17357fd..1d58f574ccea 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -169,7 +169,7 @@ public:
         const Point& rOffset,
         const Size& rSize);
 
-    bool RelocateToWindow (vcl::Window* pWindow);
+    void RelocateToWindow (vcl::Window* pWindow);
 
     /** Set the current function at the view shell or, when it is not
         present, set it at the content window.  This method supports the use
diff --git a/sd/source/ui/inc/fumorph.hxx b/sd/source/ui/inc/fumorph.hxx
index 3da4fdcdebad..ba3a39320f18 100644
--- a/sd/source/ui/inc/fumorph.hxx
+++ b/sd/source/ui/inc/fumorph.hxx
@@ -63,7 +63,7 @@ private:
         double fMorphingFactor
     );
 
-    static bool ImpMorphPolygons(
+    static void ImpMorphPolygons(
         const ::basegfx::B2DPolyPolygon& rPolyPoly1,
         const ::basegfx::B2DPolyPolygon& rPolyPoly2,
         const sal_uInt16 nSteps,
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index b76c3a37c36f..c723c5449f04 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -106,7 +106,7 @@ public:
 
     // helper api
 
-    bool startPreview(
+    void startPreview(
         const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
         const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode );
 
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 9d41a60162be..f2ae67cb306e 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -183,10 +183,11 @@ bool SlideShow::StartPreview( ViewShellBase const & rBase,
     const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode )
 {
     rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
-    if( xSlideShow.is() )
-        return xSlideShow->startPreview( xDrawPage, xAnimationNode );
+    if( !xSlideShow.is() )
+        return false;
 
-    return false;
+    xSlideShow->startPreview( xDrawPage, xAnimationNode );
+    return true;
 }
 
 void SlideShow::Stop( ViewShellBase const & rBase )
@@ -879,7 +880,7 @@ void SAL_CALL SlideShow::disposing()
     mpDoc = nullptr;
 }
 
-bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Reference< XAnimationNode >& xAnimationNode )
+void SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Reference< XAnimationNode >& xAnimationNode )
 {
     Sequence< PropertyValue > aArguments(4);
 
@@ -896,8 +897,6 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
     aArguments[3].Value <<= Reference< XWindow >();
 
     startWithArguments( aArguments );
-
-    return true;
 }
 
 OutputDevice* SlideShow::getShowWindow()
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index edac934f62bd..bcc71fbb3667 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -358,7 +358,7 @@ void SlideSorter::ArrangeGUIElements (
     }
 }
 
-bool SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
+void SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
 {
    // Stop all animations for they have been started for the old window.
     mpSlideSorterController->GetAnimator()->RemoveAllAnimations();
@@ -383,8 +383,6 @@ bool SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
         mpContentWindow->Hide();
         mpContentWindow->Show();
     }
-
-    return true;
 }
 
 void SlideSorter::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction)
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 05123e911b3b..6ffeedea6153 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -288,10 +288,10 @@ bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
     if ( ! mpSlideSorter)
         return false;
 
-    const bool bSuccess (mpSlideSorter->RelocateToWindow(pParentWindow));
+    mpSlideSorter->RelocateToWindow(pParentWindow);
     ReadFrameViewData(mpFrameView);
 
-    return bSuccess;
+    return true;
 }
 
 SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager() const
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index c701c0640893..26f24bb3e583 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1335,7 +1335,7 @@ private:
 
     /** Determine and set the paper orientation.
     */
-    bool SetupPaperOrientation (
+    void SetupPaperOrientation (
         const PageKind ePageKind,
         PrintInfo& rInfo)
     {
@@ -1376,8 +1376,6 @@ private:
                 maPrintSize = awt::Size(aPaperSize.Height(), aPaperSize.Width());
             }
         }
-
-        return true;
     }
 
     /** Top most method for preparing printer pages.  In this and the other
@@ -1869,8 +1867,7 @@ private:
         SdPage* pRefPage = pDocument->GetSdPage(0, ePageKind);
         rInfo.maPageSize = pRefPage->GetSize();
 
-        if ( ! SetupPaperOrientation(ePageKind, rInfo))
-            return;
+        SetupPaperOrientation(ePageKind, rInfo);
 
         MapMode aMap (rInfo.maMap);
         rInfo.maMap = aMap;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 45364638b196..25bed90aec1f 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -464,7 +464,7 @@ public:
     {
     }
 
-    bool insert(std::vector<svx::ClassificationResult> const & rResults)
+    void insert(std::vector<svx::ClassificationResult> const & rResults)
     {
         // Set to MASTER mode
         EditMode eOldMode = m_rDrawViewShell.GetEditMode();
@@ -538,8 +538,6 @@ public:
 
             pObject->SetLogicRect(::tools::Rectangle(aPosition, aTextSize));
         }
-
-        return true;
     }
 };
 
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index e828dc3d51fa..fd5178d01a02 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1114,7 +1114,9 @@ bool OutlineViewShell::PrepareClose( bool bUI )
     if( !ViewShell::PrepareClose(bUI) )
         return false;
 
-    return pOlView == nullptr || pOlView->PrepareClose();
+    if (pOlView)
+        pOlView->PrepareClose();
+    return true;
 }
 
 /**
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 527f32378289..1fe54a21146e 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -966,7 +966,7 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
 }
 
 /** updates draw model with all changes from outliner model */
-bool OutlineView::PrepareClose()
+void OutlineView::PrepareClose()
 {
     ::sd::UndoManager* pDocUndoMgr = dynamic_cast<sd::UndoManager*>(mpDocSh->GetUndoManager());
     if (pDocUndoMgr != nullptr)
@@ -978,7 +978,6 @@ bool OutlineView::PrepareClose()
     UpdateDocument();
     EndUndo();
     mrDoc.SetSelected(GetActualPage(), true);
-    return true;
 }
 
 /**


More information about the Libreoffice-commits mailing list