summaryrefslogtreecommitdiffstats
path: root/basic/qa/cppunit/test_vba.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/qa/cppunit/test_vba.cxx')
-rw-r--r--basic/qa/cppunit/test_vba.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 818ba1c5f4c0..8a15ba7234e8 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -14,11 +14,7 @@
#include <comphelper/processfactory.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
-#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <odbcinst.h>
+#include <systools/win32/odbccp32.hxx>
#endif
using namespace ::com::sun::star;
@@ -94,6 +90,7 @@ void VBATest::testMiscVBAFunctions()
"hex.vb",
"hour.vb",
"formatnumber.vb",
+ "formatpercent.vb",
"iif.vb",
"instr.vb",
"instrrev.vb",
@@ -117,6 +114,7 @@ void VBATest::testMiscVBAFunctions()
"minute.vb",
"month.vb",
"monthname.vb",
+ "like.vb",
"oct.vb",
"optional_paramters.vb",
"qbcolor.vb",
@@ -134,6 +132,9 @@ void VBATest::testMiscVBAFunctions()
"string.vb",
"strreverse.vb",
"switch.vb",
+ "tdf147089_idiv.vb",
+ "tdf147529_optional_parameters_msgbox.vb",
+ "tdf148358_non_ascii_names.vb",
"timeserial.vb",
"timevalue.vb",
"trim.vb",
@@ -157,7 +158,7 @@ void VBATest::testMiscVBAFunctions()
SvtSysLocaleOptions aLocalOptions;
aLocalOptions.SetLocaleConfigString( aLocale.getBcp47() );
- for ( size_t i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
+ for ( size_t i=0; i<std::size( macroSource ); ++i )
{
OUString sMacroURL = sMacroPathURL
+ OUString::createFromAscii( macroSource[ i ] );
@@ -207,7 +208,8 @@ void VBATest::testMiscOLEStuff()
const int nBufSize = 1024 * 4;
wchar_t sBuf[nBufSize];
- SQLGetInstalledDriversW( sBuf, nBufSize, nullptr );
+ if (!sal::systools::odbccp32().SQLGetInstalledDrivers(sBuf, nBufSize))
+ return;
const wchar_t *pODBCDriverName = sBuf;
bool bFound = false;
@@ -234,11 +236,11 @@ void VBATest::testMiscOLEStuff()
uno::Sequence< uno::Any > aArgs
{
- uno::makeAny(sPath),
- uno::makeAny(OUString(o3tl::toU(pODBCDriverName)))
+ uno::Any(sPath),
+ uno::Any(OUString(o3tl::toU(pODBCDriverName)))
};
- for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
+ for ( sal_uInt32 i=0; i<std::size( macroSource ); ++i )
{
OUString sMacroURL = sMacroPathURL
+ OUString::createFromAscii( macroSource[ i ] );