From 578704afac3c767a3eea2df3212b52a2006e7027 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 26 Oct 2015 11:41:54 +0100 Subject: sd: implement vcl::ITiledRenderable::isMimeTypeSupported() (cherry picked from commit b08546eb23aa8dfc2f139731f800031f147e32d7) Conflicts: sd/source/ui/inc/unomodel.hxx Change-Id: I528ac9f9f687d2940c6477b1d33264f1e523051f --- sd/source/ui/inc/unomodel.hxx | 2 ++ sd/source/ui/unoidl/unomodel.cxx | 11 +++++++++++ 2 files changed, 13 insertions(+) (limited to 'sd') diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx index 5f04474f4f6c..107069ed2dcc 100644 --- a/sd/source/ui/inc/unomodel.hxx +++ b/sd/source/ui/inc/unomodel.hxx @@ -260,6 +260,8 @@ public: virtual void resetSelection() SAL_OVERRIDE; /// @see vcl::ITiledRenderable::getWindow(). virtual vcl::Window* getWindow() SAL_OVERRIDE; + /// @see vcl::ITiledRenderable::isMimeTypeSupported(). + virtual bool isMimeTypeSupported() SAL_OVERRIDE; // XComponent diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 1628a18df296..31954b68f114 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -2550,6 +2550,17 @@ vcl::Window* SdXImpressDocument::getWindow() return pViewShell->GetActiveWindow(); } +bool SdXImpressDocument::isMimeTypeSupported() +{ + SolarMutexGuard aGuard; + DrawViewShell* pViewShell = GetViewShell(); + if (!pViewShell) + return false; + + TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromSystemClipboard(pViewShell->GetActiveWindow())); + return EditEngine::HasValidData(aDataHelper.GetTransferable()); +} + uno::Reference< i18n::XForbiddenCharacters > SdXImpressDocument::getForbiddenCharsTable() { uno::Reference< i18n::XForbiddenCharacters > xForb(mxForbidenCharacters); -- cgit