include/svtools/stringtransfer.hxx | 6 +----- svtools/source/misc/stringtransfer.cxx | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-)
New commits: commit e64daeda4423255105116606fff4be5069eb6fbf Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 14 20:42:31 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Oct 15 09:47:48 2020 +0200 need to ClearFormats to invalidate cache of what is dnded Change-Id: I2280d1d883448f1a538a78acec0d1b7f04df5ffe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104326 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svtools/stringtransfer.hxx b/include/svtools/stringtransfer.hxx index ab192f99f18d..dd497f170d4e 100644 --- a/include/svtools/stringtransfer.hxx +++ b/include/svtools/stringtransfer.hxx @@ -32,11 +32,7 @@ namespace svt { public: OStringTransferable(const OUString& rContent); - - void UpdateData(const OUString& rContent) - { - m_sContent = rContent; - } + void SetData(const OUString& rContent); private: // TransferableHelper overridables diff --git a/svtools/source/misc/stringtransfer.cxx b/svtools/source/misc/stringtransfer.cxx index 29273e495bbb..348082b77ae9 100644 --- a/svtools/source/misc/stringtransfer.cxx +++ b/svtools/source/misc/stringtransfer.cxx @@ -44,6 +44,12 @@ namespace svt AddFormat(SotClipboardFormatId::STRING); } + void OStringTransferable::SetData(const OUString& rContent) + { + m_sContent = rContent; + ClearFormats(); // invalidate m_aAny so new data will take effect + } + bool OStringTransferable::GetData( const DataFlavor& _rFlavor, const OUString& /*rDestDoc*/ ) { SotClipboardFormatId nFormat = SotExchange::GetFormat( _rFlavor ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits