summaryrefslogtreecommitdiff
path: root/scripting/source/stringresource
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2025-03-10 10:54:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2025-03-10 14:18:35 +0100
commit22f46bd89f6afc95438acf09fb5ff948f4ca8e02 (patch)
treeee44026e5e04ba2257b275f35e8d178a54606c52 /scripting/source/stringresource
parent376466a7451843be90d1ee12a3a7a2b65113e575 (diff)
use more concrete UNO classes
Change-Id: Id10786bbf7985adbb251224b45f9dabcc84d0a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/stringresource')
-rw-r--r--scripting/source/stringresource/stringresource.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index ca9d55ba3f79..ec304ffc1d0b 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1252,7 +1252,7 @@ class BinaryInput
public:
BinaryInput( const Sequence< ::sal_Int8 >& aData );
- Reference< io::XInputStream > getInputStreamForSection( sal_Int32 nSize );
+ rtl::Reference< utl::TempFileFastService > getInputStreamForSection( sal_Int32 nSize );
void seek( sal_Int32 nPos );
sal_Int32 getPosition() const
@@ -1274,21 +1274,20 @@ BinaryInput::BinaryInput( const Sequence< ::sal_Int8 >& aData )
m_nSize = m_aData.getLength();
}
-Reference< io::XInputStream > BinaryInput::getInputStreamForSection( sal_Int32 nSize )
+rtl::Reference< utl::TempFileFastService > BinaryInput::getInputStreamForSection( sal_Int32 nSize )
{
- Reference< io::XInputStream > xIn;
+ rtl::Reference< utl::TempFileFastService > xTempOut;
if( m_nCurPos + nSize <= m_nSize )
{
- rtl::Reference< utl::TempFileFastService > xTempOut = new utl::TempFileFastService;
+ xTempOut = new utl::TempFileFastService;
Sequence< sal_Int8 > aSection( m_pData + m_nCurPos, nSize );
xTempOut->writeBytes( aSection );
xTempOut->seek( 0 );
- xIn = xTempOut;
}
else
OSL_FAIL( "BinaryInput::getInputStreamForSection(): Read past end" );
- return xIn;
+ return xTempOut;
}
void BinaryInput::seek( sal_Int32 nPos )
@@ -1403,7 +1402,7 @@ void StringResourcePersistenceImpl::importBinary( const Sequence< ::sal_Int8 >&
sal_Int32 nAfterStringPos = aIn.getPosition();
sal_Int32 nSize = pPositions[i+1] - nAfterStringPos;
- Reference< io::XInputStream > xInput = aIn.getInputStreamForSection( nSize );
+ rtl::Reference< utl::TempFileFastService > xInput = aIn.getInputStreamForSection( nSize );
if( xInput.is() )
{
LocaleItem* pLocaleItem = new LocaleItem( std::move(aLocale) );