ucb/source/ucp/tdoc/tdoc_stgelems.cxx |    8 ++++----
 ucb/source/ucp/tdoc/tdoc_stgelems.hxx |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 247aeeebc9add39e13b05ac9a7dbc852633b5d92
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Sep 27 21:08:50 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Sep 28 11:37:13 2024 +0200

    setParentStorage is always called with an empty reference
    
    Change-Id: I973811b3e8aa41bc331362a96a7cb519aec363a3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174068
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx 
b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index dff9bf590902..e1eda21a2b7f 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -574,7 +574,7 @@ OutputStream::closeOutput(  )
 
     // Release parent storage.
     // Now, that the stream is closed/disposed it is not needed any longer.
-    setParentStorage( uno::Reference< embed::XStorage >() );
+    clearParentStorage();
 }
 
 
@@ -589,7 +589,7 @@ OutputStream::dispose()
 
     // Release parent storage.
     // Now, that the stream is closed/disposed it is not needed any longer.
-    setParentStorage( uno::Reference< embed::XStorage >() );
+    clearParentStorage();
 }
 
 
@@ -768,7 +768,7 @@ void SAL_CALL Stream::closeOutput()
 
     // Release parent storage.
     // Now, that the stream is closed/disposed it is not needed any longer.
-    setParentStorage( uno::Reference< embed::XStorage >() );
+    clearParentStorage();
 }
 
 
@@ -836,7 +836,7 @@ void SAL_CALL Stream::dispose()
 
     // Release parent storage.
     // Now, that the stream is closed/disposed it is not needed any longer.
-    setParentStorage( uno::Reference< embed::XStorage >() );
+    clearParentStorage();
 }
 
 
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx 
b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
index 6229923f226c..40dd7f723705 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.hxx
@@ -51,10 +51,10 @@ public:
     const css::uno::Reference< css::embed::XStorage >&
     getParentStorage() const
     { return m_xParentStorage; }
-    void setParentStorage( const css::uno::Reference< css::embed::XStorage > & 
xStg )
+    void clearParentStorage()
     {
         std::scoped_lock aGuard( m_aMutex );
-        m_xParentStorage = xStg;
+        m_xParentStorage = nullptr;
     }
 
 private:

Reply via email to