diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /svx | |
parent | I suspect the logic is supposed to be the other way around. (diff) | |
download | core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.tar.gz core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.zip |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 9 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 8 | ||||
-rw-r--r-- | svx/source/form/fmscriptingenv.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdoole2.cxx | 2 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 2 |
7 files changed, 13 insertions, 17 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 75e9138f6867..294ba3c33e25 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -460,8 +460,7 @@ void SvxRubyDialog::Update() const PropertyValue* pProps = rProps.getConstArray(); for(sal_Int32 nProp = 0; nProp < rProps.getLength(); nProp++) { - if(nAdjust > -2 && - pProps[nProp].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cRubyAdjust))) + if(nAdjust > -2 && pProps[nProp].Name == cRubyAdjust ) { sal_Int16 nTmp = sal_Int16(); pProps[nProp].Value >>= nTmp; @@ -470,8 +469,7 @@ void SvxRubyDialog::Update() else if(nAdjust != nTmp) nAdjust = -2; } - if(nPosition > -2 && - pProps[nProp].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cRubyIsAbove))) + if(nPosition > -2 && pProps[nProp].Name == cRubyIsAbove ) { sal_Bool bTmp = *(sal_Bool*)pProps[nProp].Value.getValue(); if(!nRuby) @@ -479,8 +477,7 @@ void SvxRubyDialog::Update() else if( (!nPosition && !bTmp) || (nPosition == 1 && bTmp) ) nPosition = -2; } - if(bCharStyleEqual && - pProps[nProp].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(cRubyCharStyleName))) + if(bCharStyleEqual && pProps[nProp].Name == cRubyCharStyleName ) { pProps[nProp].Value >>= sTmp; if(!nRuby) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 3b1c131b4757..0a0fb37fe89f 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -730,10 +730,10 @@ void SvxSearchDialog::CalculateDelta_Impl() try { ::rtl::OUString aModuleIdentifier = xModuleManager->identify( xFrame ); - bCalcApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ); - bDrawApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ); - bImpressApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ); - bWriterApp = aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ); + bCalcApp = aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument"; + bDrawApp = aModuleIdentifier == "com.sun.star.drawing.DrawingDocument"; + bImpressApp = aModuleIdentifier == "com.sun.star.presentation.PresentationDocument"; + bWriterApp = aModuleIdentifier == "com.sun.star.text.TextDocument"; } catch ( uno::Exception& ) { diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 1f7b5bf3351a..22d3bf6999f1 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -455,7 +455,7 @@ namespace svxform // the script to execute PScript pScript; - if ( !_rEvent.ScriptType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarBasic" ) ) ) + if ( _rEvent.ScriptType != "StarBasic" ) { pScript.reset( new NewStyleUNOScript( *xObjectShell, _rEvent.ScriptCode ) ); } diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 35e8c4c8b886..574628bfaa55 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -1493,10 +1493,9 @@ namespace sdr { namespace contact { { SolarMutexGuard aSolarGuard; - DBG_ASSERT( _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "design" ) ) || _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "alive" ) ), - "ViewObjectContactOfUnoControl_Impl::modeChanged: unexpected mode!" ); + DBG_ASSERT( _rSource.NewMode == "design" || _rSource.NewMode == "alive", "ViewObjectContactOfUnoControl_Impl::modeChanged: unexpected mode!" ); - m_eControlDesignMode = _rSource.NewMode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "design" ) ) ? eDesign : eAlive; + m_eControlDesignMode = _rSource.NewMode == "design" ? eDesign : eAlive; impl_switchDesignModeListening_nothrow( impl_isControlDesignMode_nothrow() ); diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index caca3f577d5c..62adfb72a9d0 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -184,7 +184,7 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape ) MSO_SPT eRetValue = mso_sptNil; rtl::OUString aEngine( ( (SdrCustomShapeEngineItem&)rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() ); - if ( aEngine.isEmpty() || aEngine.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) ) ) + if ( aEngine.isEmpty() || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine" ) { rtl::OUString sShapeType; const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) ); diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index f2f42820f09f..e768ca88cc9a 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -234,7 +234,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj SolarMutexGuard aGuard; // the code currently makes sense only in case there is no other client - if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnVisAreaChanged")) + if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName == "OnVisAreaChanged" && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) ) { try diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index d8a5fdfbb488..f87e9765e8c0 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -597,7 +597,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), aAny ); } - const sal_Bool bCompressed = aMimeType.isEmpty() || ( aMimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image/tiff")) ) ; + const sal_Bool bCompressed = aMimeType.isEmpty() || aMimeType == "image/tiff"; aAny <<= bCompressed; xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), aAny ); |