From 743f22045c4ec08c46c259fc0ba240194a391457 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 15:05:52 +0200 Subject: Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \; --- sfx2/source/appl/appuno.cxx | 108 ++++++++++++++++----------------- sfx2/source/appl/sfxhelp.cxx | 6 +- sfx2/source/appl/shutdowniconunx.cxx | 4 +- sfx2/source/bastyp/fltfnc.cxx | 24 ++++---- sfx2/source/dialog/filedlghelper.cxx | 2 +- sfx2/source/doc/plugin.cxx | 12 ++-- sfx2/source/doc/sfxbasemodel.cxx | 32 +++++----- sfx2/source/notify/eventsupplier.cxx | 26 ++++---- sfx2/source/view/sfxbasecontroller.cxx | 6 +- sfx2/source/view/viewprn.cxx | 10 +-- 10 files changed, 115 insertions(+), 115 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 03d783c025f1..8dfb849996cf 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -459,14 +459,14 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque { const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; rtl::OUString aName = rProp.Name; - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) + if ( aName == sFrame ) { Reference< XFrame > xFrame; OSL_VERIFY( rProp.Value >>= xFrame ); rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } else - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) + if ( aName == sHidden ) { sal_Bool bVal = sal_False; if (rProp.Value >>= bVal) @@ -484,17 +484,17 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque #endif const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n]; rtl::OUString aName = rProp.Name; - if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModel)) ) + if ( aName == sModel ) rSet.Put( SfxUnoAnyItem( SID_DOCUMENT, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentData)) ) + else if ( aName == sComponentData ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTDATA, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sComponentContext)) ) + else if ( aName == sComponentContext ) { rSet.Put( SfxUnoAnyItem( SID_COMPONENTCONTEXT, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStatusInd)) ) + else if ( aName == sStatusInd ) { Reference< ::com::sun::star::task::XStatusIndicator > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -502,7 +502,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_PROGRESS_STATUSBAR_CONTROL, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInteractionHdl)) ) + else if ( aName == sInteractionHdl ) { Reference< ::com::sun::star::task::XInteractionHandler > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -510,11 +510,11 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewData)) ) + else if ( aName == sViewData ) rSet.Put( SfxUnoAnyItem( SID_VIEW_DATA, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterData)) ) + else if ( aName == sFilterData ) rSet.Put( SfxUnoAnyItem( SID_FILTER_DATA, rProp.Value ) ); - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sInputStream)) ) + else if ( aName == sInputStream ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -522,7 +522,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_INPUTSTREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStream)) ) + else if ( aName == sStream ) { Reference< XInputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -530,7 +530,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_STREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUCBContent)) ) + else if ( aName == sUCBContent ) { Reference< XContent > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -538,7 +538,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_CONTENT, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOutputStream)) ) + else if ( aName == sOutputStream ) { Reference< XOutputStream > xVal; sal_Bool bOK = ((rProp.Value >>= xVal) && xVal.is()); @@ -546,7 +546,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_OUTPUTSTREAM, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPostData)) ) + else if ( aName == sPostData ) { Reference< XInputStream > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -554,7 +554,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoAnyItem( SID_POSTDATA, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrame)) ) + else if ( aName == sFrame ) { Reference< XFrame > xFrame; sal_Bool bOK = (rProp.Value >>= xFrame); @@ -562,7 +562,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUnoFrameItem( SID_FILLFRAME, xFrame ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sAsTemplate)) ) + else if ( aName == sAsTemplate ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -570,7 +570,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_TEMPLATE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sOpenNewView)) ) + else if ( aName == sOpenNewView ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -578,7 +578,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewId)) ) + else if ( aName == sViewId ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -586,7 +586,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_VIEW_ID, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPluginMode)) ) + else if ( aName == sPluginMode ) { sal_Int16 nVal = -1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -594,7 +594,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sReadOnly)) ) + else if ( aName == sReadOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -602,7 +602,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_READONLY, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDdeReconnect)) ) + else if ( aName == sDdeReconnect ) { sal_Bool bVal = sal_True; sal_Bool bOK = (rProp.Value >>= bVal); @@ -610,7 +610,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DDE_RECONNECT_ONLOAD, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStartPresentation)) ) + else if ( aName == sStartPresentation ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -618,7 +618,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_DOC_STARTPRESENTATION, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSelectionOnly)) ) + else if ( aName == sSelectionOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -626,7 +626,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SELECTION, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHidden)) ) + else if ( aName == sHidden ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -634,7 +634,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_HIDDEN, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMinimized)) ) + else if ( aName == sMinimized ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -642,7 +642,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_MINIMIZED, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSilent)) ) + else if ( aName == sSilent ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -650,7 +650,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_SILENT, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPreview)) ) + else if ( aName == sPreview ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -658,7 +658,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_PREVIEW, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sViewOnly)) ) + else if ( aName == sViewOnly ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -666,7 +666,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_VIEWONLY, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDontEdit)) ) + else if ( aName == sDontEdit ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -674,7 +674,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_EDITDOC, !bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUseSystemDialog)) ) + else if ( aName == sUseSystemDialog ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -682,7 +682,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_FILE_DIALOG, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sStandardDir)) ) + else if ( aName == sStandardDir ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -690,7 +690,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_STANDARD_DIR, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBlackList)) ) + else if ( aName == sBlackList ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > xVal; sal_Bool bOK = (rProp.Value >>= xVal); @@ -702,7 +702,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque rSet.Put( stringList ); } } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFileName)) ) + else if ( aName == sFileName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -710,7 +710,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSalvagedFile)) ) + else if ( aName == sSalvagedFile ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -718,7 +718,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_SALVAGE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFolderName)) ) + else if ( aName == sFolderName ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -726,7 +726,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_PATH, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFrameName)) ) + else if ( aName == sFrameName ) { ::rtl::OUString sVal; sal_Bool bOK = (rProp.Value >>= sVal); @@ -734,7 +734,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK && !sVal.isEmpty()) rSet.Put( SfxStringItem( SID_TARGETNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMediaType)) ) + else if ( aName == sMediaType ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -742,7 +742,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateName)) ) + else if ( aName == sTemplateName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -750,7 +750,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sTemplateRegionName)) ) + else if ( aName == sTemplateRegionName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -758,7 +758,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sJumpMark)) ) + else if ( aName == sJumpMark ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -766,7 +766,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_JUMPMARK, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCharacterSet)) ) + else if ( aName == sCharacterSet ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -774,7 +774,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_CHARSET, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sFilterFlags)) ) + else if ( aName == sFilterFlags ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -782,7 +782,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_FILE_FILTEROPTIONS, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sMacroExecMode)) ) + else if ( aName == sMacroExecMode ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -790,7 +790,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_MACROEXECMODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sUpdateDocMode)) ) + else if ( aName == sUpdateDocMode ) { sal_Int16 nVal =-1; sal_Bool bOK = ((rProp.Value >>= nVal) && (nVal != -1)); @@ -798,7 +798,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxUInt16Item( SID_UPDATEDOCMODE, nVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sRepairPackage)) ) + else if ( aName == sRepairPackage ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -806,7 +806,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_REPAIRPACKAGE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentTitle)) ) + else if ( aName == sDocumentTitle ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -814,7 +814,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOCINFO_TITLE, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDocumentBaseURL)) ) + else if ( aName == sDocumentBaseURL ) { ::rtl::OUString sVal; // the base url can be set to empty ( for embedded objects for example ) @@ -823,7 +823,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_BASEURL, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sHierarchicalDocumentName)) ) + else if ( aName == sHierarchicalDocumentName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -831,7 +831,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_DOC_HIERARCHICALNAME, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sCopyStreamIfPossible)) ) + else if ( aName == sCopyStreamIfPossible ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -839,7 +839,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_COPY_STREAM_IF_POSSIBLE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNoAutoSave)) ) + else if ( aName == sNoAutoSave ) { sal_Bool bVal = sal_False; sal_Bool bOK = (rProp.Value >>= bVal); @@ -847,15 +847,15 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxBoolItem( SID_NOAUTOSAVE, bVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sModifyPasswordInfo)) ) + else if ( aName == sModifyPasswordInfo ) { rSet.Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sEncryptionData)) ) + else if ( aName == sEncryptionData ) { rSet.Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, rProp.Value ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsDir)) ) + else if ( aName == sSuggestedSaveAsDir ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); @@ -863,7 +863,7 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque if (bOK) rSet.Put( SfxStringItem( SID_SUGGESTEDSAVEASDIR, sVal ) ); } - else if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuggestedSaveAsName)) ) + else if ( aName == sSuggestedSaveAsName ) { ::rtl::OUString sVal; sal_Bool bOK = ((rProp.Value >>= sVal) && !sVal.isEmpty()); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 9c6567b86407..80a8f881925b 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -474,7 +474,7 @@ String SfxHelp::GetHelpModuleName_Impl() xCont->getByName( aModuleIdentifier ) >>= lProps; for ( sal_Int32 i = 0; i < lProps.getLength(); ++i ) { - if ( lProps[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooSetupFactoryShortName")) ) + if ( lProps[i].Name == "ooSetupFactoryShortName" ) { lProps[i].Value >>= aFactoryShortName; break; @@ -491,9 +491,9 @@ String SfxHelp::GetHelpModuleName_Impl() if ( !aFactoryShortName.isEmpty() ) { // Map some module identifiers to their "real" help module string. - if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("chart2")) ) + if ( aFactoryShortName == "chart2" ) aFactoryShortName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "schart" ) ); - else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("BasicIDE")) ) + else if ( aFactoryShortName == "BasicIDE" ) aFactoryShortName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sbasic" ) ); else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sweb")) || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sglobal")) diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 8aad0f63a4e2..d4062c346486 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -189,9 +189,9 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, Sequence < PropertyValue >& aEntry = aMenu[n]; for ( sal_Int32 m=0; m>= aURL; - if ( aEntry[m].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) ) + if ( aEntry[m].Name == "Title" ) aEntry[m].Value >>= aDescription; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 599832dba787..818c157950a9 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -947,33 +947,33 @@ void SfxFilterContainer::ReadSingleFilter_Impl( sal_Int32 nFilterProperty = 0 ; for( nFilterProperty=0; nFilterProperty>= nFormatVersion; } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TemplateName")) ) + else if ( lFilterProperties[nFilterProperty].Name == "TemplateName" ) { lFilterProperties[nFilterProperty].Value >>= sDefaultTemplate; } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Flags")) ) + else if ( lFilterProperties[nFilterProperty].Name == "Flags" ) { lFilterProperties[nFilterProperty].Value >>= nFlags; } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UIName")) ) + else if ( lFilterProperties[nFilterProperty].Name == "UIName" ) { lFilterProperties[nFilterProperty].Value >>= sUIName; } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserData")) ) + else if ( lFilterProperties[nFilterProperty].Name == "UserData" ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > lUserData; lFilterProperties[nFilterProperty].Value >>= lUserData; sUserData = implc_convertStringlistToString( lUserData, ',', ::rtl::OUString() ); } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DocumentService")) ) + else if ( lFilterProperties[nFilterProperty].Name == "DocumentService" ) { lFilterProperties[nFilterProperty].Value >>= sServiceName; } - else if( lFilterProperties[nFilterProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Type")) ) + else if ( lFilterProperties[nFilterProperty].Name == "Type" ) { lFilterProperties[nFilterProperty].Value >>= sType; // Try to get filter .. but look for any exceptions! @@ -995,25 +995,25 @@ void SfxFilterContainer::ReadSingleFilter_Impl( sal_Int32 nTypeProperty = 0 ; for( nTypeProperty=0; nTypeProperty>= sHumanName; } - else if( lTypeProperties[nTypeProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DocumentIconID")) ) + else if ( lTypeProperties[nTypeProperty].Name == "DocumentIconID" ) { lTypeProperties[nTypeProperty].Value >>= nDocumentIconId; } - else if( lTypeProperties[nTypeProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MediaType")) ) + else if ( lTypeProperties[nTypeProperty].Name == "MediaType" ) { lTypeProperties[nTypeProperty].Value >>= sMimeType; } - else if( lTypeProperties[nTypeProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Extensions")) ) + else if ( lTypeProperties[nTypeProperty].Name == "Extensions" ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > lExtensions; lTypeProperties[nTypeProperty].Value >>= lExtensions; sExtension = implc_convertStringlistToString( lExtensions, ';', DEFINE_CONST_UNICODE("*.") ); } - else if( lTypeProperties[nTypeProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLPattern")) ) + else if ( lTypeProperties[nTypeProperty].Name == "URLPattern" ) { ::com::sun::star::uno::Sequence< ::rtl::OUString > lPattern; lTypeProperties[nTypeProperty].Value >>= lPattern; diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 37a2f29ed1e3..138f8a38ffbf 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -534,7 +534,7 @@ void FileDialogHelper_Impl::updateSelectionBox() Sequence< ::rtl::OUString > aCtrlList = xCtrlInfo->getSupportedControls(); sal_uInt32 nCount = aCtrlList.getLength(); for ( sal_uInt32 nCtrl = 0; nCtrl < nCount; ++nCtrl ) - if ( aCtrlList[ nCtrl ].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SelectionBox")) ) + if ( aCtrlList[ nCtrl ] == "SelectionBox" ) { bSelectionBoxFound = sal_False; break; diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 0931a0c7acff..0f706c6da911 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -202,15 +202,15 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL PluginObject::getPropertySetI void SAL_CALL PluginObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const uno::Any& aAny) throw ( beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginURL")) ) + if ( aPropertyName == "PluginURL" ) { aAny >>= maURL; } - else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginMimeType")) ) + else if ( aPropertyName == "PluginMimeType" ) { aAny >>= maMimeType; } - else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginCommands")) ) + else if ( aPropertyName == "PluginCommands" ) { maCmdList.clear(); uno::Sequence < beans::PropertyValue > aCommandSequence; @@ -225,15 +225,15 @@ uno::Any SAL_CALL PluginObject::getPropertyValue(const ::rtl::OUString& aPropert throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException) { uno::Any aAny; - if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginURL")) ) + if ( aPropertyName == "PluginURL" ) { aAny <<= maURL; } - else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginMimeType")) ) + else if ( aPropertyName == "PluginMimeType" ) { aAny <<= maMimeType; } - else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PluginCommands")) ) + else if ( aPropertyName == "PluginCommands" ) { uno::Sequence< beans::PropertyValue > aCommandSequence; maCmdList.FillSequence( aCommandSequence ); diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 00b61ab627f5..1e23fada1260 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2058,7 +2058,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-embed-source;windows_formatname=\"Star EMBS\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-embed-source;windows_formatname=\"Star EMBS\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2083,7 +2083,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2104,7 +2104,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2124,7 +2124,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-emf;windows_formatname=\"Image EMF\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2159,7 +2159,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-wmf;windows_formatname=\"Image WMF\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2199,7 +2199,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2223,7 +2223,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) else throw datatransfer::UnsupportedFlavorException(); } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image/png")) ) + else if ( aFlavor.MimeType == "image/png" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { @@ -2333,17 +2333,17 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const DATAFLAVOR& aFlavor { SfxModelGuard aGuard( *this ); - if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"")) ) + if ( aFlavor.MimeType == "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-emf;windows_formatname=\"Image EMF\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; @@ -2351,7 +2351,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const DATAFLAVOR& aFlavor && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-wmf;windows_formatname=\"Image WMF\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; @@ -2364,17 +2364,17 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const DATAFLAVOR& aFlavor if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-embed-source;windows_formatname=\"Star EMBS\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-embed-source;windows_formatname=\"Star EMBS\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"")) ) + else if ( aFlavor.MimeType == "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; } - else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("image/png")) ) + else if ( aFlavor.MimeType == "image/png" ) { if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) return sal_True; @@ -2529,7 +2529,7 @@ void addTitle_Impl( Sequence < ::com::sun::star::beans::PropertyValue >& rSeq, c for ( nArg = 0; nArg < nCount; nArg++ ) { ::com::sun::star::beans::PropertyValue& rProp = rSeq[nArg]; - if ( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) ) + if ( rProp.Name == "Title" ) { rProp.Value <<= rTitle; break; @@ -3295,7 +3295,7 @@ static void GetCommandFromSequence( rtl::OUString& rCommand, sal_Int32& nIndex, for ( sal_Int32 i = 0; i < rSeqPropValue.getLength(); i++ ) { - if ( rSeqPropValue[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Command")) ) + if ( rSeqPropValue[i].Name == "Command" ) { rSeqPropValue[i].Value >>= rCommand; nIndex = i; diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 1af00d5b7b96..8c2ac45d3324 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -212,13 +212,13 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg sal_Int32 nIndex = 0; while ( nIndex < nCount ) { - if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_EVENT_TYPE))) + if ( aProperties[ nIndex ].Name == PROP_EVENT_TYPE ) aProperties[ nIndex ].Value >>= aType; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_SCRIPT))) + else if ( aProperties[ nIndex ].Name == PROP_SCRIPT ) aProperties[ nIndex ].Value >>= aScript; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_LIBRARY))) + else if ( aProperties[ nIndex ].Name == PROP_LIBRARY ) aProperties[ nIndex ].Value >>= aLibrary; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_MACRO_NAME))) + else if ( aProperties[ nIndex ].Name == PROP_MACRO_NAME ) aProperties[ nIndex ].Value >>= aMacroName; else { OSL_FAIL("Unknown property value!"); @@ -390,13 +390,13 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p while ( nIndex < nCount ) { - if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_EVENT_TYPE))) + if ( aProperties[ nIndex ].Name == PROP_EVENT_TYPE ) aProperties[ nIndex ].Value >>= aType; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_SCRIPT))) + else if ( aProperties[ nIndex ].Name == PROP_SCRIPT ) aProperties[ nIndex ].Value >>= aScriptURL; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_LIBRARY))) + else if ( aProperties[ nIndex ].Name == PROP_LIBRARY ) aProperties[ nIndex ].Value >>= aLibrary; - else if (aProperties[ nIndex ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(PROP_MACRO_NAME))) + else if ( aProperties[ nIndex ].Name == PROP_MACRO_NAME ) aProperties[ nIndex ].Value >>= aMacroName; else { OSL_FAIL("Unknown propery value!"); @@ -406,11 +406,11 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p // Get the type ScriptType eType( STARBASIC ); - if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC))) + if ( aType == STAR_BASIC ) eType = STARBASIC; else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) && !aScriptURL.isEmpty()) eType = EXTENDED_STYPE; - else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT))) + else if ( aType == SVX_MACRO_LANGUAGE_JAVASCRIPT ) eType = JAVASCRIPT; else { SAL_WARN( "sfx2.notify", "ConvertToMacro: Unknown macro type" ); @@ -418,7 +418,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p if ( !aMacroName.isEmpty() ) { - if (aLibrary.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application"))) + if ( aLibrary == "application" ) aLibrary = SFX_APP()->GetName(); else aLibrary = ::rtl::OUString(); @@ -458,7 +458,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i if ( !aScript.isEmpty() ) o_normalizedDescriptor.put( PROP_SCRIPT, aScript ); - if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC))) + if ( aType == STAR_BASIC ) { if ( !aScript.isEmpty() ) { @@ -469,7 +469,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i if ( ( nHashPos != STRING_NOTFOUND ) && ( nHashPos < nArgsPos ) ) { rtl::OUString aBasMgrName( INetURLObject::decode( aScript.copy( 8, nHashPos-8 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET ) ); - if (aBasMgrName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("."))) + if ( aBasMgrName == "." ) aLibrary = pDoc->GetTitle(); else aLibrary = SFX_APP()->GetName(); diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index a32dcb7d6c1b..9013a674f08a 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -766,7 +766,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU SfxViewFrame* pAct = m_pData->m_pViewShell->GetViewFrame() ; if ( !m_pData->m_bDisposing ) { - if ( sTargetFrameName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_beamer")) ) + if ( sTargetFrameName == "_beamer" ) { SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame(); if ( eSearchFlags & ( ::com::sun::star::frame::FrameSearchFlag::CREATE )) @@ -783,7 +783,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU return xProv->queryDispatch( aURL, sTargetFrameName, ::com::sun::star::frame::FrameSearchFlag::SELF ); } - if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:")) ) + if ( aURL.Protocol == ".uno:" ) { rtl::OUString aMasterCommand = SfxOfficeDispatch::GetMasterUnoCommand( aURL ); sal_Bool bMasterCommand( !aMasterCommand.isEmpty() ); @@ -839,7 +839,7 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU } } } - else if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("slot:")) ) + else if ( aURL.Protocol == "slot:" ) { sal_uInt16 nId = (sal_uInt16) aURL.Path.toInt32(); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index d6497d3dac79..405390b6b455 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -610,7 +610,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro const beans::PropertyValue* pVal = rProps.getConstArray(); for( sal_Int32 i = 0; i < rProps.getLength(); i++ ) { - if( pVal[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PrinterName")) ) + if ( pVal[i].Name == "PrinterName" ) { rtl::OUString aPrinterName; pVal[i].Value >>= aPrinterName; @@ -717,18 +717,18 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) TransformItems( nId, *rReq.GetArgs(), aProps, GetInterface()->GetSlot(nId) ); for ( sal_Int32 nProp=0; nProp>= bAsynchron; aProps[nProp].Value <<= (sal_Bool) (!bAsynchron); } - if ( aProps[nProp].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Silent")) ) + if ( aProps[nProp].Name == "Silent" ) { aProps[nProp]. Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MonitorVisible")); sal_Bool bPrintSilent = sal_False; -- cgit