diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-23 20:14:45 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-04-30 17:05:28 +0200 |
commit | f220acf3aad954e20f3b15b30910432fac97ed15 (patch) | |
tree | 5c2f604499bcd812c9c5ed3b5bc572e837d509fa /shell/source/win32/jumplist/JumpList.cxx | |
parent | 723a0a067daaefb8b082fc849713ee6502ec9231 (diff) |
Use getXWeak in shell
Change-Id: Ied9a244a0fdd5973f2c9cb3bdd46500f6be2e0cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150868
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'shell/source/win32/jumplist/JumpList.cxx')
-rw-r--r-- | shell/source/win32/jumplist/JumpList.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/shell/source/win32/jumplist/JumpList.cxx b/shell/source/win32/jumplist/JumpList.cxx index 114c6f4e95b5..2773294be717 100644 --- a/shell/source/win32/jumplist/JumpList.cxx +++ b/shell/source/win32/jumplist/JumpList.cxx @@ -129,7 +129,7 @@ void SAL_CALL JumpListImpl::beginList(const OUString& sApplication) throw IllegalArgumentException( "Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', " "'Math', 'Base', 'Startcenter'.", - static_cast<OWeakObject*>(this), 1); + getXWeak(), 1); } OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication); @@ -157,8 +157,7 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory, if (sCategory.isEmpty()) { - throw IllegalArgumentException("Parameter 'category' must not be empty", - static_cast<OWeakObject*>(this), 1); + throw IllegalArgumentException("Parameter 'category' must not be empty", getXWeak(), 1); } try @@ -241,7 +240,7 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory, throw IllegalArgumentException( "No valid items given. `jumpListItems` is either empty, or contains only items " "which were removed by the user. See `XJumpList::getRemovedItems()`.", - static_cast<OWeakObject*>(this), 1); + getXWeak(), 1); } ThrowIfFailed( @@ -329,7 +328,7 @@ void SAL_CALL JumpListImpl::addTasks(const Sequence<JumpListItem>& aJumpListItem if (nItems == 0) { throw IllegalArgumentException("No valid items given. `jumpListItems` is empty.", - static_cast<OWeakObject*>(this), 1); + getXWeak(), 1); } ThrowIfFailed(m_aDestinationList->AddUserTasks(pObjectArray), "AddUserTasks failed."); @@ -417,7 +416,7 @@ void SAL_CALL JumpListImpl::deleteList(const OUString& sApplication) throw IllegalArgumentException( "Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', " "'Math', 'Base', 'Startcenter'.", - static_cast<OWeakObject*>(this), 1); + getXWeak(), 1); } OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication); @@ -442,7 +441,7 @@ Sequence<JumpListItem> SAL_CALL JumpListImpl::getRemovedItems(const OUString& sA throw IllegalArgumentException( "Parameter 'application' must be one of 'Writer', 'Calc', 'Impress', 'Draw', " "'Math', 'Base', 'Startcenter'.", - static_cast<OWeakObject*>(this), 1); + getXWeak(), 1); } OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplication); |