summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/manager
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/deployment/manager')
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx14
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.hxx6
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx11
-rw-r--r--desktop/source/deployment/manager/dp_manager.h2
-rw-r--r--desktop/source/deployment/manager/dp_manager.hrc33
-rw-r--r--desktop/source/deployment/manager/dp_manager.src52
6 files changed, 17 insertions, 101 deletions
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 34f862c8f6f6..e770bad31ef9 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx
@@ -1229,13 +1229,13 @@ sal_Bool ExtensionManager::synchronize(
try
{
::osl::MutexGuard guard(getMutex());
- OUString sSynchronizingShared(StrSyncRepository::get());
+ OUString sSynchronizingShared(StrSyncRepository());
sSynchronizingShared = sSynchronizingShared.replaceAll("%NAME", "shared");
dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared);
bool bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv);
progressShared.update("\n\n");
- OUString sSynchronizingBundled(StrSyncRepository::get());
+ OUString sSynchronizingBundled(StrSyncRepository());
sSynchronizingBundled = sSynchronizingBundled.replaceAll("%NAME", "bundled");
dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled);
bModified |= (bool)getBundledRepository()->synchronize(xAbortChannel, xCmdEnv);
@@ -1314,12 +1314,12 @@ void ExtensionManager::checkInstall(
{
OSL_ASSERT( !approve && !abort );
throw css::deployment::DeploymentException(
- dp_misc::getResourceString(RID_STR_ERROR_WHILE_ADDING) + displayName,
+ DpResId(RID_STR_ERROR_WHILE_ADDING) + displayName,
static_cast<OWeakObject *>(this), request );
}
if (abort || !approve)
throw ucb::CommandFailedException(
- dp_misc::getResourceString(RID_STR_ERROR_WHILE_ADDING) + displayName,
+ DpResId(RID_STR_ERROR_WHILE_ADDING) + displayName,
static_cast<OWeakObject *>(this), request );
}
@@ -1336,7 +1336,7 @@ void ExtensionManager::checkUpdate(
// package already deployed, interact --force:
uno::Any request(
(css::deployment::VersionException(
- dp_misc::getResourceString(
+ DpResId(
RID_STR_PACKAGE_ALREADY_ADDED ) + newDisplayName,
static_cast<OWeakObject *>(this), newVersion, newDisplayName,
oldExtension ) ) );
@@ -1346,13 +1346,13 @@ void ExtensionManager::checkUpdate(
xCmdEnv, &replace, &abort )) {
OSL_ASSERT( !replace && !abort );
throw css::deployment::DeploymentException(
- dp_misc::getResourceString(
+ DpResId(
RID_STR_ERROR_WHILE_ADDING) + newDisplayName,
static_cast<OWeakObject *>(this), request );
}
if (abort || !replace)
throw ucb::CommandFailedException(
- dp_misc::getResourceString(
+ DpResId(
RID_STR_PACKAGE_ALREADY_ADDED) + newDisplayName,
static_cast<OWeakObject *>(this), request );
}
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx
index fd060446a9a2..a31172e55b83 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.hxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx
@@ -20,8 +20,9 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_EXTENSIONMANAGER_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_EXTENSIONMANAGER_HXX
-#include "dp_manager.hrc"
+#include "strings.hrc"
#include "dp_misc.h"
+#include "dp_shared.hxx"
#include "dp_interact.h"
#include "dp_activepackages.hxx"
#include <rtl/ref.hxx>
@@ -137,8 +138,7 @@ public:
private:
- struct StrSyncRepository : public ::dp_misc::StaticResourceString<
- StrSyncRepository, RID_STR_SYNCHRONIZING_REPOSITORY> {};
+ static OUString StrSyncRepository() { return DpResId(RID_STR_SYNCHRONIZING_REPOSITORY); }
css::uno::Reference< css::uno::XComponentContext> m_xContext;
css::uno::Reference<css::deployment::XPackageManagerFactory> m_xPackageManagerFactory;
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index a0eb96fdcc02..8244d4f88ee3 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -20,6 +20,7 @@
#include <config_features.h>
#include "dp_registry.hxx"
+#include "dp_shared.hxx"
#include "dp_ucb.h"
#include "dp_resource.h"
#include "dp_platform.hxx"
@@ -738,7 +739,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
Reference<deployment::XPackage> xPackage;
// copy file:
progressUpdate(
- getResourceString(RID_STR_COPYING_PACKAGE) + title, xCmdEnv );
+ DpResId(RID_STR_COPYING_PACKAGE) + title, xCmdEnv );
if (m_activePackages.isEmpty())
{
::ucbhelper::Content docFolderContent;
@@ -829,7 +830,7 @@ Reference<deployment::XPackage> PackageManagerImpl::addPackage(
Any exc( ::cppu::getCaughtException() );
logIntern( exc );
throw deployment::DeploymentException(
- getResourceString(RID_STR_ERROR_WHILE_ADDING) + url,
+ DpResId(RID_STR_ERROR_WHILE_ADDING) + url,
static_cast<OWeakObject *>(this), exc );
}
}
@@ -928,7 +929,7 @@ void PackageManagerImpl::removePackage(
Any exc( ::cppu::getCaughtException() );
logIntern( exc );
throw deployment::DeploymentException(
- getResourceString(RID_STR_ERROR_WHILE_REMOVING) + id,
+ DpResId(RID_STR_ERROR_WHILE_REMOVING) + id,
static_cast<OWeakObject *>(this), exc );
}
}
@@ -962,7 +963,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
return getDeployedPackage_( id, val, xCmdEnv );
}
throw lang::IllegalArgumentException(
- getResourceString(RID_STR_NO_SUCH_PACKAGE) + id,
+ DpResId(RID_STR_NO_SUCH_PACKAGE) + id,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -980,7 +981,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
auto const iter = params.find(OString("platform"));
if (iter != params.end() && !platform_fits(iter->second.m_sValue))
throw lang::IllegalArgumentException(
- getResourceString(RID_STR_NO_SUCH_PACKAGE) + id,
+ DpResId(RID_STR_NO_SUCH_PACKAGE) + id,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h
index c10122454ea3..4e584a6e1d14 100644
--- a/desktop/source/deployment/manager/dp_manager.h
+++ b/desktop/source/deployment/manager/dp_manager.h
@@ -20,7 +20,7 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_MANAGER_H
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_MANAGER_H
-#include "dp_manager.hrc"
+#include "strings.hrc"
#include "dp_misc.h"
#include "dp_interact.h"
#include "dp_activepackages.hxx"
diff --git a/desktop/source/deployment/manager/dp_manager.hrc b/desktop/source/deployment/manager/dp_manager.hrc
deleted file mode 100644
index ef0945b483b6..000000000000
--- a/desktop/source/deployment/manager/dp_manager.hrc
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_DP_MANAGER_HRC
-#define INCLUDED_DP_MANAGER_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_ERROR_WHILE_ADDING (RID_DEPLOYMENT_MANAGER_START+0)
-#define RID_STR_ERROR_WHILE_REMOVING (RID_DEPLOYMENT_MANAGER_START+1)
-#define RID_STR_PACKAGE_ALREADY_ADDED (RID_DEPLOYMENT_MANAGER_START+2)
-#define RID_STR_COPYING_PACKAGE (RID_DEPLOYMENT_MANAGER_START+3)
-#define RID_STR_NO_SUCH_PACKAGE (RID_DEPLOYMENT_MANAGER_START+4)
-#define RID_STR_SYNCHRONIZING_REPOSITORY (RID_DEPLOYMENT_MANAGER_START+5)
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_manager.src b/desktop/source/deployment/manager/dp_manager.src
deleted file mode 100644
index e01a160d26dd..000000000000
--- a/desktop/source/deployment/manager/dp_manager.src
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dp_manager.hrc"
-
-String RID_STR_COPYING_PACKAGE
-{
- Text [ en-US ] = "Copying: ";
-};
-
-String RID_STR_ERROR_WHILE_ADDING
-{
- Text [ en-US ] = "Error while adding: ";
-};
-
-String RID_STR_ERROR_WHILE_REMOVING
-{
- Text [ en-US ] = "Error while removing: ";
-};
-
-String RID_STR_PACKAGE_ALREADY_ADDED
-{
- Text [ en-US ] = "Extension has already been added: ";
-};
-
-String RID_STR_NO_SUCH_PACKAGE
-{
- Text [ en-US ] = "There is no such extension deployed: ";
-};
-
-String RID_STR_SYNCHRONIZING_REPOSITORY
-{
- Text [ en-US ] = "Synchronizing repository for %NAME extensions";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */