diff options
author | jucasaca <jucasaca@gmail.com> | 2024-04-03 18:15:39 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-18 16:19:04 +0200 |
commit | 7edca7dc740f6877fa85c2a996ca869c6b971a48 (patch) | |
tree | 5d627cea026d412fb58854d6d5213708c40f312d /sw/source | |
parent | e1268721d4266ed1254da99581a7c2c3dfb72ba6 (diff) |
tdf#158056 Connect to MS Access .mdb files by mean of ACE.OLEDB.12.0 provider
* Modify the code so that all connections to MS Access files, both .mdb
and .accdb are made with the provider "Microsoft.ACE.OLEDB.12.0".
* Remove all references to the "Microsoft.Jet.OLEDB.4.0" provider to clean
up the code.
* Leave only one entry "Microsoft Access" in the Connection Wizard, which
would work for .mdb and .accdb files.
* Remove the entry "Microsoft Access 2007" from the Connection Wizard,
since it is no longer needed.
Change-Id: If523712d071199d61e0c994b35291d3a69246ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165756
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 7c97db631403..d7c11eba7575 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2571,11 +2571,8 @@ DBConnURIType GetDBunoType(const INetURLObject &rURL) type = DBConnURIType::FLAT; } #ifdef _WIN32 - else if (sExt.equalsIgnoreAsciiCase("mdb") || sExt.equalsIgnoreAsciiCase("mde")) - { - type = DBConnURIType::MSJET; - } - else if (sExt.equalsIgnoreAsciiCase("accdb") || sExt.equalsIgnoreAsciiCase("accde")) + else if (sExt.equalsIgnoreAsciiCase("accdb") || sExt.equalsIgnoreAsciiCase("accde") + || sExt.equalsIgnoreAsciiCase("mdb") || sExt.equalsIgnoreAsciiCase("mde")) { type = DBConnURIType::MSACE; } @@ -2632,14 +2629,6 @@ uno::Any GetDBunoURI(const INetURLObject &rURL, DBConnURIType& rType) aURLAny <<= sDBURL; } break; - case DBConnURIType::MSJET: -#ifdef _WIN32 - { - OUString sDBURL("sdbc:ado:access:PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + rURL.PathToFileName()); - aURLAny <<= sDBURL; - } -#endif - break; case DBConnURIType::MSACE: #ifdef _WIN32 { @@ -2698,7 +2687,6 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference aTableFilterAny <<= aFilters; } break; - case DBConnURIType::MSJET: case DBConnURIType::MSACE: aSuppressVersionsAny <<= true; break; @@ -2805,8 +2793,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShel { SwResId(STR_FILTER_TXT), "*.txt" }, { SwResId(STR_FILTER_CSV), "*.csv" }, #ifdef _WIN32 - { SwResId(STR_FILTER_MDB), "*.mdb;*.mde" }, - { SwResId(STR_FILTER_ACCDB), "*.accdb;*.accde" }, + { SwResId(STR_FILTER_ACCDB), "*.accdb;*.accde;*.mdb;*.mde" }, #endif }; |