diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-27 12:56:59 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-27 13:02:22 +0200 |
commit | ab7ac5884c5a824999b58d2a800cae64cb8e359a (patch) | |
tree | 868891d9f5678e6df6a6f527541d0d933c69a98f /desktop | |
parent | 71907bb06ae6fc3c0ea1485b6ed0efaed196a57a (diff) |
Use <config_features.h> instead of -DDISABLE_EXTENSIONS
Change-Id: I4fe5cd27b77d44b9b33af0ae3c3754e3b85c2ca3
Diffstat (limited to 'desktop')
4 files changed, 19 insertions, 15 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 1f57c2e41455..e9301bf6f9ec 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1541,7 +1541,7 @@ int Desktop::Main() */ Application::GetDefaultDevice(); -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS // Check if bundled or shared extensions were added /removed // and process those extensions (has to be done before checking // the extension dependencies! diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx index 1a4081f252ee..1eaeb09d70f5 100644 --- a/desktop/source/deployment/manager/dp_activepackages.cxx +++ b/desktop/source/deployment/manager/dp_activepackages.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_features.h> #include "sal/config.h" @@ -43,7 +44,7 @@ // key: 0xFF UTF8(identifier) // value: UTF8(tempname) 0xFF UTF8(filename) 0xFF UTF8(mediatype) -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS namespace { @@ -117,7 +118,7 @@ namespace dp_manager { ActivePackages::ActivePackages() {} ActivePackages::ActivePackages(::rtl::OUString const & url, bool readOnly) -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS : m_map(url, readOnly) #endif { @@ -137,7 +138,7 @@ bool ActivePackages::get( Data * data, ::rtl::OUString const & id, ::rtl::OUString const & fileName) const { -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS ::rtl::OString v; if (m_map.get(&v, newKey(id))) { if (data != NULL) { @@ -162,7 +163,7 @@ bool ActivePackages::get( ActivePackages::Entries ActivePackages::getEntries() const { Entries es; -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS ::dp_misc::t_string2string_map m(m_map.getEntries()); for (::dp_misc::t_string2string_map::const_iterator i(m.begin()); i != m.end(); ++i) @@ -188,7 +189,7 @@ ActivePackages::Entries ActivePackages::getEntries() const { } void ActivePackages::put(::rtl::OUString const & id, Data const & data) { -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS ::rtl::OStringBuffer b; b.append( ::rtl::OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8)); @@ -210,7 +211,7 @@ void ActivePackages::put(::rtl::OUString const & id, Data const & data) { void ActivePackages::erase( ::rtl::OUString const & id, ::rtl::OUString const & fileName) { -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS m_map.erase(newKey(id), true) || m_map.erase(oldKey(fileName), true); #else (void) id; diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx index fa2d909d3d97..940b6aa2a01e 100644 --- a/desktop/source/deployment/manager/dp_activepackages.hxx +++ b/desktop/source/deployment/manager/dp_activepackages.hxx @@ -20,12 +20,14 @@ #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_ACTIVEPACKAGES_HXX #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_MANAGER_DP_ACTIVEPACKAGES_HXX +#include <config_features.h> + #include "sal/config.h" #include <utility> #include <vector> -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS #include "dp_persmap.h" #endif @@ -84,7 +86,7 @@ public: private: ActivePackages(ActivePackages &); // not defined void operator =(ActivePackages &); // not defined -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS ::dp_misc::PersistentMap m_map; #endif }; diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 7c5b5d0b4a3a..b17f057d1f89 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -17,13 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - //TODO: Large parts of this file were copied from dp_component.cxx; those parts // should be consolidated. +#include <config_features.h> + #include "dp_configuration.hrc" #include "dp_backend.h" -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS #include "dp_persmap.h" #endif #include "dp_ucb.h" @@ -111,7 +112,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend OUString const & identifier, Reference<XCommandEnvironment> const & xCmdEnv ); -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS // for backwards compatibility - nil if no (compatible) back-compat db present ::std::auto_ptr<PersistentMap> m_registeredPackages; #endif @@ -217,7 +218,7 @@ BackendImpl::BackendImpl( configmgrini_verify_init( xCmdEnv ); -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<PersistentMap> pMap; SAL_WNODEPRECATED_DECLARATIONS_POP @@ -554,7 +555,7 @@ BackendImpl::PackageImpl::isRegistered_( if (that->hasActiveEntry(getURL())) bReg = true; -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS if (!bReg && that->m_registeredPackages.get()) { // fallback for user extension registered in berkeley DB @@ -743,7 +744,7 @@ void BackendImpl::PackageImpl::processPackage_( } else // revoke { -#ifndef DISABLE_EXTENSIONS +#if HAVE_FEATURE_EXTENSIONS if (!that->removeFromConfigmgrIni(m_isSchema, url, xCmdEnv) && that->m_registeredPackages.get()) { // Obsolete package database handling - should be removed for LibreOffice 4.0 |