diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-20 13:55:45 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-20 15:08:35 +0300 |
commit | c767178bd30e2a9430ff9140e0f2fcac5d2a5a10 (patch) | |
tree | dd8d0ccc4280f2e864ad15d3017985ea6a90f8bc /sc | |
parent | aa6808ba1163b22ce31d205eedb8f8718eeb7263 (diff) |
Fix compilation in the (experimental) DISABLE_DBCONNECTIVITY case
Change-Id: I392b0203e0850a57eb3e1dfdaf21eafed838129b
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 2868abc9ba07..96f0a7b83ebe 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -34,7 +34,10 @@ #include <comphelper/types.hxx> #include <ucbhelper/content.hxx> #include <svx/txenctab.hxx> + +#ifndef DISABLE_DBCONNECTIVITY #include <svx/dbcharsethelper.hxx> +#endif #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/sdbc/DataType.hpp> @@ -104,6 +107,8 @@ using ::std::vector; #define SC_DBPROP_EXTENSION "Extension" #define SC_DBPROP_CHARSET "CharSet" +#ifndef DISABLE_DBCONNECTIVITY + namespace { sal_uLong lcl_getDBaseConnection(uno::Reference<sdbc::XDriverManager>& _rDrvMgr,uno::Reference<sdbc::XConnection>& _rConnection,String& _rTabName,const String& rFullFileName,rtl_TextEncoding eCharSet) @@ -159,6 +164,9 @@ namespace return 0L; } } + +#endif // !DISABLE_DBCONNECTIVITY + // ----------------------------------------------------------------------- // MoveFile/KillFile/IsDocument: similar to SfxContentHelper @@ -245,6 +253,8 @@ bool ScDocShell::IsDocument( const INetURLObject& rURL ) // ----------------------------------------------------------------------- +#ifndef DISABLE_DBCONNECTIVITY + static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales) { SvNumberFormatter* pFormatter = rDoc.GetFormatTable(); @@ -292,9 +302,19 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales } } +#endif // !DISABLE_DBCONNECTIVITY + sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc ) { +#ifdef DISABLE_DBCONNECTIVITY + (void) rFullFileName; + (void) eCharSet; + (void) aColWidthParam; + (void) rRowHeightsRecalc; + + return ERRCODE_IO_GENERAL; +#else ScColumn::DoubleAllocSwitch aAllocSwitch(true); sal_uLong nErr = eERR_OK; @@ -470,8 +490,11 @@ sal_uLong ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet aDocument.DoColResize( 0, 0, static_cast<SCCOL>(nColCount) - 1, 0 ); return nErr; +#endif // !DISABLE_DBCONNECTIVITY } +#ifndef DISABLE_DBCONNECTIVITY + namespace { inline bool IsAsciiDigit( sal_Unicode c ) @@ -777,8 +800,17 @@ inline void lcl_getLongVarCharString( rtl::OUString& rString, ScBaseCell* pCell, } +#endif // !DISABLE_DBCONNECTIVITY + sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet eCharSet, bool& bHasMemo ) { +#ifdef DISABLE_DBCONNECTIVITY + (void) rFullFileName; + (void) eCharSet; + (void) bHasMemo; + + return ERRCODE_IO_GENERAL; +#else // remove the file so the dBase driver doesn't find an invalid file INetURLObject aDeleteObj( rFullFileName, INET_PROT_FILE ); KillFile( aDeleteObj ); @@ -1156,6 +1188,7 @@ sal_uLong ScDocShell::DBaseExport( const rtl::OUString& rFullFileName, CharSet e } return nErr; +#endif // !DISABLE_DBCONNECTIVITY } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |