Kaydet (Commit) 319b9959 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

Replace suitable equalsAscii calls with equalsAsciiL.

Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.
üst bb732c7e
...@@ -84,11 +84,11 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) ...@@ -84,11 +84,11 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
for ( sal_Int32 i = 0 ; i < aArguments.getLength(); i++) for ( sal_Int32 i = 0 ; i < aArguments.getLength(); i++)
{ {
OUString aName = aArguments[i].Name; OUString aName = aArguments[i].Name;
if (aName.equalsAscii("TypeName" ) ) if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName" ) ) )
aArguments[i].Value >>= sOriginalTypeName; aArguments[i].Value >>= sOriginalTypeName;
if (aName.equalsAscii("URL" ) ) if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ) )
aArguments[i].Value >>= sURL; aArguments[i].Value >>= sURL;
if (aName.equalsAscii("InputStream" ) ) if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream" ) ) )
aArguments[i].Value >>= xInStream; aArguments[i].Value >>= xInStream;
} }
......
...@@ -141,11 +141,11 @@ sal_Bool XFlatXml::importer( ...@@ -141,11 +141,11 @@ sal_Bool XFlatXml::importer(
for ( sal_Int32 i = 0 ; i < nLength; i++) for ( sal_Int32 i = 0 ; i < nLength; i++)
{ {
aName = aSourceData[i].Name; aName = aSourceData[i].Name;
if (aName.equalsAscii("InputStream")) if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InputStream")))
aSourceData[i].Value >>= xInputStream; aSourceData[i].Value >>= xInputStream;
else if ( aName.equalsAscii("FileName")) else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")))
aSourceData[i].Value >>= aFileName; aSourceData[i].Value >>= aFileName;
else if ( aName.equalsAscii("URL")) else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")))
aSourceData[i].Value >>= aURL; aSourceData[i].Value >>= aURL;
} }
...@@ -203,9 +203,9 @@ sal_Bool XFlatXml::exporter( ...@@ -203,9 +203,9 @@ sal_Bool XFlatXml::exporter(
for ( sal_Int32 i = 0 ; i < nLength; i++) for ( sal_Int32 i = 0 ; i < nLength; i++)
{ {
aName = aSourceData[i].Name; aName = aSourceData[i].Name;
if ( aName.equalsAscii("OutputStream")) if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OutputStream")))
aSourceData[i].Value >>= rOutputStream; aSourceData[i].Value >>= rOutputStream;
else if ( aName.equalsAscii("URL" )) else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ))
aSourceData[i].Value >>= sURL; aSourceData[i].Value >>= sURL;
} }
......
...@@ -63,7 +63,7 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans: ...@@ -63,7 +63,7 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
const css::beans::NamedValue* p = lArguments.getConstArray(); const css::beans::NamedValue* p = lArguments.getConstArray();
for (i=0; i<c; ++i) for (i=0; i<c; ++i)
{ {
if (p[i].Name.equalsAscii("Environment")) if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Environment")))
{ {
p[i].Value >>= lEnv; p[i].Value >>= lEnv;
break; break;
...@@ -76,12 +76,12 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans: ...@@ -76,12 +76,12 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
p = lEnv.getConstArray(); p = lEnv.getConstArray();
for (i=0; i<c; ++i) for (i=0; i<c; ++i)
{ {
if (p[i].Name.equalsAscii("Model")) if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model")))
{ {
p[i].Value >>= xModel; p[i].Value >>= xModel;
break; break;
} }
if (p[i].Name.equalsAscii("Frame")) if (p[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")))
{ {
css::uno::Reference< css::frame::XController > xController; css::uno::Reference< css::frame::XController > xController;
css::uno::Reference< css::frame::XFrame > xFrame; css::uno::Reference< css::frame::XFrame > xFrame;
......
...@@ -170,13 +170,13 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a ...@@ -170,13 +170,13 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a
// ohne ein entsprechendes Dokument funktioniert der Handler nicht // ohne ein entsprechendes Dokument funktioniert der Handler nicht
return xRet; return xRet;
if ( aURL.Path.equalsAscii("Command1" ) || if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ||
aURL.Path.equalsAscii("Command2" ) || aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ||
aURL.Path.equalsAscii("Command3" ) || aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ||
aURL.Path.equalsAscii("Command4" ) || aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ||
aURL.Path.equalsAscii("Command5" ) || aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ||
aURL.Path.equalsAscii("Command6" ) || aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command6" ) ) ||
aURL.Path.equalsAscii("Command7" ) ) aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
{ {
xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path ); xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
if ( !xRet.is() ) if ( !xRet.is() )
...@@ -214,7 +214,7 @@ sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& Serv ...@@ -214,7 +214,7 @@ sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& Serv
{ {
return ( return (
ServiceName.equalsAscii(MYPROTOCOLHANDLER_SERVICENAME ) || ServiceName.equalsAscii(MYPROTOCOLHANDLER_SERVICENAME ) ||
ServiceName.equalsAscii("com.sun.star.frame.ProtocolHandler") ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.ProtocolHandler"))
); );
} }
...@@ -342,7 +342,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property ...@@ -342,7 +342,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
// just enable this command // just enable this command
// set enable flag according to selection // set enable flag according to selection
if ( aText.equalsAscii( "Button Disabled" )) if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Button Disabled" ) ))
mbButtonEnabled = sal_False; mbButtonEnabled = sal_False;
else else
mbButtonEnabled = sal_True; mbButtonEnabled = sal_True;
...@@ -373,9 +373,9 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property ...@@ -373,9 +373,9 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException) void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener >& xControl, const URL& aURL ) throw (RuntimeException)
{ {
if ( aURL.Protocol.equalsAscii("vnd.demo.complextoolbarcontrols.demoaddon:") ) if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:")) )
{ {
if ( aURL.Path.equalsAscii("Command1" ) ) if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) )
{ {
// just enable this command // just enable this command
::com::sun::star::frame::FeatureStateEvent aEvent; ::com::sun::star::frame::FeatureStateEvent aEvent;
...@@ -386,7 +386,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener ...@@ -386,7 +386,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aEvent.State <<= Any(); aEvent.State <<= Any();
xControl->statusChanged( aEvent ); xControl->statusChanged( aEvent );
} }
else if ( aURL.Path.equalsAscii("Command2" ) ) else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) )
{ {
// just enable this command // just enable this command
::com::sun::star::frame::FeatureStateEvent aEvent; ::com::sun::star::frame::FeatureStateEvent aEvent;
...@@ -397,7 +397,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener ...@@ -397,7 +397,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aEvent.State <<= Any(); aEvent.State <<= Any();
xControl->statusChanged( aEvent ); xControl->statusChanged( aEvent );
} }
else if ( aURL.Path.equalsAscii("Command3" ) ) else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) )
{ {
// A toggle dropdown box is normally used for a group of commands // A toggle dropdown box is normally used for a group of commands
// where the user can select the last issued command easily. // where the user can select the last issued command easily.
...@@ -419,7 +419,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener ...@@ -419,7 +419,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aArgs[0].Value <<= sal_Int32( 0 ); aArgs[0].Value <<= sal_Int32( 0 );
SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True ); SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
} }
else if ( aURL.Path.equalsAscii("Command4" ) ) else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) )
{ {
// A dropdown box is normally used for a group of dependent modes, where // A dropdown box is normally used for a group of dependent modes, where
// the user can only select one. The modes cannot be combined. // the user can only select one. The modes cannot be combined.
...@@ -443,7 +443,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener ...@@ -443,7 +443,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aArgs[0].Value <<= nPos; aArgs[0].Value <<= nPos;
SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True ); SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
} }
else if ( aURL.Path.equalsAscii("Command5" ) ) else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) )
{ {
// A spin button // A spin button
Sequence< NamedValue > aArgs( 5 ); Sequence< NamedValue > aArgs( 5 );
...@@ -462,7 +462,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener ...@@ -462,7 +462,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetValues")), aArgs, sal_True ); SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetValues")), aArgs, sal_True );
} }
else if ( aURL.Path.equalsAscii("Command7" ) ) else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
{ {
// A dropdown box is normally used for a group of commands // A dropdown box is normally used for a group of commands
// where the user can select one of a defined set. // where the user can select one of a defined set.
...@@ -497,13 +497,13 @@ void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListen ...@@ -497,13 +497,13 @@ void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListen
void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (RuntimeException) void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (RuntimeException)
{ {
if ( Event.aURL.Protocol.equalsAscii("vnd.demo.complextoolbarcontrols.demoaddon:" )) if ( Event.aURL.Protocol.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:" ) ))
{ {
if ( Event.aURL.Path.equalsAscii( "Command2" )) if ( Event.aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command2" ) ))
{ {
// We get notifications whenever the text inside the combobox has been changed. // We get notifications whenever the text inside the combobox has been changed.
// We store the new text into a member. // We store the new text into a member.
if ( Event.Event.equalsAscii( "TextChanged" )) if ( Event.Event.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextChanged" ) ))
{ {
rtl::OUString aNewText; rtl::OUString aNewText;
sal_Bool bHasText( sal_False ); sal_Bool bHasText( sal_False );
......
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