summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Filter.cxx6
-rw-r--r--forms/source/misc/InterfaceContainer.cxx12
2 files changed, 8 insertions, 10 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 6983e8388b1b..8524b1822ed9 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -792,19 +792,19 @@ namespace frm
continue;
}
- if ( 0 == pName->compareToAscii( "MessageParent" ) )
+ if ( pName->equalsAscii( "MessageParent" ) )
{
// the message parent
*pValue >>= m_xMessageParent;
OSL_ENSURE( m_xMessageParent.is(), "OFilterControl::initialize: invalid MessageParent!" );
}
- else if ( 0 == pName->compareToAscii( "NumberFormatter" ) )
+ else if ( pName->equalsAscii( "NumberFormatter" ) )
{
// the number format. This argument is optional.
*pValue >>= m_xFormatter;
OSL_ENSURE( m_xFormatter.is(), "OFilterControl::initialize: invalid NumberFormatter!" );
}
- else if ( 0 == pName->compareToAscii( "ControlModel" ) )
+ else if ( pName->equalsAscii( "ControlModel" ) )
{
// the control model for which we act as filter control
if ( !(*pValue >>= xControlModel ) )
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 9e91c2b8738b..bab4df85f176 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -363,15 +363,15 @@ struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescr
{
void operator()( ScriptEventDescriptor& _rDescriptor )
{
- if ( 0 == _rDescriptor.ScriptType.compareToAscii( "StarBasic" ) )
+ if ( _rDescriptor.ScriptType.equalsAscii( "StarBasic" ) )
{ // it's a starbasic macro
sal_Int32 nPrefixLength = _rDescriptor.ScriptCode.indexOf( ':' );
if ( 0 <= nPrefixLength )
{ // the macro name does not already contain a :
#ifdef DBG_UTIL
const OUString sPrefix = _rDescriptor.ScriptCode.copy( 0, nPrefixLength );
- DBG_ASSERT( 0 == sPrefix.compareToAscii( "document" )
- || 0 == sPrefix.compareToAscii( "application" ),
+ DBG_ASSERT( sPrefix.equalsAscii( "document" )
+ || sPrefix.equalsAscii( "application" ),
"TransformEventTo52Format: invalid (unknown) prefix!" );
#endif
// cut the prefix
@@ -386,14 +386,12 @@ struct TransformEventTo60Format : public ::std::unary_function< ScriptEventDescr
{
void operator()( ScriptEventDescriptor& _rDescriptor )
{
- if ( 0 == _rDescriptor.ScriptType.compareToAscii( "StarBasic" ) )
+ if ( _rDescriptor.ScriptType.equalsAscii( "StarBasic" ) )
{ // it's a starbasic macro
if ( _rDescriptor.ScriptCode.indexOf( ':' ) < 0 )
{ // the macro name does not already contain a :
// -> default the type to "document"
- OUString sNewScriptCode( "document:" );
- sNewScriptCode += _rDescriptor.ScriptCode;
- _rDescriptor.ScriptCode = sNewScriptCode;
+ _rDescriptor.ScriptCode = "document:" + _rDescriptor.ScriptCode;
}
}
}