summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-03-22 10:05:39 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-03-22 09:01:58 +0100
commit561cb62a5ac81053e89ec9bf1eed739801570c2d (patch)
tree15dd209a037283ff066dad01119f6c03bef563b8 /vcl
parent6c16dc217ef5cbe25166df7a3728ade12a148880 (diff)
Simplify CoCreateInstance / CoGetClassObject with COMReference
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/app/fileregistration.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/vcl/win/app/fileregistration.cxx b/vcl/win/app/fileregistration.cxx
index 75bb0010ba21..bd31c4acd607 100644
--- a/vcl/win/app/fileregistration.cxx
+++ b/vcl/win/app/fileregistration.cxx
@@ -37,7 +37,7 @@ namespace vcl::fileregistration
{
static void LaunchModernSettingsDialogDefaultApps()
{
- auto pIf = sal::systools::COMReference<IApplicationActivationManager>().CoCreateInstance(
+ sal::systools::COMReference<IApplicationActivationManager> pIf(
CLSID_ApplicationActivationManager, nullptr, CLSCTX_INPROC_SERVER);
DWORD pid;
@@ -121,9 +121,8 @@ void LaunchRegistrationUI()
}
else
{
- auto pIf = sal::systools::COMReference<IApplicationAssociationRegistrationUI>()
- .CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI, nullptr,
- CLSCTX_INPROC_SERVER);
+ sal::systools::COMReference<IApplicationAssociationRegistrationUI> pIf(
+ CLSID_ApplicationAssociationRegistrationUI, nullptr, CLSCTX_INPROC_SERVER);
// LaunchAdvancedAssociationUI only works for applications registered under
// Software\RegisteredApplications. See scp2/source/ooo/registryitem_ooo.scp