summaryrefslogtreecommitdiff
path: root/embeddedobj
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 /embeddedobj
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 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx4
-rw-r--r--embeddedobj/source/general/xcreator.cxx2
-rw-r--r--embeddedobj/source/msole/xdialogcreator.cxx2
-rw-r--r--embeddedobj/source/msole/xolefactory.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 3f7cb8fde98f..c6f57aa9c643 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -368,7 +368,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
embeddedobj_OOoEmbeddedObjectFactory_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new OOoEmbeddedObjectFactory(context)));
+ return cppu::acquire(new OOoEmbeddedObjectFactory(context));
}
@@ -412,6 +412,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
embeddedobj_OOoSpecialEmbeddedObjectFactory_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new OOoSpecialEmbeddedObjectFactory(context)));
+ return cppu::acquire(new OOoSpecialEmbeddedObjectFactory(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx
index a54295895190..d057aeba4a1a 100644
--- a/embeddedobj/source/general/xcreator.cxx
+++ b/embeddedobj/source/general/xcreator.cxx
@@ -410,7 +410,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
embeddedobj_UNOEmbeddedObjectCreator_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new UNOEmbeddedObjectCreator(context)));
+ return cppu::acquire(new UNOEmbeddedObjectCreator(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx
index 2d162cf9608e..226528516953 100644
--- a/embeddedobj/source/msole/xdialogcreator.cxx
+++ b/embeddedobj/source/msole/xdialogcreator.cxx
@@ -329,7 +329,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
embeddedobj_MSOLEDialogObjectCreator_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new MSOLEDialogObjectCreator(context)));
+ return cppu::acquire(new MSOLEDialogObjectCreator(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx
index b18ba1153498..1a7728ef8cdd 100644
--- a/embeddedobj/source/msole/xolefactory.cxx
+++ b/embeddedobj/source/msole/xolefactory.cxx
@@ -245,7 +245,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
embeddedobj_OleEmbeddedObjectFactory_get_implementation(
css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return cppu::acquire(static_cast<cppu::OWeakObject*>(new OleEmbeddedObjectFactory(context)));
+ return cppu::acquire(new OleEmbeddedObjectFactory(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */