summaryrefslogtreecommitdiff
path: root/desktop/source/deployment/manager
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/manager
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/manager')
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx17
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.hxx4
2 files changed, 10 insertions, 11 deletions
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 619aed1987c6..1a4081f252ee 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -43,7 +43,7 @@
// key: 0xFF UTF8(identifier)
// value: UTF8(tempname) 0xFF UTF8(filename) 0xFF UTF8(mediatype)
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
namespace {
@@ -117,13 +117,12 @@ namespace dp_manager {
ActivePackages::ActivePackages() {}
ActivePackages::ActivePackages(::rtl::OUString const & url, bool readOnly)
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
: m_map(url, readOnly)
#endif
{
-#if defined(ANDROID) || defined(IOS)
- (void)url; (void)readOnly;
-#endif
+ (void) url;
+ (void) readOnly;
}
ActivePackages::~ActivePackages() {}
@@ -138,7 +137,7 @@ bool ActivePackages::get(
Data * data, ::rtl::OUString const & id, ::rtl::OUString const & fileName)
const
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::rtl::OString v;
if (m_map.get(&v, newKey(id))) {
if (data != NULL) {
@@ -163,7 +162,7 @@ bool ActivePackages::get(
ActivePackages::Entries ActivePackages::getEntries() const {
Entries es;
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_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)
@@ -189,7 +188,7 @@ ActivePackages::Entries ActivePackages::getEntries() const {
}
void ActivePackages::put(::rtl::OUString const & id, Data const & data) {
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::rtl::OStringBuffer b;
b.append(
::rtl::OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8));
@@ -211,7 +210,7 @@ void ActivePackages::put(::rtl::OUString const & id, Data const & data) {
void ActivePackages::erase(
::rtl::OUString const & id, ::rtl::OUString const & fileName)
{
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_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 254d09acdf65..fa2d909d3d97 100644
--- a/desktop/source/deployment/manager/dp_activepackages.hxx
+++ b/desktop/source/deployment/manager/dp_activepackages.hxx
@@ -25,7 +25,7 @@
#include <utility>
#include <vector>
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
#include "dp_persmap.h"
#endif
@@ -84,7 +84,7 @@ public:
private:
ActivePackages(ActivePackages &); // not defined
void operator =(ActivePackages &); // not defined
-#if !defined(ANDROID) && !defined(IOS)
+#ifndef DISABLE_EXTENSIONS
::dp_misc::PersistentMap m_map;
#endif
};