summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl/swdtflvr.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-09-30 09:38:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-09-30 12:32:18 +0200
commit9373320fc88c1582a2ad25bda9c5264c7c58a97e (patch)
treeee2df8944d7af2080498b991ed46429e0a020947 /sw/source/uibase/dochdl/swdtflvr.cxx
parent37b81dd54a915223780a6b5efa54ce45db332604 (diff)
loplugin:reducevarscope in sw
Change-Id: Ifed7220c6acf7049b2985f1911a806b37a54d794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dochdl/swdtflvr.cxx')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 745731327a09..c530bca6d61f 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1391,7 +1391,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
{
SwPasteContext aPasteContext(rSh);
- sal_uInt8 nEventAction, nAction=0;
+ sal_uInt8 nAction=0;
SotExchangeDest nDestination = SwTransferable::GetSotDestination( rSh );
SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
SotExchangeActionFlags nActionFlags = SotExchangeActionFlags::NONE;
@@ -1411,6 +1411,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt
? EXCHG_IN_ACTION_COPY
: EXCHG_IN_ACTION_MOVE);
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
+ sal_uInt8 nEventAction;
nAction = SotExchange::GetExchangeAction(
rData.GetDataFlavorExVector(),
nDestination,
@@ -3308,9 +3309,10 @@ bool SwTransferable::PasteFormat( SwWrtShell& rSh,
bool SwTransferable::TestAllowedFormat( const TransferableDataHelper& rData,
SotClipboardFormatId nFormat, SotExchangeDest nDestination )
{
- sal_uInt8 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
+ sal_uInt8 nAction = EXCHG_INOUT_ACTION_NONE;
if( rData.HasFormat( nFormat )) {
uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() );
+ sal_uInt8 nEventAction;
nAction = SotExchange::GetExchangeAction(
rData.GetDataFlavorExVector(),
nDestination, EXCHG_IN_ACTION_COPY,