diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-26 11:28:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-26 13:38:33 +0100 |
commit | 7efbbe98d7fe951909234dcacd37f67975f00da2 (patch) | |
tree | 997e4823038a31d2a685a27fb6b0d6cd6a19b7da /desktop/source/lib | |
parent | 2e61410d2545c1dee0c5aad4ea01b29f0a907e61 (diff) |
lok::Document::paste: check if the given mime type is supported
Change-Id: Ib59ea43700815c53cdd4be819e2e9cf35c6f89e9
Diffstat (limited to 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9ac9347d35c0..85ed95d17dc6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1017,6 +1017,13 @@ static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, cons } pWindow->SetClipboard(xClipboard); + if (!pDoc->isMimeTypeSupported()) + { + if (gImpl) + gImpl->maLastExceptionMsg = "Document doesn't support this mime type"; + return false; + } + OUString aCommand(".uno:Paste"); uno::Sequence<beans::PropertyValue> aPropertyValues; if (!comphelper::dispatchCommand(aCommand, aPropertyValues)) |