summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-03-10 09:41:13 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-10 08:22:26 +0100
commit96388e5e809a48573970df9b6b2649517a08447f (patch)
treec686721e917a0a1bb5cf27b3468bd80b3c62b416 /vcl/win
parent24dd6c5f9861340fafccad9504a99a939cbba0a6 (diff)
Drop 'static_cast<cppu::OWeakObject*>' syntactic noise
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/dtrans/WinClipboard.cxx2
-rw-r--r--vcl/win/dtrans/ftransl.cxx2
-rw-r--r--vcl/win/dtrans/generic_clipboard.cxx2
-rw-r--r--vcl/win/dtrans/source.cxx2
-rw-r--r--vcl/win/dtrans/target.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/vcl/win/dtrans/WinClipboard.cxx b/vcl/win/dtrans/WinClipboard.cxx
index 5ec56690b17e..2253c1691785 100644
--- a/vcl/win/dtrans/WinClipboard.cxx
+++ b/vcl/win/dtrans/WinClipboard.cxx
@@ -345,7 +345,7 @@ dtrans_CWinClipboard_get_implementation(css::uno::XComponentContext* context,
}
else
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new CWinClipboard(context, "")));
+ return cppu::acquire(new CWinClipboard(context, ""));
}
}
diff --git a/vcl/win/dtrans/ftransl.cxx b/vcl/win/dtrans/ftransl.cxx
index 6bcf59066b81..45ab9a79ef64 100644
--- a/vcl/win/dtrans/ftransl.cxx
+++ b/vcl/win/dtrans/ftransl.cxx
@@ -540,6 +540,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
dtrans_CDataFormatTranslatorUNO_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new CDataFormatTranslatorUNO(context)));
+ return cppu::acquire(new CDataFormatTranslatorUNO(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/generic_clipboard.cxx b/vcl/win/dtrans/generic_clipboard.cxx
index 0394353601c8..23c26415d697 100644
--- a/vcl/win/dtrans/generic_clipboard.cxx
+++ b/vcl/win/dtrans/generic_clipboard.cxx
@@ -142,7 +142,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
dtrans_GenericClipboard_get_implementation(
css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new GenericClipboard()));
+ return cppu::acquire(new GenericClipboard());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/dtrans/source.cxx b/vcl/win/dtrans/source.cxx
index 81275560a806..fdbb295e33da 100644
--- a/vcl/win/dtrans/source.cxx
+++ b/vcl/win/dtrans/source.cxx
@@ -297,7 +297,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
dtrans_DragSource_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new DragSource(context)));
+ return cppu::acquire(new DragSource(context));
}
/** This function is called as extra thread from
diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx
index 32cf95ffa647..8f48cd2d2bec 100644
--- a/vcl/win/dtrans/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -640,7 +640,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
dtrans_DropTarget_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new DropTarget(context)));
+ return cppu::acquire(new DropTarget(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */