Kaydet (Commit) 39c2a52d authored tarafından Julien Nabet's avatar Julien Nabet

Avoid temporary rtl::OUString

üst e336f41e
...@@ -114,7 +114,7 @@ sal_Bool LWPFilterReader::filter( const Sequence< PropertyValue >& aDescriptor ) ...@@ -114,7 +114,7 @@ sal_Bool LWPFilterReader::filter( const Sequence< PropertyValue >& aDescriptor )
for( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) for( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ )
{ {
//Note we should attempt to use "InputStream" if it exists first! //Note we should attempt to use "InputStream" if it exists first!
if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) )
aDescriptor[i].Value >>= sURL; aDescriptor[i].Value >>= sURL;
} }
...@@ -218,11 +218,11 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro ...@@ -218,11 +218,11 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro
sal_Int32 nPropertyCount = aDescriptor.getLength(); sal_Int32 nPropertyCount = aDescriptor.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty ) for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{ {
if( aDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) ) if( aDescriptor[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) )
{ {
aDescriptor[nProperty].Value >>= aTypeName; aDescriptor[nProperty].Value >>= aTypeName;
} }
else if( aDescriptor[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate")) ) else if( aDescriptor[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
{ {
bOpenAsTemplate = sal_True; bOpenAsTemplate = sal_True;
} }
...@@ -232,17 +232,17 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro ...@@ -232,17 +232,17 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro
{ {
OUString strTemp; OUString strTemp;
aDescriptor[i].Value >>= strTemp; aDescriptor[i].Value >>= strTemp;
if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream")) ) if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InputStream")) )
{ {
uno::Reference< XInputStream> rInputStream; uno::Reference< XInputStream> rInputStream;
aDescriptor[i].Value >>= rInputStream; aDescriptor[i].Value >>= rInputStream;
// //
// TRANSFORM IMPLEMENTATION HERE!!!!!! // TODO TRANSFORM IMPLEMENTATION HERE!!!!!!
// and call m_DocumentHandler's SAX mDochods // and call m_DocumentHandler's SAX mDochods
// //
if( IsWordproFile(rInputStream) ) if( IsWordproFile(rInputStream) )
{ {
if( aTypeName == OUString(RTL_CONSTASCII_USTRINGPARAM("wordpro_template")) ) if( aTypeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wordpro_template")) )
{ {
if(!bOpenAsTemplate) if(!bOpenAsTemplate)
{ {
...@@ -259,7 +259,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro ...@@ -259,7 +259,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro
} }
return ret; return ret;
} }
else if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) else if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) )
{ {
OUString sURL; OUString sURL;
OUString sFileName; OUString sFileName;
...@@ -277,7 +277,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro ...@@ -277,7 +277,7 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro
//end with .lwp: //end with .lwp:
if( IsWordproFile(sURL) ) if( IsWordproFile(sURL) )
{ {
if( aTypeName == OUString(RTL_CONSTASCII_USTRINGPARAM("wordpro_template")) ) if( aTypeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("wordpro_template")) )
{ {
if(!bOpenAsTemplate) if(!bOpenAsTemplate)
{ {
......
...@@ -84,7 +84,7 @@ sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& a ...@@ -84,7 +84,7 @@ sal_Bool RtfImportFilter::filter( const uno::Sequence< beans::PropertyValue >& a
OUString sTemp; OUString sTemp;
for ( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ ) for ( sal_Int32 i = 0; i < aDescriptor.getLength(); i++ )
{ {
if( aDescriptor[i].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) if( aDescriptor[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) )
{ {
aDescriptor[i].Value >>= sTemp; aDescriptor[i].Value >>= sTemp;
aURL = sTemp; aURL = sTemp;
......
...@@ -71,7 +71,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r ...@@ -71,7 +71,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r
uno::Reference < io::XInputStream > xInputStream; uno::Reference < io::XInputStream > xInputStream;
for( sal_Int32 nProperty = 0; nProperty < nPropertyCount; ++nProperty ) for( sal_Int32 nProperty = 0; nProperty < nPropertyCount; ++nProperty )
{ {
if( pValues[nProperty].Name == OUString(RTL_CONSTASCII_USTRINGPARAM("TypeName")) ) if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) )
rDescriptor[nProperty].Value >>= sTypeName; rDescriptor[nProperty].Value >>= sTypeName;
else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "URL" )) ) else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "URL" )) )
pValues[nProperty].Value >>= sURL; pValues[nProperty].Value >>= sURL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment