From bd80ff75a216d6494a1de64896856f4bbccc52ff Mon Sep 17 00:00:00 2001 From: Gert Faller Date: Mon, 22 Nov 2010 22:17:17 +0100 Subject: RTL_CONSTASCII_USTRINGPARAM in libs-gui 06 --- sax/source/expatwrap/sax_expat.cxx | 62 +++++++++++++++++++------------------- sax/source/expatwrap/saxwriter.cxx | 12 ++++---- 2 files changed, 37 insertions(+), 37 deletions(-) (limited to 'sax/source') 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 ); } -- cgit