diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-12-02 08:50:41 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-12-03 08:13:24 +0100 |
commit | 52e1d0ca6ad38b4b4fdc77b0951ad26f0ac18ec5 (patch) | |
tree | 3d757b15abd22dd119ffc34ad36036fd4781c630 /vcl | |
parent | 74895bf55846c56cebbd927817b8b9756ed800d0 (diff) |
Windows format name is UniformResourceLocatorW for Unicode strings
See also commit 5fb9f4ffa9284c7248e2e82210506babaad4044d
tdf#145964: Windows format name is FileNameW for Unicode strings
TODO: replace one remaining format from CFSTR_* family that we use (see
https://www.codeproject.com/Reference/1091137/Windows-Clipboard-Formats):
FileGroupDescriptor -> FileGroupDescriptorW. That one needs more complex
handling.
Change-Id: I4d4ad83099854768cf36c7b3d89059d79c8e77f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126213
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/treelist/transfer.cxx | 10 | ||||
-rw-r--r-- | vcl/win/dtrans/ftransl.cxx | 5 |
2 files changed, 4 insertions, 11 deletions
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index bb245767cb63..81c99653578f 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -777,18 +777,10 @@ bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk, break; case SotClipboardFormatId::STRING: + case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: maAny <<= rBmk.GetURL(); break; - case SotClipboardFormatId::UNIFORMRESOURCELOCATOR: - { - OString sURL(OUStringToOString(rBmk.GetURL(), eSysCSet)); - Sequence< sal_Int8 > aSeq( sURL.getLength() ); - memcpy( aSeq.getArray(), sURL.getStr(), sURL.getLength() ); - maAny <<= aSeq; - } - break; - case SotClipboardFormatId::NETSCAPE_BOOKMARK: { Sequence< sal_Int8 > aSeq( 2048 ); diff --git a/vcl/win/dtrans/ftransl.cxx b/vcl/win/dtrans/ftransl.cxx index 0fc4aa53f804..2d5ecd492754 100644 --- a/vcl/win/dtrans/ftransl.cxx +++ b/vcl/win/dtrans/ftransl.cxx @@ -302,10 +302,11 @@ const std::vector< FormatEntry > g_TranslTable { //SotClipboardFormatId::NETSCAPE_IMAGE FormatEntry("application/x-openoffice-netscape-image;windows_formatname=\"Netscape Image Format\"", "Netscape Image Format", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), //SotClipboardFormatId::SBA_FORMEXCHANGE - FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), //SotClipboardFormatId::SBA_REPORTEXCHANGE + FormatEntry("application/x-openoffice-sba-formexchange;windows_formatname=\"SBA_FORMEXCHANGE\"", "SBA_FORMEXCHANGE", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), + //SotClipboardFormatId::SBA_REPORTEXCHANGE FormatEntry("application/x-openoffice-sba-reportexchange;windows_formatname=\"SBA_REPORTEXCHANGE\"", "SBA_REPORTEXCHANGE", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), //SotClipboardFormatId::UNIFORMRESOURCELOCATOR - FormatEntry("application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocator\"", "UniformResourceLocator", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), + FormatEntry("application/x-openoffice-uniformresourcelocator;windows_formatname=\"UniformResourceLocatorW\"", "UniformResourceLocator", nullptr, CF_INVALID, CppuType_String), //SotClipboardFormatId::STARCHARTDOCUMENT_50 FormatEntry("application/x-openoffice-starchartdocument-50;windows_formatname=\"StarChartDocument 5.0\"", "StarChartDocument 5.0", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), //SotClipboardFormatId::GRAPHOBJ |