summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-03-11 17:31:43 +0000
committerNoel Power <noel.power@suse.com>2013-03-11 17:32:53 +0000
commit54d70501380f818fc928557590ed70e6f5a925f7 (patch)
tree29dbe62163a5f905f170a022d289d1662b90d69e /basic
parent0f7798d86226d8e93fbd624283cd3558c7dd63fe (diff)
remove some rtl:: and RTL_CONSTASCII_USTRINGPARAM foo
Change-Id: I68e2891999f306865d00b33fdfef3bc539a34e93
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/test_vba.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index f120a22304a1..abb929f95889 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -28,8 +28,10 @@ namespace
// Declares the method as a test to call
CPPUNIT_TEST(testMiscVBAFunctions);
+// not much point even trying to run except on windows
+#if defined(WNT)
CPPUNIT_TEST(testObjAssignWithDefaultMember);
- //CPPUNIT_TEST(testOle);
+#endif
// End of test suite definition
CPPUNIT_TEST_SUITE_END();
@@ -50,8 +52,7 @@ bool VBATest::hasOLEEnv()
uno::Reference<lang::XMultiComponentFactory> xSMgr = xContext->getServiceManager();
xOLEFactory = uno::Reference<lang::XMultiServiceFactory>(
xSMgr->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.bridge.OleObjectFactory") ),
+ "com.sun.star.bridge.OleObjectFactory",
xContext ), uno::UNO_QUERY );
}
}
@@ -100,7 +101,7 @@ void VBATest::testMiscVBAFunctions()
fprintf(stderr, "macro returned:\n%s\n", OUStringToOString( pReturn->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() );
}
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn != NULL );
- CPPUNIT_ASSERT_MESSAGE("Result not as expected", pReturn->GetOUString() == rtl::OUString("OK") );
+ CPPUNIT_ASSERT_MESSAGE("Result not as expected", pReturn->GetOUString() == "OK" );
}
}
@@ -115,30 +116,30 @@ void VBATest::testObjAssignWithDefaultMember()
"ole_ObjAssignToNothing.vb",
};
- rtl::OUString sMacroPathURL = getURLFromSrc("/basic/qa/vba_tests/");
+ OUString sMacroPathURL = getURLFromSrc("/basic/qa/vba_tests/");
uno::Sequence< uno::Any > aArgs(1);
// path to test document
- rtl::OUString sPath = getPathFromSrc("/basic/qa/vba_tests/data/");
- sPath += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ADODBdata.xls") );
- sPath = sPath.replaceAll( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\\" ) ) );
+ OUString sPath = getPathFromSrc("/basic/qa/vba_tests/data/");
+ sPath += OUString( "ADODBdata.xls" );
+ sPath = sPath.replaceAll( "/", "\\" );
aArgs[ 0 ] = uno::makeAny( sPath );
for ( sal_uInt32 i=0; i<SAL_N_ELEMENTS( macroSource ); ++i )
{
- rtl::OUString sMacroURL( sMacroPathURL );
- sMacroURL += rtl::OUString::createFromAscii( macroSource[ i ] );
+ OUString sMacroURL( sMacroPathURL );
+ sMacroURL += OUString::createFromAscii( macroSource[ i ] );
MacroSnippet myMacro;
myMacro.LoadSourceFromFile( sMacroURL );
SbxVariableRef pReturn = myMacro.Run( aArgs );
if ( pReturn )
{
fprintf(stderr, "macro result for %s\n", macroSource[ i ] );
- fprintf(stderr, "macro returned:\n%s\n", rtl::OUStringToOString( pReturn->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ fprintf(stderr, "macro returned:\n%s\n", OUStringToOString( pReturn->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() );
}
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn != NULL );
- CPPUNIT_ASSERT_MESSAGE("Result not as expected", pReturn->GetOUString() == rtl::OUString("OK") );
+ CPPUNIT_ASSERT_MESSAGE("Result not as expected", pReturn->GetOUString() == "OK" );
}
}