• Mike Kaganski's avatar
    Partially fix VBATest::testMiscOLEStuff for Win64 · 5ecd7ebb
    Mike Kaganski yazdı
    On Windows x64 there are two ODBCs - one for each bitness.
    A 64-bit build gets 64-bit ODBC, and there is no provider named
    "Microsoft Excel Driver (*.xls)", no normally the test is simply
    skipped. But if MS Excel is installed, then it installs provider
    "Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)", that was
    detected by previous code, but not used inside the VBAs. So, VBAs
    tried to use "Microsoft Excel Driver (*.xls)" unavailable to them.
    
    This patch allows using Excel's provider as well, thus allowing
    developer to test against 64-bit-specific regressions.
    
    However, the last test uses Microsoft.Jet.OLEDB.4.0 provider,
    that is unavailable on Win64. There are substitutions -
    Microsoft.ACE.OLEDB.12.0 and Microsoft.ACE.OLEDB.15.0,
    but there is no easy way to test if they are installed. Thus,
    that test is disabled on Win64 for now.
    
    Also, possible buffer overflow fixed, when byte count was passed
    to SQLGetInstalledDriversW instead of char count.
    
    Change-Id: Ib5c55251f0e92b3078a46aee173b5061439445ae
    Reviewed-on: https://gerrit.libreoffice.org/32019Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
    Tested-by: 's avatarTor Lillqvist <tml@collabora.com>
    5ecd7ebb