Kaydet (Commit) 07c7b544 authored tarafından Michael Stahl's avatar Michael Stahl

tdf#114243 sot: catch exceptions in SotStorage::GetFormatID()

This function returns an error code so it might as well convert
exceptions to that for the benefit of clients like lcl_ReadSections().

Change-Id: Iccf21bf64ee81b66dd9b9902b9b952fa48a318e5
üst 9e52685e
......@@ -762,7 +762,15 @@ SotClipboardFormatId SotStorage::GetFormatID( const css::uno::Reference < css::e
return SotClipboardFormatId::NONE;
OUString aMediaType;
xProps->getPropertyValue("MediaType") >>= aMediaType;
try
{
xProps->getPropertyValue("MediaType") >>= aMediaType;
}
catch (uno::Exception const& e)
{
SAL_INFO("sot", "SotStorage::GetFormatID: exception: " << e);
}
if ( !aMediaType.isEmpty() )
{
css::datatransfer::DataFlavor aDataFlavor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment