diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-04-03 15:48:31 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-04-03 15:48:31 +0000 |
commit | 63d022c8aafff8cf74011fd58a8a63c94509c130 (patch) | |
tree | 20535dd50ff3cb774fe552392b53a992903f1aeb /dbaccess | |
parent | 3045d768f468eae4cc07eda92d1b95933b8d02c8 (diff) |
INTEGRATION: CWS dbodf11 (1.2.22); FILE MERGED
2008/04/01 11:11:33 oj 1.2.22.4: RESYNC: (1.2-1.4); FILE MERGED
2008/01/31 07:47:45 oj 1.2.22.3: #i85757# as odf 1.2 form
2008/01/28 13:16:16 oj 1.2.22.2: use constant
2008/01/28 13:14:04 oj 1.2.22.1: remove duplicate ado entry
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx index 21146d2c6f0c..671526f8a81b 100644 --- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xmlFileBasedDatabase.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kz $ $Date: 2008-03-05 16:50:46 $ + * last change: $Author: kz $ $Date: 2008-04-03 16:48:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -63,7 +63,7 @@ #include <tools/diagnose_ex.h> #endif #include <comphelper/sequence.hxx> - +#include "dsntypes.hxx" namespace dbaxml { using namespace ::com::sun::star::uno; @@ -119,26 +119,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport, } if ( sLocation.getLength() && sMediaType.getLength() ) { - ::rtl::OUString sURL(RTL_CONSTASCII_USTRINGPARAM("sdbc:")); - if ( sMediaType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "text/csv" ) ) ) - { - sURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flat:")); - } - else if ( sMediaType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "application/dbase" ) ) ) - { - sURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbase:")); - } - else if ( sMediaType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "application/vnd.oasis.opendocument.spreadsheet" ) ) ) - { - sURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc:")); - } - else if ( sMediaType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "application/msaccess" ) ) ) - { - if ( sFileTypeExtension.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "mdb" ) ) ) - sURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=")); - else - sURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ado:access:Provider=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=")); - } + ::rtl::OUString sURL(dbaui::ODsnTypeCollection::getDatasourcePrefixFromMediaType(sMediaType,sFileTypeExtension)); sURL += sLocation; try { |