summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx9
-rw-r--r--include/vcl/ITiledRenderable.hxx4
-rw-r--r--sc/inc/docuno.hxx4
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
-rw-r--r--sd/source/ui/inc/unomodel.hxx4
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx6
-rw-r--r--sw/inc/unotxdoc.hxx4
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx4
8 files changed, 17 insertions, 24 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 85ed95d17dc6..8f12ee2b8d00 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1009,14 +1009,7 @@ static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, cons
uno::Reference<datatransfer::XTransferable> xTransferable(new LOKTransferable(pMimeType, pData, nSize));
uno::Reference<datatransfer::clipboard::XClipboard> xClipboard(new LOKClipboard());
xClipboard->setContents(xTransferable, uno::Reference<datatransfer::clipboard::XClipboardOwner>());
- vcl::Window* pWindow = pDoc->getWindow();
- if (!pWindow)
- {
- gImpl->maLastExceptionMsg = "Document did not provide a window";
- return false;
- }
-
- pWindow->SetClipboard(xClipboard);
+ pDoc->setClipboard(xClipboard);
if (!pDoc->isMimeTypeSupported())
{
if (gImpl)
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 4fa23386bfbc..8ae719edf752 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -148,8 +148,8 @@ public:
return OUString();
}
- /// Returns the current vcl::Window of the component.
- virtual vcl::Window* getWindow() = 0;
+ /// Sets the clipboard of the component.
+ virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) = 0;
/// If the current contents of the clipboard is something we can paste.
virtual bool isMimeTypeSupported() = 0;
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 3ee6e61e58ef..ea924a8bb3b4 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -399,8 +399,8 @@ public:
/// @see lok::Document::resetSelection().
virtual void resetSelection() override;
- /// @see vcl::ITiledRenderable::getWindow().
- virtual vcl::Window* getWindow() override;
+ /// @see vcl::ITiledRenderable::setClipboard().
+ virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
/// @see vcl::ITiledRenderable::isMimeTypeSupported().
virtual bool isMimeTypeSupported() override;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 8391905ba969..c6070f1dfe82 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -845,15 +845,15 @@ void ScModelObj::resetSelection()
pDocShell->GetDocument().GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, "");
}
-vcl::Window* ScModelObj::getWindow()
+void ScModelObj::setClipboard(const uno::Reference<datatransfer::clipboard::XClipboard>& xClipboard)
{
SolarMutexGuard aGuard;
ScViewData* pViewData = ScDocShell::GetViewData();
if (!pViewData)
- return 0;
+ return;
- return pViewData->GetActiveWin();
+ pViewData->GetActiveWin()->SetClipboard(xClipboard);
}
bool ScModelObj::isMimeTypeSupported()
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 03dc4456067d..1e1d65f2d63c 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -259,8 +259,8 @@ public:
virtual void setGraphicSelection(int nType, int nX, int nY) override;
/// @see lok::Document::resetSelection().
virtual void resetSelection() override;
- /// @see vcl::ITiledRenderable::getWindow().
- virtual vcl::Window* getWindow() override;
+ /// @see vcl::ITiledRenderable::setClipboard().
+ virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
/// @see vcl::ITiledRenderable::isMimeTypeSupported().
virtual bool isMimeTypeSupported() override;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 8c3d0a3d0722..c840f784e6a2 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2533,15 +2533,15 @@ void SdXImpressDocument::resetSelection()
pSdrView->UnmarkAll();
}
-vcl::Window* SdXImpressDocument::getWindow()
+void SdXImpressDocument::setClipboard(const uno::Reference<datatransfer::clipboard::XClipboard>& xClipboard)
{
SolarMutexGuard aGuard;
DrawViewShell* pViewShell = GetViewShell();
if (!pViewShell)
- return 0;
+ return;
- return pViewShell->GetActiveWindow();
+ pViewShell->GetActiveWindow()->SetClipboard(xClipboard);
}
bool SdXImpressDocument::isMimeTypeSupported()
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 196f60d81286..d5c5eb9f17d2 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -431,8 +431,8 @@ public:
virtual void resetSelection() override;
/// @see vcl::ITiledRenderable::getPartPageRectangles().
virtual OUString getPartPageRectangles() override;
- /// @see vcl::ITiledRenderable::getWindow().
- virtual vcl::Window* getWindow() override;
+ /// @see vcl::ITiledRenderable::setClipboard().
+ virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
/// @see vcl::ITiledRenderable::isMimeTypeSupported().
virtual bool isMimeTypeSupported() override;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 683119886911..43a5b324d9ca 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3139,11 +3139,11 @@ OUString SwXTextDocument::getPartPageRectangles()
return pWrtShell->getPageRectangles();
}
-vcl::Window* SwXTextDocument::getWindow()
+void SwXTextDocument::setClipboard(const uno::Reference<datatransfer::clipboard::XClipboard>& xClipboard)
{
SolarMutexGuard aGuard;
- return &pDocShell->GetView()->GetEditWin();
+ pDocShell->GetView()->GetEditWin().SetClipboard(xClipboard);
}
bool SwXTextDocument::isMimeTypeSupported()