summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/hltpbase.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f2448460ee66..f0aa7c368c04 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -37,6 +37,7 @@
#include <strings.hrc>
#include <dialmgr.hxx>
#include <bitmaps.hlst>
+#include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
using namespace ::ucbhelper;
@@ -465,13 +466,21 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& rItemSet)
if (xTransferable->isDataFlavorSupported(aFlavor))
{
OUString aClipBoardConentent;
- if (xTransferable->getTransferData(aFlavor) >>= aClipBoardConentent)
+ try
+ {
+ if (xTransferable->getTransferData(aFlavor) >>= aClipBoardConentent)
+ {
+ INetURLObject aURL;
+ aURL.SetSmartURL(aClipBoardConentent);
+ if (!aURL.HasError())
+ aStrURL
+ = aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
+ }
+ }
+ // tdf#158345: Opening Hyperlink dialog leads to crash
+ // MimeType = "text/plain;charset=utf-16"
+ catch(const css::datatransfer::UnsupportedFlavorException&)
{
- INetURLObject aURL;
- aURL.SetSmartURL(aClipBoardConentent);
- if (!aURL.HasError())
- aStrURL
- = aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
}
}
}