[Libreoffice-commits] core.git: include/vcl sc/source sd/source sw/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 11 17:37:01 UTC 2021
include/vcl/transfer.hxx | 2 +-
sc/source/ui/view/gridwin.cxx | 3 +--
sd/source/ui/view/drviews4.cxx | 2 +-
sw/source/uibase/docvw/edtwin.cxx | 2 +-
vcl/source/treelist/transfer.cxx | 6 +-----
5 files changed, 5 insertions(+), 10 deletions(-)
New commits:
commit 417c0c7b711fbd82a874c8f43c1b2a8f4631e236
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 11 10:22:42 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Mar 11 18:36:16 2021 +0100
TransferableDataHelper::CreateFromSelection doesn't use its argument
Change-Id: Id43995411d850ae051d1d803bcea2745e1dc17a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112331
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index cd2b58fc29b6..c94b005b13fa 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -366,7 +366,7 @@ public:
static TransferableDataHelper CreateFromClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& rClipboard);
static TransferableDataHelper CreateFromSystemClipboard( vcl::Window * pWindow );
- static TransferableDataHelper CreateFromSelection( vcl::Window * pWindow );
+ static TransferableDataHelper CreateFromPrimarySelection();
static bool IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor,
const css::datatransfer::DataFlavor& rRequestFlavor );
};
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index f3a543075b9d..790ab75713b0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4519,8 +4519,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
else
{
// get selection from system
-
- TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSelection( this ) );
+ TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromPrimarySelection());
const uno::Reference<datatransfer::XTransferable>& xTransferable = aDataHelper.GetTransferable();
if ( xTransferable.is() )
{
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index fa8d9672e2d5..62e23e5b8e7e 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -493,7 +493,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow )
{
- TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSelection( GetActiveWindow() ) );
+ TransferableDataHelper aDataHelper(TransferableDataHelper::CreateFromPrimarySelection());
if( aDataHelper.GetTransferable().is() )
{
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 05595d9a23ff..1f95f9bdea31 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5605,7 +5605,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
if( !m_rView.GetDocShell()->IsReadOnly() )
{
TransferableDataHelper aDataHelper(
- TransferableDataHelper::CreateFromSelection( this ));
+ TransferableDataHelper::CreateFromPrimarySelection());
if( !aDataHelper.GetXTransferable().is() )
break;
diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 56c38019ab3b..bee628edc60b 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -2170,11 +2170,8 @@ TransferableDataHelper TransferableDataHelper::CreateFromSystemClipboard( vcl::W
return CreateFromClipboard(xClipboard);
}
-
-TransferableDataHelper TransferableDataHelper::CreateFromSelection( vcl::Window* pWindow )
+TransferableDataHelper TransferableDataHelper::CreateFromPrimarySelection()
{
- DBG_ASSERT( pWindow, "Window pointer is NULL" );
-
Reference< XClipboard > xSelection(GetSystemPrimarySelection());
TransferableDataHelper aRet;
@@ -2200,7 +2197,6 @@ TransferableDataHelper TransferableDataHelper::CreateFromSelection( vcl::Window*
return aRet;
}
-
bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor,
const css::datatransfer::DataFlavor& rRequestFlavor )
{
More information about the Libreoffice-commits
mailing list