Blame SOURCES/0238-sd-implement-vcl-ITiledRenderable-isMimeTypeSupporte.patch

f325b2
From e428238e9c2017375e5f5e1a492385abac5937c1 Mon Sep 17 00:00:00 2001
f325b2
From: Miklos Vajna <vmiklos@collabora.co.uk>
f325b2
Date: Mon, 26 Oct 2015 11:41:54 +0100
f325b2
Subject: [PATCH 238/398] sd: implement
f325b2
 vcl::ITiledRenderable::isMimeTypeSupported()
f325b2
f325b2
Change-Id: I528ac9f9f687d2940c6477b1d33264f1e523051f
f325b2
(cherry picked from commit b08546eb23aa8dfc2f139731f800031f147e32d7)
f325b2
---
f325b2
 sd/source/ui/inc/unomodel.hxx    |  2 ++
f325b2
 sd/source/ui/unoidl/unomodel.cxx | 11 +++++++++++
f325b2
 2 files changed, 13 insertions(+)
f325b2
f325b2
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
f325b2
index a24f774e2fc9..741cfd356e39 100644
f325b2
--- a/sd/source/ui/inc/unomodel.hxx
f325b2
+++ b/sd/source/ui/inc/unomodel.hxx
f325b2
@@ -260,6 +260,8 @@ public:
f325b2
     virtual void resetSelection() override;
f325b2
     /// @see vcl::ITiledRenderable::getWindow().
f325b2
     virtual vcl::Window* getWindow() override;
f325b2
+    /// @see vcl::ITiledRenderable::isMimeTypeSupported().
f325b2
+    virtual bool isMimeTypeSupported() override;
f325b2
 
f325b2
     // XComponent
f325b2
 
f325b2
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
f325b2
index 1628a18df296..31954b68f114 100644
f325b2
--- a/sd/source/ui/unoidl/unomodel.cxx
f325b2
+++ b/sd/source/ui/unoidl/unomodel.cxx
f325b2
@@ -2550,6 +2550,17 @@ vcl::Window* SdXImpressDocument::getWindow()
f325b2
     return pViewShell->GetActiveWindow();
f325b2
 }
f325b2
 
f325b2
+bool SdXImpressDocument::isMimeTypeSupported()
f325b2
+{
f325b2
+    SolarMutexGuard aGuard;
f325b2
+    DrawViewShell* pViewShell = GetViewShell();
f325b2
+    if (!pViewShell)
f325b2
+        return false;
f325b2
+
f325b2
+    TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromSystemClipboard(pViewShell->GetActiveWindow()));
f325b2
+    return EditEngine::HasValidData(aDataHelper.GetTransferable());
f325b2
+}
f325b2
+
f325b2
 uno::Reference< i18n::XForbiddenCharacters > SdXImpressDocument::getForbiddenCharsTable()
f325b2
 {
f325b2
     uno::Reference< i18n::XForbiddenCharacters > xForb(mxForbidenCharacters);
f325b2
-- 
f325b2
2.12.0
f325b2