diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-12-21 15:18:21 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-12-21 23:47:53 +0100 |
commit | 21e96548719b77310da5e2bae91de52cc468960b (patch) | |
tree | e166168abbcca0033ce1ff6e772ceb17cdd6211e /vcl | |
parent | b126def60fc5280d40bc25db86748ed798c8548d (diff) |
Improve SAL_INFO output for clipboard operations on iOS
Change-Id: Id9ed115067655c62346f765ddc3ed9bdce05ab9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108101
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108103
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/ios/DataFlavorMapping.cxx | 5 | ||||
-rw-r--r-- | vcl/ios/clipboard.cxx | 1 | ||||
-rw-r--r-- | vcl/ios/iOSTransferable.cxx | 13 |
3 files changed, 8 insertions, 11 deletions
diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 88b0e6199818..037939b2c57c 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -560,8 +560,11 @@ DataFlavorMapper::typesArrayToFlavorSequence(NSArray* types) const { flavors.realloc(flavors.getLength() + 1); flavors[flavors.getLength() - 1] = oOOFlavor; + } + else + { SAL_INFO("vcl.ios.clipboard", - "Mapped " << [sysFormat UTF8String] << " to " << oOOFlavor.MimeType); + "Was not able to map " << [sysFormat UTF8String] << " to an internal flavour"); } } diff --git a/vcl/ios/clipboard.cxx b/vcl/ios/clipboard.cxx index b60cda1bef4d..ad0af57e3995 100644 --- a/vcl/ios/clipboard.cxx +++ b/vcl/ios/clipboard.cxx @@ -74,6 +74,7 @@ void SAL_CALL iOSClipboard::setContents( dict[types[i]] = pBoardData; } } + SAL_INFO("vcl.ios.clipboard", "Setting pasteboard items: " << NSDictionaryKeysToOUString(dict)); [mPasteboard setItems:array options:@{}]; // We don't keep a copy of the clipboard contents around in-process, so fire the lost clipboard diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx index 9ec27867fb0b..1ae2277014b6 100644 --- a/vcl/ios/iOSTransferable.cxx +++ b/vcl/ios/iOSTransferable.cxx @@ -25,6 +25,8 @@ #include <sal/types.h> #include <osl/diagnose.h> +#include <quartz/utils.h> + #include "iOSTransferable.hxx" #include "DataFlavorMapping.hxx" @@ -143,16 +145,7 @@ void iOSTransferable::initClipboardItemList() throw RuntimeException("Cannot get clipboard data", static_cast<XTransferable*>(this)); } -#ifdef SAL_LOG_INFO - NSString* types = @""; - for (unsigned i = 0; i < [pboardFormats count]; i++) - { - if ([types length] > 0) - types = [types stringByAppendingString:@", "]; - types = [types stringByAppendingString:[pboardFormats objectAtIndex:i]]; - } - SAL_INFO("vcl.ios.clipboard", "Types on clipboard: " << [types UTF8String]); -#endif + SAL_INFO("vcl.ios.clipboard", "Types on clipboard: " << NSStringArrayToOUString(pboardFormats)); mFlavorList = mDataFlavorMapper->typesArrayToFlavorSequence(pboardFormats); } |