summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-04-10 09:54:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-04-10 10:54:32 +0200
commit7e3d93fd5776244e9028ff4fb3b551222b49cd87 (patch)
treeace08e91a56f2ba5c4a0db65a75609e9fa14b1db /shell
parent69a05652a5b30b4d4234c19cc0a1e355712759d5 (diff)
Various loplugin warnings (in new Windows-only code)
Change-Id: I78863816c9ad520e0fc4919aeaa2e25ff768d451 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/jumplist/JumpList.cxx32
1 files changed, 15 insertions, 17 deletions
diff --git a/shell/source/win32/jumplist/JumpList.cxx b/shell/source/win32/jumplist/JumpList.cxx
index a8770840d38e..f5d8ca8532cd 100644
--- a/shell/source/win32/jumplist/JumpList.cxx
+++ b/shell/source/win32/jumplist/JumpList.cxx
@@ -46,13 +46,14 @@ using namespace css::system::windows;
using namespace osl;
using namespace sal::systools;
+namespace
+{
class JumpListImpl : public BaseMutex, public WeakComponentImplHelper<XJumpList, XServiceInfo>
{
Reference<XComponentContext> m_xContext;
public:
explicit JumpListImpl(const Reference<XComponentContext>& xContext);
- ~JumpListImpl();
// XJumpList
virtual void SAL_CALL appendCategory(const OUString& sCategory,
@@ -73,10 +74,6 @@ JumpListImpl::JumpListImpl(const Reference<XComponentContext>& xContext)
{
}
-JumpListImpl::~JumpListImpl() {}
-
-namespace
-{
// Determines if the provided IShellLinkItem is listed in the array of items that the user has removed
bool lcl_isItemInArray(COMReference<IShellLinkW> pShellLinkItem,
COMReference<IObjectArray> poaRemoved)
@@ -155,7 +152,7 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory,
COMReference<IObjectCollection> aCollection(CLSID_EnumerableObjectCollection, nullptr,
CLSCTX_INPROC_SERVER);
- for (auto item : aJumpListItems)
+ for (auto const& item : aJumpListItems)
{
if (item.name.isEmpty())
continue;
@@ -178,20 +175,21 @@ void SAL_CALL JumpListImpl::appendCategory(const OUString& sCategory,
PropVariantClear(&propvar);
}
- ThrowIfFailed(
- pShellLinkItem->SetDescription(o3tl::toW(item.description.getStr())),
- OString("Setting description '" + item.description.toUtf8() + "' failed."));
-
- ThrowIfFailed(pShellLinkItem->SetPath(o3tl::toW(sofficePath.getStr())),
- OString("Setting path '" + sofficePath.toUtf8() + "' failed."));
+ ThrowIfFailed(pShellLinkItem->SetDescription(o3tl::toW(item.description.getStr())),
+ OStringConcatenation("Setting description '"
+ + item.description.toUtf8() + "' failed."));
ThrowIfFailed(
- pShellLinkItem->SetArguments(o3tl::toW(item.arguments.getStr())),
- OString("Setting arguments '" + item.arguments.toUtf8() + "' failed."));
+ pShellLinkItem->SetPath(o3tl::toW(sofficePath.getStr())),
+ OStringConcatenation("Setting path '" + sofficePath.toUtf8() + "' failed."));
- ThrowIfFailed(
- pShellLinkItem->SetIconLocation(o3tl::toW(item.iconPath.getStr()), 0),
- OString("Setting icon path '" + item.iconPath.toUtf8() + "' failed."));
+ ThrowIfFailed(pShellLinkItem->SetArguments(o3tl::toW(item.arguments.getStr())),
+ OStringConcatenation("Setting arguments '" + item.arguments.toUtf8()
+ + "' failed."));
+
+ ThrowIfFailed(pShellLinkItem->SetIconLocation(o3tl::toW(item.iconPath.getStr()), 0),
+ OStringConcatenation("Setting icon path '" + item.iconPath.toUtf8()
+ + "' failed."));
if (lcl_isItemInArray(pShellLinkItem, removed))
{