diff options
-rw-r--r-- | Library_merged.mk | 7 | ||||
-rw-r--r-- | android/qa/sc/Makefile | 1 | ||||
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | desktop/Library_deployment.mk | 16 | ||||
-rw-r--r-- | desktop/Library_deploymentmisc.mk | 7 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_activepackages.cxx | 31 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_activepackages.hxx | 5 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_extensionmanager.hxx | 1 | ||||
-rw-r--r-- | desktop/source/deployment/manager/dp_managerfac.cxx | 1 | ||||
-rw-r--r-- | desktop/source/deployment/registry/configuration/dp_configuration.cxx | 15 | ||||
-rw-r--r-- | desktop/source/deployment/registry/help/dp_help.cxx | 6 |
11 files changed, 81 insertions, 13 deletions
diff --git a/Library_merged.mk b/Library_merged.mk index 9fe9c2d012ff..b2e49b067d96 100644 --- a/Library_merged.mk +++ b/Library_merged.mk @@ -49,11 +49,16 @@ $(eval $(call gb_Library_add_linked_libs,merged,\ )) $(eval $(call gb_Library_use_externals,merged,\ - berkeleydb \ icuuc \ zlib \ )) +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) +$(eval $(call gb_Library_use_externals,merged,\ + berkeleydb \ +)) +endif + # gb_MERGEDLIBS is defined in solenv/gbuild/extensions/pre_MergedLibsList.mk $(eval $(call gb_Library_add_library_objects,merged,\ $(gb_MERGEDLIBS) \ diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile index cd09db12a7cd..22d4ebafea31 100644 --- a/android/qa/sc/Makefile +++ b/android/qa/sc/Makefile @@ -60,7 +60,6 @@ copy-stuff: bootstrap.uno \ comphelpgcc3 \ configmgr.uno \ - db-4.7 \ fontconfig \ forlo \ foruilo \ diff --git a/configure.in b/configure.in index 84c1dcc24531..1fccd1eeacb5 100644 --- a/configure.in +++ b/configure.in @@ -5819,10 +5819,12 @@ or install the Berkeley db development package.]) SCPDEFS="$SCPDEFS -DSYSTEM_DB" MINGW_EXTERNAL_DLLS="$MINGW_EXTERNAL_DLLS libdb-4.8.dll" -else +elif test $_os != iOS -a $_os != Android; then AC_MSG_RESULT([internal]) SYSTEM_DB=NO BUILD_TYPE="$BUILD_TYPE BERKELEYDB" +else + AC_MSG_RESULT([none]) fi AC_SUBST(SYSTEM_DB) AC_SUBST(SYSTEM_DB_CFLAGS) diff --git a/desktop/Library_deployment.mk b/desktop/Library_deployment.mk index 91561c8488e7..7e455ef66edb 100644 --- a/desktop/Library_deployment.mk +++ b/desktop/Library_deployment.mk @@ -44,7 +44,6 @@ $(eval $(call gb_Library_add_linked_libs,deployment,\ cppu \ cppuhelper \ deploymentmisc \ - helplinker \ sal \ svl \ tl \ @@ -54,15 +53,16 @@ $(eval $(call gb_Library_add_linked_libs,deployment,\ $(gb_STDLIBS) \ )) +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Library_use_externals,deployment,\ berkeleydb \ )) +endif $(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment)) $(eval $(call gb_Library_add_exception_objects,deployment,\ desktop/source/deployment/dp_log \ - desktop/source/deployment/dp_persmap \ desktop/source/deployment/dp_services \ desktop/source/deployment/dp_xml \ desktop/source/deployment/manager/dp_activepackages \ @@ -92,4 +92,16 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\ desktop/source/deployment/registry/sfwk/dp_sfwk \ )) +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) + +$(eval $(call gb_Library_add_linked_libs,deployment,\ + helplinker \ +)) + +$(eval $(call gb_Library_add_exception_objects,deployment,\ + desktop/source/deployment/dp_persmap \ +)) + +endif + # vim: set ts=4 sw=4 et: diff --git a/desktop/Library_deploymentmisc.mk b/desktop/Library_deploymentmisc.mk index d4bf21128a27..abcc0e29e9c2 100644 --- a/desktop/Library_deploymentmisc.mk +++ b/desktop/Library_deploymentmisc.mk @@ -54,12 +54,19 @@ $(eval $(call gb_Library_add_linked_libs,deploymentmisc,\ $(gb_STDLIBS) \ )) +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Library_use_externals,deploymentmisc,\ berkeleydb \ )) +endif +ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Library_add_exception_objects,deploymentmisc,\ desktop/source/deployment/misc/db \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,deploymentmisc,\ desktop/source/deployment/misc/dp_dependencies \ desktop/source/deployment/misc/dp_descriptioninfoset \ desktop/source/deployment/misc/dp_identifier \ diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx index 47a86c5008b2..b7b99f564d6f 100644 --- a/desktop/source/deployment/manager/dp_activepackages.cxx +++ b/desktop/source/deployment/manager/dp_activepackages.cxx @@ -43,8 +43,6 @@ #include <boost/unordered_map.hpp> #include "dp_identifier.hxx" -#include "dp_persmap.h" - #include "dp_activepackages.hxx" // Old format of database entry: @@ -126,7 +124,15 @@ namespace dp_manager { ActivePackages::ActivePackages() {} -ActivePackages::ActivePackages(::rtl::OUString const & url) : m_map(url) {} +ActivePackages::ActivePackages(::rtl::OUString const & url) +#if !defined(ANDROID) && !defined(IOS) + : m_map(url) +#endif +{ +#if defined(ANDROID) || defined(IOS) + (void)url; +#endif +} ActivePackages::~ActivePackages() {} @@ -140,6 +146,7 @@ bool ActivePackages::get( Data * data, ::rtl::OUString const & id, ::rtl::OUString const & fileName) const { +#if !defined(ANDROID) && !defined(IOS) ::rtl::OString v; if (m_map.get(&v, newKey(id))) { if (data != NULL) { @@ -154,10 +161,17 @@ bool ActivePackages::get( } else { return false; } +#else + (void) data; + (void) id; + (void) fileName; + return false; +#endif } ActivePackages::Entries ActivePackages::getEntries() const { Entries es; +#if !defined(ANDROID) && !defined(IOS) ::dp_misc::t_string2string_map m(m_map.getEntries()); for (::dp_misc::t_string2string_map::const_iterator i(m.begin()); i != m.end(); ++i) @@ -178,10 +192,12 @@ ActivePackages::Entries ActivePackages::getEntries() const { decodeOldData(fn, i->second))); } } +#endif return es; } void ActivePackages::put(::rtl::OUString const & id, Data const & data) { +#if !defined(ANDROID) && !defined(IOS) ::rtl::OStringBuffer b; b.append( ::rtl::OUStringToOString(data.temporaryName, RTL_TEXTENCODING_UTF8)); @@ -194,12 +210,21 @@ void ActivePackages::put(::rtl::OUString const & id, Data const & data) { b.append(separator); b.append(::rtl::OUStringToOString(data.failedPrerequisites, RTL_TEXTENCODING_UTF8)); m_map.put(newKey(id), b.makeStringAndClear()); +#else + (void) id; + (void) data; +#endif } void ActivePackages::erase( ::rtl::OUString const & id, ::rtl::OUString const & fileName) { +#if !defined(ANDROID) && !defined(IOS) m_map.erase(newKey(id), true) || m_map.erase(oldKey(fileName), true); +#else + (void) id; + (void) fileName; +#endif } } diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx index 61057bc9533e..b72484435aec 100644 --- a/desktop/source/deployment/manager/dp_activepackages.hxx +++ b/desktop/source/deployment/manager/dp_activepackages.hxx @@ -34,7 +34,9 @@ #include <utility> #include <vector> +#if !defined(ANDROID) && !defined(IOS) #include "dp_persmap.h" +#endif namespace rtl { class OUString; } @@ -91,8 +93,9 @@ public: private: ActivePackages(ActivePackages &); // not defined void operator =(ActivePackages &); // not defined - +#if !defined(ANDROID) && !defined(IOS) ::dp_misc::PersistentMap m_map; +#endif }; } diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx index 6c6bd5cb41f3..f1a99dbcef4c 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.hxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.hxx @@ -40,6 +40,7 @@ #include "com/sun/star/deployment/XPackageManager.hpp" #include "osl/mutex.hxx" #include <list> +#include <boost/unordered_map.hpp> namespace css = ::com::sun::star; diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx index 2bd2fa74a0b5..701d1a6a91a5 100644 --- a/desktop/source/deployment/manager/dp_managerfac.cxx +++ b/desktop/source/deployment/manager/dp_managerfac.cxx @@ -32,6 +32,7 @@ #include "cppuhelper/compbase1.hxx" #include "comphelper/servicedecl.hxx" #include "com/sun/star/deployment/thePackageManagerFactory.hpp" +#include <boost/unordered_map.hpp> using namespace ::dp_misc; diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 85f404c44012..12e5f50984ea 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -32,7 +32,9 @@ #include "dp_configuration.hrc" #include "dp_backend.h" +#if !defined(ANDROID) && !defined(IOS) #include "dp_persmap.h" +#endif #include "dp_ucb.h" #include "rtl/string.hxx" #include "rtl/ustrbuf.hxx" @@ -118,10 +120,10 @@ 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) // 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; @@ -224,6 +226,8 @@ BackendImpl::BackendImpl( deleteUnusedFolders(OUString(), folders); configmgrini_verify_init( xCmdEnv ); + +#if !defined(ANDROID) && !defined(IOS) SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<PersistentMap> pMap; SAL_WNODEPRECATED_DECLARATIONS_POP @@ -247,6 +251,7 @@ BackendImpl::BackendImpl( } } m_registeredPackages = pMap; +#endif } } @@ -566,13 +571,14 @@ BackendImpl::PackageImpl::isRegistered_( bool bReg = false; if (that->hasActiveEntry(getURL())) bReg = true; +#if !defined(ANDROID) && !defined(IOS) if (!bReg && that->m_registeredPackages.get()) { // fallback for user extension registered in berkeley DB bReg = that->m_registeredPackages->has( rtl::OUStringToOString( url, RTL_TEXTENCODING_UTF8 )); } - +#endif return beans::Optional< beans::Ambiguous<sal_Bool> >( true, beans::Ambiguous<sal_Bool>( bReg, false ) ); } @@ -754,6 +760,7 @@ void BackendImpl::PackageImpl::processPackage_( } else // revoke { +#if !defined(ANDROID) && !defined(IOS) if (!that->removeFromConfigmgrIni(m_isSchema, url, xCmdEnv) && that->m_registeredPackages.get()) { // Obsolete package database handling - should be removed for LibreOffice 4.0 @@ -803,7 +810,7 @@ void BackendImpl::PackageImpl::processPackage_( OSL_ASSERT(0); } } - +#endif ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); //If an xcu file was life deployed then always a data entry is written. //If the xcu file was already in the configmr.ini then there is also diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 73f4601f6fae..d121833e2d00 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -39,7 +39,9 @@ #include "svl/inettype.hxx" #include "unotools/pathoptions.hxx" +#if !defined(ANDROID) && !defined(IOS) #include <l10ntools/compilehelp.hxx> +#endif #include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/uri/XUriReferenceFactory.hpp> @@ -397,6 +399,7 @@ void BackendImpl::implProcessHelp( data.dataUrl = xPackage->getURL(); if (!package->extensionContainsCompiledHelp()) { +#if !defined(ANDROID) && !defined(IOS) const OUString sHelpFolder = createFolder(OUString(), xCmdEnv); data.dataUrl = sHelpFolder; @@ -593,6 +596,9 @@ void BackendImpl::implProcessHelp( } } } +#else + (void) xCmdEnv; +#endif } //Writing the data entry replaces writing the flag file. If we got to this //point the registration was successful. |