summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-05-29 11:36:50 +0300
committerTor Lillqvist <tml@collabora.com>2019-05-29 14:07:34 +0300
commitbcc36b632ecbf4a2e126e640055ad0ed852fb9e8 (patch)
treefcb718d2b1220345eb73d60bb988d274fab0157e
parent58f121ef2e680697e10453add43bab9b771d153a (diff)
Add a couple of SAL_INFOs about types available on the system clipboard
Change-Id: I821a699ee4f44881aadac89f265974a10095b544
-rw-r--r--include/sal/log-areas.dox1
-rw-r--r--vcl/ios/DataFlavorMapping.cxx2
-rw-r--r--vcl/ios/iOSTransferable.cxx12
3 files changed, 15 insertions, 0 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 8d9a2c68ea92..904ba74b4425 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -478,6 +478,7 @@ certain functionality.
@li @c vcl.headless - bitmap-based backend
@li @c vcl.helper
@li @c vcl.icontest
+@li @c vcl.ios.clipboard
@li @c vcl.kde5 - KDE5
@li @c vcl.layout - Widget layout
@li @c vcl.lazydelete
diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx
index 37ff2181d651..be4ecb299ff5 100644
--- a/vcl/ios/DataFlavorMapping.cxx
+++ b/vcl/ios/DataFlavorMapping.cxx
@@ -557,6 +557,8 @@ DataFlavorMapper::typesArrayToFlavorSequence(NSArray* types) const
{
flavors.realloc(flavors.getLength() + 1);
flavors[flavors.getLength() - 1] = oOOFlavor;
+ SAL_INFO("vcl.ios.clipboard",
+ "Mapped " << [sysFormat UTF8String] << " to " << oOOFlavor.MimeType);
}
}
diff --git a/vcl/ios/iOSTransferable.cxx b/vcl/ios/iOSTransferable.cxx
index b1bc4043ea9e..9ec27867fb0b 100644
--- a/vcl/ios/iOSTransferable.cxx
+++ b/vcl/ios/iOSTransferable.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <sal/log.hxx>
#include <sal/types.h>
#include <osl/diagnose.h>
@@ -142,6 +143,17 @@ 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
+
mFlavorList = mDataFlavorMapper->typesArrayToFlavorSequence(pboardFormats);
}