Kaydet (Commit) 629cc605 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Intermediate commit of hacking on --disable-database-connectivity

Add HAVE_FEATURE_DBCONNECTIVITY to <config_features.h> instead of
using (or not, more likely) -DDISABLE_DBCONNECTIVITY.

The plan is still that database connectivity would be disabled always
for the non-desktop platforms, and otherwise disabling it would be a
configure option.

But, still lots to do; the TiledLibreOffice iOS test app gets tons of
undefineds when linking if I actually try to disable the database
connectivity.

Change-Id: If1e4b55faa1514cd55dec5fc5487a30d689739ac
üst 558aa446
......@@ -149,7 +149,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,base, \
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
analysis \
calc \
$(call gb_Helper_optional,DBCONNECTIVITY,calc) \
date \
pricing \
sc \
......@@ -227,11 +227,12 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
configmgr \
ctl \
cui \
dba \
dbase \
dbmm \
$(if $(DISABLE_DBCONNECTIVITY),,dbtools) \
dbaxml \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dba \
dbase \
dbmm \
dbtools \
dbaxml) \
deploymentmisc \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(if $(filter unx,$(GUIBASE)),desktop_detector) \
......@@ -253,8 +254,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
evtatt \
exp \
expwrap \
flat \
file \
$(call gb_Helper_optional,DBCONNECTIVITY, \
flat \
file) \
filterconfig \
$(if $(filter $(ENABLE_FIREBIRD_SDBC),TRUE),firebird_sdbc) \
fps_office \
......@@ -300,7 +302,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
msfilter \
$(if $(DISABLE_SCRIPTING),,msforms) \
mtfrenderer \
mysql \
$(call gb_Helper_optional,DBCONNECTIVITY,mysql) \
odbc \
odfflatxml \
offacc \
......@@ -313,7 +315,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
res \
sax \
sb \
sdbt \
$(call gb_Helper_optional,DBCONNECTIVITY,sdbt) \
scn \
sd \
sdd \
......@@ -412,7 +414,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
) \
communi \
ooxml \
sdbc \
$(call gb_Helper_optional,DBCONNECTIVITY,sdbc) \
avmediaQuickTime \
filtertracer \
rpt \
......@@ -502,7 +504,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
cached1 \
collator_data \
comphelper \
dbpool2 \
$(call gb_Helper_optional,DBCONNECTIVITY,dbpool2) \
deployment \
deploymentgui \
dict_ja \
......
......@@ -37,7 +37,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
cpputools \
$(call gb_Helper_optional,CRASHREP,crashrep) \
cui \
dbaccess \
$(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
dtrans \
......@@ -50,7 +50,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
external \
extras \
filter \
$(call gb_Helper_optional,DBCONNECTIVITY,forms) \
forms \
formula \
fpicker \
framework \
......
......@@ -92,7 +92,6 @@ export DICT_SYSTEM_DIR=@DICT_SYSTEM_DIR@
export DISABLE_ACTIVEX=@DISABLE_ACTIVEX@
export DISABLE_ATL=@DISABLE_ATL@
export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@
export DISABLE_DBCONNECTIVITY=@DISABLE_DBCONNECTIVITY@
export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
export DISABLE_EXPORT=@DISABLE_EXPORT@
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
......
......@@ -49,6 +49,12 @@
#define HAVE_FEATURE_AVMEDIA 0
/* DBCONNECTIVITY - Whether to have functionality to connect to
* databases.
*/
#define HAVE_FEATURE_DBCONNECTIVITY 0
/* EXTENSIONS - Whether we have any extension mechanism at all
*
* Primarily intended for non-desktop platforms where supporting
......
......@@ -2359,35 +2359,21 @@ else
SCPDEFS="$SCPDEFS -DDISABLE_AVMEDIA"
fi
dnl Decide whether to build database connectivity stuff (including
dnl Base) or not. We probably don't want to on non-desktop OSes.
# Decide whether to build database connectivity stuff (including
# Base) or not. We probably don't want to on non-desktop OSes.
if test -z "$enable_database_connectivity"; then
# Do enable database connectivity for Android for now as otherwise
# we presumably will get linking errors... We are not as far in
# the work for iOS, so we might as well disable it for iOS already.
# And actually, do enable it for iOS, too. Let's get back to
# figuring out what to do with this later, if ever.
# (Note that with "enable", I mean "enable building the related
# code". Very likely little of it will make any sense at run-time
# on Android or iOS and won't even be shipped with/linked into any
# app.)
#if test $_os != iOS; then
# --disable-database-connectivity is unfinished work in progress
# and the iOS test app doesn't link if we actually try to use it.
# if test $_os != iOS -a $_os != Android; then
enable_database_connectivity=yes
#fi
# fi
fi
DISABLE_DBCONNECTIVITY=''
if test "$enable_database_connectivity" = yes; then
BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
else
DISABLE_DBCONNECTIVITY='TRUE'
SCPDEFS="$SCPDEFS -DDISABLE_DBCONNECTIVITY"
AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
fi
AC_SUBST(DISABLE_DBCONNECTIVITY)
if test -z "$enable_extensions"; then
# For iOS and Android disable extensions unless specifically overridden with --enable-extensions.
......
......@@ -26,7 +26,7 @@ $(eval $(call gb_Library_use_libraries,frm,\
comphelper \
cppu \
cppuhelper \
dbtools \
$(call gb_Helper_optional,DBCONNECTIVITY,dbtools) \
editeng \
i18nlangtag \
sal \
......
......@@ -19,10 +19,12 @@
#ifndef INCLUDED_CONNECTIVITY_SQLPARSE_HXX
#define INCLUDED_CONNECTIVITY_SQLPARSE_HXX
#include <config_features.h>
#include <com/sun/star/uno/Reference.h>
#include <osl/mutex.hxx>
#include <connectivity/sqlnode.hxx>
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
#ifndef YYBISON
#ifndef FLEX_SCANNER
#include "sqlbison.hxx"
......
......@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <stdio.h>
#include <tools/urlobj.hxx>
#include <svl/converter.hxx>
......@@ -26,7 +28,7 @@
#include <ucbhelper/content.hxx>
#include <svx/txenctab.hxx>
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
#include <svx/dbcharsethelper.hxx>
#endif
......@@ -79,6 +81,8 @@
using namespace com::sun::star;
using ::std::vector;
#if HAVE_FEATURE_DBCONNECTIVITY
#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
//! move to a header file?
......@@ -95,8 +99,6 @@ using ::std::vector;
#define SC_DBPROP_EXTENSION "Extension"
#define SC_DBPROP_CHARSET "CharSet"
#ifndef DISABLE_DBCONNECTIVITY
namespace
{
sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager2>& _rDrvMgr, uno::Reference<sdbc::XConnection>& _rConnection, OUString& _rTabName, const OUString& rFullFileName, rtl_TextEncoding eCharSet)
......@@ -148,7 +150,7 @@ namespace
}
}
#endif // !DISABLE_DBCONNECTIVITY
#endif // HAVE_FEATURE_DBCONNECTIVITY
// MoveFile/KillFile/IsDocument: similar to SfxContentHelper
......@@ -237,7 +239,7 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL )
return bRet;
}
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales)
{
......@@ -285,12 +287,12 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales
}
}
#endif // !DISABLE_DBCONNECTIVITY
#endif // HAVE_FEATURE_DBCONNECTIVITY
sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet,
ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc )
{
#ifdef DISABLE_DBCONNECTIVITY
#if !HAVE_FEATURE_DBCONNECTIVITY
(void) rFullFileName;
(void) eCharSet;
(void) aColWidthParam;
......@@ -462,10 +464,10 @@ sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncodi
}
return nErr;
#endif // !DISABLE_DBCONNECTIVITY
#endif // HAVE_FEATURE_DBCONNECTIVITY
}
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
namespace {
......@@ -773,11 +775,11 @@ inline void lcl_getLongVarCharString(
}
#endif // !DISABLE_DBCONNECTIVITY
#endif // HAVE_FEATURE_DBCONNECTIVITY
sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo )
{
#ifdef DISABLE_DBCONNECTIVITY
#if !HAVE_FEATURE_DBCONNECTIVITY
(void) rFullFileName;
(void) eCharSet;
(void) bHasMemo;
......@@ -1151,7 +1153,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
}
return nErr;
#endif // !DISABLE_DBCONNECTIVITY
#endif // HAVE_FEATURE_DBCONNECTIVITY
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -1025,7 +1025,7 @@ OUString SfxObjectShell::GetServiceNameFromFactory( const OUString& rFact )
aServiceName = "com.sun.star.script.BasicIDE";
}
#endif
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
else if ( aFact == "sdatabase" )
{
aServiceName = "com.sun.star.sdb.OfficeDatabaseDocument";
......
......@@ -248,7 +248,6 @@ endif
gb_GLOBALDEFS += \
$(call gb_Helper_define_if_set,\
DISABLE_DBCONNECTIVITY \
DISABLE_DYNLOADING \
DISABLE_EXPORT \
DISABLE_SCRIPTING \
......
......@@ -17,11 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include "svx/txencbox.hxx"
#include "svx/txenctab.hxx"
#include <svx/dialogs.hrc>
#ifndef DISABLE_DBCONNECTIVITY
#if HAVE_FEATURE_DBCONNECTIVITY
#include "svx/dbcharsethelper.hxx"
#endif
#include <vcl/builder.hxx>
......@@ -134,7 +135,7 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap(
bool bExcludeImportSubsets, sal_uInt32 nExcludeInfoFlags,
sal_uInt32 nButIncludeInfoFlags )
{
#ifdef DISABLE_DBCONNECTIVITY
#if !HAVE_FEATURE_DBCONNECTIVITY
(void)bExcludeImportSubsets;
(void)nExcludeInfoFlags;
(void)nButIncludeInfoFlags;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment