[Libreoffice-commits] core.git: include/svtools svtools/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 15 07:48:35 UTC 2020
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 <caolanm at redhat.com>
AuthorDate: Wed Oct 14 20:42:31 2020 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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 );
More information about the Libreoffice-commits
mailing list