summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
Diffstat (limited to 'sax')
-rw-r--r--sax/source/expatwrap/sax_expat.cxx62
-rw-r--r--sax/source/expatwrap/saxwriter.cxx12
-rw-r--r--sax/test/sax/testsax.cxx2
-rw-r--r--sax/test/sax/testwriter.cxx2
-rw-r--r--sax/test/saxdemo.cxx8
-rw-r--r--sax/test/testcomponent.cxx6
6 files changed, 46 insertions, 46 deletions
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 704b51f5cceb..7de05b6c7e4c 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -467,7 +467,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource)
if( ! entity.structSource.aInputStream.is() )
{
- throw SAXException( OUString::createFromAscii( "No input source" ) ,
+ throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("No input source")) ,
Reference< XInterface > () , Any() );
}
@@ -482,7 +482,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource)
entity.pParser = XML_ParserCreate( 0 );
if( ! entity.pParser )
{
- throw SAXException( OUString::createFromAscii( "Couldn't create parser" ) ,
+ throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("Couldn't create parser")) ,
Reference< XInterface > (), Any() );
}
@@ -632,82 +632,82 @@ OUString getErrorMessage( XML_Error xmlE, OUString sSystemId , sal_Int32 nLine )
{
OUString Message;
if( XML_ERROR_NONE == xmlE ) {
- Message = OUString::createFromAscii( "No" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("No"));
}
else if( XML_ERROR_NO_MEMORY == xmlE ) {
- Message = OUString::createFromAscii( "no memory" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no memory"));
}
else if( XML_ERROR_SYNTAX == xmlE ) {
- Message = OUString::createFromAscii( "syntax" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("syntax"));
}
else if( XML_ERROR_NO_ELEMENTS == xmlE ) {
- Message = OUString::createFromAscii( "no elements" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no elements"));
}
else if( XML_ERROR_INVALID_TOKEN == xmlE ) {
- Message = OUString::createFromAscii( "invalid token" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("invalid token"));
}
else if( XML_ERROR_UNCLOSED_TOKEN == xmlE ) {
- Message = OUString::createFromAscii( "unclosed token" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed token"));
}
else if( XML_ERROR_PARTIAL_CHAR == xmlE ) {
- Message = OUString::createFromAscii( "partial char" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("partial char"));
}
else if( XML_ERROR_TAG_MISMATCH == xmlE ) {
- Message = OUString::createFromAscii( "tag mismatch" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("tag mismatch"));
}
else if( XML_ERROR_DUPLICATE_ATTRIBUTE == xmlE ) {
- Message = OUString::createFromAscii( "duplicate attribute" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("duplicate attribute"));
}
else if( XML_ERROR_JUNK_AFTER_DOC_ELEMENT == xmlE ) {
- Message = OUString::createFromAscii( "junk after doc element" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("junk after doc element"));
}
else if( XML_ERROR_PARAM_ENTITY_REF == xmlE ) {
- Message = OUString::createFromAscii( "parameter entity reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("parameter entity reference"));
}
else if( XML_ERROR_UNDEFINED_ENTITY == xmlE ) {
- Message = OUString::createFromAscii( "undefined entity" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("undefined entity"));
}
else if( XML_ERROR_RECURSIVE_ENTITY_REF == xmlE ) {
- Message = OUString::createFromAscii( "recursive entity reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("recursive entity reference"));
}
else if( XML_ERROR_ASYNC_ENTITY == xmlE ) {
- Message = OUString::createFromAscii( "async entity" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("async entity"));
}
else if( XML_ERROR_BAD_CHAR_REF == xmlE ) {
- Message = OUString::createFromAscii( "bad char reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("bad char reference"));
}
else if( XML_ERROR_BINARY_ENTITY_REF == xmlE ) {
- Message = OUString::createFromAscii( "binary entity reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("binary entity reference"));
}
else if( XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF == xmlE ) {
- Message = OUString::createFromAscii( "attribute external entity reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("attribute external entity reference"));
}
else if( XML_ERROR_MISPLACED_XML_PI == xmlE ) {
- Message = OUString::createFromAscii( "misplaced xml processing instruction" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("misplaced xml processing instruction"));
}
else if( XML_ERROR_UNKNOWN_ENCODING == xmlE ) {
- Message = OUString::createFromAscii( "unknown encoding" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown encoding"));
}
else if( XML_ERROR_INCORRECT_ENCODING == xmlE ) {
- Message = OUString::createFromAscii( "incorrect encoding" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("incorrect encoding"));
}
else if( XML_ERROR_UNCLOSED_CDATA_SECTION == xmlE ) {
- Message = OUString::createFromAscii( "unclosed cdata section" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed cdata section"));
}
else if( XML_ERROR_EXTERNAL_ENTITY_HANDLING == xmlE ) {
- Message = OUString::createFromAscii( "external entity reference" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("external entity reference"));
}
else if( XML_ERROR_NOT_STANDALONE == xmlE ) {
- Message = OUString::createFromAscii( "not standalone" );
+ Message = OUString(RTL_CONSTASCII_USTRINGPARAM("not standalone"));
}
- OUString str = OUString::createFromAscii( "[" );
+ OUString str(RTL_CONSTASCII_USTRINGPARAM("["));
str += sSystemId;
- str += OUString::createFromAscii( " line " );
+ str += OUString(RTL_CONSTASCII_USTRINGPARAM(" line "));
str += OUString::valueOf( nLine );
- str += OUString::createFromAscii( "]: " );
+ str += OUString(RTL_CONSTASCII_USTRINGPARAM("]: "));
str += Message;
- str += OUString::createFromAscii( "error" );
+ str += OUString(RTL_CONSTASCII_USTRINGPARAM("error"));
return str;
}
@@ -1050,9 +1050,9 @@ sal_Bool SAL_CALL component_writeInfo(
OUString::createFromAscii( "/" IMPLEMENTATION_NAME "/UNO/SERVICES" ) );
xNewKey->createKey( OUString::createFromAscii( SERVICE_NAME ) );
- xNewKey = xKey->createKey( OUString::createFromAscii("/") +
+ xNewKey = xKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/")) +
SaxWriter_getImplementationName()+
- OUString::createFromAscii( "/UNO/SERVICES" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
xNewKey->createKey( SaxWriter_getServiceName() );
return sal_True;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index d947a50b0ff9..9aaaa75134f8 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -245,7 +245,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
Any a;
a <<= e;
throw SAXException(
- OUString::createFromAscii( "io exception during writing" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("io exception during writing")),
Reference< XInterface > (),
a );
}
@@ -1030,12 +1030,12 @@ Reference < XInterface > SAL_CALL SaxWriter_CreateInstance(
OUString SaxWriter_getServiceName() throw()
{
- return OUString::createFromAscii( "com.sun.star.xml.sax.Writer" );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"));
}
OUString SaxWriter_getImplementationName() throw()
{
- return OUString::createFromAscii( "com.sun.star.extensions.xml.sax.Writer" );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.extensions.xml.sax.Writer"));
}
Sequence< OUString > SaxWriter_getSupportedServiceNames(void) throw()
@@ -1111,12 +1111,12 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
if( ! m_bDocStarted )
{
throw SAXException(
- OUString::createFromAscii( "endDocument called before startDocument" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("endDocument called before startDocument")),
Reference< XInterface >() , Any() );
}
if( m_nLevel ) {
throw SAXException(
- OUString::createFromAscii( "unexpected end of document" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("unexpected end of document")),
Reference< XInterface >() , Any() );
}
mp_SaxWriterHelper->endDocument();
@@ -1129,7 +1129,7 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
Any a;
a <<= e;
throw SAXException(
- OUString::createFromAscii( "IO exception during closing the IO Stream" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("IO exception during closing the IO Stream")),
Reference< XInterface > (),
a );
}
diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx
index fcc083e4fda4..ece7d7327129 100644
--- a/sax/test/sax/testsax.cxx
+++ b/sax/test/sax/testsax.cxx
@@ -237,7 +237,7 @@ Reference < XInputStream > createStreamFromSequence(
const Reference < XMultiServiceFactory > &xSMgr )
{
Reference < XInterface > xOutStreamService =
- xSMgr->createInstance( OUString::createFromAscii("com.sun.star.io.Pipe") );
+ xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) );
OSL_ASSERT( xOutStreamService.is() );
Reference< XOutputStream > rOutStream( xOutStreamService , UNO_QUERY );
OSL_ASSERT( rOutStream.is() );
diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx
index 68df101bde23..33ee9fa97073 100644
--- a/sax/test/sax/testwriter.cxx
+++ b/sax/test/sax/testwriter.cxx
@@ -348,7 +348,7 @@ void OSaxWriterTest::testInvariant( const OUString& TestName,
const Reference < XInterface >& TestObject )
throw ( IllegalArgumentException, RuntimeException)
{
- if( OUString::createFromAscii("com.sun.star.xml.sax.Writer") == TestName ) {
+ if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) == TestName ) {
Reference< XDocumentHandler > doc( TestObject , UNO_QUERY );
Reference< XExtendedDocumentHandler > ext( TestObject , UNO_QUERY );
Reference< XActiveDataSource > source( TestObject , UNO_QUERY );
diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx
index 18715609a4c0..28799f780dde 100644
--- a/sax/test/saxdemo.cxx
+++ b/sax/test/saxdemo.cxx
@@ -509,7 +509,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
@@ -524,7 +524,7 @@ int main (int argc, char **argv)
OUString aDllName =
OUString::createFromAscii( "sax.uno" SAL_DLLEXTENSION );
xReg->registerImplementation(
- OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
aDllName,
Reference< XSimpleRegistry > () );
}
@@ -541,7 +541,7 @@ int main (int argc, char **argv)
// read xml from a file and count elements
//--------------------------------
Reference< XInterface > x = xSMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) );
if( x.is() )
{
Reference< XParser > rParser( x , UNO_QUERY );
@@ -581,7 +581,7 @@ int main (int argc, char **argv)
//----------------------
// The SAX-Writer demo
//----------------------
- x= xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) );
+ x= xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) );
if( x.is() )
{
printf( "start writing to %s\n" , argv[2] );
diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx
index c92e416fc791..e395add9f662 100644
--- a/sax/test/testcomponent.cxx
+++ b/sax/test/testcomponent.cxx
@@ -79,7 +79,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
- OUString::createFromAscii( "com.sun.star.registry.ImplementationRegistration" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
@@ -102,7 +102,7 @@ int main (int argc, char **argv)
aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
#endif
xReg->registerImplementation(
- OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
aDllName,
xSimpleReg );
}
@@ -130,7 +130,7 @@ int main (int argc, char **argv)
#endif
xReg->registerImplementation(
- OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ) ,
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")) ,
aDllName,
xSimpleReg );
}