comphelper/source/misc/docpasswordrequest.cxx      |    4 ----
 include/comphelper/docpasswordrequest.hxx          |    6 +++---
 scripting/source/stringresource/stringresource.cxx |   18 ++++++++----------
 scripting/source/vbaevents/eventhelper.cxx         |    2 +-
 4 files changed, 12 insertions(+), 18 deletions(-)

New commits:
commit 1fbc623a5e8183b0042e886af9e2a4e0ac7e51f7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 12 10:19:03 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 12 12:35:00 2024 +0200

    use more concrete UNO classes in scripting
    
    Change-Id: I4eddf7ccdf2d0720a4204e578c9f21d8c78dbd35
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173249
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/scripting/source/stringresource/stringresource.cxx 
b/scripting/source/stringresource/stringresource.cxx
index 3e06668ec7d0..a081601b42b2 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1049,13 +1049,12 @@ void StringResourcePersistenceImpl::implStoreAtLocation
 class BinaryOutput
 {
     rtl::Reference< utl::TempFileFastService > m_xTempFile;
-    Reference< io::XOutputStream >          m_xOutputStream;
 
 public:
     explicit BinaryOutput();
 
-    const Reference< io::XOutputStream >& getOutputStream() const
-        { return m_xOutputStream; }
+    Reference< io::XOutputStream > getOutputStream() const
+        { return m_xTempFile; }
 
     Sequence< ::sal_Int8 > closeAndGetData();
 
@@ -1073,13 +1072,12 @@ public:
 BinaryOutput::BinaryOutput()
 {
     m_xTempFile = new utl::TempFileFastService;
-    m_xOutputStream = m_xTempFile;
 }
 
 template< class T >
 void BinaryOutput::write16BitInt( T n )
 {
-    if( !m_xOutputStream.is() )
+    if( !m_xTempFile.is() )
         return;
 
     Sequence< sal_Int8 > aSeq( 2 );
@@ -1090,12 +1088,12 @@ void BinaryOutput::write16BitInt( T n )
 
     p[0] = nLow;
     p[1] = nHigh;
-    m_xOutputStream->writeBytes( aSeq );
+    m_xTempFile->writeBytes( aSeq );
 }
 
 void BinaryOutput::writeInt32( sal_Int32 n )
 {
-    if( !m_xOutputStream.is() )
+    if( !m_xTempFile.is() )
         return;
 
     Sequence< sal_Int8 > aSeq( 4 );
@@ -1106,7 +1104,7 @@ void BinaryOutput::writeInt32( sal_Int32 n )
         p[i] = sal_Int8( n & 0xff );
         n >>= 8;
     }
-    m_xOutputStream->writeBytes( aSeq );
+    m_xTempFile->writeBytes( aSeq );
 }
 
 void BinaryOutput::writeString( const OUString& aStr )
@@ -1123,10 +1121,10 @@ void BinaryOutput::writeString( const OUString& aStr )
 Sequence< ::sal_Int8 > BinaryOutput::closeAndGetData()
 {
     Sequence< ::sal_Int8 > aRetSeq;
-    if( !m_xOutputStream.is() )
+    if( !m_xTempFile.is() )
         return aRetSeq;
 
-    m_xOutputStream->closeOutput();
+    m_xTempFile->closeOutput();
 
     sal_Int32 nSize = static_cast<sal_Int32>(m_xTempFile->getPosition());
 
diff --git a/scripting/source/vbaevents/eventhelper.cxx 
b/scripting/source/vbaevents/eventhelper.cxx
index dd68e99cf1b5..0e8acbcc3677 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -514,7 +514,7 @@ public:
     // XScriptEventSupplier
     virtual Reference< container::XNameContainer > SAL_CALL getEvents(  ) 
override { return m_xNameContainer; }
 private:
-    Reference< container::XNameContainer > m_xNameContainer;
+    rtl::Reference< ReadOnlyEventsNameContainer > m_xNameContainer;
 };
 
 }
commit 99243746d26035b91b7301028007dbd6d5c50763
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Sep 12 10:18:51 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Sep 12 12:34:50 2024 +0200

    use more concrete UNO classes in comphelper
    
    Change-Id: I1a81d2264a450c23a5196f980e91a686f69edca8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173248
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/misc/docpasswordrequest.cxx 
b/comphelper/source/misc/docpasswordrequest.cxx
index 6f644336e1e2..8a606630c25e 100644
--- a/comphelper/source/misc/docpasswordrequest.cxx
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -41,16 +41,12 @@ using ::com::sun::star::task::XInteractionPassword2;
 
 namespace comphelper {
 
-namespace {
-
 class AbortContinuation : public ::cppu::WeakImplHelper< XInteractionAbort >
 {
 public:
     virtual void SAL_CALL select() override {}
 };
 
-}
-
 class PasswordContinuation : public ::cppu::WeakImplHelper< 
XInteractionPassword2 >
 {
 public:
diff --git a/include/comphelper/docpasswordrequest.hxx 
b/include/comphelper/docpasswordrequest.hxx
index a4e8704eb5e4..e57c293df9fd 100644
--- a/include/comphelper/docpasswordrequest.hxx
+++ b/include/comphelper/docpasswordrequest.hxx
@@ -31,7 +31,7 @@ namespace com::sun::star::task { class XInteractionAbort; }
 namespace comphelper {
 
 class PasswordContinuation;
-
+class AbortContinuation;
 
 /** Selects which UNO document password request type to use. */
 enum class DocPasswordRequestType
@@ -62,7 +62,7 @@ private:
 
 private:
     css::uno::Any                         maRequest;
-    css::uno::Reference<css::task::XInteractionAbort> mxAbort;
+    rtl::Reference<AbortContinuation>     mxAbort;
     rtl::Reference<PasswordContinuation>  mxPassword;
 };
 
@@ -98,7 +98,7 @@ private:
 
 private:
     css::uno::Any                         maRequest;
-    css::uno::Reference<css::task::XInteractionAbort> mxAbort;
+    rtl::Reference<AbortContinuation>     mxAbort;
     rtl::Reference<PasswordContinuation>  mxPassword;
 };
 

Reply via email to