diff options
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/browser/dbexchange.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableCopyHelper.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableRowExchange.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbexchange.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TableCopyHelper.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableRowExchange.cxx | 6 |
7 files changed, 16 insertions, 16 deletions
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index dc6398f48aea..dc318dc0f61c 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -140,14 +140,14 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - bool ODataClipboard::WriteObject( ::tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& /*rFlavor*/ ) + bool ODataClipboard::WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& /*rFlavor*/ ) { if (nUserObjectId == FORMAT_OBJECT_ID_RTF || nUserObjectId == FORMAT_OBJECT_ID_HTML ) { ODatabaseImportExport* pExport = static_cast<ODatabaseImportExport*>(pUserObject); - if ( pExport && rxOStm.is() ) + if ( pExport ) { - pExport->setStream(rxOStm.get()); + pExport->setStream(&rOStm); return pExport->Write(); } } diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index b543dade80bb..636ca85c7752 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -72,7 +72,7 @@ namespace dbaui OUString sDefaultTableName; OUString aUrl; - tools::SvRef<SotTempStream> aHtmlRtfStorage; + std::unique_ptr<SvStream> aHtmlRtfStorage; ElementType nType; std::unique_ptr<weld::TreeIter> xDroppedAt; sal_Int8 nAction; diff --git a/dbaccess/source/ui/inc/TableRowExchange.hxx b/dbaccess/source/ui/inc/TableRowExchange.hxx index 36e249795137..9450ab2ff827 100644 --- a/dbaccess/source/ui/inc/TableRowExchange.hxx +++ b/dbaccess/source/ui/inc/TableRowExchange.hxx @@ -32,7 +32,7 @@ namespace dbaui protected: virtual void AddSupportedFormats() override; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override; - virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override; + virtual bool WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override; virtual void ObjectReleased() override; }; } diff --git a/dbaccess/source/ui/inc/dbexchange.hxx b/dbaccess/source/ui/inc/dbexchange.hxx index 7fb0c6ee0b96..050f5bd3b849 100644 --- a/dbaccess/source/ui/inc/dbexchange.hxx +++ b/dbaccess/source/ui/inc/dbexchange.hxx @@ -75,7 +75,7 @@ namespace dbaui virtual void AddSupportedFormats() override; virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override; virtual void ObjectReleased() override; - virtual bool WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override; + virtual bool WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override; }; } diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index c69c04699769..e2842172d408 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -265,16 +265,16 @@ bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData _rAsyncDrop.bHtml = bHtml; _rAsyncDrop.bError = !copyTagTable(_rAsyncDrop,true,_xConnection); - bRet = ( !_rAsyncDrop.bError && bOk && _rAsyncDrop.aHtmlRtfStorage.is() ); + bRet = ( !_rAsyncDrop.bError && bOk && _rAsyncDrop.aHtmlRtfStorage ); if ( bRet ) { // now we need to copy the stream ::utl::TempFileNamed aTmp; _rAsyncDrop.aUrl = aTmp.GetURL(); - ::tools::SvRef<SotTempStream> aNew = new SotTempStream( aTmp.GetFileName() ); + std::unique_ptr<SvStream> aNew = SotTempStream::Create( aTmp.GetFileName() ); _rAsyncDrop.aHtmlRtfStorage->Seek(STREAM_SEEK_TO_BEGIN); - _rAsyncDrop.aHtmlRtfStorage->CopyTo( aNew.get() ); - _rAsyncDrop.aHtmlRtfStorage = aNew; + aNew->WriteStream(*_rAsyncDrop.aHtmlRtfStorage); + _rAsyncDrop.aHtmlRtfStorage = std::move(aNew); } else _rAsyncDrop.aHtmlRtfStorage = nullptr; @@ -286,7 +286,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc ,std::u16string_view i_rDestDataSource ,const SharedConnection& _xConnection) { - if ( _rDesc.aHtmlRtfStorage.is() ) + if ( _rDesc.aHtmlRtfStorage ) { copyTagTable(_rDesc,false,_xConnection); _rDesc.aHtmlRtfStorage = nullptr; diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 55696fe36463..76121d5537be 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -774,9 +774,9 @@ void OTableEditorCtrl::InsertRows( sal_Int32 nRow ) TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); if(aTransferData.HasFormat(SotClipboardFormatId::SBA_TABED)) { - ::tools::SvRef<SotTempStream> aStreamRef; + std::unique_ptr<SvStream> aStreamRef; bool bOk = aTransferData.GetSotStorageStream(SotClipboardFormatId::SBA_TABED,aStreamRef); - if (bOk && aStreamRef.is()) + if (bOk && aStreamRef) { aStreamRef->Seek(STREAM_SEEK_TO_BEGIN); aStreamRef->ResetError(); diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index c56450ac1c26..a4a80be7463e 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -31,16 +31,16 @@ namespace dbaui : m_vTableRow(std::move(_rvTableRow)) { } - bool OTableRowExchange::WriteObject( tools::SvRef<SotTempStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& /*rFlavor*/ ) + bool OTableRowExchange::WriteObject( SvStream& rOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& /*rFlavor*/ ) { if(nUserObjectId == FORMAT_OBJECT_ID_SBA_TABED) { std::vector< std::shared_ptr<OTableRow> >* pRows = static_cast< std::vector< std::shared_ptr<OTableRow> >* >(pUserObject); if(pRows) { - (*rxOStm).WriteInt32( pRows->size() ); // first stream the size + rOStm.WriteInt32( pRows->size() ); // first stream the size for (auto const& row : *pRows) - WriteOTableRow(*rxOStm, *row); + WriteOTableRow(rOStm, *row); return true; } } |