[Libreoffice-commits] core.git: include/sot sot/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 10 18:10:09 UTC 2021


 include/sot/storage.hxx       |    2 +-
 sot/source/sdstor/storage.cxx |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 6e1bc19044dc154fee30263951e1122028b22b5b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 10 11:49:20 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jun 10 20:09:29 2021 +0200

    loplugin:unnecessaryreturn SotStorageStream::Commit
    
    Change-Id: Icfd32ea8b29aa544b71d0c4fc6bc67c06f81e327
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116987
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index 65cde53d2a67..41b57506946c 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -64,7 +64,7 @@ public:
 
     virtual void SetSize(sal_uInt64 nNewSize) override;
     sal_uInt32 GetSize() const;
-    bool Commit();
+    void Commit();
     bool SetProperty(OUString const & rName, css::uno::Any const & rValue);
     virtual sal_uInt64 TellEnd() override;
 };
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 596a59d59785..cef5b3d7a02d 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -176,13 +176,12 @@ sal_uInt64 SotStorageStream::TellEnd()
     return pOwnStm->GetSize();
 }
 
-bool SotStorageStream::Commit()
+void SotStorageStream::Commit()
 {
     pOwnStm->Flush();
     if( pOwnStm->GetError() == ERRCODE_NONE )
         pOwnStm->Commit();
     SetError( pOwnStm->GetError() );
-    return GetError() == ERRCODE_NONE;
 }
 
 bool SotStorageStream::SetProperty( const OUString& rName, const css::uno::Any& rValue )


More information about the Libreoffice-commits mailing list