summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/registry
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/deployment/registry')
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx19
-rw-r--r--desktop/source/deployment/registry/component/dp_component.hrc34
-rw-r--r--desktop/source/deployment/registry/component/dp_component.src52
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx9
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.hrc30
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.src32
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx12
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx7
-rw-r--r--desktop/source/deployment/registry/dp_registry.src52
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx2
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx22
-rw-r--r--desktop/source/deployment/registry/help/dp_help.hrc32
-rw-r--r--desktop/source/deployment/registry/help/dp_help.src37
-rw-r--r--desktop/source/deployment/registry/inc/dp_backend.h15
-rw-r--r--desktop/source/deployment/registry/inc/dp_registry.hrc34
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx8
-rw-r--r--desktop/source/deployment/registry/package/dp_package.hrc29
-rw-r--r--desktop/source/deployment/registry/package/dp_package.src27
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.cxx9
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx10
-rw-r--r--desktop/source/deployment/registry/script/dp_script.hrc32
-rw-r--r--desktop/source/deployment/registry/script/dp_script.src37
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx8
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.hrc29
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.src27
25 files changed, 59 insertions, 546 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 60a2686ca99a..24949b8e9586 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -18,7 +18,8 @@
*/
-#include "dp_component.hrc"
+#include "strings.hrc"
+#include "dp_shared.hxx"
#include "dp_backend.h"
#include "dp_platform.hxx"
#include "dp_services.hxx"
@@ -495,33 +496,33 @@ BackendImpl::BackendImpl(
"application/vnd.sun.star.uno-component;type=native;platform=" +
getPlatformString(),
"*" SAL_DLLEXTENSION,
- getResourceString(RID_STR_DYN_COMPONENT)
+ DpResId(RID_STR_DYN_COMPONENT)
) ),
m_xJavaComponentTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.uno-component;type=Java",
"*.jar",
- getResourceString(RID_STR_JAVA_COMPONENT)
+ DpResId(RID_STR_JAVA_COMPONENT)
) ),
m_xPythonComponentTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.uno-component;type=Python",
"*.py",
- getResourceString(
+ DpResId(
RID_STR_PYTHON_COMPONENT)
) ),
m_xComponentsTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.uno-components",
"*.components",
- getResourceString(RID_STR_COMPONENTS)
+ DpResId(RID_STR_COMPONENTS)
) ),
m_xRDBTypelibTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.uno-typelibrary;type=RDB",
"*.rdb",
- getResourceString(RID_STR_RDB_TYPELIB)
+ DpResId(RID_STR_RDB_TYPELIB)
) ),
m_xJavaTypelibTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.uno-typelibrary;type=Java",
"*.jar",
- getResourceString(RID_STR_JAVA_TYPELIB)
+ DpResId(RID_STR_JAVA_TYPELIB)
) ),
m_typeInfos( 6 )
{
@@ -629,7 +630,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -721,7 +722,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType,
+ StrUnsupportedMediaType() + mediaType,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/component/dp_component.hrc b/desktop/source/deployment/registry/component/dp_component.hrc
deleted file mode 100644
index 91caa2082402..000000000000
--- a/desktop/source/deployment/registry/component/dp_component.hrc
+++ /dev/null
@@ -1,34 +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_COMPONENT_HRC
-#define INCLUDED_DP_COMPONENT_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_DYN_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+10)
-#define RID_STR_JAVA_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+11)
-#define RID_STR_PYTHON_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+12)
-#define RID_STR_COMPONENTS (RID_DEPLOYMENT_COMPONENT_START+13)
-#define RID_STR_RDB_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+20)
-#define RID_STR_JAVA_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+21)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/component/dp_component.src b/desktop/source/deployment/registry/component/dp_component.src
deleted file mode 100644
index fea67f326600..000000000000
--- a/desktop/source/deployment/registry/component/dp_component.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_component.hrc"
-
-String RID_STR_DYN_COMPONENT
-{
- Text [ en-US ] = "UNO Dynamic Library Component";
-};
-
-String RID_STR_JAVA_COMPONENT
-{
- Text [ en-US ] = "UNO Java Component";
-};
-
-String RID_STR_PYTHON_COMPONENT
-{
- Text [ en-US ] = "UNO Python Component";
-};
-
-String RID_STR_COMPONENTS
-{
- Text [ en-US ] = "UNO Components";
-};
-
-String RID_STR_RDB_TYPELIB
-{
- Text [ en-US ] = "UNO RDB Type Library";
-};
-
-String RID_STR_JAVA_TYPELIB
-{
- Text [ en-US ] = "UNO Java Type Library";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index ad372fa73297..cdf61b289ec7 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -22,7 +22,6 @@
#include <config_features.h>
-#include "dp_configuration.hrc"
#include "dp_backend.h"
#if HAVE_FEATURE_EXTENSIONS
#include "dp_persmap.h"
@@ -186,12 +185,12 @@ BackendImpl::BackendImpl(
m_xConfDataTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.configuration-data",
"*.xcu",
- getResourceString(RID_STR_CONF_DATA)
+ DpResId(RID_STR_CONF_DATA)
) ),
m_xConfSchemaTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.configuration-schema",
"*.xcs",
- getResourceString(RID_STR_CONF_SCHEMA)
+ DpResId(RID_STR_CONF_SCHEMA)
) ),
m_typeInfos( 2 )
{
@@ -317,7 +316,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -349,7 +348,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType,
+ StrUnsupportedMediaType() + mediaType,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.hrc b/desktop/source/deployment/registry/configuration/dp_configuration.hrc
deleted file mode 100644
index 3895d1113fdf..000000000000
--- a/desktop/source/deployment/registry/configuration/dp_configuration.hrc
+++ /dev/null
@@ -1,30 +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_CONFIGURATION_HRC
-#define INCLUDED_DP_CONFIGURATION_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_CONF_SCHEMA (RID_DEPLOYMENT_CONF_START+10)
-#define RID_STR_CONF_DATA (RID_DEPLOYMENT_CONF_START+11)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.src b/desktop/source/deployment/registry/configuration/dp_configuration.src
deleted file mode 100644
index be4ae80eebf1..000000000000
--- a/desktop/source/deployment/registry/configuration/dp_configuration.src
+++ /dev/null
@@ -1,32 +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_configuration.hrc"
-
-String RID_STR_CONF_SCHEMA
-{
- Text [ en-US ] = "Configuration Schema";
-};
-
-String RID_STR_CONF_DATA
-{
- Text [ en-US ] = "Configuration Data";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 9078d61b8f79..bbd752f3d07c 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -628,8 +628,8 @@ void Package::processPackage_impl(
ProgressLevel progress(
xCmdEnv,
(doRegisterPackage
- ? PackageRegistryBackend::StrRegisteringPackage::get()
- : PackageRegistryBackend::StrRevokingPackage::get())
+ ? PackageRegistryBackend::StrRegisteringPackage()
+ : PackageRegistryBackend::StrRevokingPackage())
+ displayName );
processPackage_( guard,
doRegisterPackage,
@@ -642,8 +642,8 @@ void Package::processPackage_impl(
Any e(cppu::getCaughtException());
throw deployment::DeploymentException(
((doRegisterPackage
- ? getResourceString(RID_STR_ERROR_WHILE_REGISTERING)
- : getResourceString(RID_STR_ERROR_WHILE_REVOKING))
+ ? DpResId(RID_STR_ERROR_WHILE_REGISTERING)
+ : DpResId(RID_STR_ERROR_WHILE_REVOKING))
+ getDisplayName()),
static_cast< OWeakObject * >(this), e);
}
@@ -666,8 +666,8 @@ void Package::processPackage_impl(
Any exc( ::cppu::getCaughtException() );
throw deployment::DeploymentException(
(doRegisterPackage
- ? getResourceString(RID_STR_ERROR_WHILE_REGISTERING)
- : getResourceString(RID_STR_ERROR_WHILE_REVOKING))
+ ? DpResId(RID_STR_ERROR_WHILE_REGISTERING)
+ : DpResId(RID_STR_ERROR_WHILE_REVOKING))
+ getDisplayName(), static_cast<OWeakObject *>(this), exc );
}
}
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index da6c96195158..745dc66a8717 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -19,8 +19,9 @@
#include <sal/config.h>
+#include "dp_shared.hxx"
#include "dp_package.hxx"
-#include "dp_registry.hrc"
+#include "strings.hrc"
#include "dp_registry.hxx"
#include "dp_misc.h"
#include "dp_resource.h"
@@ -494,7 +495,7 @@ Reference<deployment::XPackage> PackageRegistryImpl::bindPackage(
}
}
throw lang::IllegalArgumentException(
- getResourceString(RID_STR_CANNOT_DETECT_MEDIA_TYPE) + url,
+ DpResId(RID_STR_CANNOT_DETECT_MEDIA_TYPE) + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
else
@@ -514,7 +515,7 @@ Reference<deployment::XPackage> PackageRegistryImpl::bindPackage(
}
if (iFind == m_mediaType2backend.end()) {
throw lang::IllegalArgumentException(
- getResourceString(RID_STR_UNSUPPORTED_MEDIA_TYPE) + mediaType,
+ DpResId(RID_STR_UNSUPPORTED_MEDIA_TYPE) + mediaType,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
return iFind->second->bindPackage( url, mediaType, bRemoved,
diff --git a/desktop/source/deployment/registry/dp_registry.src b/desktop/source/deployment/registry/dp_registry.src
deleted file mode 100644
index a8cf5d2deb15..000000000000
--- a/desktop/source/deployment/registry/dp_registry.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_registry.hrc"
-
-String RID_STR_REGISTERING_PACKAGE
-{
- Text [ en-US ] = "Enabling: ";
-};
-
-String RID_STR_REVOKING_PACKAGE
-{
- Text [ en-US ] = "Disabling: ";
-};
-
-String RID_STR_CANNOT_DETECT_MEDIA_TYPE
-{
- Text [ en-US ] = "Cannot detect media-type: ";
-};
-
-String RID_STR_UNSUPPORTED_MEDIA_TYPE
-{
- Text [ en-US ] = "This media-type is not supported: ";
-};
-
-String RID_STR_ERROR_WHILE_REGISTERING
-{
- Text [ en-US ] = "An error occurred while enabling: ";
-};
-
-String RID_STR_ERROR_WHILE_REVOKING
-{
- Text [ en-US ] = "An error occurred while disabling: ";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index a5bac639d480..fbdb4614455e 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -159,7 +159,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
if (mediaType.isEmpty())
{
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index f7b64bb3a59d..88b9e59f24c6 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -20,7 +20,7 @@
#include <memory>
#include <config_features.h>
-#include "dp_help.hrc"
+#include "strings.hrc"
#include "dp_backend.h"
#include "dp_helpbackenddb.hxx"
#include "dp_services.hxx"
@@ -128,7 +128,7 @@ BackendImpl::BackendImpl(
: PackageRegistryBackend( args, xComponentContext ),
m_xHelpTypeInfo( new Package::TypeInfo("application/vnd.sun.star.help",
OUString(),
- getResourceString(RID_STR_HELP)
+ DpResId(RID_STR_HELP)
) ),
m_typeInfos( 1 )
{
@@ -173,7 +173,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
// we don't support auto detection:
if (mediaType_.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
OUString type, subType;
@@ -199,7 +199,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType_,
+ StrUnsupportedMediaType() + mediaType_,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
@@ -370,7 +370,7 @@ void BackendImpl::implProcessHelp(
OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
if( !xSFA->isFolder( aExpandedHelpURL ) )
{
- OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
+ OUString aErrStr = DpResId( RID_STR_HELPPROCESSING_GENERAL_ERROR );
aErrStr += "No help folder";
OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
throw deployment::DeploymentException( OUString(), oWeakThis,
@@ -475,18 +475,18 @@ void BackendImpl::implProcessHelp(
if( !bSuccess )
{
- sal_uInt16 nErrStrId = 0;
+ const char* pErrStrId = nullptr;
switch( aErrorInfo.m_eErrorClass )
{
- case HelpProcessingErrorClass::General: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
- case HelpProcessingErrorClass::XmlParsing: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
+ case HelpProcessingErrorClass::General: pErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
+ case HelpProcessingErrorClass::XmlParsing: pErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
default: ;
};
OUString aErrStr;
- if( nErrStrId != 0 )
+ if (pErrStrId)
{
- aErrStr = getResourceString( nErrStrId );
+ aErrStr = DpResId(pErrStrId);
// Remove CR/LF
OUString aErrMsg( aErrorInfo.m_aErrorMsg );
@@ -506,7 +506,7 @@ void BackendImpl::implProcessHelp(
aErrMsg = aErrMsg.copy( 0, nCopy );
}
aErrStr += aErrMsg;
- if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
+ if (!strcmp(pErrStrId, RID_STR_HELPPROCESSING_XMLPARSING_ERROR) && !aErrorInfo.m_aXMLParsingFile.isEmpty() )
{
aErrStr += " in ";
diff --git a/desktop/source/deployment/registry/help/dp_help.hrc b/desktop/source/deployment/registry/help/dp_help.hrc
deleted file mode 100644
index 59cb6136c458..000000000000
--- a/desktop/source/deployment/registry/help/dp_help.hrc
+++ /dev/null
@@ -1,32 +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_HELP_HRC
-#define INCLUDED_DP_HELP_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_HELP (RID_DEPLOYMENT_HELP_START+2)
-
-#define RID_STR_HELPPROCESSING_GENERAL_ERROR (RID_DEPLOYMENT_HELP_START+3)
-#define RID_STR_HELPPROCESSING_XMLPARSING_ERROR (RID_DEPLOYMENT_HELP_START+4)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/help/dp_help.src b/desktop/source/deployment/registry/help/dp_help.src
deleted file mode 100644
index 0d8d663c4107..000000000000
--- a/desktop/source/deployment/registry/help/dp_help.src
+++ /dev/null
@@ -1,37 +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_help.hrc"
-
-String RID_STR_HELP
-{
- Text [ en-US ] = "Help";
-};
-
-String RID_STR_HELPPROCESSING_GENERAL_ERROR
-{
- Text [ en-US ] = "The extension cannot be installed because:\n";
-};
-
-String RID_STR_HELPPROCESSING_XMLPARSING_ERROR
-{
- Text [ en-US ] = "The extension will not be installed because an error occurred in the Help files:\n";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index 33ea1e5a7a37..6aebe1124026 100644
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -22,6 +22,7 @@
#include "dp_misc.h"
#include "dp_resource.h"
+#include "dp_shared.hxx"
#include "dp_interact.h"
#include <rtl/ref.hxx>
#include <cppuhelper/weakref.hxx>
@@ -33,7 +34,7 @@
#include <com/sun/star/deployment/InvalidRemovedParameterException.hpp>
#include <list>
#include <unordered_map>
-#include "dp_registry.hrc"
+#include "strings.hrc"
namespace dp_registry
{
@@ -221,10 +222,8 @@ protected:
Unknown, User, Shared, Bundled, Tmp, Document
} m_eContext;
- struct StrCannotDetectMediaType : public ::dp_misc::StaticResourceString<
- StrCannotDetectMediaType, RID_STR_CANNOT_DETECT_MEDIA_TYPE> {};
- struct StrUnsupportedMediaType : public ::dp_misc::StaticResourceString<
- StrUnsupportedMediaType, RID_STR_UNSUPPORTED_MEDIA_TYPE> {};
+ static OUString StrCannotDetectMediaType() { return DpResId(RID_STR_CANNOT_DETECT_MEDIA_TYPE); }
+ static OUString StrUnsupportedMediaType() { return DpResId(RID_STR_UNSUPPORTED_MEDIA_TYPE); }
// @@@ to be implemented by specific backend:
virtual css::uno::Reference<css::deployment::XPackage> bindPackage_(
@@ -261,10 +260,8 @@ protected:
OUString const & folderUrl);
public:
- struct StrRegisteringPackage : public ::dp_misc::StaticResourceString<
- StrRegisteringPackage, RID_STR_REGISTERING_PACKAGE> {};
- struct StrRevokingPackage : public ::dp_misc::StaticResourceString<
- StrRevokingPackage, RID_STR_REVOKING_PACKAGE> {};
+ static OUString StrRegisteringPackage() { return DpResId(RID_STR_REGISTERING_PACKAGE); }
+ static OUString StrRevokingPackage() { return DpResId(RID_STR_REVOKING_PACKAGE); }
css::uno::Reference<css::uno::XComponentContext> const &
getComponentContext() const { return m_xComponentContext; }
diff --git a/desktop/source/deployment/registry/inc/dp_registry.hrc b/desktop/source/deployment/registry/inc/dp_registry.hrc
deleted file mode 100644
index c6a8d67ea77a..000000000000
--- a/desktop/source/deployment/registry/inc/dp_registry.hrc
+++ /dev/null
@@ -1,34 +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_REGISTRY_HRC
-#define INCLUDED_DP_REGISTRY_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_CANNOT_DETECT_MEDIA_TYPE (RID_DEPLOYMENT_REGISTRY_START+0)
-#define RID_STR_UNSUPPORTED_MEDIA_TYPE (RID_DEPLOYMENT_REGISTRY_START+1)
-#define RID_STR_ERROR_WHILE_REGISTERING (RID_DEPLOYMENT_REGISTRY_START+2)
-#define RID_STR_ERROR_WHILE_REVOKING (RID_DEPLOYMENT_REGISTRY_START+3)
-#define RID_STR_REGISTERING_PACKAGE (RID_DEPLOYMENT_REGISTRY_START+4)
-#define RID_STR_REVOKING_PACKAGE (RID_DEPLOYMENT_REGISTRY_START+5)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 8d051bc2ee45..e5c061d021f9 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -18,7 +18,7 @@
*/
-#include "dp_package.hrc"
+#include "strings.hrc"
#include "dp_package.hxx"
#include "dp_backend.h"
#include "dp_ucb.h"
@@ -270,7 +270,7 @@ BackendImpl::BackendImpl(
m_xBundleTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.package-bundle",
"*.oxt;*.uno.pkg",
- getResourceString(RID_STR_PACKAGE_BUNDLE)
+ DpResId(RID_STR_PACKAGE_BUNDLE)
) ),
m_xLegacyBundleTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.legacy-package-bundle",
@@ -375,7 +375,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -410,7 +410,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType,
+ StrUnsupportedMediaType() + mediaType,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/package/dp_package.hrc b/desktop/source/deployment/registry/package/dp_package.hrc
deleted file mode 100644
index 253dccb9e3a2..000000000000
--- a/desktop/source/deployment/registry/package/dp_package.hrc
+++ /dev/null
@@ -1,29 +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_PACKAGE_HRC
-#define INCLUDED_DP_PACKAGE_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_PACKAGE_BUNDLE (RID_DEPLOYMENT_BUNDLE_START+10)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/package/dp_package.src b/desktop/source/deployment/registry/package/dp_package.src
deleted file mode 100644
index c091c1b14acb..000000000000
--- a/desktop/source/deployment/registry/package/dp_package.src
+++ /dev/null
@@ -1,27 +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_package.hrc"
-
-String RID_STR_PACKAGE_BUNDLE
-{
- Text [ en-US ] = "Extension";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.cxx b/desktop/source/deployment/registry/script/dp_lib_container.cxx
index b743ad2f1eed..8843b04b6b0c 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.cxx
+++ b/desktop/source/deployment/registry/script/dp_lib_container.cxx
@@ -21,8 +21,9 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include "dp_script.hrc"
+#include "strings.hrc"
#include "dp_resource.h"
+#include "dp_shared.hxx"
#include "dp_xml.h"
#include "dp_lib_container.h"
@@ -41,11 +42,9 @@ namespace backend {
namespace script {
namespace {
-struct StrCannotDetermineLibName : public StaticResourceString<
- StrCannotDetermineLibName, RID_STR_CANNOT_DETERMINE_LIBNAME> {};
+ OUString StrCannotDetermineLibName() { return DpResId(RID_STR_CANNOT_DETERMINE_LIBNAME); }
}
-
OUString LibraryContainer::get_libname(
OUString const & url,
Reference<XCommandEnvironment> const & xCmdEnv,
@@ -56,7 +55,7 @@ OUString LibraryContainer::get_libname(
xml_parse( ::xmlscript::importLibrary( import ), ucb_content, xContext );
if (import.aName.isEmpty()) {
- throw Exception( StrCannotDetermineLibName::get(),
+ throw Exception( StrCannotDetermineLibName(),
Reference<XInterface>() );
}
return import.aName;
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index 332a6057a01e..e806617845f2 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -18,7 +18,7 @@
*/
-#include "dp_script.hrc"
+#include "strings.hrc"
#include "dp_services.hxx"
#include "dp_lib_container.h"
#include "dp_backend.h"
@@ -144,12 +144,12 @@ BackendImpl::BackendImpl(
m_xBasicLibTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.basic-library",
OUString() /* no file filter */,
- getResourceString(RID_STR_BASIC_LIB)
+ DpResId(RID_STR_BASIC_LIB)
) ),
m_xDialogLibTypeInfo( new Package::TypeInfo(
"application/vnd.sun.star.dialog-library",
OUString() /* no file filter */,
- getResourceString(RID_STR_DIALOG_LIB)
+ DpResId(RID_STR_DIALOG_LIB)
) ),
m_typeInfos( 2 )
{
@@ -233,7 +233,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -272,7 +272,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType,
+ StrUnsupportedMediaType() + mediaType,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/script/dp_script.hrc b/desktop/source/deployment/registry/script/dp_script.hrc
deleted file mode 100644
index 7f75edb38ac0..000000000000
--- a/desktop/source/deployment/registry/script/dp_script.hrc
+++ /dev/null
@@ -1,32 +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_SCRIPT_HRC
-#define INCLUDED_DP_SCRIPT_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_BASIC_LIB (RID_DEPLOYMENT_SCRIPT_START+10)
-#define RID_STR_DIALOG_LIB (RID_DEPLOYMENT_SCRIPT_START+11)
-
-#define RID_STR_CANNOT_DETERMINE_LIBNAME (RID_DEPLOYMENT_SCRIPT_START+16)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_script.src b/desktop/source/deployment/registry/script/dp_script.src
deleted file mode 100644
index f3162f8f86e3..000000000000
--- a/desktop/source/deployment/registry/script/dp_script.src
+++ /dev/null
@@ -1,37 +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_script.hrc"
-
-String RID_STR_BASIC_LIB
-{
- Text [ en-US ] = "%PRODUCTNAME Basic Library";
-};
-
-String RID_STR_DIALOG_LIB
-{
- Text [ en-US ] = "Dialog Library";
-};
-
-String RID_STR_CANNOT_DETERMINE_LIBNAME
-{
- Text [ en-US ] = "The library name could not be determined.";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 274ee2f827c2..d5a8a5df2843 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -20,7 +20,7 @@
#include <sal/config.h>
#include "dp_services.hxx"
-#include "dp_sfwk.hrc"
+#include "strings.hrc"
#include "dp_backend.h"
#include "dp_ucb.h"
#include "dp_parceldesc.hxx"
@@ -208,7 +208,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
- StrCannotDetectMediaType::get() + url,
+ StrCannotDetectMediaType() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
@@ -251,7 +251,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
- OUString sfwkLibType = getResourceString( RID_STR_SFWK_LIB );
+ OUString sfwkLibType = DpResId( RID_STR_SFWK_LIB );
// replace %MACRONAME placeholder with language name
OUString MACRONAME( "%MACROLANG" );
sal_Int32 startOfReplace = sfwkLibType.indexOf( MACRONAME );
@@ -266,7 +266,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
throw lang::IllegalArgumentException(
- StrUnsupportedMediaType::get() + mediaType,
+ StrUnsupportedMediaType() + mediaType,
static_cast<OWeakObject *>(this),
static_cast<sal_Int16>(-1) );
}
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc b/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc
deleted file mode 100644
index 505c54015b95..000000000000
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc
+++ /dev/null
@@ -1,29 +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_SFWK_HRC
-#define INCLUDED_DP_SFWK_HRC
-
-#include "deployment.hrc"
-
-#define RID_STR_SFWK_LIB (RID_DEPLOYMENT_SCRIPT_START+20)
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.src b/desktop/source/deployment/registry/sfwk/dp_sfwk.src
deleted file mode 100644
index 23cd3197eabe..000000000000
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.src
+++ /dev/null
@@ -1,27 +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_sfwk.hrc"
-
-String RID_STR_SFWK_LIB
-{
- Text [ en-US ] = "%MACROLANG Library";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */