diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-12-21 15:18:21 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2021-04-05 18:19:05 +0300 |
commit | e5f4d42bd9baa801f203154c27cca9d4be4dfc72 (patch) | |
tree | 75def0b65a95a8bc4d8cefd9509f9834ccca29ee /vcl/ios | |
parent | 4b4eb3c365bebdaa6b07551dd5f5db28d40b7f31 (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>
Diffstat (limited to 'vcl/ios')
-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 962e9c49af21..dc0e5ba90a55 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -559,8 +559,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); } |