summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-05-31 21:35:45 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-05-31 21:35:45 -0500
commit31cc01a5ffe32c1c7b8226d09d799ea83f6a8d30 (patch)
treef404d5ae14f35e11d9ec31e1c0a71fee8464b5a9
parent43c0c12369f379ec1c851486883a855f8f445d70 (diff)
targeted string re-work
Change-Id: Ifd6b90778725d94a9338a53a4cdc514cdb595052
-rw-r--r--padmin/source/adddlg.cxx28
-rw-r--r--padmin/source/helper.cxx10
-rw-r--r--sax/source/expatwrap/sax_expat.cxx69
-rw-r--r--sax/source/expatwrap/saxwriter.cxx34
-rw-r--r--sax/test/sax/testsax.cxx30
-rw-r--r--sax/test/sax/testwriter.cxx68
-rw-r--r--sax/test/saxdemo.cxx50
-rw-r--r--sax/test/testcomponent.cxx16
-rw-r--r--sot/source/sdstor/stgelem.cxx8
-rw-r--r--sot/source/sdstor/storage.cxx8
-rw-r--r--sot/source/sdstor/ucbstorage.cxx54
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx14
12 files changed, 194 insertions, 195 deletions
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index ae1964d021c5..4ed1f7acaf21 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -95,11 +95,11 @@ void APChooseDevicePage::fill( PrinterInfo& rInfo )
{
if( m_aPDFBtn.IsChecked() )
{
- rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("pdf="));
+ rInfo.m_aFeatures = OUString("pdf=");
}
else if( m_aFaxBtn.IsChecked() )
{
- rInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax"));
+ rInfo.m_aFeatures = OUString("fax");
}
else
rInfo.m_aFeatures = OUString();
@@ -284,7 +284,7 @@ IMPL_LINK( APChooseDriverPage, ClickBtnHdl, PushButton*, pButton )
aDir.append( sal_Unicode( '/' ) );
aDir.appendAscii( PRINTER_PPDDIR );
rtl::OUString aPPDDir( aDir.makeStringAndClear() );
- FindFiles( aPPDDir, aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PS;PPD;PS.GZ;PPD.GZ" ) ), true );
+ FindFiles( aPPDDir, aFiles, String( "PS;PPD;PS.GZ;PPD.GZ" ), true );
for( file = aFiles.begin(); file != aFiles.end(); ++file )
{
String aFile( aPPDDir );
@@ -528,8 +528,8 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
if( pParser == NULL )
{
String aText( PaResId( RID_TXT_DRIVERDOESNOTEXIST ) );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s1" ) ), rtl::OStringToOUString(aPrinter, aEncoding) );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s2" ) ), rtl::OStringToOUString(aDriver, aEncoding) );
+ aText.SearchAndReplace( String( "%s1" ), rtl::OStringToOUString(aPrinter, aEncoding) );
+ aText.SearchAndReplace( String( "%s2" ), rtl::OStringToOUString(aDriver, aEncoding) );
InfoBox aBox( this, aText );
aBox.Execute();
continue;
@@ -541,7 +541,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
if (aCommand.isEmpty())
{
String aText( PaResId( RID_TXT_PRINTERWITHOUTCOMMAND ) );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), rtl::OStringToOUString(aPrinter, aEncoding) );
+ aText.SearchAndReplace( String( "%s" ), rtl::OStringToOUString(aPrinter, aEncoding) );
InfoBox aBox( this, aText );
aBox.Execute();
continue;
@@ -569,7 +569,7 @@ APOldPrinterPage::APOldPrinterPage( AddPrinterDialog* pParent )
aInfo.m_pParser->getMargins( rtl::OStringToOUString(aValue, aEncoding),
nLeft, nRight, nTop, nBottom ) )
{
- const PPDKey* pKey = aInfo.m_pParser->getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) ) );
+ const PPDKey* pKey = aInfo.m_pParser->getKey( String( "PageSize" ) );
const PPDValue* pValue = pKey ? pKey->getValue( rtl::OStringToOUString(aValue, aEncoding) ) : NULL;
if( pKey && pValue )
aInfo.m_aContext.setValue( pKey, pValue );
@@ -652,7 +652,7 @@ void APOldPrinterPage::addOldPrinters()
if( ! rManager.addPrinter( pInfo->m_aPrinterName, pInfo->m_aDriverName ) )
{
String aText( PaResId( RID_TXT_PRINTERADDFAILED ) );
- aText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ), pInfo->m_aPrinterName );
+ aText.SearchAndReplace( String( "%s" ), pInfo->m_aPrinterName );
ErrorBox aBox( this, WB_OK | WB_DEF_OK, aText );
aBox.Execute();
continue;
@@ -698,7 +698,7 @@ void APFaxDriverPage::fill( PrinterInfo& rInfo )
{
if( isDefault() )
{
- rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT"));
+ rInfo.m_aDriverName = OUString("SGENPRT");
}
}
@@ -731,9 +731,9 @@ bool APPdfDriverPage::check()
void APPdfDriverPage::fill( PrinterInfo& rInfo )
{
if( isDefault() )
- rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("SGENPRT"));
+ rInfo.m_aDriverName = OUString("SGENPRT");
else if( isDist() )
- rInfo.m_aDriverName = OUString(RTL_CONSTASCII_USTRINGPARAM("ADISTILL"));
+ rInfo.m_aDriverName = OUString("ADISTILL");
}
//--------------------------------------------------------------------
@@ -1019,13 +1019,13 @@ void AddPrinterDialog::addPrinter()
}
else if( m_pChooseDevicePage->isFax() )
{
- aInfo.m_aFeatures = OUString(RTL_CONSTASCII_USTRINGPARAM("fax="));
+ aInfo.m_aFeatures = OUString("fax=");
if( m_pFaxNamePage->isFaxSwallow() )
- aInfo.m_aFeatures += OUString(RTL_CONSTASCII_USTRINGPARAM("swallow"));
+ aInfo.m_aFeatures += OUString("swallow");
}
else if( m_pChooseDevicePage->isPDF() )
{
- OUString aPdf( RTL_CONSTASCII_USTRINGPARAM("pdf=") );
+ OUString aPdf( "pdf=" );
aPdf += m_pPdfCommandPage->getPdfDir();
aInfo.m_aFeatures = aPdf;
}
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 4ceee33f4d37..2ff6e9accc92 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -72,11 +72,11 @@ ResId padmin::PaResId( sal_uInt32 nId )
utl::OConfigurationNode aNode =
utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
vcl::unohelper::GetMultiServiceFactory(),
- OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/L10N")) );
+ OUString("org.openoffice.Setup/L10N") );
if ( aNode.isValid() )
{
rtl::OUString aLoc;
- Any aValue = aNode.getNodeValue( OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")) );
+ Any aValue = aNode.getNodeValue( OUString("ooLocale") );
if( aValue >>= aLoc )
{
sal_Int32 nIndex = 0;
@@ -287,7 +287,7 @@ bool padmin::chooseDirectory( String& rInOutPath )
Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
- Reference< XFolderPicker > xFolderPicker( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
+ Reference< XFolderPicker > xFolderPicker( xFactory->createInstance( OUString( "com.sun.star.ui.dialogs.FolderPicker" ) ), UNO_QUERY );
if( xFolderPicker.is() )
{
Reference< XControlAccess > xCA( xFolderPicker, UNO_QUERY );
@@ -297,8 +297,8 @@ bool padmin::chooseDirectory( String& rInOutPath )
{
Any aState;
aState <<= sal_False;
- xCA->setControlProperty( OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpButton" ) ),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ),
+ xCA->setControlProperty( OUString( "HelpButton" ),
+ OUString( "Visible" ),
aState );
}
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 360611f10ba4..42e4371f7882 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -207,7 +207,7 @@ Reference< XInterface > SAL_CALL SaxExpatParser_CreateInstance(
Sequence< OUString > SaxExpatParser::getSupportedServiceNames_Static(void) throw ()
{
Sequence<OUString> aRet(1);
- aRet.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME) );
+ aRet.getArray()[0] = ::rtl::OUString( SERVICE_NAME );
return aRet;
}
@@ -476,7 +476,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource)
if( ! entity.structSource.aInputStream.is() )
{
- throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("No input source")) ,
+ throw SAXException( OUString("No input source") ,
Reference< XInterface > () , Any() );
}
@@ -491,7 +491,7 @@ void SaxExpatParser::parseStream( const InputSource& structSource)
entity.pParser = XML_ParserCreate( 0 );
if( ! entity.pParser )
{
- throw SAXException( OUString(RTL_CONSTASCII_USTRINGPARAM("Couldn't create parser")) ,
+ throw SAXException( OUString("Couldn't create parser") ,
Reference< XInterface > (), Any() );
}
@@ -604,7 +604,7 @@ void SaxExpatParser::setLocale( const Locale & locale ) throw (RuntimeException)
// XServiceInfo
OUString SaxExpatParser::getImplementationName() throw ()
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ));
+ return OUString( IMPLEMENTATION_NAME );
}
// XServiceInfo
@@ -625,7 +625,7 @@ Sequence< OUString > SaxExpatParser::getSupportedServiceNames(void) throw ()
{
Sequence<OUString> seq(1);
- seq.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( SERVICE_NAME ));
+ seq.getArray()[0] = OUString( SERVICE_NAME );
return seq;
}
@@ -640,82 +640,82 @@ OUString getErrorMessage( XML_Error xmlE, OUString sSystemId , sal_Int32 nLine )
{
OUString Message;
if( XML_ERROR_NONE == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("No"));
+ Message = OUString("No");
}
else if( XML_ERROR_NO_MEMORY == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no memory"));
+ Message = OUString("no memory");
}
else if( XML_ERROR_SYNTAX == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("syntax"));
+ Message = OUString("syntax");
}
else if( XML_ERROR_NO_ELEMENTS == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("no elements"));
+ Message = OUString("no elements");
}
else if( XML_ERROR_INVALID_TOKEN == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("invalid token"));
+ Message = OUString("invalid token");
}
else if( XML_ERROR_UNCLOSED_TOKEN == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed token"));
+ Message = OUString("unclosed token");
}
else if( XML_ERROR_PARTIAL_CHAR == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("partial char"));
+ Message = OUString("partial char");
}
else if( XML_ERROR_TAG_MISMATCH == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("tag mismatch"));
+ Message = OUString("tag mismatch");
}
else if( XML_ERROR_DUPLICATE_ATTRIBUTE == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("duplicate attribute"));
+ Message = OUString("duplicate attribute");
}
else if( XML_ERROR_JUNK_AFTER_DOC_ELEMENT == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("junk after doc element"));
+ Message = OUString("junk after doc element");
}
else if( XML_ERROR_PARAM_ENTITY_REF == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("parameter entity reference"));
+ Message = OUString("parameter entity reference");
}
else if( XML_ERROR_UNDEFINED_ENTITY == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("undefined entity"));
+ Message = OUString("undefined entity");
}
else if( XML_ERROR_RECURSIVE_ENTITY_REF == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("recursive entity reference"));
+ Message = OUString("recursive entity reference");
}
else if( XML_ERROR_ASYNC_ENTITY == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("async entity"));
+ Message = OUString("async entity");
}
else if( XML_ERROR_BAD_CHAR_REF == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("bad char reference"));
+ Message = OUString("bad char reference");
}
else if( XML_ERROR_BINARY_ENTITY_REF == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("binary entity reference"));
+ Message = OUString("binary entity reference");
}
else if( XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("attribute external entity reference"));
+ Message = OUString("attribute external entity reference");
}
else if( XML_ERROR_MISPLACED_XML_PI == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("misplaced xml processing instruction"));
+ Message = OUString("misplaced xml processing instruction");
}
else if( XML_ERROR_UNKNOWN_ENCODING == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown encoding"));
+ Message = OUString("unknown encoding");
}
else if( XML_ERROR_INCORRECT_ENCODING == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("incorrect encoding"));
+ Message = OUString("incorrect encoding");
}
else if( XML_ERROR_UNCLOSED_CDATA_SECTION == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("unclosed cdata section"));
+ Message = OUString("unclosed cdata section");
}
else if( XML_ERROR_EXTERNAL_ENTITY_HANDLING == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("external entity reference"));
+ Message = OUString("external entity reference");
}
else if( XML_ERROR_NOT_STANDALONE == xmlE ) {
- Message = OUString(RTL_CONSTASCII_USTRINGPARAM("not standalone"));
+ Message = OUString("not standalone");
}
- OUString str(RTL_CONSTASCII_USTRINGPARAM("["));
+ OUString str("[");
str += sSystemId;
- str += OUString(RTL_CONSTASCII_USTRINGPARAM(" line "));
+ str += OUString(" line ");
str += OUString::valueOf( nLine );
- str += OUString(RTL_CONSTASCII_USTRINGPARAM("]: "));
+ str += OUString("]: ");
str += Message;
- str += OUString(RTL_CONSTASCII_USTRINGPARAM("error"));
+ str += OUString("error");
return str;
}
@@ -791,7 +791,7 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis ,
{
// in case of two concurrent threads, there is only the danger of an leak,
// which is neglectable for one string
- static OUString g_CDATA( RTL_CONSTASCII_USTRINGPARAM( "CDATA" ) );
+ static OUString g_CDATA( "CDATA" );
SaxExpatParser_Impl *pImpl = ((SaxExpatParser_Impl*)pvThis);
@@ -863,8 +863,7 @@ void SaxExpatParser_Impl::callbackEntityDecl(
OSL_TRACE("SaxExpatParser: internal entity declaration, stopping");
XML_StopParser(pImpl->getEntity().pParser, XML_FALSE);
pImpl->exception = SAXParseException(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SaxExpatParser: internal entity declaration, stopping")),
+ ::rtl::OUString( "SaxExpatParser: internal entity declaration, stopping"),
0, Any(),
pImpl->rDocumentLocator->getPublicId(),
pImpl->rDocumentLocator->getSystemId(),
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 287e2f7458e1..57f99f0cfbbe 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -198,7 +198,7 @@ inline sal_uInt32 SaxWriterHelper::writeSequence() throw( SAXException )
Any a;
a <<= e;
throw SAXException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("io exception during writing")),
+ OUString("io exception during writing"),
Reference< XInterface > (),
a );
}
@@ -983,12 +983,12 @@ Reference < XInterface > SAL_CALL SaxWriter_CreateInstance(
OUString SaxWriter_getServiceName() throw()
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"));
+ return OUString("com.sun.star.xml.sax.Writer");
}
OUString SaxWriter_getImplementationName() throw()
{
- return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.extensions.xml.sax.Writer"));
+ return OUString("com.sun.star.extensions.xml.sax.Writer");
}
Sequence< OUString > SaxWriter_getSupportedServiceNames(void) throw()
@@ -1064,12 +1064,12 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
if( ! m_bDocStarted )
{
throw SAXException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("endDocument called before startDocument")),
+ OUString("endDocument called before startDocument"),
Reference< XInterface >() , Any() );
}
if( m_nLevel ) {
throw SAXException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("unexpected end of document")),
+ OUString("unexpected end of document"),
Reference< XInterface >() , Any() );
}
mp_SaxWriterHelper->endDocument();
@@ -1082,7 +1082,7 @@ void SAXWriter::endDocument(void) throw(SAXException, RuntimeE
Any a;
a <<= e;
throw SAXException(
- OUString(RTL_CONSTASCII_USTRINGPARAM("IO exception during closing the IO Stream")),
+ OUString("IO exception during closing the IO Stream"),
Reference< XInterface > (),
a );
}
@@ -1095,13 +1095,13 @@ void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeL
if( ! m_bDocStarted )
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "startElement called before startDocument" ));
+ except.Message = OUString( "startElement called before startDocument" );
throw except;
}
if( m_bIsCDATA )
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "startElement call not allowed with CDATA sections" ));
+ except.Message = OUString( "startElement call not allowed with CDATA sections" );
throw except;
}
@@ -1147,13 +1147,13 @@ void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeL
if (eRet == SAX_WARNING)
{
SAXInvalidCharacterException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export in a attribute value" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export in a attribute value" );
throw except;
}
else if (eRet == SAX_ERROR)
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
@@ -1189,7 +1189,7 @@ void SAXWriter::endElement(const OUString& aName) throw (SAXException, Runtime
if (!bRet)
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
@@ -1199,7 +1199,7 @@ void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeE
if( ! m_bDocStarted )
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "characters method called before startDocument" ) );
+ except.Message = OUString( "characters method called before startDocument" );
throw except;
}
@@ -1241,7 +1241,7 @@ void SAXWriter::characters(const OUString& aChars) throw(SAXException, RuntimeE
if (bThrowException)
{
SAXInvalidCharacterException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
@@ -1286,7 +1286,7 @@ void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& a
if (!mp_SaxWriterHelper->processingInstruction(aTarget, aData))
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
@@ -1320,7 +1320,7 @@ void SAXWriter::endCDATA(void) throw (RuntimeException)
if( ! m_bDocStarted | ! m_bIsCDATA)
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "endCDATA was called without startCDATA" ) );
+ except.Message = OUString( "endCDATA was called without startCDATA" );
throw except;
}
@@ -1358,7 +1358,7 @@ void SAXWriter::comment(const OUString& sComment) throw(SAXException, RuntimeExc
if (!mp_SaxWriterHelper->comment(sComment))
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
@@ -1399,7 +1399,7 @@ void SAXWriter::unknown(const OUString& sString) throw (SAXException, RuntimeExc
if (!mp_SaxWriterHelper->writeString( sString, sal_False, sal_False))
{
SAXException except;
- except.Message = OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid charcter during XML-Export" ) );
+ except.Message = OUString( "Invalid charcter during XML-Export" );
throw except;
}
}
diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx
index dd2e5c38a496..e528f2659f8e 100644
--- a/sax/test/sax/testsax.cxx
+++ b/sax/test/sax/testsax.cxx
@@ -118,12 +118,12 @@ Reference < XInterface > SAL_CALL OSaxParserTest_CreateInstance( const Reference
OUString OSaxParserTest_getServiceName( ) throw ()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("test.com.sun.star.xml.sax.Parser" ));
+ return OUString( "test.com.sun.star.xml.sax.Parser" );
}
OUString OSaxParserTest_getImplementationName( ) throw ()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("test.extensions.xml.sax.Parser"));
+ return OUString( "test.extensions.xml.sax.Parser");
}
Sequence<OUString> OSaxParserTest_getSupportedServiceNames( ) throw ()
@@ -143,7 +143,7 @@ void OSaxParserTest::testInvariant(
const Reference < XInterface >& TestObject )
throw ( IllegalArgumentException, RuntimeException)
{
- if( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) == TestName ) {
+ if( OUString( "com.sun.star.xml.sax.Parser") == TestName ) {
Reference < XParser > parser( TestObject , UNO_QUERY );
ERROR_ASSERT( parser.is() , "XDataInputStream cannot be queried" );
@@ -157,7 +157,7 @@ sal_Int32 OSaxParserTest::test(
sal_Int32 hTestHandle)
throw ( IllegalArgumentException, RuntimeException)
{
- if( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) == TestName ) {
+ if( OUString( "com.sun.star.xml.sax.Parser") == TestName ) {
try
{
if( 0 == hTestHandle ) {
@@ -237,7 +237,7 @@ Reference < XInputStream > createStreamFromSequence(
const Reference < XMultiServiceFactory > &xSMgr )
{
Reference < XInterface > xOutStreamService =
- xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe")) );
+ xSMgr->createInstance( OUString("com.sun.star.io.Pipe") );
OSL_ASSERT( xOutStreamService.is() );
Reference< XOutputStream > rOutStream( xOutStreamService , UNO_QUERY );
OSL_ASSERT( rOutStream.is() );
@@ -301,7 +301,7 @@ public: // Error handler
{
printf( "Error !\n" );
throw SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("error from error handler")) ,
+ OUString( "error from error handler") ,
Reference < XInterface >() ,
aSAXParseException );
}
@@ -509,7 +509,7 @@ void OSaxParserTest::testSimple( const Reference < XParser > &rParser )
Reference< XInputStream > rInStream;
OUString sInput;
rInStream = createStreamFromSequence( seqBytes , m_rFactory );
- sInput = OUString( OUString( RTL_CONSTASCII_USTRINGPARAM("internal")) );
+ sInput = OUString( OUString( "internal") );
if( rParser.is() ) {
InputSource source;
@@ -575,7 +575,7 @@ void OSaxParserTest::testNamespaces( const Reference < XParser > &rParser )
OUString sInput;
rInStream = createStreamFromSequence( seqBytes , m_rFactory );
- sInput = OUString( RTL_CONSTASCII_USTRINGPARAM( "internal" ));
+ sInput = OUString( "internal" );
if( rParser.is() ) {
InputSource source;
@@ -629,7 +629,7 @@ void OSaxParserTest::testEncoding( const Reference < XParser > &rParser )
OUString sInput;
rInStream = createStreamFromSequence( seqBytes , m_rFactory );
- sInput = OUString( RTL_CONSTASCII_USTRINGPARAM("internal") );
+ sInput = OUString( "internal" );
if( rParser.is() ) {
InputSource source;
@@ -663,7 +663,7 @@ void OSaxParserTest::testFile( const Reference < XParser > & rParser )
{
Reference< XInputStream > rInStream = createStreamFromFile( "testsax.xml" , m_rFactory );
- OUString sInput = OUString( RTL_CONSTASCII_USTRINGPARAM( "testsax.xml" ) );
+ OUString sInput = OUString( "testsax.xml" );
if( rParser.is() && rInStream.is() ) {
@@ -723,7 +723,7 @@ void OSaxParserTest::testPerformance( const Reference < XParser > & rParser )
Reference < XInputStream > rInStream =
createStreamFromFile( "testPerformance.xml" , m_rFactory );
- OUString sInput = OUString( RTL_CONSTASCII_USTRINGPARAM( "testperformance.xml") );
+ OUString sInput = OUString( "testperformance.xml" );
if( rParser.is() && rInStream.is() ) {
InputSource source;
@@ -797,16 +797,16 @@ sal_Bool SAL_CALL component_writeInfo(
reinterpret_cast< XRegistryKey * >( pRegistryKey ) );
OUString str =
- OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
+ OUString( "/" ) +
OSaxParserTest_getImplementationName() +
- OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
+ OUString( "/UNO/SERVICES" );
Reference< XRegistryKey > xNewKey = xKey->createKey( str );
xNewKey->createKey( OSaxParserTest_getServiceName() );
str =
- OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) +
+ OUString( "/" ) +
OSaxWriterTest_getImplementationName() +
- OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES") );
+ OUString( "/UNO/SERVICES" );
xNewKey = xKey->createKey( str );
xNewKey->createKey( OSaxWriterTest_getServiceName() );
diff --git a/sax/test/sax/testwriter.cxx b/sax/test/sax/testwriter.cxx
index f894236d190c..63a918f5f66d 100644
--- a/sax/test/sax/testwriter.cxx
+++ b/sax/test/sax/testwriter.cxx
@@ -329,12 +329,12 @@ Reference < XInterface > SAL_CALL OSaxWriterTest_CreateInstance( const Reference
OUString OSaxWriterTest_getServiceName( ) throw ()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("test.com.sun.star.xml.sax.Writer"));
+ return OUString( "test.com.sun.star.xml.sax.Writer");
}
OUString OSaxWriterTest_getImplementationName( ) throw ()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM("test.extensions.xml.sax.Writer"));
+ return OUString( "test.extensions.xml.sax.Writer");
}
Sequence<OUString> OSaxWriterTest_getSupportedServiceNames( ) throw ()
@@ -352,7 +352,7 @@ void OSaxWriterTest::testInvariant( const OUString& TestName,
const Reference < XInterface >& TestObject )
throw ( IllegalArgumentException, RuntimeException)
{
- if( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) == TestName ) {
+ if( OUString("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 );
@@ -373,7 +373,7 @@ sal_Int32 OSaxWriterTest::test(
sal_Int32 hTestHandle)
throw ( IllegalArgumentException,RuntimeException)
{
- if( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) == TestName )
+ if( OUString( "com.sun.star.xml.sax.Writer") == TestName )
{
try
{
@@ -471,10 +471,10 @@ void OSaxWriterTest::writeParagraph(
void OSaxWriterTest::testSimple( const Reference< XExtendedDocumentHandler > &r )
{
- OUString testParagraph = OUString( RTL_CONSTASCII_USTRINGPARAM(
+ OUString testParagraph = OUString(
"Dies ist ein bloeder Test um zu uberpruefen, ob der SAXWriter "
"wohl Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile "
- "bis zum bitteren Ende schreibt." ));
+ "bis zum bitteren Ende schreibt." );
OFileWriter *pw = new OFileWriter("output.xml");
AttributeListImpl *pList = new AttributeListImpl;
@@ -491,24 +491,24 @@ void OSaxWriterTest::testSimple( const Reference< XExtendedDocumentHandler > &r
r->startDocument();
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("Arg1" )),
- OUString( RTL_CONSTASCII_USTRINGPARAM("CDATA")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("bla\n u")) );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("Arg2")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("CDATA")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("blub")) );
+ pList->addAttribute( OUString( "Arg1" ),
+ OUString( "CDATA") ,
+ OUString( "bla\n u") );
+ pList->addAttribute( OUString( "Arg2") ,
+ OUString( "CDATA") ,
+ OUString( "blub") );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag1")) , rList );
+ r->startElement( OUString( "tag1") , rList );
r->ignorableWhitespace( OUString() );
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) );
+ r->characters( OUString( "huhu") );
r->ignorableWhitespace( OUString() );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("hi")) , rList );
+ r->startElement( OUString( "hi") , rList );
r->ignorableWhitespace( OUString() );
// the enpassant must be converted & -> &amp;
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM("&#252;")) );
+ r->characters( OUString( "&#252;") );
// Test added for mib. Tests if errors during conversions occurs
r->ignorableWhitespace( OUString() );
@@ -524,7 +524,7 @@ void OSaxWriterTest::testSimple( const Reference< XExtendedDocumentHandler > &r
// '>' must not be converted
r->startCDATA();
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM(">fsfsdf<")) );
+ r->characters( OUString( ">fsfsdf<") );
r->endCDATA();
r->ignorableWhitespace( OUString() );
@@ -532,16 +532,16 @@ void OSaxWriterTest::testSimple( const Reference< XExtendedDocumentHandler > &r
r->ignorableWhitespace( OUString() );
- r->comment( OUString( RTL_CONSTASCII_USTRINGPARAM("Dies ist ein Kommentar !")) );
+ r->comment( OUString( "Dies ist ein Kommentar !") );
r->ignorableWhitespace( OUString() );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("emptytagtest")) , rList );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("emptytagtest")) );
+ r->startElement( OUString( "emptytagtest") , rList );
+ r->endElement( OUString( "emptytagtest") );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("hi")) );
+ r->endElement( OUString( "hi") );
r->ignorableWhitespace( OUString() );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag1")) );
+ r->endElement( OUString( "tag1") );
r->endDocument();
}
@@ -566,7 +566,7 @@ void OSaxWriterTest::testExceptions( const Reference< XExtendedDocumentHandler >
sal_Bool bException = sal_True;
try
{
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) , rList );
+ r->startElement( OUString( "huhu") , rList );
bException = sal_False;
}
catch( SAXException &e )
@@ -578,13 +578,13 @@ void OSaxWriterTest::testExceptions( const Reference< XExtendedDocumentHandler >
r->startDocument();
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) , rList );
+ r->startElement( OUString( "huhu") , rList );
r->startCDATA();
{
sal_Bool bException = sal_True;
try{
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) , rList );
+ r->startElement( OUString( "huhu") , rList );
bException = sal_False;
}
catch( SAXException &e ) {
@@ -608,7 +608,7 @@ void OSaxWriterTest::testExceptions( const Reference< XExtendedDocumentHandler >
}
}
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) );
+ r->endElement( OUString( "huhu") );
r->endDocument();
}
@@ -631,10 +631,10 @@ void OSaxWriterTest::testDTD(const Reference< XExtendedDocumentHandler > &r )
r->startDocument();
- r->unknown( OUString( RTL_CONSTASCII_USTRINGPARAM("<!DOCTYPE iCalendar >\n")) );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) , rList );
+ r->unknown( OUString( "<!DOCTYPE iCalendar >\n") );
+ r->startElement( OUString( "huhu") , rList );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) );
+ r->endElement( OUString( "huhu") );
r->endDocument();
}
@@ -644,10 +644,10 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
AttributeListImpl *pList = new AttributeListImpl;
OUString testParagraph =
- OUString( RTL_CONSTASCII_USTRINGPARAM(
+ OUString(
"Dies ist ein bloeder Test um zu uberpruefen, ob der SAXWriter "
"wohl Zeilenumbrueche halbwegs richtig macht oder ob er die Zeile "
- "bis zum bitteren Ende schreibt." ));
+ "bis zum bitteren Ende schreibt." );
Reference< XAttributeList > rList( (XAttributeList *) pList , UNO_QUERY );
@@ -668,12 +668,12 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
// just write a bunch of xml tags !
// for performance testing
sal_Int32 i2;
- OUString huhu( RTL_CONSTASCII_USTRINGPARAM("huhu") );
+ OUString huhu( "huhu" );
OUString emptyString;
const int ITERATIONS = 125;
for( i2 = 0 ; i2 < ITERATIONS ; i2 ++ )
{
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag") ) +
+ r->startElement( OUString( "tag" ) +
OUString::valueOf( i2 ), rList );
for( sal_Int32 i = 0 ; i < 450 ; i ++ )
{
@@ -688,7 +688,7 @@ void OSaxWriterTest::testPerformance(const Reference< XExtendedDocumentHandler
for( i2 = ITERATIONS-1 ; i2 >= 0 ; i2-- )
{
r->ignorableWhitespace( emptyString );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag") ) + OUString::valueOf( i2 ) );
+ r->endElement( OUString( "tag" ) + OUString::valueOf( i2 ) );
}
r->endDocument();
diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx
index bd3e1c0312a8..a7e8f8a16ab5 100644
--- a/sax/test/saxdemo.cxx
+++ b/sax/test/saxdemo.cxx
@@ -152,7 +152,7 @@ public: // Error handler
{
printf( "Error !\n" );
throw SAXException(
- OUString( RTL_CONSTASCII_USTRINGPARAM("error from error handler")) ,
+ OUString( "error from error handler") ,
Reference < XInterface >() ,
aSAXParseException );
}
@@ -504,14 +504,14 @@ int main (int argc, char **argv)
// create service manager
Reference< XMultiServiceFactory > xSMgr = createRegistryServiceFactory(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" )) );
+ OUString( "applicat.rdb" ) );
Reference < XImplementationRegistration > xReg;
try
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
+ OUString("com.sun.star.registry.ImplementationRegistration") );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch( Exception & ) {
@@ -523,9 +523,9 @@ int main (int argc, char **argv)
try
{
// Load dll for the tested component
- OUString aDllName(RTL_CONSTASCII_USTRINGPARAM( "sax.uno" SAL_DLLEXTENSION ));
+ OUString aDllName( "sax.uno" SAL_DLLEXTENSION );
xReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
+ OUString("com.sun.star.loader.SharedLibrary"),
aDllName,
Reference< XSimpleRegistry > () );
}
@@ -542,7 +542,7 @@ int main (int argc, char **argv)
// read xml from a file and count elements
//--------------------------------
Reference< XInterface > x = xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) );
+ OUString("com.sun.star.xml.sax.Parser") );
if( x.is() )
{
Reference< XParser > rParser( x , UNO_QUERY );
@@ -582,7 +582,7 @@ int main (int argc, char **argv)
//----------------------
// The SAX-Writer demo
//----------------------
- x= xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer")) );
+ x= xSMgr->createInstance( OUString("com.sun.star.xml.sax.Writer") );
if( x.is() )
{
printf( "start writing to %s\n" , argv[2] );
@@ -597,50 +597,50 @@ int main (int argc, char **argv)
Reference< XExtendedDocumentHandler > r( x , UNO_QUERY );
r->startDocument();
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("Arg1" )),
- OUString( RTL_CONSTASCII_USTRINGPARAM("CDATA")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("foo\n u")) );
- pList->addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM("Arg2")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("CDATA")) ,
- OUString( RTL_CONSTASCII_USTRINGPARAM("foo2")) );
+ pList->addAttribute( OUString( "Arg1" ),
+ OUString( "CDATA") ,
+ OUString( "foo\n u") );
+ pList->addAttribute( OUString( "Arg2") ,
+ OUString( "CDATA") ,
+ OUString( "foo2") );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag1")) , rList );
+ r->startElement( OUString( "tag1") , rList );
// tells the writer to insert a linefeed
r->ignorableWhitespace( OUString() );
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM("huhu")) );
+ r->characters( OUString( "huhu") );
r->ignorableWhitespace( OUString() );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("hi")) , rList );
+ r->startElement( OUString( "hi") , rList );
r->ignorableWhitespace( OUString() );
// the enpassant must be converted & -> &amp;
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM("&#252;")) );
+ r->characters( OUString( "&#252;") );
r->ignorableWhitespace( OUString() );
// '>' must not be converted
r->startCDATA();
- r->characters( OUString( RTL_CONSTASCII_USTRINGPARAM(" > foo < ")) );
+ r->characters( OUString( " > foo < ") );
r->endCDATA();
r->ignorableWhitespace( OUString() );
- OUString testParagraph = OUString( RTL_CONSTASCII_USTRINGPARAM(
+ OUString testParagraph = OUString(
"This is only a test to check, if the writer inserts line feeds "
- "if needed or if the writer puts the whole text into one line." ));
+ "if needed or if the writer puts the whole text into one line." );
writeParagraphHelper( r , testParagraph );
r->ignorableWhitespace( OUString() );
- r->comment( OUString( RTL_CONSTASCII_USTRINGPARAM("This is a comment !")) );
+ r->comment( OUString( "This is a comment !") );
r->ignorableWhitespace( OUString() );
- r->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM("emptytagtest")) , rList );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("emptytagtest")) );
+ r->startElement( OUString( "emptytagtest") , rList );
+ r->endElement( OUString( "emptytagtest") );
r->ignorableWhitespace( OUString() );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("hi")) );
+ r->endElement( OUString( "hi") );
r->ignorableWhitespace( OUString() );
- r->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM("tag1")) );
+ r->endElement( OUString( "tag1") );
r->endDocument();
printf( "finished writing\n" );
diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx
index c3b3e0a77423..bd05ac608c31 100644
--- a/sax/test/testcomponent.cxx
+++ b/sax/test/testcomponent.cxx
@@ -70,7 +70,7 @@ int main (int argc, char **argv)
// create service manager
Reference< XMultiServiceFactory > xSMgr =
- createRegistryServiceFactory( OUString( RTL_CONSTASCII_USTRINGPARAM("applicat.rdb")) );
+ createRegistryServiceFactory( OUString( "applicat.rdb") );
Reference < XImplementationRegistration > xReg;
Reference < XSimpleRegistry > xSimpleReg;
@@ -79,7 +79,7 @@ int main (int argc, char **argv)
{
// Create registration service
Reference < XInterface > x = xSMgr->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")) );
+ OUString("com.sun.star.registry.ImplementationRegistration") );
xReg = Reference< XImplementationRegistration > ( x , UNO_QUERY );
}
catch (const Exception&)
@@ -98,12 +98,12 @@ int main (int argc, char **argv)
#ifdef SAL_W32
OUString aDllName = OStringToOUString( argv[n] , RTL_TEXTENCODING_ASCII_US );
#else
- OUString aDllName = OUString( RTL_CONSTASCII_USTRINGPARAM("lib"));
+ OUString aDllName = OUString( "lib");
aDllName += OStringToOUString( argv[n] , RTL_TEXTENCODING_ASCII_US );
- aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
+ aDllName += OUString( ".so");
#endif
xReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")),
+ OUString("com.sun.star.loader.SharedLibrary"),
aDllName,
xSimpleReg );
}
@@ -126,13 +126,13 @@ int main (int argc, char **argv)
#ifdef SAL_W32
OUString aDllName = OStringToOUString( sTestName , RTL_TEXTENCODING_ASCII_US );
#else
- OUString aDllName = OUString( RTL_CONSTASCII_USTRINGPARAM("lib"));
+ OUString aDllName = OUString( "lib");
aDllName += OStringToOUString( sTestName , RTL_TEXTENCODING_ASCII_US );
- aDllName += OUString( RTL_CONSTASCII_USTRINGPARAM(".so"));
+ aDllName += OUString( ".so");
#endif
xReg->registerImplementation(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")) ,
+ OUString("com.sun.star.loader.SharedLibrary") ,
aDllName,
xSimpleReg );
}
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index c51dc1be6339..e8eb0e59db45 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -235,11 +235,11 @@ static String ToUpperUnicode( const String & rStr )
// I don't know the locale, so en_US is hopefully fine
/*
com.sun.star.lang.Locale aLocale;
- aLocale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("en"));
- aLocale.Country = OUString(RTL_CONSTASCII_USTRINGPARAM("US"));
+ aLocale.Language = OUString("en");
+ aLocale.Country = OUString("US");
*/
- static rtl::OUString aEN(RTL_CONSTASCII_USTRINGPARAM("en"));
- static rtl::OUString aUS(RTL_CONSTASCII_USTRINGPARAM("US"));
+ static rtl::OUString aEN("en");
+ static rtl::OUString aUS("US");
static CharClass aCC( com::sun::star::lang::Locale( aEN, aUS, rtl::OUString() ) );
return aCC.uppercase( rStr );
}
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index c4120bd488de..5c7241a44177 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -1217,7 +1217,7 @@ void SotStorage::SetKey( const rtl::OString& rKey )
::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 );
::com::sun::star::uno::Any aAny;
aAny <<= aSequ;
- SetProperty( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), aAny );
+ SetProperty( ::rtl::OUString("EncryptionKey"), aAny );
}
}
}
@@ -1243,8 +1243,8 @@ SotStorage* SotStorage::OpenOLEStorage( const com::sun::star::uno::Reference < c
{
uno::Reference < beans::XPropertySet > xStreamProps( xStream, uno::UNO_QUERY_THROW );
xStreamProps->setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ),
- uno::makeAny( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.oleobject" ) ) ) );
+ ::rtl::OUString( "MediaType" ),
+ uno::makeAny( ::rtl::OUString( "application/vnd.sun.star.oleobject" ) ) );
}
pStream = utl::UcbStreamHelper::CreateStream( xStream );
@@ -1266,7 +1266,7 @@ sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::s
return 0;
::rtl::OUString aMediaType;
- xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ) >>= aMediaType;
+ xProps->getPropertyValue( ::rtl::OUString("MediaType") ) >>= aMediaType;
if ( !aMediaType.isEmpty() )
{
::com::sun::star::datatransfer::DataFlavor aDataFlavor;
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index fd5761a2f384..7fdd53589998 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -670,7 +670,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
{
xComEnv = new ::ucbhelper::CommandEnvironment( Reference< ::com::sun::star::task::XInteractionHandler >(),
xProgress );
- aTemp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?repairpackage"));
+ aTemp += rtl::OUString("?repairpackage");
}
m_pContent = new ::ucbhelper::Content( aTemp, xComEnv );
@@ -688,7 +688,7 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
::com::sun::star::uno::Sequence < sal_Int8 > aSequ( (sal_Int8*) pBuffer, RTL_DIGEST_LENGTH_SHA1 );
::com::sun::star::uno::Any aAny;
aAny <<= aSequ;
- m_pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EncryptionKey")), aAny );
+ m_pContent->setPropertyValue( ::rtl::OUString("EncryptionKey"), aAny );
}
}
}
@@ -1177,7 +1177,7 @@ sal_Int16 UCBStorageStream_Impl::Commit()
aArg.Data = xStream;
aArg.ReplaceExisting = sal_True;
aAny <<= aArg;
- m_pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), aAny );
+ m_pContent->executeCommand( ::rtl::OUString("insert"), aAny );
// wrapper now controls lifetime of temporary file
m_aTempURL.Erase();
@@ -1782,7 +1782,7 @@ void UCBStorage_Impl::Init()
{
// Hack! Avoid access to the manifest file until mediatype is not available in the first segment of a
// disk spanned file
- m_aContentType = m_aOriginalContentType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.impress") );
+ m_aContentType = m_aOriginalContentType = ::rtl::OUString( "application/vnd.sun.xml.impress" );
}
else if ( m_pContent )
{
@@ -1794,8 +1794,8 @@ void UCBStorage_Impl::Init()
if ( m_nError == ERRCODE_NONE )
{
// read the manifest.xml file
- aObj.Append( String( RTL_CONSTASCII_USTRINGPARAM("META-INF") ) );
- aObj.Append( String( RTL_CONSTASCII_USTRINGPARAM("manifest.xml") ) );
+ aObj.Append( String( "META-INF" ) );
+ aObj.Append( String( "manifest.xml" ) );
// create input stream
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ );
@@ -1811,7 +1811,7 @@ void UCBStorage_Impl::Init()
Reference < ::com::sun::star::packages::manifest::XManifestReader > xReader =
Reference< ::com::sun::star::packages::manifest::XManifestReader >
( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.manifest.ManifestReader"))), UNO_QUERY) ;
+ ::rtl::OUString("com.sun.star.packages.manifest.ManifestReader")), UNO_QUERY) ;
Sequence < Sequence < PropertyValue > > aProps = xReader->readManifestSequence( xInputStream );
// cleanup
@@ -1831,7 +1831,7 @@ void UCBStorage_Impl::Init()
{
// get the manifest information from the package
try {
- Any aAny = m_pContent->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) );
+ Any aAny = m_pContent->getPropertyValue( ::rtl::OUString("MediaType") );
rtl::OUString aTmp;
if ( ( aAny >>= aTmp ) && !aTmp.isEmpty() )
m_aContentType = m_aOriginalContentType = aTmp;
@@ -1876,7 +1876,7 @@ void UCBStorage_Impl::CreateContent()
{
xComEnv = new ::ucbhelper::CommandEnvironment( Reference< ::com::sun::star::task::XInteractionHandler >(),
m_xProgressHandler );
- aTemp += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?repairpackage"));
+ aTemp += rtl::OUString("?repairpackage");
}
m_pContent = new ::ucbhelper::Content( aTemp, xComEnv );
@@ -1903,10 +1903,10 @@ void UCBStorage_Impl::ReadContent()
// create cursor for access to children
Sequence< ::rtl::OUString > aProps(4);
::rtl::OUString* pProps = aProps.getArray();
- pProps[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
- pProps[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
- pProps[2] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
- pProps[3] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size"));
+ pProps[0] = ::rtl::OUString("Title");
+ pProps[1] = ::rtl::OUString("IsFolder");
+ pProps[2] = ::rtl::OUString("MediaType");
+ pProps[3] = ::rtl::OUString("Size");
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS;
try
@@ -1961,13 +1961,13 @@ void UCBStorage_Impl::ReadContent()
{
xComEnv = new ::ucbhelper::CommandEnvironment( Reference< ::com::sun::star::task::XInteractionHandler >(),
m_xProgressHandler );
- aName += String( RTL_CONSTASCII_USTRINGPARAM( "?repairpackage" ) );
+ aName += String( "?repairpackage" );
}
::ucbhelper::Content aContent( aName, xComEnv );
::rtl::OUString aMediaType;
- Any aAny = aContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) );
+ Any aAny = aContent.getPropertyValue( ::rtl::OUString("MediaType") );
if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) )
pElement->m_bIsStorage = sal_True;
else if ( aMediaType.isEmpty() )
@@ -2127,9 +2127,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert
if ( !m_bIsRoot )
aPath += m_aName;
aPath += '/';
- aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
+ aProps[0].Name = ::rtl::OUString("MediaType");
aProps[0].Value <<= (::rtl::OUString ) m_aContentType;
- aProps[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPath"));
+ aProps[1].Name = ::rtl::OUString("FullPath");
aProps[1].Value <<= (::rtl::OUString ) aPath;
rSequence[ nProps++ ] = aProps;
@@ -2150,9 +2150,9 @@ void UCBStorage_Impl::GetProps( sal_Int32& nProps, Sequence < Sequence < Propert
// properties of streams
String aElementPath( aPath );
aElementPath += pElement->m_aName;
- aProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
+ aProps[0].Name = ::rtl::OUString("MediaType");
aProps[0].Value <<= (::rtl::OUString ) pElement->GetContentType();
- aProps[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FullPath"));
+ aProps[1].Name = ::rtl::OUString("FullPath");
aProps[1].Value <<= (::rtl::OUString ) aElementPath;
rSequence[ nProps++ ] = aProps;
}
@@ -2199,7 +2199,7 @@ sal_Bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
Sequence < ::rtl::OUString > aNames(1);
::rtl::OUString* pNames = aNames.getArray();
- pNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
+ pNames[0] = ::rtl::OUString( "Title" );
Sequence < Any > aValues(1);
Any* pValues = aValues.getArray();
pValues[0] = makeAny( ::rtl::OUString( m_aName ) );
@@ -2269,7 +2269,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// first remove all open stream handles
if( !pElement->m_xStream.Is() || pElement->m_xStream->Clear() )
{
- pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), makeAny( sal_Bool( sal_True ) ) );
+ pContent->executeCommand( ::rtl::OUString("delete"), makeAny( sal_Bool( sal_True ) ) );
nRet = COMMIT_RESULT_SUCCESS;
}
else
@@ -2315,7 +2315,7 @@ sal_Int16 UCBStorage_Impl::Commit()
nLocalRet = COMMIT_RESULT_SUCCESS;
Any aAny;
aAny <<= (rtl::OUString) pElement->m_aName;
- pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), aAny );
+ pContent->setPropertyValue( ::rtl::OUString("Title"), aAny );
}
if ( pElement->IsLoaded() && pElement->GetContentType() != pElement->GetOriginalContentType() )
@@ -2324,7 +2324,7 @@ sal_Int16 UCBStorage_Impl::Commit()
nLocalRet = COMMIT_RESULT_SUCCESS;
Any aAny;
aAny <<= (rtl::OUString) pElement->GetContentType();
- pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aAny );
+ pContent->setPropertyValue( ::rtl::OUString("MediaType"), aAny );
}
if ( nLocalRet != COMMIT_RESULT_NOTHING_TO_DO )
@@ -2375,7 +2375,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// clipboard format and ClassId will be retrieved from the media type when the file is loaded again
Any aType;
aType <<= (rtl::OUString) m_aContentType;
- m_pContent->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), aType );
+ m_pContent->setPropertyValue( ::rtl::OUString("MediaType"), aType );
if ( m_bIsLinked )
{
@@ -2398,7 +2398,7 @@ sal_Int16 UCBStorage_Impl::Commit()
Reference < ::com::sun::star::packages::manifest::XManifestWriter > xWriter =
Reference< ::com::sun::star::packages::manifest::XManifestWriter >
( ::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.manifest.ManifestWriter"))), UNO_QUERY) ;
+ ::rtl::OUString("com.sun.star.packages.manifest.ManifestWriter")), UNO_QUERY) ;
sal_Int32 nCount = GetObjectCount() + 1;
Sequence < Sequence < PropertyValue > > aProps( nCount );
sal_Int32 nProps = 0;
@@ -2410,7 +2410,7 @@ sal_Int16 UCBStorage_Impl::Commit()
xWriter = NULL;
xOutputStream = NULL;
DELETEZ( pTempFile );
- aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("manifest.xml")), NameClash::OVERWRITE );
+ aNewSubFolder.transferContent( aSource, InsertOperation_MOVE, ::rtl::OUString("manifest.xml"), NameClash::OVERWRITE );
}
}
else
@@ -2421,7 +2421,7 @@ sal_Int16 UCBStorage_Impl::Commit()
#endif
// force writing
Any aAny;
- m_pContent->executeCommand( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("flush")), aAny );
+ m_pContent->executeCommand( ::rtl::OUString("flush"), aAny );
if ( m_pSource != 0 )
{
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( m_pTempFile->GetURL(), STREAM_STD_READ );
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index cdf5470c01dc..86d688dc04a0 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -82,14 +82,14 @@ OLESimpleStorage::~OLESimpleStorage()
uno::Sequence< ::rtl::OUString > SAL_CALL OLESimpleStorage::impl_staticGetSupportedServiceNames()
{
uno::Sequence< ::rtl::OUString > aRet(1);
- aRet[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage"));
+ aRet[0] = ::rtl::OUString("com.sun.star.embed.OLESimpleStorage");
return aRet;
}
//-------------------------------------------------------------------------
::rtl::OUString SAL_CALL OLESimpleStorage::impl_staticGetImplementationName()
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.embed.OLESimpleStorage"));
+ return ::rtl::OUString("com.sun.star.comp.embed.OLESimpleStorage");
}
//-------------------------------------------------------------------------
@@ -265,7 +265,7 @@ void SAL_CALL OLESimpleStorage::initialize( const uno::Sequence< uno::Any >& aAr
else
{
uno::Reference < io::XStream > xTempFile(
- m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")) ),
+ m_xFactory->createInstance( ::rtl::OUString("com.sun.star.io.TempFile") ),
uno::UNO_QUERY_THROW );
uno::Reference < io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -367,7 +367,7 @@ void SAL_CALL OLESimpleStorage::insertByName( const ::rtl::OUString& aName, cons
}
catch( const uno::Exception& e )
{
- throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Insert has failed!" ) ),
+ throw lang::WrappedTargetException( ::rtl::OUString( "Insert has failed!" ),
uno::Reference< uno::XInterface >(),
uno::makeAny( e ) );
}
@@ -424,7 +424,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const ::rtl::OUString& aName, con
{
uno::Any aCaught( ::cppu::getCaughtException() );
- throw lang::WrappedTargetException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't copy raw stream")),
+ throw lang::WrappedTargetException( ::rtl::OUString("Can't copy raw stream"),
uno::Reference< uno::XInterface >(),
aCaught );
}
@@ -450,7 +450,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName )
uno::Any aResult;
uno::Reference< io::XStream > xTempFile(
- m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile")) ),
+ m_xFactory->createInstance( ::rtl::OUString("com.sun.star.io.TempFile") ),
uno::UNO_QUERY );
uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream();
@@ -486,7 +486,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName )
uno::Reference< container::XNameContainer > xResultNameContainer(
m_xFactory->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+ ::rtl::OUString("com.sun.star.embed.OLESimpleStorage"),
aArgs ),
uno::UNO_QUERY_THROW );