diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-09 16:28:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-09 21:23:21 +0200 |
commit | 58ace895761c304020f92a2aded57cb6b9e83dd1 (patch) | |
tree | d9b3f473f18ec9ce899ebf208af86ca19209dc56 /svtools/source/misc | |
parent | 4bdf40c5b7e9749b72b2a7ae6c33509bb3dad82a (diff) |
inherit OStringTransferable from TransferDataContainer
so it can be used as an argument to
weld: :CustomWeld::SetDragDataTransferrable
Change-Id: Ibb58be6871a8719504d33d02bf7104213105be99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104126
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/stringtransfer.cxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/svtools/source/misc/stringtransfer.cxx b/svtools/source/misc/stringtransfer.cxx index 14e805fc60c9..29273e495bbb 100644 --- a/svtools/source/misc/stringtransfer.cxx +++ b/svtools/source/misc/stringtransfer.cxx @@ -33,21 +33,17 @@ namespace svt //= OStringTransferable - - - OStringTransferable::OStringTransferable(const OUString& _rContent) - :TransferableHelper() - ,m_sContent( _rContent ) + OStringTransferable::OStringTransferable(const OUString& rContent) + : TransferDataContainer() + , m_sContent(rContent) { } - void OStringTransferable::AddSupportedFormats() { AddFormat(SotClipboardFormatId::STRING); } - bool OStringTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { SotClipboardFormatId nFormat = SotExchange::GetFormat( _rFlavor ); @@ -57,17 +53,13 @@ namespace svt return false; } - //= OStringTransfer - - void OStringTransfer::CopyString( const OUString& _rContent, vcl::Window* _pWindow ) { rtl::Reference<OStringTransferable> pTransferable = new OStringTransferable( _rContent ); pTransferable->CopyToClipboard( _pWindow ); } - bool OStringTransfer::PasteString( OUString& _rContent, vcl::Window* _pWindow ) { TransferableDataHelper aClipboardData = TransferableDataHelper::CreateFromSystemClipboard( _pWindow ); @@ -88,15 +80,12 @@ namespace svt return false; } - void OStringTransfer::StartStringDrag( const OUString& _rContent, vcl::Window* _pWindow, sal_Int8 _nDragSourceActions ) { rtl::Reference<OStringTransferable> pTransferable = new OStringTransferable( _rContent ); pTransferable->StartDrag(_pWindow, _nDragSourceActions); } - } // namespace svt - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |