summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-01-20 11:36:40 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-01-20 11:36:40 +0100
commit319b9959b1243e41bd8212432d0b894e3a0a6bf8 (patch)
tree3189bd64af1a521942e6a03d6db4a275c32793bf /odk
parentbb732c7e8aadae5f3b06c3871718140da1457e2e (diff)
Replace suitable equalsAscii calls with equalsAsciiL.
Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx6
-rw-r--r--odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx10
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyListener.cxx6
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx38
4 files changed, 30 insertions, 30 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
index 8db6e8e8f59e..76cc30a6a019 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
@@ -84,11 +84,11 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
for ( sal_Int32 i = 0 ; i < aArguments.getLength(); i++)
{
OUString aName = aArguments[i].Name;
- if (aName.equalsAscii("TypeName" ) )
+ if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName" ) ) )
aArguments[i].Value >>= sOriginalTypeName;
- if (aName.equalsAscii("URL" ) )
+ if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ) )
aArguments[i].Value >>= sURL;
- if (aName.equalsAscii("InputStream" ) )
+ if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream" ) ) )
aArguments[i].Value >>= xInStream;
}
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index c171e56d3145..2042a821aa48 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@ -141,11 +141,11 @@ sal_Bool XFlatXml::importer(
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
aName = aSourceData[i].Name;
- if (aName.equalsAscii("InputStream"))
+ if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InputStream")))
aSourceData[i].Value >>= xInputStream;
- else if ( aName.equalsAscii("FileName"))
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FileName")))
aSourceData[i].Value >>= aFileName;
- else if ( aName.equalsAscii("URL"))
+ else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")))
aSourceData[i].Value >>= aURL;
}
@@ -203,9 +203,9 @@ sal_Bool XFlatXml::exporter(
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
aName = aSourceData[i].Name;
- if ( aName.equalsAscii("OutputStream"))
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OutputStream")))
aSourceData[i].Value >>= rOutputStream;
- else if ( aName.equalsAscii("URL" ))
+ else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ))
aSourceData[i].Value >>= sURL;
}
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx b/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
index 73934563ad55..ec90afbbaa33 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
@@ -63,7 +63,7 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
const css::beans::NamedValue* p = lArguments.getConstArray();
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;
break;
@@ -76,12 +76,12 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
p = lEnv.getConstArray();
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;
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::XFrame > xFrame;
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index 8bec59245220..1238cf934a68 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -170,13 +170,13 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a
// ohne ein entsprechendes Dokument funktioniert der Handler nicht
return xRet;
- if ( aURL.Path.equalsAscii("Command1" ) ||
- aURL.Path.equalsAscii("Command2" ) ||
- aURL.Path.equalsAscii("Command3" ) ||
- aURL.Path.equalsAscii("Command4" ) ||
- aURL.Path.equalsAscii("Command5" ) ||
- aURL.Path.equalsAscii("Command6" ) ||
- aURL.Path.equalsAscii("Command7" ) )
+ if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command6" ) ) ||
+ aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
{
xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
if ( !xRet.is() )
@@ -214,7 +214,7 @@ sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& Serv
{
return (
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
// just enable this command
// set enable flag according to selection
- if ( aText.equalsAscii( "Button Disabled" ))
+ if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Button Disabled" ) ))
mbButtonEnabled = sal_False;
else
mbButtonEnabled = sal_True;
@@ -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)
{
- 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
::com::sun::star::frame::FeatureStateEvent aEvent;
@@ -386,7 +386,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aEvent.State <<= Any();
xControl->statusChanged( aEvent );
}
- else if ( aURL.Path.equalsAscii("Command2" ) )
+ else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) )
{
// just enable this command
::com::sun::star::frame::FeatureStateEvent aEvent;
@@ -397,7 +397,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aEvent.State <<= Any();
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
// where the user can select the last issued command easily.
@@ -419,7 +419,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aArgs[0].Value <<= sal_Int32( 0 );
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
// the user can only select one. The modes cannot be combined.
@@ -443,7 +443,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aArgs[0].Value <<= nPos;
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
Sequence< NamedValue > aArgs( 5 );
@@ -462,7 +462,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
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
// where the user can select one of a defined set.
@@ -497,13 +497,13 @@ void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListen
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 store the new text into a member.
- if ( Event.Event.equalsAscii( "TextChanged" ))
+ if ( Event.Event.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextChanged" ) ))
{
rtl::OUString aNewText;
sal_Bool bHasText( sal_False );