summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/registry
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-23 19:06:58 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-26 18:45:04 +0200
commit5a5c8e253abbef5626dab70f8978275ac3c742f8 (patch)
tree86c65cdfbff8ea0140937dee1311f65619f9aaf7 /desktop/source/deployment/registry
parent3ee3e7946c4a772fd13eada4b235479581190dce (diff)
Check feature test macros instead of ANDROID and/or IOS
Pass -DLIBO_FEATURE_FOO to compiler for some elements in BUILD_TYPE. BUILD_TYPE has at least two kinds of elements: Those that indicate building a bundled copy of some 3rd-party library, and those that indicate some specific feature of the LibreOffice platform or build-time configuration choice. This is for the latter kind. Change many of the checks for Android and/or iOS in the source code to check LIBO_FEATURE_DESKTOP, LIBO_FEATURE_HELP or DISABLE_EXTENSIONS instead, in cases where that is what is meant, not Android or iOS specifically. Change-Id: I2cd3f3bb99e953c7754dcea76a426f8f9d61e4db
Diffstat (limited to 'desktop/source/deployment/registry')
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx13
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx4
2 files changed, 10 insertions, 7 deletions
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 74fd3987133f..7c5b5d0b4a3a 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -23,7 +23,7 @@
#include "dp_configuration.hrc"
#include "dp_backend.h"
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
#include "dp_persmap.h"
#endif
#include "dp_ucb.h"
@@ -110,10 +110,12 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
OUString const & url, OUString const & mediaType, sal_Bool bRemoved,
OUString const & identifier,
Reference<XCommandEnvironment> const & xCmdEnv );
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifndef DISABLE_EXTENSIONS
// for backwards compatibility - nil if no (compatible) back-compat db present
::std::auto_ptr<PersistentMap> m_registeredPackages;
#endif
+
virtual void SAL_CALL disposing();
const Reference<deployment::XPackageTypeInfo> m_xConfDataTypeInfo;
@@ -215,7 +217,7 @@ BackendImpl::BackendImpl(
configmgrini_verify_init( xCmdEnv );
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<PersistentMap> pMap;
SAL_WNODEPRECATED_DECLARATIONS_POP
@@ -551,7 +553,8 @@ BackendImpl::PackageImpl::isRegistered_(
bool bReg = false;
if (that->hasActiveEntry(getURL()))
bReg = true;
-#if !defined(ANDROID) && !defined(IOS)
+
+#ifndef DISABLE_EXTENSIONS
if (!bReg && that->m_registeredPackages.get())
{
// fallback for user extension registered in berkeley DB
@@ -740,7 +743,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
else // revoke
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
if (!that->removeFromConfigmgrIni(m_isSchema, url, xCmdEnv) &&
that->m_registeredPackages.get()) {
// Obsolete package database handling - should be removed for LibreOffice 4.0
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 67598b91a96a..5c660fb3d393 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -31,7 +31,7 @@
#include "uno/current_context.hxx"
#include "unotools/pathoptions.hxx"
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_HELP
#include <helpcompiler/compilehelp.hxx>
#include <helpcompiler/HelpIndexer.hxx>
#endif
@@ -386,7 +386,7 @@ void BackendImpl::implProcessHelp(
data.dataUrl = xPackage->getURL();
if (!package->extensionContainsCompiledHelp())
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifdef LIBO_FEATURE_HELP
const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
data.dataUrl = sHelpFolder;