summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-17 23:51:04 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-18 00:04:15 +0300
commit629cc605a45e75d6896b524eada2354c1d4d33a8 (patch)
treea9bea5727019feaf545706e5694692c4742c1085 /sc
parent558aa44672fe3565dfe1eab82c8766f2f499ee0d (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docsh8.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 28bbecac3eeb..0aefb22e2ee8 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -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: */