From 8a01ee624318ac08800af89d988971114637a04e Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 14:28:18 +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 )/' \{\} \; --- basctl/source/basicide/moduldl2.cxx | 2 +- chart2/source/controller/main/ElementSelector.cxx | 2 +- .../controller/main/ShapeToolbarController.cxx | 12 +-- .../source/controller/main/UndoCommandDispatch.cxx | 2 +- chart2/source/tools/DataSourceHelper.cxx | 16 +-- chart2/source/tools/InternalDataProvider.cxx | 2 +- chart2/source/view/main/ChartView.cxx | 8 +- comphelper/source/misc/mimeconfighelper.cxx | 12 +-- cui/source/customize/cfg.cxx | 24 ++--- cui/source/customize/selector.cxx | 6 +- cui/source/options/treeopt.cxx | 10 +- dbaccess/source/core/dataaccess/ContentHelper.cxx | 16 +-- .../source/core/dataaccess/databasecontext.cxx | 2 +- .../source/core/dataaccess/databasedocument.cxx | 2 +- .../source/core/dataaccess/documentcontainer.cxx | 4 +- .../source/core/dataaccess/documentdefinition.cxx | 14 +-- dbaccess/source/core/dataaccess/intercept.cxx | 2 +- dbaccess/source/core/recovery/settingsimport.cxx | 6 +- .../source/core/recovery/subcomponentrecovery.cxx | 6 +- dbaccess/source/filter/xml/xmlServerDatabase.cxx | 4 +- dbaccess/source/filter/xml/xmlfilter.cxx | 6 +- dbaccess/source/ui/browser/sbagrid.cxx | 8 +- dbaccess/source/ui/control/opendoccontrols.cxx | 2 +- desktop/source/app/app.cxx | 2 +- desktop/source/app/cmdlineargs.cxx | 2 +- desktop/source/app/officeipcthread.cxx | 2 +- desktop/source/migration/migration.cxx | 2 +- .../source/migration/services/basicmigration.cxx | 2 +- .../migration/services/oo3extensionmigration.cxx | 4 +- .../migration/services/wordbookmigration.cxx | 2 +- embeddedobj/source/commonembedding/miscobj.cxx | 18 ++-- embeddedobj/source/commonembedding/persistence.cxx | 36 +++---- embeddedobj/source/commonembedding/xfactory.cxx | 4 +- embeddedobj/source/general/docholder.cxx | 6 +- embeddedobj/source/general/intercept.cxx | 2 +- embeddedobj/source/general/xcreator.cxx | 2 +- embeddedobj/source/msole/oleembed.cxx | 2 +- embeddedobj/source/msole/olepersist.cxx | 12 +-- embeddedobj/source/msole/ownview.cxx | 2 +- embeddedobj/source/msole/xolefactory.cxx | 2 +- embeddedobj/test/mtexecutor/mainthreadexecutor.cxx | 2 +- embedserv/source/embed/docholder.cxx | 2 +- embedserv/source/embed/intercept.cxx | 2 +- .../source/propctrlr/formgeometryhandler.cxx | 4 +- extensions/source/propctrlr/propcontroller.cxx | 2 +- extensions/source/update/check/updatecheckjob.cxx | 4 +- filter/source/filtertracer/filtertracer.cxx | 14 +-- filter/source/flash/swfdialog.cxx | 4 +- filter/source/msfilter/escherex.cxx | 30 +++--- filter/source/pdf/pdfdialog.cxx | 4 +- filter/source/pdf/pdfexport.cxx | 108 ++++++++++----------- filter/source/pdf/pdffilter.cxx | 6 +- filter/source/placeware/filter.cxx | 2 +- filter/source/svg/svgexport.cxx | 4 +- filter/source/svg/svgfilter.cxx | 4 +- filter/source/svg/svgimport.cxx | 4 +- .../source/xsltdialog/xmlfiltersettingsdialog.cxx | 34 +++---- filter/source/xsltdialog/xmlfiltertabdialog.cxx | 2 +- filter/source/xsltdialog/xmlfiltertestdialog.cxx | 12 +-- forms/source/richtext/richtextcontrol.cxx | 6 +- forms/source/richtext/specialdispatchers.cxx | 2 +- fpicker/source/office/OfficeFilePicker.cxx | 6 +- fpicker/source/office/commonpicker.cxx | 2 +- framework/source/fwe/xml/menudocumenthandler.cxx | 54 +++++------ .../source/fwi/uielement/constitemcontainer.cxx | 4 +- framework/source/fwi/uielement/itemcontainer.cxx | 4 +- .../source/fwi/uielement/rootitemcontainer.cxx | 2 +- framework/source/helper/uielementwrapperbase.cxx | 4 +- .../source/uielement/addonstoolbarwrapper.cxx | 2 +- .../source/uielement/buttontoolbarcontroller.cxx | 6 +- .../source/uielement/fontsizemenucontroller.cxx | 2 +- .../uielement/langselectionmenucontroller.cxx | 6 +- .../source/uielement/toolbarsmenucontroller.cxx | 4 +- .../source/uifactory/addonstoolboxfactory.cxx | 6 +- .../uifactory/windowcontentfactorymanager.cxx | 4 +- i18npool/source/isolang/isolang.cxx | 2 +- .../source/numberformatcode/numberformatcode.cxx | 22 ++--- linguistic/source/lngprophelp.cxx | 22 ++--- .../FlatXmlFilterDetection/filterdetect.cxx | 6 +- .../FlatXmlFilter_cpp/FlatXml.cxx | 2 +- .../complextoolbarcontrols/MyProtocolHandler.cxx | 20 ++-- oox/source/core/filterdetect.cxx | 4 +- oox/source/docprop/ooxmldocpropimport.cxx | 2 +- oox/source/drawingml/graphicshapecontext.cxx | 6 +- oox/source/dump/dffdumper.cxx | 8 +- oox/source/dump/dumperbase.cxx | 70 ++++++------- oox/source/dump/oledumper.cxx | 68 ++++++------- oox/source/dump/pptxdumper.cxx | 4 +- oox/source/export/drawingml.cxx | 10 +- oox/source/export/shapes.cxx | 6 +- oox/source/ppt/timenode.cxx | 2 +- oox/source/ppt/timenodelistcontext.cxx | 2 +- oox/source/vml/vmlformatting.cxx | 2 +- package/source/xstor/ocompinstream.cxx | 14 +-- package/source/xstor/owriteablestream.cxx | 32 +++--- package/source/xstor/xfactory.cxx | 2 +- package/source/xstor/xstorage.cxx | 30 +++--- package/source/zippackage/ZipPackage.cxx | 34 +++---- package/source/zippackage/ZipPackageFolder.cxx | 6 +- package/source/zippackage/ZipPackageStream.cxx | 24 ++--- pyuno/source/module/pyuno_runtime.cxx | 10 +- reportdesign/source/core/api/ReportDefinition.cxx | 2 +- reportdesign/source/filter/xml/xmlfilter.cxx | 8 +- sax/source/expatwrap/sax_expat.cxx | 2 +- sax/source/fastparser/facreg.cxx | 4 +- sc/source/core/tool/addinhelpid.cxx | 4 +- sc/source/ui/miscdlgs/optsolver.cxx | 2 +- sc/source/ui/unoobj/celllistsource.cxx | 2 +- sc/source/ui/unoobj/cellvaluebinding.cxx | 2 +- sc/source/ui/unoobj/dapiuno.cxx | 12 +-- sc/source/ui/unoobj/docuno.cxx | 16 +-- sc/source/ui/unoobj/fmtuno.cxx | 20 ++-- sc/source/ui/unoobj/funcuno.cxx | 4 +- sc/source/ui/unoobj/nameuno.cxx | 10 +- sc/source/ui/unoobj/styleuno.cxx | 4 +- scripting/source/stringresource/stringresource.cxx | 2 +- sd/source/core/CustomAnimationEffect.cxx | 22 ++--- sd/source/core/CustomAnimationPreset.cxx | 2 +- sd/source/core/TransitionPreset.cxx | 2 +- sd/source/filter/eppt/pptexanimations.cxx | 40 ++++---- sd/source/filter/eppt/pptx-epptooxml.cxx | 22 ++--- sd/source/filter/eppt/pptx-text.cxx | 28 +++--- sd/source/filter/html/HtmlOptionsDialog.cxx | 4 +- sd/source/filter/html/htmlex.cxx | 54 +++++------ sd/source/filter/ppt/pptinanimations.cxx | 4 +- sd/source/ui/unoidl/unomodel.cxx | 2 +- sd/source/ui/unoidl/unoobj.cxx | 8 +- sd/source/ui/view/ViewShellBase.cxx | 2 +- sd/source/ui/view/drviews5.cxx | 2 +- sd/source/ui/view/frmview.cxx | 84 ++++++++-------- sd/source/ui/view/outlview.cxx | 2 +- sdext/source/pdfimport/filterdet.cxx | 14 +-- sdext/source/pdfimport/pdfiadaptor.cxx | 16 +-- sdext/source/presenter/PresenterScreen.cxx | 4 +- sfx2/source/appl/appserv.cxx | 2 +- sfx2/source/dialog/dockwin.cxx | 2 +- sfx2/source/dialog/recfloat.cxx | 2 +- sfx2/source/dialog/templdlg.cxx | 2 +- sfx2/source/doc/docfac.cxx | 2 +- sfx2/source/doc/doctemplates.cxx | 2 +- sfx2/source/doc/graphhelp.cxx | 8 +- sfx2/source/doc/guisaveas.cxx | 16 +-- sfx2/source/doc/objstor.cxx | 4 +- sfx2/source/toolbox/tbxitem.cxx | 2 +- sfx2/source/view/viewprn.cxx | 2 +- sfx2/source/view/viewsh.cxx | 18 ++-- sfx2/workben/custompanel/ctp_factory.cxx | 2 +- svl/source/items/srchitem.cxx | 24 ++--- svtools/source/filter/jpeg/jpeg.cxx | 2 +- svtools/source/uno/toolboxcontroller.cxx | 2 +- .../customshapes/EnhancedCustomShapeEngine.cxx | 4 +- svx/source/form/fmcontrollayout.cxx | 4 +- svx/source/form/formcontrolfactory.cxx | 2 +- svx/source/form/formcontroller.cxx | 4 +- svx/source/gengal/gengal.cxx | 8 +- svx/source/tbxctrls/grafctrl.cxx | 6 +- svx/source/tbxctrls/lboxctrl.cxx | 2 +- svx/source/tbxctrls/tbunocontroller.cxx | 4 +- svx/source/unodraw/UnoGraphicExporter.cxx | 40 ++++---- svx/source/unodraw/unopage.cxx | 2 +- svx/source/unodraw/unoshap2.cxx | 18 ++-- svx/source/unogallery/unogalthemeprovider.cxx | 2 +- svx/source/xml/xmlxtimp.cxx | 12 +-- svx/source/xoutdev/xattr.cxx | 8 +- svx/source/xoutdev/xattrbmp.cxx | 6 +- svx/workben/msview/xmlconfig.cxx | 16 +-- sw/source/core/unocore/unocrsrhelper.cxx | 6 +- sw/source/filter/xml/xmlimp.cxx | 12 +-- sw/source/ui/lingu/olmenu.cxx | 2 +- sw/source/ui/uiview/view.cxx | 22 ++--- sw/source/ui/uno/SwXFilterOptions.cxx | 2 +- sw/source/ui/uno/unotxdoc.cxx | 2 +- sw/source/ui/vba/vbapagesetup.cxx | 2 +- sw/source/ui/vba/vbaselection.cxx | 2 +- toolkit/source/awt/vclxtoolkit.cxx | 8 +- toolkit/source/awt/vclxwindow1.cxx | 4 +- ucb/source/ucp/cmis/cmis_content.cxx | 34 +++---- ucb/source/ucp/ext/ucpext_content.cxx | 18 ++-- ucb/source/ucp/gio/gio_content.cxx | 48 ++++----- ucb/source/ucp/gvfs/gvfs_content.cxx | 10 +- ucb/source/ucp/odma/odma_content.cxx | 6 +- ucb/source/ucp/webdav/ContentProperties.cxx | 2 +- ucb/source/ucp/webdav/webdavcontent.cxx | 8 +- unotools/source/config/fontcfg.cxx | 8 +- unotools/source/config/xmlaccelcfg.cxx | 14 +-- vcl/aqua/source/gdi/salprn.cxx | 2 +- vcl/generic/fontmanager/fontmanager.cxx | 50 +++++----- vcl/source/app/svdata.cxx | 2 +- vcl/source/gdi/print3.cxx | 16 +-- vcl/source/window/printdlg.cxx | 48 ++++----- vcl/unx/kde/UnxCommandThread.cxx | 22 ++--- vcl/unx/kde/UnxFilePicker.cxx | 4 +- writerfilter/source/dmapper/DomainMapper.cxx | 4 +- writerfilter/source/dmapper/MeasureHandler.cxx | 2 +- writerfilter/source/dmapper/StyleSheetTable.cxx | 2 +- .../source/filter/WriterFilterDetection.cxx | 10 +- .../source/wpdimp/WordPerfectImportFilter.cxx | 2 +- xmloff/source/chart/SchXMLPlotAreaContext.cxx | 4 +- xmloff/source/core/DocumentSettingsContext.cxx | 4 +- xmloff/source/core/xmlexp.cxx | 4 +- xmloff/source/draw/animationimport.cxx | 4 +- xmloff/source/forms/elementimport.cxx | 2 +- xmloff/source/style/xmlstyle.cxx | 2 +- xmlscript/source/xmlflat_imexp/xmlbas_import.cxx | 14 +-- 204 files changed, 1041 insertions(+), 1041 deletions(-) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 913de2d326e5..d0fe4085c401 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -948,7 +948,7 @@ void LibPage::InsertLib() if ( bReplace ) { // check, if the library is the Standard library - if ( aLibName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) ) + if ( aLibName == "Standard" ) { ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_REPLACESTDLIB ) ) ).Execute(); continue; diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx index 71e84b3ace7b..cbd4928f098e 100644 --- a/chart2/source/controller/main/ElementSelector.cxx +++ b/chart2/source/controller/main/ElementSelector.cxx @@ -307,7 +307,7 @@ void SAL_CALL ElementSelectorToolbarController::statusChanged( const frame::Feat if( m_apSelectorListBox.get() ) { SolarMutexGuard aSolarMutexGuard; - if( rEvent.FeatureURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ChartElementSelector" ) ) ) + if ( rEvent.FeatureURL.Path == "ChartElementSelector" ) { Reference< frame::XController > xChartController; rEvent.State >>= xChartController; diff --git a/chart2/source/controller/main/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx index 565eaf0f1bfa..1a655fa23fc2 100644 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ b/chart2/source/controller/main/ShapeToolbarController.cxx @@ -135,37 +135,37 @@ void ShapeToolbarController::initialize( const Sequence< uno::Any >& rArguments break; } } - if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:BasicShapes" ) ) ) + if ( m_aCommandURL == ".uno:BasicShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:BasicShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_BASIC; m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) ); } - else if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SymbolShapes" ) ) ) + else if ( m_aCommandURL == ".uno:SymbolShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SymbolShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_SYMBOL; m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) ); } - else if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:ArrowShapes" ) ) ) + else if ( m_aCommandURL == ".uno:ArrowShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ArrowShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_ARROW; m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox) ); } - else if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:FlowChartShapes" ) ) ) + else if ( m_aCommandURL == ".uno:FlowChartShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FlowChartShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_FLOWCHART; m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) ); } - else if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:CalloutShapes" ) ) ) + else if ( m_aCommandURL == ".uno:CalloutShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CalloutShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_CALLOUT; m_pToolbarController = TToolbarHelper::createFromQuery( new SvxTbxCtlCustomShapes( m_nSlotId, m_nToolBoxId, *pToolBox ) ); } - else if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:StarShapes" ) ) ) + else if ( m_aCommandURL == ".uno:StarShapes" ) { m_aStates.insert( TCommandState::value_type( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:StarShapes" ) ), sal_True ) ); m_nSlotId = SID_DRAWTBX_CS_STAR; diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx index f1dbf032ea3c..4c29848813ed 100644 --- a/chart2/source/controller/main/UndoCommandDispatch.cxx +++ b/chart2/source/controller/main/UndoCommandDispatch.cxx @@ -111,7 +111,7 @@ void SAL_CALL UndoCommandDispatch::dispatch( SolarMutexGuard aSolarGuard; try { - if( URL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" ))) + if ( URL.Path == "Undo" ) m_xUndoManager->undo(); else m_xUndoManager->redo(); diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx index ac11380fa76b..db49b7d20c43 100644 --- a/chart2/source/tools/DataSourceHelper.cxx +++ b/chart2/source/tools/DataSourceHelper.cxx @@ -201,25 +201,25 @@ void DataSourceHelper::readArguments( const uno::Sequence< beans::PropertyValue for(sal_Int32 i=0; i>= eRowSource ) bUseColumns = (eRowSource==::com::sun::star::chart::ChartDataRowSource_COLUMNS); } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FirstCellAsLabel" ) )) + else if ( aProperty.Name == "FirstCellAsLabel" ) { aProperty.Value >>= bFirstCellAsLabel; } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HasCategories" ) )) + else if ( aProperty.Name == "HasCategories" ) { aProperty.Value >>= bHasCategories; } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CellRangeRepresentation" ) )) + else if ( aProperty.Name == "CellRangeRepresentation" ) { aProperty.Value >>= rRangeRepresentation; } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SequenceMapping" ) )) + else if ( aProperty.Name == "SequenceMapping" ) { aProperty.Value >>= rSequenceMapping; } @@ -383,19 +383,19 @@ bool DataSourceHelper::allArgumentsForRectRangeDetected( for(sal_Int32 i=0; i(0)))); } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FirstCellAsLabel" ) )) + else if ( aProperty.Name == "FirstCellAsLabel" ) { bHasFirstCellAsLabel = (aProperty.Value.hasValue() && aProperty.Value.isExtractableTo(::getBooleanCppuType())); } - else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CellRangeRepresentation" ) )) + else if ( aProperty.Name == "CellRangeRepresentation" ) { ::rtl::OUString aRange; bHasCellRangeRepresentation = diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index 09dfd0508f4c..48e7cb671f80 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -767,7 +767,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32(); return lcl_createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::valueOf( nIndex )); } - else if( aRangeRepresentation.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "last" ))) + else if ( aRangeRepresentation == "last" ) { sal_Int32 nIndex = (m_bDataInColumns ? m_aInternalData.getColumnCount() diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index d8f518790176..250332f08b78 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2883,13 +2883,13 @@ void SAL_CALL ChartView::setPropertyValue( const ::rtl::OUString& rPropertyName beans::PropertyValue* pDataValues = aZoomFactors.getArray(); while( nFilterArgs-- ) { - if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleXNumerator" ) ) ) + if ( pDataValues->Name == "ScaleXNumerator" ) pDataValues->Value >>= m_nScaleXNumerator; - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleXDenominator" ) ) ) + else if ( pDataValues->Name == "ScaleXDenominator" ) pDataValues->Value >>= m_nScaleXDenominator; - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleYNumerator" ) ) ) + else if ( pDataValues->Name == "ScaleYNumerator" ) pDataValues->Value >>= m_nScaleYNumerator; - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleYDenominator" ) ) ) + else if ( pDataValues->Name == "ScaleYDenominator" ) pDataValues->Value >>= m_nScaleYDenominator; pDataValues++; diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 81ef3ba03215..dad64b31ff1b 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -217,7 +217,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFacto if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) + if ( aFilterData[nInd].Name == "DocumentService" ) aFilterData[nInd].Value >>= aDocServiceName; } } @@ -322,7 +322,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi { aResult[nInd + 1].Name = aObjPropNames[nInd]; - if ( aObjPropNames[nInd].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectVerbs" ) ) ) + if ( aObjPropNames[nInd] == "ObjectVerbs" ) { uno::Sequence< ::rtl::OUString > aVerbShortcuts; if ( xObjectProps->getByName( aObjPropNames[nInd] ) >>= aVerbShortcuts ) @@ -586,7 +586,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu ::rtl::OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aMediaDescr.getLength(); nInd++ ) - if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + if ( aMediaDescr[nInd].Name == "FilterName" ) aMediaDescr[nInd].Value >>= aFilterName; if ( aFilterName.isEmpty() ) @@ -608,7 +608,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu // get FilterName for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ ) - if ( aTempMD[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + if ( aTempMD[nInd].Name == "FilterName" ) aTempMD[nInd].Value >>= aFilterName; if ( !aFilterName.isEmpty() ) @@ -650,7 +650,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { ::rtl::OUString aDocName; for ( sal_Int32 nInd = 0; nInd < aObject.getLength(); nInd++ ) - if ( aObject[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentServiceName" ) ) ) + if ( aObject[nInd].Name == "ObjectDocumentServiceName" ) { aObject[nInd].Value >>= aDocName; break; @@ -661,7 +661,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu sal_Bool bNeedsAddition = sal_True; for ( sal_Int32 nMedInd = 0; nMedInd < aMediaDescr.getLength(); nMedInd++ ) - if ( aMediaDescr[nMedInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) + if ( aMediaDescr[nMedInd].Name == "DocumentService" ) { aMediaDescr[nMedInd].Value <<= aDocName; bNeedsAddition = sal_False; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index a941f4f145d7..cf277504688b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -418,27 +418,27 @@ OUString GetModuleName( const OUString& aModuleId ) if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) || aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) + else if ( aModuleId == "com.sun.star.text.WebDocument" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer/Web")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) + else if ( aModuleId == "com.sun.star.drawing.DrawingDocument" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Draw")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) + else if ( aModuleId == "com.sun.star.presentation.PresentationDocument" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Impress")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) + else if ( aModuleId == "com.sun.star.sheet.SpreadsheetDocument" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Calc")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.script.BasicIDE" ) ) ) + else if ( aModuleId == "com.sun.star.script.BasicIDE" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Basic")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.formula.FormulaProperties" ) ) ) + else if ( aModuleId == "com.sun.star.formula.FormulaProperties" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Math")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) ) + else if ( aModuleId == "com.sun.star.sdb.RelationDesign" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Relation Design")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.QueryDesign" ) ) ) + else if ( aModuleId == "com.sun.star.sdb.QueryDesign" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Query Design")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.TableDesign" ) ) ) + else if ( aModuleId == "com.sun.star.sdb.TableDesign" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Table Design")); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.DataSourceBrowser" ) ) ) + else if ( aModuleId == "com.sun.star.sdb.DataSourceBrowser" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Data Source Browser" )); - else if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.DatabaseDocument" ) ) ) + else if ( aModuleId == "com.sun.star.sdb.DatabaseDocument" ) return OUString(RTL_CONSTASCII_USTRINGPARAM("Database" )); return ::rtl::OUString(); @@ -463,7 +463,7 @@ OUString GetUIModuleName( const OUString& aModuleId, const uno::Reference< css:: OUString aUIName; for ( sal_Int32 i = 0; i < aSeq.getLength(); ++i ) { - if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ooSetupFactoryUIName" ) )) + if ( aSeq[i].Name == "ooSetupFactoryUIName" ) { aSeq[i].Value >>= aModuleUIName; break; diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 4b6159fdcf60..de928ddc37d1 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -345,12 +345,12 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows // then the user & share are added at depth=1 ) { - if ( sUIName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "user" ) ) ) + if ( sUIName == "user" ) { sUIName = m_sMyMacros; bIsRootNode = sal_True; } - else if ( sUIName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "share" ) ) ) + else if ( sUIName == "share" ) { sUIName = m_sProdMacros; bIsRootNode = sal_True; @@ -743,7 +743,7 @@ void SvxConfigGroupListBox_Impl::GroupSelected() { for ( sal_Int32 k = 0; k < aPropSeq.getLength(); ++k ) { - if ( aPropSeq[k].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) ) + if ( aPropSeq[k].Name == "Name" ) { aPropSeq[k].Value >>= aLabel; break; diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index ed19976d0f79..72a41cef76a8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1699,7 +1699,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) SfxModule* pSwMod = (*(SfxModule**) GetAppData(SHL_WRITER)); if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) ) { - if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) + if ( aFactory == "com.sun.star.text.WebDocument" ) setGroupName( C2U("WriterWeb"), rTextArray.GetString(0) ); else setGroupName( C2U("Writer"), rTextArray.GetString(0) ); @@ -1740,7 +1740,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Calc options if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) ) { - if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) + if ( aFactory == "com.sun.star.sheet.SpreadsheetDocument" ) { if ( !lcl_isOptionHidden( SID_SC_EDITOPTIONS, aOptionsDlgOpt ) ) { @@ -1767,7 +1767,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) SfxModule* pSdMod = ( *( SfxModule** ) GetAppData( SHL_DRAW ) ); if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) ) { - if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) + if ( aFactory == "com.sun.star.presentation.PresentationDocument" ) { if ( !lcl_isOptionHidden( SID_SD_EDITOPTIONS, aOptionsDlgOpt ) ) { @@ -1791,7 +1791,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Draw options if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) ) { - if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) )) + if ( aFactory == "com.sun.star.drawing.DrawingDocument" ) { if ( !lcl_isOptionHidden( SID_SD_GRAPHIC_OPTIONS, aOptionsDlgOpt ) ) { @@ -1815,7 +1815,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame ) // Math options if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) ) { - if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.formula.FormulaProperties" ) )) + if ( aFactory == "com.sun.star.formula.FormulaProperties" ) { if ( !lcl_isOptionHidden( SID_SM_EDITOPTIONS, aOptionsDlgOpt ) ) { diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 975b61283d8b..608334026190 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -357,7 +357,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue { const PropertyValue& rValue = pValues[ n ]; - if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + if ( rValue.Name == "ContentType" ) { // Read-only property! aRet[ n ] <<= IllegalAccessException( @@ -366,7 +366,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue ), static_cast< cppu::OWeakObject * >( this ) ); } - else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + else if ( rValue.Name == "IsDocument" ) { // Read-only property! aRet[ n ] <<= IllegalAccessException( @@ -375,7 +375,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue ), static_cast< cppu::OWeakObject * >( this ) ); } - else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + else if ( rValue.Name == "IsFolder" ) { // Read-only property! aRet[ n ] <<= IllegalAccessException( @@ -384,7 +384,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue ), static_cast< cppu::OWeakObject * >( this ) ); } - else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rValue.Name == "Title" ) { rtl::OUString aNewValue; if ( rValue.Value >>= aNewValue ) @@ -462,19 +462,19 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& // Process Core properties. - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + if ( rProp.Name == "ContentType" ) { xRow->appendString ( rProp, getContentType() ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rProp.Name == "Title" ) { xRow->appendString ( rProp, m_pImpl->m_aProps.aTitle ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + else if ( rProp.Name == "IsDocument" ) { xRow->appendBoolean( rProp, m_pImpl->m_aProps.bIsDocument ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + else if ( rProp.Name == "IsFolder" ) { xRow->appendBoolean( rProp, m_pImpl->m_aProps.bIsFolder ); } diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 74e5fc272e8e..48f12121ad13 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -411,7 +411,7 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat const PropertyValue* pPropsEnd = rSessionPersistentProps.getConstArray() + rSessionPersistentProps.getLength(); for ( ; pProp != pPropsEnd; ++pProp ) { - if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AuthFailedPassword" ) ) ) + if ( pProp->Name == "AuthFailedPassword" ) { OSL_VERIFY( pProp->Value >>= sAuthFailedPassword ); } diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 72f4eb94864d..27dbacc5419d 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2060,7 +2060,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons ::comphelper::NamedValueCollection aInitArgs( _Arguments ); aInitArgs.put( "Frame", _Frame ); - if ( _ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) ) + if ( _ViewName == "Preview" ) aInitArgs.put( "Preview", sal_Bool( sal_True ) ); Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW ); xInitController->initialize( aInitArgs.getWrappedPropertyValues() ); diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index d34a125e4e8f..85c615de2181 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -454,7 +454,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com // Unreachable } } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) ) + else if ( aCommand.Name == "insert" ) { ////////////////////////////////////////////////////////////////// // insert @@ -473,7 +473,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com // Unreachable } } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) ) + else if ( aCommand.Name == "delete" ) { ////////////////////////////////////////////////////////////////// // delete diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 5fafb3df4d0d..f8393f17ebed 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -851,7 +851,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons if ( lcl_extractOpenMode( pIter->Value, nOpenMode ) ) continue; - if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MacroExecutionMode" ) ) ) + if ( pIter->Name == "MacroExecutionMode" ) { sal_Int16 nMacroExecMode( !aDocumentMacroMode ? MacroExecMode::USE_CONFIG : *aDocumentMacroMode ); OSL_VERIFY( pIter->Value >>= nMacroExecMode ); @@ -1054,7 +1054,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co if ( m_bInExecute ) return aRet; - if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "copyTo" ) ) ) + if ( aCommand.Name == "copyTo" ) { Sequence aIni; aCommand.Argument >>= aIni; @@ -1076,11 +1076,11 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) ) + else if ( aCommand.Name == "preview" ) { onCommandPreview(aRet); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) ) + else if ( aCommand.Name == "insert" ) { Sequence aIni; aCommand.Argument >>= aIni; @@ -1105,7 +1105,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co { onCommandGetDocumentProperties( aRet ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) ) + else if ( aCommand.Name == "delete" ) { ////////////////////////////////////////////////////////////////// // delete @@ -1130,11 +1130,11 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co { aRet <<= impl_close_throw(); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "show" ) ) ) + else if ( aCommand.Name == "show" ) { impl_showOrHideComponent_throw( true ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hide" ) ) ) + else if ( aCommand.Name == "hide" ) { impl_showOrHideComponent_throw( false ); } diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx index 1ec11d02e643..9ad0727d4905 100644 --- a/dbaccess/source/core/dataaccess/intercept.cxx +++ b/dbaccess/source/core/dataaccess/intercept.cxx @@ -158,7 +158,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence 0 @@ -273,9 +273,9 @@ namespace dbaccess ::rtl::OUString sLocalName; split( i_rElementName, sNamespace, sLocalName ); - if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item-set" ) ) ) + if ( sLocalName == "config-item-set" ) return new ConfigItemSetImport( m_aChildSettings ); - if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item" ) ) ) + if ( sLocalName == "config-item" ) return new ConfigItemImport( m_aChildSettings ); #if OSL_DEBUG_LEVEL > 0 diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index 0f0519510326..a8d28960fba0 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -334,7 +334,7 @@ namespace dbaccess if ( m_aStates.empty() ) { - if ( i_Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "office:settings" ) ) ) + if ( i_Name == "office:settings" ) { pNewState = new OfficeSettingsImport( m_aSettings ); } @@ -503,7 +503,7 @@ namespace dbaccess break; case REPORT: - if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.report.ReportDefinition" ) ) ) + if ( sModuleIdentifier == "com.sun.star.report.ReportDefinition" ) { // it's an SRB report designer m_aCompDesc.bForEditing = true; @@ -516,7 +516,7 @@ namespace dbaccess break; default: - if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) ) + if ( sModuleIdentifier == "com.sun.star.sdb.RelationDesign" ) { m_eType = RELATION_DESIGN; m_aCompDesc.bForEditing = true; diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index b5208f4406a6..b2dfb3339491 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -109,7 +109,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, sURL.append(sDatabaseName); } } - else if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "jdbc:oracle:thin" ) ) ) + else if ( sType == "jdbc:oracle:thin" ) { sURL.appendAscii("jdbc:oracle:thin:@"); sURL.append(sHostName); @@ -124,7 +124,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, sURL.append(sDatabaseName); } } - else if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:address:ldap" ) ) ) + else if ( sType == "sdbc:address:ldap" ) { sURL.appendAscii("sdbc:address:ldap:"); sURL.append(sHostName); diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 613506907260..aa7825e8c1b2 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -555,11 +555,11 @@ void ODBFilter::SetViewSettings(const Sequence& aViewProps) const PropertyValue *pEnd = pIter + aViewProps.getLength(); for (; pIter != pEnd; ++pIter) { - if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Queries" ) ) ) + if ( pIter->Name == "Queries" ) { fillPropertyMap(pIter->Value,m_aQuerySettings); } - else if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Tables" ) ) ) + else if ( pIter->Name == "Tables" ) { fillPropertyMap(pIter->Value,m_aTablesSettings); } @@ -572,7 +572,7 @@ void ODBFilter::SetConfigurationSettings(const Sequence& aConfigP const PropertyValue *pEnd = pIter + aConfigProps.getLength(); for (; pIter != pEnd; ++pIter) { - if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "layout-settings" ) ) ) + if ( pIter->Name == "layout-settings" ) { Sequence aWindows; pIter->Value >>= aWindows; diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 534a1a8d4ba5..63178832aa47 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -447,13 +447,13 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL ) { DispatchType eURLType = dtUnknown; - if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/BrowserAttribs" ) ) ) + if ( _rURL.Complete == ".uno:GridSlots/BrowserAttribs" ) eURLType = dtBrowserAttribs; - else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/RowHeight" ) ) ) + else if ( _rURL.Complete == ".uno:GridSlots/RowHeight" ) eURLType = dtRowHeight; - else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnAttribs" ) ) ) + else if ( _rURL.Complete == ".uno:GridSlots/ColumnAttribs" ) eURLType = dtColumnAttribs; - else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnWidth" ) ) ) + else if ( _rURL.Complete == ".uno:GridSlots/ColumnWidth" ) eURLType = dtColumnWidth; return eURLType; } diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 71fd695ffc04..12ca3060a9c6 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -105,7 +105,7 @@ namespace dbaui for ( sal_Int32 i=0; i>= sLabel; break; diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 0a448c16079b..6df1561c2c84 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2425,7 +2425,7 @@ void Desktop::OpenClients() OUString aPreloadData; aPerfTuneIniFile.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "QuickstartPreloadConfiguration" )), aPreloadData, aDefault ); - if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) )) + if ( aPreloadData == "1" ) { if ( rArgs.IsWriter() || rArgs.IsCalc() || diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 037c716308e8..e62315b08780 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -480,7 +480,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& #endif SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False ); } - else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "quickstart=no" ))) + else if ( oArg == "quickstart=no" ) { SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_True ); SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False ); diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 8ca6083a815d..58daf1f5189c 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -478,7 +478,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread() OUString aUserInstallPathHashCode; - if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) )) + if ( aPreloadData == "1" ) { sal_Char szBuffer[32]; sprintf( szBuffer, "%d", SUPD ); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 496d23946fef..d0efd587ad81 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -107,7 +107,7 @@ static const char XDG_CONFIG_PART[] = "/.config"; { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) + if ( aPropSeq[i].Name == "Label" ) { aPropSeq[i].Value >>= aStr; break; diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx index 1ac73ac62ead..a2a7b9b5dd77 100644 --- a/desktop/source/migration/services/basicmigration.cxx +++ b/desktop/source/migration/services/basicmigration.cxx @@ -209,7 +209,7 @@ namespace migration { beans::NamedValue aValue; *pIter >>= aValue; - if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) ) + if ( aValue.Name == "UserData" ) { if ( !(aValue.Value >>= m_sSourceDir) ) { diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 563ed1489d8a..64b4a6e12d1b 100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -413,14 +413,14 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro { beans::NamedValue aValue; *pIter >>= aValue; - if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) ) + if ( aValue.Name == "UserData" ) { if ( !(aValue.Value >>= m_sSourceDir) ) { OSL_FAIL( "ExtensionMigration::initialize: argument UserData has wrong type!" ); } } - else if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExtensionBlackList" ) ) ) + else if ( aValue.Name == "ExtensionBlackList" ) { Sequence< ::rtl::OUString > aBlackList; if ( (aValue.Value >>= aBlackList ) && ( aBlackList.getLength() > 0 )) diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 3a30754f1f0a..2d274d18f5a6 100644 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -277,7 +277,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile ) { beans::NamedValue aValue; *pIter >>= aValue; - if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) ) + if ( aValue.Name == "UserData" ) { if ( !(aValue.Value >>= m_sSourceDir) ) { diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 475fd87c94ee..ae8f302051c8 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -114,15 +114,15 @@ void OCommonEmbeddedObject::CommonInit_Impl( const uno::Sequence< beans::NamedVa // TODO/LATER: in future UI names can be also provided here for ( sal_Int32 nInd = 0; nInd < aObjectProps.getLength(); nInd++ ) { - if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ClassID" ) ) ) + if ( aObjectProps[nInd].Name == "ClassID" ) aObjectProps[nInd].Value >>= m_aClassID; - else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentServiceName" ) ) ) + else if ( aObjectProps[nInd].Name == "ObjectDocumentServiceName" ) aObjectProps[nInd].Value >>= m_aDocServiceName; - else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentFilterName" ) ) ) + else if ( aObjectProps[nInd].Name == "ObjectDocumentFilterName" ) aObjectProps[nInd].Value >>= m_aPresetFilterName; - else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectMiscStatus" ) ) ) + else if ( aObjectProps[nInd].Name == "ObjectMiscStatus" ) aObjectProps[nInd].Value >>= m_nMiscStatus; - else if ( aObjectProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectVerbs" ) ) ) + else if ( aObjectProps[nInd].Name == "ObjectVerbs" ) aObjectProps[nInd].Value >>= m_aObjectVerbs; } @@ -232,9 +232,9 @@ void OCommonEmbeddedObject::LinkInit_Impl( // setPersistance has no effect on own links, so the complete initialization must be done here for ( sal_Int32 nInd = 0; nInd < aMediaDescr.getLength(); nInd++ ) - if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( aMediaDescr[nInd].Name == "URL" ) aMediaDescr[nInd].Value >>= m_aLinkURL; - else if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + else if ( aMediaDescr[nInd].Name == "FilterName" ) aMediaDescr[nInd].Value >>= m_aLinkFilterName; OSL_ENSURE( m_aLinkURL.getLength() && m_aLinkFilterName.getLength(), "Filter and URL must be provided!\n" ); @@ -251,12 +251,12 @@ void OCommonEmbeddedObject::LinkInit_Impl( uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; for ( sal_Int32 nObjInd = 0; nObjInd < aObjectDescr.getLength(); nObjInd++ ) - if ( aObjectDescr[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) + if ( aObjectDescr[nObjInd].Name == "OutplaceDispatchInterceptor" ) { aObjectDescr[nObjInd].Value >>= xDispatchInterceptor; break; } - else if ( aObjectDescr[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Parent" ) ) ) + else if ( aObjectDescr[nObjInd].Name == "Parent" ) { aObjectDescr[nObjInd].Value >>= m_xParent; } diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 654e221ee892..526688a6c521 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -110,7 +110,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: for ( sal_Int32 nInd = 0; nInd < nLength; nInd++ ) { aResult[nInd].Name = aOrig[nInd].Name; - if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AsTemplate" ) ) ) + if ( aResult[nInd].Name == "AsTemplate" ) { aResult[nInd].Value <<= sal_True; bAsTemplateSet = sal_True; @@ -1013,32 +1013,32 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( m_bReadOnly = sal_False; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) + if ( lArguments[nInd].Name == "ReadOnly" ) lArguments[nInd].Value >>= m_bReadOnly; // TODO: use lObjArgs for StoreVisualReplacement for ( sal_Int32 nObjInd = 0; nObjInd < lObjArgs.getLength(); nObjInd++ ) - if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) + if ( lObjArgs[nObjInd].Name == "OutplaceDispatchInterceptor" ) { uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; if ( lObjArgs[nObjInd].Value >>= xDispatchInterceptor ) m_pDocHolder->SetOutplaceDispatchInterceptor( xDispatchInterceptor ); } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DefaultParentBaseURL" ) ) ) + else if ( lObjArgs[nObjInd].Name == "DefaultParentBaseURL" ) { lObjArgs[nObjInd].Value >>= m_aDefaultParentBaseURL; } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Parent" ) ) ) + else if ( lObjArgs[nObjInd].Name == "Parent" ) { lObjArgs[nObjInd].Value >>= m_xParent; } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IndividualMiscStatus" ) ) ) + else if ( lObjArgs[nObjInd].Name == "IndividualMiscStatus" ) { sal_Int64 nMiscStatus=0; lObjArgs[nObjInd].Value >>= nMiscStatus; m_nMiscStatus |= nMiscStatus; } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CloneFrom" ) ) ) + else if ( lObjArgs[nObjInd].Name == "CloneFrom" ) { uno::Reference < embed::XEmbeddedObject > xObj; lObjArgs[nObjInd].Value >>= xObj; @@ -1049,7 +1049,7 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( m_nClonedMapUnit = xObj->getMapUnit( embed::Aspects::MSOLE_CONTENT ); } } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceFrameProperties" ) ) ) + else if ( lObjArgs[nObjInd].Name == "OutplaceFrameProperties" ) { uno::Sequence< uno::Any > aOutFrameProps; uno::Sequence< beans::NamedValue > aOutFramePropsTyped; @@ -1073,19 +1073,19 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( else OSL_FAIL( "OCommonEmbeddedObject::setPersistentEntry: illegal type for argument 'OutplaceFrameProperties'!" ); } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModuleName" ) ) ) + else if ( lObjArgs[nObjInd].Name == "ModuleName" ) { lObjArgs[nObjInd].Value >>= m_aModuleName; } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EmbeddedScriptSupport" ) ) ) + else if ( lObjArgs[nObjInd].Name == "EmbeddedScriptSupport" ) { OSL_VERIFY( lObjArgs[nObjInd].Value >>= m_bEmbeddedScriptSupport ); } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentRecoverySupport" ) ) ) + else if ( lObjArgs[nObjInd].Name == "DocumentRecoverySupport" ) { OSL_VERIFY( lObjArgs[nObjInd].Value >>= m_bDocumentRecoverySupport ); } - else if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RecoveryStorage" ) ) ) + else if ( lObjArgs[nObjInd].Name == "RecoveryStorage" ) { OSL_VERIFY( lObjArgs[nObjInd].Value >>= m_xRecoveryStorage ); } @@ -1219,7 +1219,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed:: for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { // StoreVisualReplacement and VisualReplacement args have no sence here - if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) + if ( lObjArgs[nInd].Name == "CanTryOptimization" ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1352,7 +1352,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { // StoreVisualReplacement and VisualReplacement args have no sence here - if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) + if ( lObjArgs[nInd].Name == "CanTryOptimization" ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1703,13 +1703,13 @@ void SAL_CALL OCommonEmbeddedObject::reload( ::rtl::OUString aNewLinkFilter; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) { - if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( lArguments[nInd].Name == "URL" ) { // the new URL lArguments[nInd].Value >>= m_aLinkURL; m_aLinkFilterName = ::rtl::OUString(); } - else if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + else if ( lArguments[nInd].Name == "FilterName" ) { lArguments[nInd].Value >>= aNewLinkFilter; m_aLinkFilterName = ::rtl::OUString(); @@ -1746,7 +1746,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( // TODO: use lObjArgs for StoreVisualReplacement for ( sal_Int32 nObjInd = 0; nObjInd < lObjArgs.getLength(); nObjInd++ ) - if ( lObjArgs[nObjInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutplaceDispatchInterceptor" ) ) ) + if ( lObjArgs[nObjInd].Name == "OutplaceDispatchInterceptor" ) { uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor; if ( lObjArgs[nObjInd].Value >>= xDispatchInterceptor ) @@ -1762,7 +1762,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( m_bReadOnly = sal_False; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) + if ( lArguments[nInd].Name == "ReadOnly" ) lArguments[nInd].Value >>= m_bReadOnly; if ( bOldReadOnlyValue != m_bReadOnly && !m_bIsLink ) diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 56662e95fa67..3bef21d016fa 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -356,7 +356,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta // check if there is URL, URL must exist ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( aTempMedDescr[nInd].Name == "URL" ) aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) @@ -422,7 +422,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( aTempMedDescr[nInd].Name == "URL" ) aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 0d4a43ee636b..b8930efede2d 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -617,7 +617,7 @@ void DocumentHolder::FindConnectPoints( xMenu->getByIndex( nInd ) >>= aProps; rtl::OUString aCommand; for ( sal_Int32 nSeqInd = 0; nSeqInd < aProps.getLength(); nSeqInd++ ) - if ( aProps[nSeqInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandURL" ) ) ) + if ( aProps[nSeqInd].Name == "CommandURL" ) { aProps[nSeqInd].Value >>= aCommand; break; @@ -626,9 +626,9 @@ void DocumentHolder::FindConnectPoints( if ( aCommand.isEmpty() ) throw uno::RuntimeException(); - if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:PickList" ) ) ) + if ( aCommand == ".uno:PickList" ) nConnectPoints[0] = nInd; - else if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:WindowList" ) ) ) + else if ( aCommand == ".uno:WindowList" ) nConnectPoints[1] = nInd; } } diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index f892e3b35493..8c9be5039b7e 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -170,7 +170,7 @@ Interceptor::dispatch( while( nInd < aNewArgs.getLength() ) { - if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) ) + if ( aNewArgs[nInd].Name == "SaveTo" ) { aNewArgs[nInd].Value <<= sal_True; break; diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 607fe2260c8b..1a4a5b2f54da 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -367,7 +367,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta // check if there is URL, URL must exist ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ ) - if ( aTempMedDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( aTempMedDescr[nInd].Name == "URL" ) aTempMedDescr[nInd].Value >>= aURL; if ( aURL.isEmpty() ) diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 04d20caf7b4f..268b3efa51d4 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -293,7 +293,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) + if ( aFilterData[nInd].Name == "DocumentService" ) aFilterData[nInd].Value >>= aDocServiceName; } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 196dba92a883..6840fe6cddcc 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -1130,11 +1130,11 @@ void OleEmbeddedObject::StoreToLocation_Impl( uno::Reference< io::XStream > xCachedVisualRepresentation; for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { - if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StoreVisualReplacement" ) ) ) + if ( lObjArgs[nInd].Name == "StoreVisualReplacement" ) lObjArgs[nInd].Value >>= bStoreVis; - else if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisualReplacement" ) ) ) + else if ( lObjArgs[nInd].Name == "VisualReplacement" ) lObjArgs[nInd].Value >>= xCachedVisualRepresentation; - else if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CanTryOptimization" ) ) ) + else if ( lObjArgs[nInd].Name == "CanTryOptimization" ) lObjArgs[nInd].Value >>= bTryOptimization; } @@ -1391,7 +1391,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( m_bReadOnly = sal_False; sal_Int32 nInd = 0; for ( nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReadOnly" ) ) ) + if ( lArguments[nInd].Name == "ReadOnly" ) lArguments[nInd].Value >>= m_bReadOnly; #ifdef WNT @@ -1401,7 +1401,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( SwitchOwnPersistence( xStorage, sEntName ); for ( nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) - if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StoreVisualReplacement" ) ) ) + if ( lObjArgs[nInd].Name == "StoreVisualReplacement" ) lObjArgs[nInd].Value >>= m_bStoreVisRepl; #ifdef WNT @@ -1469,7 +1469,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( // use URL ( may be content or stream later ) from MediaDescriptor to initialize object ::rtl::OUString aURL; for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) - if ( lArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( lArguments[nInd].Name == "URL" ) lArguments[nInd].Value >>= aURL; if ( aURL.isEmpty() ) diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 91381263134e..063bb0d5a572 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -239,7 +239,7 @@ sal_Bool OwnView_Impl::CreateModel( sal_Bool bUseNative ) ::rtl::OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + if ( aArgs[nInd].Name == "FilterName" ) aArgs[nInd].Value >>= aFilterName; if ( aFilterName.isEmpty() && !aTypeName.isEmpty() ) diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 8fac58e32012..27cd1017aebc 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -121,7 +121,7 @@ uno::Reference< uno::XInterface > SAL_CALL OleEmbeddedObjectFactory::createInsta for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) { - if ( lObjArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CloneFrom" ) ) ) + if ( lObjArgs[nInd].Name == "CloneFrom" ) { try { diff --git a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx index a462b2eed162..952eca3cae67 100644 --- a/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx +++ b/embeddedobj/test/mtexecutor/mainthreadexecutor.cxx @@ -65,7 +65,7 @@ uno::Any SAL_CALL MainThreadExecutor::execute( const uno::Sequence< beans::Named sal_Int32 nValuesSize = 0; for ( sal_Int32 nInd = 0; nInd < aArguments.getLength(); nInd++ ) - if ( aArguments[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "JobToExecute" ) ) ) + if ( aArguments[nInd].Name == "JobToExecute" ) aArguments[nInd].Value >>= xJob; else { diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index d6b3e23ba954..67afa0324809 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -1158,7 +1158,7 @@ HRESULT DocumentHolder::GetDocumentBorder( RECT *pRect ) { uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentBorder" ) ) ) + if ( aArgs[nInd].Name == "DocumentBorder" ) { uno::Sequence< sal_Int32 > aRect; if ( ( aArgs[nInd].Value >>= aRect ) && aRect.getLength() == 4 ) diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index f620857c44cf..964096e63744 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/intercept.cxx @@ -213,7 +213,7 @@ Interceptor::dispatch( while( nInd < aNewArgs.getLength() ) { - if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) ) + if ( aNewArgs[nInd].Name == "SaveTo" ) { aNewArgs[nInd].Value <<= sal_True; break; diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 89b1486a19dd..2fc5f763a5f1 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -740,13 +740,13 @@ namespace pcr ::std::vector< EventTranslation > aEventTranslations; aEventTranslations.reserve(2); - if ( _event.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Position" ) ) ) + if ( _event.PropertyName == "Position" ) { AwtPoint aPos = m_xShape->getPosition(); aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONX, makeAny( aPos.X ) ) ); aEventTranslations.push_back( EventTranslation( PROPERTY_POSITIONY, makeAny( aPos.Y ) ) ); } - else if ( _event.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( _event.PropertyName == "Size" ) { AwtSize aSize = m_xShape->getSize(); aEventTranslations.push_back( EventTranslation( PROPERTY_WIDTH, makeAny( aSize.Width ) ) ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 4f625778e384..0b4663566b4a 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -746,7 +746,7 @@ namespace pcr { if ( _rEvent.Source == m_xModel ) { - if ( _rEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) + if ( _rEvent.PropertyName == "IsReadOnly" ) impl_updateReadOnlyView_nothrow(); return; } diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx index 4b912fad19e3..2b7aa0a1dc9b 100644 --- a/extensions/source/update/check/updatecheckjob.cxx +++ b/extensions/source/update/check/updatecheckjob.cxx @@ -199,14 +199,14 @@ UpdateCheckJob::execute(const uno::Sequence& namedValues) { for ( sal_Int32 n=namedValues.getLength(); n-- > 0; ) { - if ( namedValues[ n ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DynamicData" ) ) ) + if ( namedValues[ n ].Name == "DynamicData" ) { uno::Sequence aListProp; if ( namedValues[n].Value >>= aListProp ) { for ( sal_Int32 i=aListProp.getLength(); i-- > 0; ) { - if ( aListProp[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "updateList" ) ) ) + if ( aListProp[ i ].Name == "updateList" ) { handleExtensionUpdates( aListProp ); return uno::Any(); diff --git a/filter/source/filtertracer/filtertracer.cxx b/filter/source/filtertracer/filtertracer.cxx index cfe6d5dfb5ee..72781252dc6e 100644 --- a/filter/source/filtertracer/filtertracer.cxx +++ b/filter/source/filtertracer/filtertracer.cxx @@ -116,19 +116,19 @@ void SAL_CALL FilterTracer::initialize( const SEQ( NMSP_UNO::Any )& aArguments ) for ( i = 0; i < aParameter.getLength(); i++ ) { const NMSP_BEANS::PropertyValue& rProp = aParameter[ i ]; - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LogLevel" ) ) ) + if ( rProp.Name == "LogLevel" ) rProp.Value >>= mnLogLevel; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ClassFilter" ) ) ) + else if ( rProp.Name == "ClassFilter" ) rProp.Value >>= msClassFilter; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MethodFilter" ) ) ) + else if ( rProp.Name == "MethodFilter" ) rProp.Value >>= msMethodFilter; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MessageFilter" ) ) ) + else if ( rProp.Name == "MessageFilter" ) rProp.Value >>= msMessageFilter; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutputStream" ) ) ) + else if ( rProp.Name == "OutputStream" ) rProp.Value >>= mxOutputStream; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + else if ( rProp.Name == "URL" ) rProp.Value >>= msURL; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentHandler" ) ) ) + else if ( rProp.Name == "DocumentHandler" ) rProp.Value >>= mxDocumentHandler; } diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index 996befa0dd29..be19e1b39f02 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -241,7 +241,7 @@ Sequence< PropertyValue > SAL_CALL SWFDialog::getPropertyValues() for( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) break; } @@ -263,7 +263,7 @@ void SAL_CALL SWFDialog::setPropertyValues( const Sequence< PropertyValue >& rPr for( sal_Int32 i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) { maMediaDescriptor[ i ].Value >>= maFilterData; break; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 94cf7dfa8cc1..56a7c2659d71 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -753,33 +753,33 @@ sal_Bool EscherPropertyContainer::GetLineArrow( const sal_Bool bLineStart, /* todo: calculate the best option for ArrowLenght and ArrowWidth */ - if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Arrow concave" ) ) ) + if ( aApiName == "Arrow concave" ) reLineEnd = ESCHER_LineArrowStealthEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Square 45" ) ) ) + else if ( aApiName == "Square 45" ) reLineEnd = ESCHER_LineArrowDiamondEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Small Arrow" ) ) ) + else if ( aApiName == "Small Arrow" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Dimension Lines" ) ) ) + else if ( aApiName == "Dimension Lines" ) { rnArrowLength = 0; rnArrowWidth = 2; reLineEnd = ESCHER_LineArrowOvalEnd; } - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Double Arrow" ) ) ) + else if ( aApiName == "Double Arrow" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Rounded short Arrow" ) ) ) + else if ( aApiName == "Rounded short Arrow" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Symmetric Arrow" ) ) ) + else if ( aApiName == "Symmetric Arrow" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Line Arrow" ) ) ) + else if ( aApiName == "Line Arrow" ) reLineEnd = ESCHER_LineArrowOpenEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Rounded large Arrow" ) ) ) + else if ( aApiName == "Rounded large Arrow" ) reLineEnd = ESCHER_LineArrowEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Circle" ) ) ) + else if ( aApiName == "Circle" ) reLineEnd = ESCHER_LineArrowOvalEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Square" ) ) ) + else if ( aApiName == "Square" ) reLineEnd = ESCHER_LineArrowDiamondEnd; - else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Arrow" ) ) ) + else if ( aApiName == "Arrow" ) reLineEnd = ESCHER_LineArrowEnd; } else if ( comphelper::string::getTokenCount(aArrowStartName, ' ') == 2 ) @@ -3258,18 +3258,18 @@ MSO_SPT EscherPropertyContainer::GetCustomShapeType( const uno::Reference< drawi for ( i = 0; i < nCount; i++ ) { const beans::PropertyValue& rProp = aGeoPropSeq[ i ]; - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( rProp.Name == "Type" ) { if ( rProp.Value >>= rShapeType ) eShapeType = EnhancedCustomShapeTypeNames::Get( rShapeType ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredX" ) ) ) + else if ( rProp.Name == "MirroredX" ) { sal_Bool bMirroredX = sal_Bool(); if ( ( rProp.Value >>= bMirroredX ) && bMirroredX ) nMirrorFlags |= SHAPEFLAG_FLIPH; } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredY" ) ) ) + else if ( rProp.Name == "MirroredY" ) { sal_Bool bMirroredY = sal_Bool(); if ( ( rProp.Value >>= bMirroredY ) && bMirroredY ) diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index a5172936afae..3bf1c3d9c3d8 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -182,7 +182,7 @@ Sequence< PropertyValue > SAL_CALL PDFDialog::getPropertyValues() for( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) break; } @@ -204,7 +204,7 @@ void SAL_CALL PDFDialog::setPropertyValues( const Sequence< PropertyValue >& rPr for( sal_Int32 i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) { maMediaDescriptor[ i ].Value >>= maFilterData; break; diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index b927ae6382b5..b6f628e2e46e 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -184,11 +184,11 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, for( sal_Int32 nData = 0, nDataCount = rRenderOptions.getLength(); nData < nDataCount; ++nData ) { - if( rRenderOptions[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFirstPage" ) ) ) + if ( rRenderOptions[ nData ].Name == "IsFirstPage" ) pFirstPage = &rRenderOptions[ nData ].Value; - else if( rRenderOptions[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsLastPage" ) ) ) + else if ( rRenderOptions[ nData ].Name == "IsLastPage" ) pLastPage = &rRenderOptions[ nData ].Value; - else if( rRenderOptions[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportNotesPages" ) ) ) + else if ( rRenderOptions[ nData ].Name == "ExportNotesPages" ) rRenderOptions[ nData ].Value >>= bExportNotesPages; } @@ -211,7 +211,7 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, for( sal_Int32 nProperty = 0, nPropertyCount = aRenderer.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( aRenderer[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) + if ( aRenderer[ nProperty ].Name == "PageSize" ) aRenderer[ nProperty].Value >>= aPageSize; } @@ -361,7 +361,7 @@ static OUString getMimetypeForDocument( const Reference< XMultiServiceFactory >& Sequence< beans::PropertyValue > aFilterData; xFilterFactory->getByName( aFilterName ) >>= aFilterData; for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aFilterData[nInd].Name == "Type" ) aFilterData[nInd].Value >>= aTypeName; if ( !aTypeName.isEmpty() ) @@ -374,7 +374,7 @@ static OUString getMimetypeForDocument( const Reference< XMultiServiceFactory >& Sequence< beans::PropertyValue > aTypeData; xTypeDetection->getByName( aTypeName ) >>= aTypeData; for ( sal_Int32 nInd = 0; nInd < aTypeData.getLength(); nInd++ ) - if ( aTypeData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( aTypeData[nInd].Name == "MediaType" ) aTypeData[nInd].Value >>= aDocMimetype; } } @@ -453,107 +453,107 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue for( sal_Int32 nData = 0, nDataCount = rFilterData.getLength(); nData < nDataCount; ++nData ) { - if( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageRange" ) ) ) + if ( rFilterData[ nData ].Name == "PageRange" ) rFilterData[ nData ].Value >>= aPageRange; - else if( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Selection" ) ) ) + else if ( rFilterData[ nData ].Name == "Selection" ) rFilterData[ nData ].Value >>= aSelection; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseLosslessCompression" ) ) ) + else if ( rFilterData[ nData ].Name == "UseLosslessCompression" ) rFilterData[ nData ].Value >>= mbUseLosslessCompression; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Quality" ) ) ) + else if ( rFilterData[ nData ].Name == "Quality" ) rFilterData[ nData ].Value >>= mnQuality; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ReduceImageResolution" ) ) ) + else if ( rFilterData[ nData ].Name == "ReduceImageResolution" ) rFilterData[ nData ].Value >>= mbReduceImageResolution; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsSkipEmptyPages" ) ) ) + else if ( rFilterData[ nData ].Name == "IsSkipEmptyPages" ) rFilterData[ nData ].Value >>= mbSkipEmptyPages; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MaxImageResolution" ) ) ) + else if ( rFilterData[ nData ].Name == "MaxImageResolution" ) rFilterData[ nData ].Value >>= mnMaxImageResolution; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseTaggedPDF" ) ) ) + else if ( rFilterData[ nData ].Name == "UseTaggedPDF" ) rFilterData[ nData ].Value >>= mbUseTaggedPDF; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SelectPdfVersion" ) ) ) + else if ( rFilterData[ nData ].Name == "SelectPdfVersion" ) rFilterData[ nData ].Value >>= mnPDFTypeSelection; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportNotes" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportNotes" ) rFilterData[ nData ].Value >>= mbExportNotes; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportNotesPages" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportNotesPages" ) rFilterData[ nData ].Value >>= mbExportNotesPages; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EmbedStandardFonts" ) ) ) + else if ( rFilterData[ nData ].Name == "EmbedStandardFonts" ) rFilterData[ nData ].Value >>= mbEmbedStandardFonts; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseTransitionEffects" ) ) ) + else if ( rFilterData[ nData ].Name == "UseTransitionEffects" ) rFilterData[ nData ].Value >>= mbUseTransitionEffects; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportFormFields" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportFormFields" ) rFilterData[ nData ].Value >>= mbExportFormFields; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FormsType" ) ) ) + else if ( rFilterData[ nData ].Name == "FormsType" ) rFilterData[ nData ].Value >>= mnFormsFormat; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowDuplicateFieldNames" ) ) ) + else if ( rFilterData[ nData ].Name == "AllowDuplicateFieldNames" ) rFilterData[ nData ].Value >>= mbAllowDuplicateFieldNames; //viewer properties - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HideViewerToolbar" ) ) ) + else if ( rFilterData[ nData ].Name == "HideViewerToolbar" ) rFilterData[ nData ].Value >>= mbHideViewerToolbar; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HideViewerMenubar" ) ) ) + else if ( rFilterData[ nData ].Name == "HideViewerMenubar" ) rFilterData[ nData ].Value >>= mbHideViewerMenubar; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HideViewerWindowControls" ) ) ) + else if ( rFilterData[ nData ].Name == "HideViewerWindowControls" ) rFilterData[ nData ].Value >>= mbHideViewerWindowControls; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResizeWindowToInitialPage" ) ) ) + else if ( rFilterData[ nData ].Name == "ResizeWindowToInitialPage" ) rFilterData[ nData ].Value >>= mbFitWindow; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CenterWindow" ) ) ) + else if ( rFilterData[ nData ].Name == "CenterWindow" ) rFilterData[ nData ].Value >>= mbCenterWindow; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenInFullScreenMode" ) ) ) + else if ( rFilterData[ nData ].Name == "OpenInFullScreenMode" ) rFilterData[ nData ].Value >>= mbOpenInFullScreenMode; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DisplayPDFDocumentTitle" ) ) ) + else if ( rFilterData[ nData ].Name == "DisplayPDFDocumentTitle" ) rFilterData[ nData ].Value >>= mbDisplayPDFDocumentTitle; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InitialView" ) ) ) + else if ( rFilterData[ nData ].Name == "InitialView" ) rFilterData[ nData ].Value >>= mnPDFDocumentMode; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Magnification" ) ) ) + else if ( rFilterData[ nData ].Name == "Magnification" ) rFilterData[ nData ].Value >>= mnPDFDocumentAction; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Zoom" ) ) ) + else if ( rFilterData[ nData ].Name == "Zoom" ) rFilterData[ nData ].Value >>= mnZoom; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InitialPage" ) ) ) + else if ( rFilterData[ nData ].Name == "InitialPage" ) rFilterData[ nData ].Value >>= mnInitialPage; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageLayout" ) ) ) + else if ( rFilterData[ nData ].Name == "PageLayout" ) rFilterData[ nData ].Value >>= mnPDFPageLayout; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FirstPageOnLeft" ) ) ) + else if ( rFilterData[ nData ].Name == "FirstPageOnLeft" ) rFilterData[ nData ].Value >>= aContext.FirstPageLeft; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsAddStream" ) ) ) + else if ( rFilterData[ nData ].Name == "IsAddStream" ) rFilterData[ nData ].Value >>= mbAddStream; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Watermark" ) ) ) + else if ( rFilterData[ nData ].Name == "Watermark" ) { maWatermark = rFilterData[ nData ].Value; mbWatermark = sal_True; } //now all the security related properties... - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EncryptFile" ) ) ) + else if ( rFilterData[ nData ].Name == "EncryptFile" ) rFilterData[ nData ].Value >>= mbEncrypt; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentOpenPassword" ) ) ) + else if ( rFilterData[ nData ].Name == "DocumentOpenPassword" ) rFilterData[ nData ].Value >>= aOpenPassword; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RestrictPermissions" ) ) ) + else if ( rFilterData[ nData ].Name == "RestrictPermissions" ) rFilterData[ nData ].Value >>= mbRestrictPermissions; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PermissionPassword" ) ) ) + else if ( rFilterData[ nData ].Name == "PermissionPassword" ) rFilterData[ nData ].Value >>= aPermissionPassword; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreparedPasswords" ) ) ) + else if ( rFilterData[ nData ].Name == "PreparedPasswords" ) rFilterData[ nData ].Value >>= xEnc; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreparedPermissionPassword" ) ) ) + else if ( rFilterData[ nData ].Name == "PreparedPermissionPassword" ) rFilterData[ nData ].Value >>= aPreparedPermissionPassword; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Printing" ) ) ) + else if ( rFilterData[ nData ].Name == "Printing" ) rFilterData[ nData ].Value >>= mnPrintAllowed; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Changes" ) ) ) + else if ( rFilterData[ nData ].Name == "Changes" ) rFilterData[ nData ].Value >>= mnChangesAllowed; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EnableCopyingOfContent" ) ) ) + else if ( rFilterData[ nData ].Name == "EnableCopyingOfContent" ) rFilterData[ nData ].Value >>= mbCanCopyOrExtract; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EnableTextAccessForAccessibilityTools" ) ) ) + else if ( rFilterData[ nData ].Name == "EnableTextAccessForAccessibilityTools" ) rFilterData[ nData ].Value >>= mbCanExtractForAccessibility; //--->i56629 links extra (relative links and other related stuff) - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportLinksRelativeFsys" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportLinksRelativeFsys" ) rFilterData[ nData ].Value >>= mbExportRelativeFsysLinks; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PDFViewSelection" ) ) ) + else if ( rFilterData[ nData ].Name == "PDFViewSelection" ) rFilterData[ nData ].Value >>= mnDefaultLinkAction; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ConvertOOoTargetToPDFTarget" ) ) ) + else if ( rFilterData[ nData ].Name == "ConvertOOoTargetToPDFTarget" ) rFilterData[ nData ].Value >>= mbConvertOOoTargetToPDFTarget; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportBookmarksToPDFDestination" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportBookmarksToPDFDestination" ) rFilterData[ nData ].Value >>= mbExportBmkToDest; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportBookmarks" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportBookmarks" ) rFilterData[ nData ].Value >>= mbExportBookmarks; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportHiddenSlides" ) ) ) + else if ( rFilterData[ nData ].Name == "ExportHiddenSlides" ) rFilterData[ nData ].Value >>= mbExportHiddenSlides; - else if ( rFilterData[ nData ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenBookmarkLevels" ) ) ) + else if ( rFilterData[ nData ].Name == "OpenBookmarkLevels" ) rFilterData[ nData ].Value >>= mnOpenBookmarkLevels; } aContext.URL = aURL.GetMainURL(INetURLObject::DECODE_TO_IURI); diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx index a42633c608c5..58b9afa66960 100644 --- a/filter/source/pdf/pdffilter.cxx +++ b/filter/source/pdf/pdffilter.cxx @@ -63,11 +63,11 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) for ( sal_Int32 i = 0 ; ( i < nLength ) && !xOStm.is(); ++i) { - if( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutputStream" ) ) ) + if ( pValue[ i ].Name == "OutputStream" ) pValue[ i ].Value >>= xOStm; - else if( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + else if ( pValue[ i ].Name == "FilterData" ) pValue[ i ].Value >>= aFilterData; - else if ( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + else if ( pValue[ i ].Name == "StatusIndicator" ) pValue[ i ].Value >>= xStatusIndicator; else if( pValue[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) ) pValue[i].Value >>= xIH; diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx index bba8fd690018..8e207dc6b2c1 100644 --- a/filter/source/placeware/filter.cxx +++ b/filter/source/placeware/filter.cxx @@ -109,7 +109,7 @@ sal_Bool SAL_CALL PlaceWareExportFilter::filter( const ::com::sun::star::uno::Se { pValue[i].Value >>= xInteractionHandler; } - else if ( pValue[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "StatusIndicator" ) ) ) + else if ( pValue[i].Name == "StatusIndicator" ) { pValue[i].Value >>= xStatusIndicator; } diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index df104a4cfb17..f2e0fc7159a3 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -459,9 +459,9 @@ sal_Bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) for ( sal_Int32 i = 0 ; i < nLength; ++i) { - if( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutputStream" ) ) ) + if ( pValue[ i ].Name == "OutputStream" ) pValue[ i ].Value >>= xOStm; - else if( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileName" ) ) ) + else if ( pValue[ i ].Name == "FileName" ) { ::rtl::OUString aFileName; diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index a77e9b3fbfb6..ed8e0883c3a8 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -170,7 +170,7 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto for ( sal_Int32 i = 0 ; i < nLength; ++i) { - if( pValue[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PagePos" ) ) ) + if ( pValue[ i ].Name == "PagePos" ) { pValue[ i ].Value >>= nPageToExport; } @@ -273,7 +273,7 @@ rtl::OUString SAL_CALL SVGFilter::detect( Sequence< PropertyValue >& io_rDescrip const sal_Int32 nAttribs = io_rDescriptor.getLength(); for( sal_Int32 i = 0; i < nAttribs; i++ ) { - if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + if ( pAttribs[i].Name == "InputStream" ) pAttribs[i].Value >>= xInput; } diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index de2a762aad4e..a0582ce18cce 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -61,11 +61,11 @@ sal_Bool SVGFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) const beans::PropertyValue* pAttribs = rDescriptor.getConstArray(); for ( sal_Int32 i=0 ; iName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + if ( pAttribs->Name == "InputStream" ) { pAttribs->Value >>= xInputStream; } - else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + else if ( pAttribs->Name == "StatusIndicator" ) pAttribs->Value >>= xStatus; } diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx index 0bc05d6b7a2f..d17b0b8b6e4c 100644 --- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx @@ -413,7 +413,7 @@ OUString XMLFilterSettingsDialog::createUniqueInterfaceName( const OUString& rIn for( nValue = 0; nValue < nValueCount; nValue++, pValues++ ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ) ) + if ( pValues->Name == "UIName" ) { OUString aInterfaceName; pValues->Value >>= aInterfaceName; @@ -745,7 +745,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi for( nIndex = 0; nIndex < nCount; nIndex++ ) { OUString aName( aSequence[nIndex].Name ); - if( aSequence[nIndex].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Types" ) ) ) + if ( aSequence[nIndex].Name == "Types" ) { Sequence< OUString > aTypes; if( aSequence[nIndex].Value >>= aTypes ) @@ -859,7 +859,7 @@ void XMLFilterSettingsDialog::onDelete() for( nValue = 0; (nValue < nValueCount) && !bTypeStillUsed; nValue++, pValues++ ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( pValues->Name == "Type" ) { OUString aType; pValues->Value >>= aType; @@ -1113,39 +1113,39 @@ void XMLFilterSettingsDialog::initFilterList() for( nValue = 0; nValue < nValueCount; nValue++, pValues++ ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( pValues->Name == "Type" ) { pValues->Value >>= pTempFilter->maType; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ) ) + else if ( pValues->Name == "UIName" ) { pValues->Value >>= pTempFilter->maInterfaceName; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) + else if ( pValues->Name == "DocumentService" ) { pValues->Value >>= pTempFilter->maDocumentService; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterService" ) ) ) + else if ( pValues->Name == "FilterService" ) { pValues->Value >>= aFilterService; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Flags" ) ) ) + else if ( pValues->Name == "Flags" ) { pValues->Value >>= pTempFilter->maFlags; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) ) + else if ( pValues->Name == "UserData" ) { pValues->Value >>= aUserData; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileFormatVersion" ) ) ) + else if ( pValues->Name == "FileFormatVersion" ) { pValues->Value >>= pTempFilter->maFileFormatVersion; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TemplateName" ) ) ) + else if ( pValues->Name == "TemplateName" ) { pValues->Value >>= pTempFilter->maImportTemplate; } - else if(pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Finalized" ) )) + else if ( pValues->Name == "Finalized" ) { pValues->Value >>= pTempFilter->mbReadonly; } @@ -1192,12 +1192,12 @@ void XMLFilterSettingsDialog::initFilterList() for( nValue2 = 0; nValue2 < nValueCount2; nValue2++, pValues2++ ) { /* - if( pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( pValues2->Name == "MediaType" ) { pValues2->Value >>= pTempFilter->maDocType; } else */ - if( pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ClipboardFormat" ) ) ) + if ( pValues2->Name == "ClipboardFormat" ) { OUString aDocType; pValues2->Value >>= aDocType; @@ -1207,7 +1207,7 @@ void XMLFilterSettingsDialog::initFilterList() pTempFilter->maDocType = aDocType; } - else if( pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Extensions" ) ) ) + else if ( pValues2->Name == "Extensions" ) { Sequence< OUString > aExtensions; if( pValues2->Value >>= aExtensions ) @@ -1225,11 +1225,11 @@ void XMLFilterSettingsDialog::initFilterList() } } } - else if( pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentIconID" ) ) ) + else if ( pValues2->Name == "DocumentIconID" ) { pValues2->Value >>= pTempFilter->mnDocumentIconID; } - else if(pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Finalized" ) )) + else if ( pValues2->Name == "Finalized" ) { // both the filter and the type may be finalized sal_Bool bTemp = sal_False; diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx index f45d8da4b7da..eb7d7508390d 100644 --- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx @@ -199,7 +199,7 @@ bool XMLFilterTabDialog::onOk() for( nValue = 0; (nValue < nValueCount) && (nErrorId == 0); nValue++, pValues++ ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ) ) + if ( pValues->Name == "UIName" ) { OUString aInterfaceName; pValues->Value >>= aInterfaceName; diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 40606d776cd0..a42a21805ee2 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -122,7 +122,7 @@ static bool checkComponent( Reference< XComponent >& rxComponent, const OUString if( xInfo->supportsService( rServiceName ) ) { // special case for impress documents which supports same service as draw documents - if( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) + if ( rServiceName == "com.sun.star.drawing.DrawingDocument" ) { // so if we want a draw we need to check if its not an impress if( !xInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument") ) ) ) @@ -353,22 +353,22 @@ void XMLFilterTestDialog::onExportBrowse() for( sal_Int32 nValue = 0; (nValue < aValues.getLength()) && (nFound != 15); nValue++, pValues++ ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( pValues->Name == "Type" ) { pValues->Value >>= aType; nFound |= 1; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) + else if ( pValues->Name == "DocumentService" ) { pValues->Value >>= aService; nFound |= 2; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Flags" ) ) ) + else if ( pValues->Name == "Flags" ) { pValues->Value >>= nFlags; nFound |= 4; } - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) ) ) + if ( pValues->Name == "UIName" ) { pValues->Value >>= aInterfaceName; nFound |= 8; @@ -392,7 +392,7 @@ void XMLFilterTestDialog::onExportBrowse() OUString aExtension; for( nValue = 0; nValue < aValues2.getLength(); nValue++, pValues2++ ) { - if( pValues2->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Extensions" ) ) ) + if ( pValues2->Name == "Extensions" ) { Sequence< OUString > aExtensions; if( pValues2->Value >>= aExtensions ) diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 54ef4769dd01..7e1694a4bcdc 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -681,11 +681,11 @@ namespace frm // some hard-coded slots, which do not have a UNO name at SFX level, but which // we nevertheless need to transport via UNO mechanisms, so we need a name - if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowHangingPunctuation" ) ) ) + if ( _rUnoSlotName == "AllowHangingPunctuation" ) return SID_ATTR_PARA_HANGPUNCTUATION; - if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ApplyForbiddenCharacterRules" ) ) ) + if ( _rUnoSlotName == "ApplyForbiddenCharacterRules" ) return SID_ATTR_PARA_FORBIDDEN_RULES; - if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseScriptSpacing" ) ) ) + if ( _rUnoSlotName == "UseScriptSpacing" ) return SID_ATTR_PARA_SCRIPTSPACE; OSL_ENSURE( pSlot, "lcl_getSlotFromUnoName: unknown UNO slot name!" ); diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index 9370ad6010a0..75ca0371aaba 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -174,7 +174,7 @@ namespace frm const PropertyValue* pLookupEnd = _rArguments.getConstArray() + _rArguments.getLength(); while ( pLookup != pLookupEnd ) { - if ( pLookup->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enable" ) ) ) + if ( pLookup->Name == "Enable" ) break; ++pLookup; } diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx index e7d1add71c84..d500b2fa42d6 100644 --- a/fpicker/source/office/OfficeFilePicker.cxx +++ b/fpicker/source/office/OfficeFilePicker.cxx @@ -1098,19 +1098,19 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments ) //------------------------------------------------------------------------- sal_Bool SvtFilePicker::implHandleInitializationArgument( const ::rtl::OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { - if ( _rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TemplateDescription" ) ) ) + if ( _rName == "TemplateDescription" ) { m_nServiceType = TemplateDescription::FILEOPEN_SIMPLE; OSL_VERIFY( _rValue >>= m_nServiceType ); return sal_True; } - if ( _rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StandardDir" ) ) ) + if ( _rName == "StandardDir" ) { OSL_VERIFY( _rValue >>= m_aStandardDir ); return sal_True; } - if ( _rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BlackList" ) ) ) + if ( _rName == "BlackList" ) { OSL_VERIFY( _rValue >>= m_aBlackList ); return sal_True; diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index b7664c9731da..55094e5a668b 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -488,7 +488,7 @@ namespace svt sal_Bool OCommonPicker::implHandleInitializationArgument( const ::rtl::OUString& _rName, const Any& _rValue ) SAL_THROW( ( Exception, RuntimeException ) ) { sal_Bool bKnown = sal_True; - if ( _rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ParentWindow" ) ) ) + if ( _rName == "ParentWindow" ) { m_xDialogParent.clear(); OSL_VERIFY( _rValue >>= m_xDialogParent ); diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index a8bf41ca63b4..e280b304a8b9 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -288,7 +288,7 @@ throw( SAXException, RuntimeException ) ++m_nElementDepth; m_xReader->startElement( aName, xAttrList ); } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR ))) + else if ( aName == ELEMENT_MENUBAR ) { ++m_nElementDepth; m_bMenuBarMode = sal_True; @@ -369,7 +369,7 @@ throw( SAXException, RuntimeException ) ++m_nElementDepth; m_xReader->startElement( rName, xAttrList ); } - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) + else if ( rName == ELEMENT_MENU ) { ++m_nElementDepth; @@ -397,13 +397,13 @@ throw( SAXException, RuntimeException ) { ::rtl::OUString aName = xAttrList->getNameByIndex( i ); ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) + if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) + else if ( aName == ATTRIBUTE_LABEL ) aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) + else if ( aName == ATTRIBUTE_HELPID ) aHelpId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE ))) + else if ( aName == ATTRIBUTE_STYLE ) { ::rtl::OUString aTemp( aValue ); sal_Int32 nIndex = 0; @@ -412,11 +412,11 @@ throw( SAXException, RuntimeException ) ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) + if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_IMAGE ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_RADIO ) nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } @@ -522,7 +522,7 @@ throw( SAXException, RuntimeException ) ++m_nElementDepth; m_xReader->startElement( aName, xAttrList ); } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP ))) + else if ( aName == ELEMENT_MENUPOPUP ) { ++m_nElementDepth; m_bMenuPopupMode = sal_True; @@ -607,7 +607,7 @@ throw( SAXException, RuntimeException ) if ( m_bMenuMode ) m_xReader->startElement( rName, xAttrList ); - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) + else if ( rName == ELEMENT_MENU ) { ::rtl::OUString aHelpId; ::rtl::OUString aCommandId; @@ -632,13 +632,13 @@ throw( SAXException, RuntimeException ) { ::rtl::OUString aName = xAttrList->getNameByIndex( i ); ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) + if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) + else if ( aName == ATTRIBUTE_LABEL ) aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) + else if ( aName == ATTRIBUTE_HELPID ) aHelpId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE ))) + else if ( aName == ATTRIBUTE_STYLE ) { ::rtl::OUString aTemp( aValue ); sal_Int32 nIndex = 0; @@ -647,11 +647,11 @@ throw( SAXException, RuntimeException ) ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) + if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_IMAGE ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_RADIO ) nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } @@ -678,7 +678,7 @@ throw( SAXException, RuntimeException ) m_xReader = Reference< XDocumentHandler >( new OReadMenuHandler( xSubItemContainer, m_xContainerFactory )); m_xReader->startDocument(); } - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) + else if ( rName == ELEMENT_MENUITEM ) { ::rtl::OUString aHelpId; ::rtl::OUString aCommandId; @@ -689,13 +689,13 @@ throw( SAXException, RuntimeException ) { ::rtl::OUString aName = xAttrList->getNameByIndex( i ); ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ID ))) + if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_LABEL ))) + else if ( aName == ATTRIBUTE_LABEL ) aLabel = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_HELPID ))) + else if ( aName == ATTRIBUTE_HELPID ) aHelpId = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_STYLE ))) + else if ( aName == ATTRIBUTE_STYLE ) { ::rtl::OUString aTemp( aValue ); sal_Int32 nIndex = 0; @@ -704,11 +704,11 @@ throw( SAXException, RuntimeException ) ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) + if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_IMAGE ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; - else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + else if ( aToken == ATTRIBUTE_ITEMSTYLE_RADIO ) nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } @@ -728,7 +728,7 @@ throw( SAXException, RuntimeException ) m_nNextElementExpected = ELEM_CLOSE_MENUITEM; } - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR ))) + else if ( rName == ELEMENT_MENUSEPARATOR ) { Sequence< PropertyValue > aMenuSeparator( 1 ); aMenuSeparator[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )); diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 150481e410f0..6ead1feee3f3 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -197,7 +197,7 @@ ConstItemContainer::ConstItemContainer( const Reference< XIndexAccess >& rSource Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) + if ( aPropSeq[j].Name == "ItemDescriptorContainer" ) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; @@ -234,7 +234,7 @@ void ConstItemContainer::copyItemContainer( const std::vector< Sequence< Propert Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) + if ( aPropSeq[j].Name == "ItemDescriptorContainer" ) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/fwi/uielement/itemcontainer.cxx b/framework/source/fwi/uielement/itemcontainer.cxx index 6e0dce68852d..ede715b89e08 100644 --- a/framework/source/fwi/uielement/itemcontainer.cxx +++ b/framework/source/fwi/uielement/itemcontainer.cxx @@ -81,7 +81,7 @@ ItemContainer::ItemContainer( const Reference< XIndexAccess >& rSourceContainer, Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) + if ( aPropSeq[j].Name == "ItemDescriptorContainer" ) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; @@ -117,7 +117,7 @@ void ItemContainer::copyItemContainer( const std::vector< Sequence< PropertyValu Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) + if ( aPropSeq[j].Name == "ItemDescriptorContainer" ) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index d52e7c4f624f..2aa7b7cca92c 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -126,7 +126,7 @@ RootItemContainer::RootItemContainer( const Reference< XIndexAccess >& rSourceCo Reference< XIndexAccess > xIndexAccess; for ( sal_Int32 j = 0; j < aPropSeq.getLength(); j++ ) { - if ( aPropSeq[j].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ItemDescriptorContainer" ) )) + if ( aPropSeq[j].Name == "ItemDescriptorContainer" ) { aPropSeq[j].Value >>= xIndexAccess; nContainerIndex = j; diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 339ee0379735..cc03c0ddbd48 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -128,9 +128,9 @@ throw ( Exception, RuntimeException ) PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) + if ( aPropValue.Name == "ResourceURL" ) aPropValue.Value >>= m_aResourceURL; - else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) + else if ( aPropValue.Name == "Frame" ) { Reference< XFrame > xFrame; aPropValue.Value >>= xFrame; diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index ed6d016f30f6..b4affd0192d9 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -122,7 +122,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument PropertyValue aPropValue; if ( aArguments[n] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ConfigurationData" ) )) + if ( aPropValue.Name == "ConfigurationData" ) aPropValue.Value >>= m_aConfigData; } } diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx index 1a1613f6aa48..42c13b005bec 100644 --- a/framework/source/uielement/buttontoolbarcontroller.cxx +++ b/framework/source/uielement/buttontoolbarcontroller.cxx @@ -148,11 +148,11 @@ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException { if ( aArguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) + if ( aPropValue.Name == "Frame" ) m_xFrame.set(aPropValue.Value,UNO_QUERY); - else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CommandURL" ) )) + else if ( aPropValue.Name == "CommandURL" ) aPropValue.Value >>= m_aCommandURL; - else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ServiceManager" ) )) + else if ( aPropValue.Name == "ServiceManager" ) m_xServiceManager.set(aPropValue.Value,UNO_QUERY); } } diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 2de8e8d5833b..3016cffe89c8 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -107,7 +107,7 @@ rtl::OUString FontSizeMenuController::retrievePrinterName( com::sun::star::uno:: Sequence< PropertyValue > aPrinterSeq = xPrintable->getPrinter(); for ( int i = 0; i < aPrinterSeq.getLength(); i++ ) { - if ( aPrinterSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) )) + if ( aPrinterSeq[i].Name == "Name" ) { aPrinterSeq[i].Value >>= aPrinterName; break; diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index fb7c59a05a1a..2a9e54f99878 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -326,15 +326,15 @@ void SAL_CALL LanguageSelectionMenuController::updatePopupMenu() throw ( ::com:: // TODO: Fill menu with the information retrieved by the status update - if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageSelectionMenu" ) )) + if ( m_aCommandURL == ".uno:SetLanguageSelectionMenu" ) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageSelectionMenu ); } - else if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageParagraphMenu" ) )) + else if ( m_aCommandURL == ".uno:SetLanguageParagraphMenu" ) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageParagraphMenu ); } - else if( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:SetLanguageAllTextMenu" ) )) + else if ( m_aCommandURL == ".uno:SetLanguageAllTextMenu" ) { fillPopupMenu(m_xPopupMenu, MODE_SetLanguageAllTextMenu ); } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 1bffc3966f17..d500be371fc4 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -261,7 +261,7 @@ rtl::OUString ToolbarsMenuController::getUINameFromCommand( const rtl::OUString& { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) + if ( aPropSeq[i].Name == "Label" ) { aPropSeq[i].Value >>= aStr; break; @@ -500,7 +500,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) || m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), aEmptyString ); - else if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) + else if ( m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" ) addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_INPUTLINEBAR )), aEmptyString ); else addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_FORMULABAR )), aEmptyString ); diff --git a/framework/source/uifactory/addonstoolboxfactory.cxx b/framework/source/uifactory/addonstoolboxfactory.cxx index 2516de5a3304..c8d0d6d13d63 100644 --- a/framework/source/uifactory/addonstoolboxfactory.cxx +++ b/framework/source/uifactory/addonstoolboxfactory.cxx @@ -173,11 +173,11 @@ throw ( ::com::sun::star::container::NoSuchElementException, for ( sal_Int32 n = 0; n < Args.getLength(); n++ ) { - if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ConfigurationData" ) )) + if ( Args[n].Name == "ConfigurationData" ) Args[n].Value >>= aConfigData; - else if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) + else if ( Args[n].Name == "Frame" ) Args[n].Value >>= xFrame; - else if ( Args[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) + else if ( Args[n].Name == "ResourceURL" ) Args[n].Value >>= aResourceURL; } diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx index 9838427b3048..965feec9770d 100644 --- a/framework/source/uifactory/windowcontentfactorymanager.cxx +++ b/framework/source/uifactory/windowcontentfactorymanager.cxx @@ -148,9 +148,9 @@ throw (uno::Exception, uno::RuntimeException) beans::PropertyValue aPropValue; if ( Arguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Frame" ) )) + if ( aPropValue.Name == "Frame" ) aPropValue.Value >>= xFrame; - else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ResourceURL" ) )) + else if ( aPropValue.Name == "ResourceURL" ) aPropValue.Value >>= aResourceURL; } } diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index f27cd887b3ad..9586b7bc655b 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -914,7 +914,7 @@ LanguageType MsLangId::convertIsoNamesToLanguage( const rtl::OUString& rLang, while ( pEntry->mnLang != LANGUAGE_DONTKNOW ); // some eng countries should be mapped to a specific english language - if ( aLowerLang.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "en" ) ) ) + if ( aLowerLang == "en" ) { const IsoLangEngEntry* pEngEntry = aImplIsoLangEngEntries; do diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx index ddb1052759ab..b8972e36de5c 100644 --- a/i18npool/source/numberformatcode/numberformatcode.cxx +++ b/i18npool/source/numberformatcode/numberformatcode.cxx @@ -201,11 +201,11 @@ NumberFormatCodeMapper::mapElementTypeShortToString(sal_Int16 formatType) sal_Int16 NumberFormatCodeMapper::mapElementTypeStringToShort(const ::rtl::OUString& formatType) { - if(formatType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "short" ) )) + if ( formatType == "short" ) return com::sun::star::i18n::KNumberFormatType::SHORT; - if(formatType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "medium" ) )) + if ( formatType == "medium" ) return com::sun::star::i18n::KNumberFormatType::MEDIUM; - if(formatType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "long" ) )) + if ( formatType == "long" ) return com::sun::star::i18n::KNumberFormatType::LONG; return com::sun::star::i18n::KNumberFormatType::SHORT; @@ -240,21 +240,21 @@ NumberFormatCodeMapper::mapElementUsageShortToString(sal_Int16 formatUsage) sal_Int16 NumberFormatCodeMapper::mapElementUsageStringToShort(const ::rtl::OUString& formatUsage) { - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DATE" ) )) + if ( formatUsage == "DATE" ) return com::sun::star::i18n::KNumberFormatUsage::DATE; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TIME" ) )) + if ( formatUsage == "TIME" ) return com::sun::star::i18n::KNumberFormatUsage::TIME; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DATE_TIME" ) )) + if ( formatUsage == "DATE_TIME" ) return com::sun::star::i18n::KNumberFormatUsage::DATE_TIME; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FIXED_NUMBER" ) )) + if ( formatUsage == "FIXED_NUMBER" ) return com::sun::star::i18n::KNumberFormatUsage::FIXED_NUMBER; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FRACTION_NUMBER" ) )) + if ( formatUsage == "FRACTION_NUMBER" ) return com::sun::star::i18n::KNumberFormatUsage::FRACTION_NUMBER; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PERCENT_NUMBER" ) )) + if ( formatUsage == "PERCENT_NUMBER" ) return com::sun::star::i18n::KNumberFormatUsage::PERCENT_NUMBER; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CURRENCY" ) )) + if ( formatUsage == "CURRENCY" ) return com::sun::star::i18n::KNumberFormatUsage::CURRENCY; - if(formatUsage.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SCIENTIFIC_NUMBER" ) )) + if ( formatUsage == "SCIENTIFIC_NUMBER" ) return com::sun::star::i18n::KNumberFormatUsage::SCIENTIFIC_NUMBER; return 0; diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index 91571f5820a0..d6b2663aec38 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -140,12 +140,12 @@ void PropertyChgHelper::GetCurrentValues() sal_Bool *pbVal = NULL, *pbResVal = NULL; - if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_IS_IGNORE_CONTROL_CHARACTERS ) )) + if ( pPropName[i] == UPN_IS_IGNORE_CONTROL_CHARACTERS ) { pbVal = &bIsIgnoreControlCharacters; pbResVal = &bResIsIgnoreControlCharacters; } - else if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_IS_USE_DICTIONARY_LIST ) )) + else if ( pPropName[i] == UPN_IS_USE_DICTIONARY_LIST ) { pbVal = &bIsUseDictionaryList; pbResVal = &bResIsUseDictionaryList; @@ -419,17 +419,17 @@ void PropertyHelper_Spell::GetCurrentValues() sal_Bool *pbVal = NULL, *pbResVal = NULL; - if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_IS_SPELL_UPPER_CASE ) )) + if ( pPropName[i] == UPN_IS_SPELL_UPPER_CASE ) { pbVal = &bIsSpellUpperCase; pbResVal = &bResIsSpellUpperCase; } - else if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_IS_SPELL_WITH_DIGITS ) )) + else if ( pPropName[i] == UPN_IS_SPELL_WITH_DIGITS ) { pbVal = &bIsSpellWithDigits; pbResVal = &bResIsSpellWithDigits; } - else if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_IS_SPELL_CAPITALIZATION ) )) + else if ( pPropName[i] == UPN_IS_SPELL_CAPITALIZATION ) { pbVal = &bIsSpellCapitalization; pbResVal = &bResIsSpellCapitalization; @@ -604,17 +604,17 @@ void PropertyHelper_Hyphen::GetCurrentValues() sal_Int16 *pnVal = NULL, *pnResVal = NULL; - if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_LEADING ) )) + if ( pPropName[i] == UPN_HYPH_MIN_LEADING ) { pnVal = &nHyphMinLeading; pnResVal = &nResHyphMinLeading; } - else if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_TRAILING ) )) + else if ( pPropName[i] == UPN_HYPH_MIN_TRAILING ) { pnVal = &nHyphMinTrailing; pnResVal = &nResHyphMinTrailing; } - else if (pPropName[i].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_WORD_LENGTH ) )) + else if ( pPropName[i] == UPN_HYPH_MIN_WORD_LENGTH ) { pnVal = &nHyphMinWordLength; pnResVal = &nResHyphMinWordLength; @@ -693,11 +693,11 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues &rPropVals ) { sal_Int16 *pnResVal = NULL; - if (pVal[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_LEADING ) )) + if ( pVal[i].Name == UPN_HYPH_MIN_LEADING ) pnResVal = &nResHyphMinLeading; - else if (pVal[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_TRAILING ) )) + else if ( pVal[i].Name == UPN_HYPH_MIN_TRAILING ) pnResVal = &nResHyphMinTrailing; - else if (pVal[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( UPN_HYPH_MIN_WORD_LENGTH ) )) + else if ( pVal[i].Name == UPN_HYPH_MIN_WORD_LENGTH ) pnResVal = &nResHyphMinWordLength; DBG_ASSERT( pnResVal, "unknown property" ); diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx index e77dede8facb..64d2e0f1811c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx @@ -86,11 +86,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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName" ) ) ) + if ( aName == "TypeName" ) aArguments[i].Value >>= sOriginalTypeName; - if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ) ) + if ( aName == "URL" ) aArguments[i].Value >>= sURL; - if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream" ) ) ) + if ( aName == "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 cfd264a4cb31..a20c30e0375d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx @@ -205,7 +205,7 @@ sal_Bool XFlatXml::exporter( aName = aSourceData[i].Name; if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OutputStream"))) aSourceData[i].Value >>= rOutputStream; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) )) + else if ( aName == "URL" ) aSourceData[i].Value >>= sURL; } diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx index e7d933615cfc..fa748a7b6552 100644 --- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx @@ -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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Button Disabled" ) )) + if ( aText == "Button Disabled" ) mbButtonEnabled = sal_False; else mbButtonEnabled = sal_True; @@ -375,7 +375,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener { if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:")) ) { - if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ) + if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ) + else if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ) + else if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ) + else if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ) + else if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) ) + else if ( aURL.Path == "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.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:" ) )) + if ( Event.aURL.Protocol == "vnd.demo.complextoolbarcontrols.demoaddon:" ) { - if ( Event.aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command2" ) )) + if ( Event.aURL.Path == "Command2" ) { // We get notifications whenever the text inside the combobox has been changed. // We store the new text into a member. - if ( Event.Event.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextChanged" ) )) + if ( Event.Event == "TextChanged" ) { rtl::OUString aNewText; sal_Bool bHasText( sal_False ); diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 259b5c1f653e..90b287e88cd5 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -163,7 +163,7 @@ void SAL_CALL FilterDetectDocHandler::processingInstruction( void FilterDetectDocHandler::parseRelationship( const AttributeList& rAttribs ) { OUString aType = rAttribs.getString( XML_Type, OUString() ); - if( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) ) ) + if ( aType == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) { Reference< com::sun::star::uri::XUriReferenceFactory > xFac = com::sun::star::uri::UriReferenceFactory::create( mxContext ); try @@ -202,7 +202,7 @@ OUString FilterDetectDocHandler::getFilterNameFromContentType( const OUString& r rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-excel.template.macroEnabled.main+xml" ) ) ) return CREATE_OUSTRING( "MS Excel 2007 XML Template" ); - if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.ms-excel.sheet.binary.macroEnabled.main" ) ) ) + if ( rContentType == "application/vnd.ms-excel.sheet.binary.macroEnabled.main" ) return CREATE_OUSTRING( "MS Excel 2007 Binary" ); if( rContentType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml" ) ) || diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx index 736e3400c3de..ef651734fc50 100644 --- a/oox/source/docprop/ooxmldocpropimport.cxx +++ b/oox/source/docprop/ooxmldocpropimport.cxx @@ -92,7 +92,7 @@ Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxSto for( sal_Int32 nEntryIndex = 0, nEntryLength = rEntries.getLength(); nEntryIndex < nEntryLength; ++nEntryIndex ) { const StringPair& rEntry = rEntries[ nEntryIndex ]; - if( rEntry.First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) ) + if ( rEntry.First == "Target" ) { Reference< XExtendedStorageStream > xExtStream( xHierarchy->openStreamElementByHierarchicalName( rEntry.Second, ElementModes::READ ), UNO_QUERY_THROW ); diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 2230a3bbe60a..8af4e802a0ca 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -143,11 +143,11 @@ Reference< XFastContextHandler > GraphicalObjectFrameContext::createFastChildCon case XML_graphicData : // CT_GraphicalObjectData { OUString sUri( xAttribs->getOptionalValue( XML_uri ) ); - if ( sUri.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http://schemas.openxmlformats.org/presentationml/2006/ole" ) ) ) + if ( sUri == "http://schemas.openxmlformats.org/presentationml/2006/ole" ) xRet.set( new OleObjectGraphicDataContext( *this, mpShapePtr ) ); - else if ( sUri.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ) ) ) + else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/diagram" ) xRet.set( new DiagramGraphicDataContext( *this, mpShapePtr ) ); - else if ( sUri.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "http://schemas.openxmlformats.org/drawingml/2006/chart" ) ) ) + else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/chart" ) xRet.set( new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart ) ); else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 ) xRet.set( new table::TableContext( *this, mpShapePtr ) ); diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index 9ffeddf5d39a..13fd50788124 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -216,13 +216,13 @@ void DffStreamObject::dumpDffOpt() { const ItemFormat& rItemFmt = aIt->second; aName = rItemFmt.maItemName; - if( rItemFmt.maListName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "binary" ) ) ) + if ( rItemFmt.maListName == "binary" ) eType = PROPTYPE_BINARY; - else if( rItemFmt.maListName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "string" ) ) ) + else if ( rItemFmt.maListName == "string" ) eType = PROPTYPE_STRING; - else if( rItemFmt.maListName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "blip" ) ) ) + else if ( rItemFmt.maListName == "blip" ) eType = PROPTYPE_BLIP; - else if( rItemFmt.maListName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "colorarray" ) ) ) + else if ( rItemFmt.maListName == "colorarray" ) eType = PROPTYPE_COLORARRAY; } aPropInfos.push_back( PropInfo( aName( "property-data" ), eType, nBaseId, nValue ) ); diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index d529d7203cd2..bcbdb41aedd2 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -204,9 +204,9 @@ OUStringVector::const_iterator ItemFormat::parse( const OUStringVector& rFormatV if( meFmtType == FORMATTYPE_NONE ) { - if( aFmtType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "unused" ) ) ) + if ( aFmtType == "unused" ) set( meDataType, FORMATTYPE_HEX, CREATE_OUSTRING( OOX_DUMP_UNUSED ) ); - else if( aFmtType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "unknown" ) ) ) + else if ( aFmtType == "unknown" ) set( meDataType, FORMATTYPE_HEX, CREATE_OUSTRING( OOX_DUMP_UNKNOWN ) ); } @@ -728,25 +728,25 @@ OString StringHelper::convertToUtf8( const OUString& rStr ) DataType StringHelper::convertToDataType( const OUString& rStr ) { DataType eType = DATATYPE_VOID; - if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "int8" ) ) ) + if ( rStr == "int8" ) eType = DATATYPE_INT8; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "uint8" ) ) ) + else if ( rStr == "uint8" ) eType = DATATYPE_UINT8; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "int16" ) ) ) + else if ( rStr == "int16" ) eType = DATATYPE_INT16; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "uint16" ) ) ) + else if ( rStr == "uint16" ) eType = DATATYPE_UINT16; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "int32" ) ) ) + else if ( rStr == "int32" ) eType = DATATYPE_INT32; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "uint32" ) ) ) + else if ( rStr == "uint32" ) eType = DATATYPE_UINT32; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "int64" ) ) ) + else if ( rStr == "int64" ) eType = DATATYPE_INT64; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "uint64" ) ) ) + else if ( rStr == "uint64" ) eType = DATATYPE_UINT64; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "float" ) ) ) + else if ( rStr == "float" ) eType = DATATYPE_FLOAT; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "double" ) ) ) + else if ( rStr == "double" ) eType = DATATYPE_DOUBLE; return eType; } @@ -754,17 +754,17 @@ DataType StringHelper::convertToDataType( const OUString& rStr ) FormatType StringHelper::convertToFormatType( const OUString& rStr ) { FormatType eType = FORMATTYPE_NONE; - if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dec" ) ) ) + if ( rStr == "dec" ) eType = FORMATTYPE_DEC; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hex" ) ) ) + else if ( rStr == "hex" ) eType = FORMATTYPE_HEX; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "shorthex" ) ) ) + else if ( rStr == "shorthex" ) eType = FORMATTYPE_SHORTHEX; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bin" ) ) ) + else if ( rStr == "bin" ) eType = FORMATTYPE_BIN; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "fix" ) ) ) + else if ( rStr == "fix" ) eType = FORMATTYPE_FIX; - else if( rStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bool" ) ) ) + else if ( rStr == "bool" ) eType = FORMATTYPE_BOOL; return eType; } @@ -828,9 +828,9 @@ bool StringHelper::convertStringToDouble( double& orfData, const OUString& rData bool StringHelper::convertStringToBool( const OUString& rData ) { - if( rData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "true" ) ) ) + if ( rData == "true" ) return true; - if( rData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "false" ) ) ) + if ( rData == "false" ) return false; sal_Int64 nData; return convertStringToInt( nData, rData ) && (nData != 0); @@ -996,9 +996,9 @@ bool NameListBase::implIsValid() const void NameListBase::implProcessConfigItemStr( TextInputStream& rStrm, const OUString& rKey, const OUString& rData ) { - if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "include" ) ) ) + if ( rKey == "include" ) include( rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "exclude" ) ) ) + else if ( rKey == "exclude" ) exclude( rData ); else ConfigItemBase::implProcessConfigItemStr( rStrm, rKey, rData ); @@ -1058,9 +1058,9 @@ ConstList::ConstList( const SharedConfigData& rCfgData ) : void ConstList::implProcessConfigItemStr( TextInputStream& rStrm, const OUString& rKey, const OUString& rData ) { - if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "default" ) ) ) + if ( rKey == "default" ) setDefaultName( rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "quote-names" ) ) ) + else if ( rKey == "quote-names" ) setQuoteNames( StringHelper::convertStringToBool( rData ) ); else NameListBase::implProcessConfigItemStr( rStrm, rKey, rData ); @@ -1117,7 +1117,7 @@ void MultiList::setNamesFromVec( sal_Int64 nStartKey, const OUStringVector& rNam void MultiList::implProcessConfigItemStr( TextInputStream& rStrm, const OUString& rKey, const OUString& rData ) { - if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ignore-empty" ) ) ) + if ( rKey == "ignore-empty" ) mbIgnoreEmpty = StringHelper::convertStringToBool( rData ); else ConstList::implProcessConfigItemStr( rStrm, rKey, rData ); @@ -1141,7 +1141,7 @@ FlagsList::FlagsList( const SharedConfigData& rCfgData ) : void FlagsList::implProcessConfigItemStr( TextInputStream& rStrm, const OUString& rKey, const OUString& rData ) { - if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ignore" ) ) ) + if ( rKey == "ignore" ) { sal_Int64 nIgnore; if( StringHelper::convertStringToInt( nIgnore, rData ) ) @@ -1246,11 +1246,11 @@ void CombiList::implSetName( sal_Int64 nKey, const OUString& rName ) for( OUStringVector::iterator aIt = aRemain.begin(), aEnd = aRemain.end(); aIt != aEnd; ++aIt ) { OUStringPair aPair = StringHelper::convertStringToPair( *aIt ); - if( aPair.first.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "noshift" ) ) ) + if ( aPair.first == "noshift" ) { aItemFmt.mbShiftValue = StringHelper::convertStringToBool( aPair.second ); } - else if( aPair.first.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "filter" ) ) ) + else if ( aPair.first == "filter" ) { OUStringPair aFilter = StringHelper::convertStringToPair( aPair.second, '~' ); ExtItemFormatKey aKey( nKey ); @@ -1438,19 +1438,19 @@ bool SharedConfigData::implIsValid() const void SharedConfigData::implProcessConfigItemStr( TextInputStream& rStrm, const OUString& rKey, const OUString& rData ) { - if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "include-config-file" ) ) ) + if ( rKey == "include-config-file" ) readConfigFile( maConfigPath + rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "constlist" ) ) ) + else if ( rKey == "constlist" ) readNameList< ConstList >( rStrm, rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "multilist" ) ) ) + else if ( rKey == "multilist" ) readNameList< MultiList >( rStrm, rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flagslist" ) ) ) + else if ( rKey == "flagslist" ) readNameList< FlagsList >( rStrm, rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "combilist" ) ) ) + else if ( rKey == "combilist" ) readNameList< CombiList >( rStrm, rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "shortlist" ) ) ) + else if ( rKey == "shortlist" ) createShortList( rData ); - else if( rKey.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "unitconverter" ) ) ) + else if ( rKey == "unitconverter" ) createUnitConverter( rData ); else setOption( rKey, rData ); diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 1aa62161f745..d400fe1dc99b 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -273,9 +273,9 @@ void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nSt // property ID names mxPropIds = cfg().createNameList< ConstList >( "OLEPROP-IDS" ); OUString aGuidName = cfg().getStringOption( rGuid, OUString() ); - if( aGuidName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalDocProp" ) ) ) + if ( aGuidName == "GlobalDocProp" ) mxPropIds->includeList( cfg().getNameList( "OLEPROP-GLOBALIDS" ) ); - else if( aGuidName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BuiltinDocProp" ) ) ) + else if ( aGuidName == "BuiltinDocProp" ) mxPropIds->includeList( cfg().getNameList( "OLEPROP-BUILTINIDS" ) ); else mxPropIds->includeList( cfg().getNameList( "OLEPROP-BASEIDS" ) ); @@ -559,7 +559,7 @@ void OleStorageObject::construct( const ObjectBase& rParent, const StorageRef& r void OleStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& /*rStrgPath*/, const OUString& rStrmName, const OUString& rSysFileName ) { - if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\001CompObj" ) ) ) + if ( rStrmName == "\001CompObj" ) OleCompObjObject( *this, rxStrm, rSysFileName ).dump(); else if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\005SummaryInformation" ) ) || rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\005DocumentSummaryInformation" ) ) ) OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump(); @@ -660,7 +660,7 @@ bool ComCtlObjectBase::dumpComCtlComplex() writeEmptyItem( "font" ); IndentGuard aIndGuard2( mxOut ); OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() ); - if( aClassName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StdFont" ) ) ) + if ( aClassName == "StdFont" ) StdFontObject( *this ).dump(); } if( !mxStrm->isEof() && (nFlags & 0x02) ) @@ -668,7 +668,7 @@ bool ComCtlObjectBase::dumpComCtlComplex() writeEmptyItem( "mouse-icon" ); IndentGuard aIndGuard2( mxOut ); OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() ); - if( aClassName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StdPic" ) ) ) + if ( aClassName == "StdPic" ) StdPicObject( *this ).dump(); } return !mxStrm->isEof(); @@ -1215,11 +1215,11 @@ void AxPropertyObjectBase::dumpLargeProperties() { IndentGuard aIndGuard2( mxOut ); OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() ); - if( aClassName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StdFont" ) ) ) + if ( aClassName == "StdFont" ) StdFontObject( *this ).dump(); - else if( aClassName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StdPic" ) ) ) + else if ( aClassName == "StdPic" ) StdPicObject( *this ).dump(); - else if( aClassName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CFontNew" ) ) ) + else if ( aClassName == "CFontNew" ) AxCFontNewObject( *this ).dump(); else ensureValid( false ); @@ -1530,7 +1530,7 @@ void FormControlStreamObject::implDump() if( !maProgId.isEmpty() && !mxStrm->isEof() ) { - if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CommandButton.1" ) ) ) + if ( maProgId == "Forms.CommandButton.1" ) AxCommandButtonObject( *this ).dump(); else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.TextBox.1" ) ) || maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ListBox.1" ) ) || @@ -1540,45 +1540,45 @@ void FormControlStreamObject::implDump() maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ToggleButton.1" ) ) || maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RefEdit.Ctrl" ) ) ) AxMorphControlObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Label.1" ) ) ) + else if ( maProgId == "Forms.Label.1" ) AxLabelObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Image.1" ) ) ) + else if ( maProgId == "Forms.Image.1" ) AxImageObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ScrollBar.1" ) ) ) + else if ( maProgId == "Forms.ScrollBar.1" ) AxScrollBarObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.SpinButton.1" ) ) ) + else if ( maProgId == "Forms.SpinButton.1" ) AxSpinButtonObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.TabStrip.1" ) ) ) + else if ( maProgId == "Forms.TabStrip.1" ) AxTabStripObject( *this ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComCtl2.FlatScrollBar.2" ) ) ) + else if ( maProgId == "MSComCtl2.FlatScrollBar.2" ) ComCtlScrollBarObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.ProgCtrl.1" ) ) ) + else if ( maProgId == "COMCTL.ProgCtrl.1" ) ComCtlProgressBarObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComctlLib.ProgCtrl.2" ) ) ) + else if ( maProgId == "MSComctlLib.ProgCtrl.2" ) ComCtlProgressBarObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.Slider.1" ) ) ) + else if ( maProgId == "COMCTL.Slider.1" ) ComCtlSliderObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComctlLib.Slider.2" ) ) ) + else if ( maProgId == "MSComctlLib.Slider.2" ) ComCtlSliderObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ComCtl2.UpDown.1" ) ) ) + else if ( maProgId == "ComCtl2.UpDown.1" ) ComCtlUpDownObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComCtl2.UpDown.2" ) ) ) + else if ( maProgId == "MSComCtl2.UpDown.2" ) ComCtlUpDownObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.ImageListCtrl.1" ) ) ) + else if ( maProgId == "COMCTL.ImageListCtrl.1" ) ComCtlImageListObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComctlLib.ImageListCtrl.2" ) ) ) + else if ( maProgId == "MSComctlLib.ImageListCtrl.2" ) ComCtlImageListObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.TabStrip.1" ) ) ) + else if ( maProgId == "COMCTL.TabStrip.1" ) ComCtlTabStripObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComctlLib.TabStrip.2" ) ) ) + else if ( maProgId == "MSComctlLib.TabStrip.2" ) ComCtlTabStripObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.TreeCtrl.1" ) ) ) + else if ( maProgId == "COMCTL.TreeCtrl.1" ) ComCtlTreeViewObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MSComctlLib.TreeCtrl.2" ) ) ) + else if ( maProgId == "MSComctlLib.TreeCtrl.2" ) ComCtlTreeViewObject( *this, 6 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "COMCTL.SBarCtrl.1" ) ) ) + else if ( maProgId == "COMCTL.SBarCtrl.1" ) ComCtlStatusBarObject( *this, 5 ).dump(); - else if( maProgId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StdPic" ) ) ) + else if ( maProgId == "StdPic" ) StdPicObject( *this ).dump(); } dumpRemainingStream(); @@ -1933,11 +1933,11 @@ VbaContainerStorageObject::VbaContainerStorageObject( const ObjectBase& rParent, void VbaContainerStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName ) { - if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "f" ) ) ) + if ( rStrmName == "f" ) VbaFStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump(); - else if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "o" ) ) ) + else if ( rStrmName == "o" ) VbaOStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump(); - else if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "x" ) ) ) + else if ( rStrmName == "x" ) VbaXStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump(); else OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName ); @@ -2175,7 +2175,7 @@ VbaFormStorageObject::VbaFormStorageObject( const ObjectBase& rParent, const Sto void VbaFormStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName ) { - if( rStrmName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "\003VBFrame" ) ) ) + if ( rStrmName == "\003VBFrame" ) TextLineStreamObject( *this, rxStrm, mrVbaData.meTextEnc, rSysFileName ).dump(); else VbaContainerStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName ); @@ -2199,7 +2199,7 @@ void VbaProjectStorageObject::implDumpStream( const Reference< XInputStream >& r void VbaProjectStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath ) { - if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VBA" ) ) ) + if ( rStrgPath == "VBA" ) VbaStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump(); else VbaFormStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump(); diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx index f470afadbac6..f9ca6422aab4 100644 --- a/oox/source/dump/pptxdumper.cxx +++ b/oox/source/dump/pptxdumper.cxx @@ -99,12 +99,12 @@ void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, false ) ); VbaProjectStorageObject( *this, xStrg, rSysFileName ).dump(); } - else if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ppt/embeddings" ) ) ) + else if ( rStrgPath == "ppt/embeddings" ) { StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, false ) ); OleStorageObject( *this, xStrg, rSysFileName ).dump(); } - else if( rStrgPath.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ppt/activeX" ) ) ) + else if ( rStrgPath == "ppt/activeX" ) { StorageRef xStrg( new ::oox::ole::OleStorage( getContext(), rxStrm, true ) ); ActiveXStorageObject( *this, xStrg, rSysFileName ).dump(); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 01e4c015f3b3..3ab7dd91d7af 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1015,7 +1015,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa if ( pValue ) { OUString aPropName( pPropValue[ i ].Name ); DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr())); - if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NumberingType" ) ) ) + if ( aPropName == "NumberingType" ) nNumberingType = *( (sal_Int16*)pValue ); else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Prefix" ) ) ) { if( *(OUString*)pValue == US( ")" ) ) @@ -1025,12 +1025,12 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa bSDot = true; else if( *(OUString*)pValue == US( ")" ) ) bPBehind = true; - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletChar" ) ) ) + } else if ( aPropName == "BulletChar" ) { aBulletChar = String ( *( (String*)pValue ) ).GetChar( 0 ); //printf ("bullet char: %d\n", aBulletChar.getStr()); } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletFont" ) ) ) + else if ( aPropName == "BulletFont" ) { aFontDesc = *( (awt::FontDescriptor*)pValue ); bHasFontDesc = true; @@ -1039,7 +1039,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa // instead of a Unicode encoding the encoding RTL_TEXTENCODING_SYMBOL was used. // Because there might exist a lot of damaged documemts I added this two lines // which fixes the bullet problem for the export. - if ( aFontDesc.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ) ) + if ( aFontDesc.Name == "StarSymbol" ) aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252; } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletRelSize" ) ) ) { @@ -1047,7 +1047,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicURL" ) ) ) { aGraphicURL = ( *(OUString*)pValue ); DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr())); - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicSize" ) ) ) + } else if ( aPropName == "GraphicSize" ) { if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (awt::Size*)0) ) { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 640418447d1f..066a53fb813e 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -713,12 +713,12 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) const PropertyValue& rProp = aGeometrySeq[ i ]; DBG(printf("geometry property: %s\n", USS( rProp.Name ))); - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredX" ) )) + if ( rProp.Name == "MirroredX" ) rProp.Value >>= bFlipH; - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredY" ) )) + if ( rProp.Name == "MirroredY" ) rProp.Value >>= bFlipV; - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AdjustmentValues" ) )) + if ( rProp.Name == "AdjustmentValues" ) nAdjustmentValuesIndex = i; else if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Handles" ) )) { if( !bIsDefaultObject ) diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 776e2bfe513a..44ca44b75bb9 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -159,7 +159,7 @@ namespace oox { namespace ppt { sal_Int32 nLength = aUserData.getLength(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { sal_Int16 nNodeType = 0; p->Value >>= nNodeType; diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index fa312d527b0c..1112e68d28d8 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -273,7 +273,7 @@ namespace oox { namespace ppt { break; case XML_evt: case XML_call: - if( msCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "onstopaudio" ) ) ) + if ( msCommand == "onstopaudio" ) { nCommand = EffectCommands::STOPAUDIO; } diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 1d5a9588f44f..f7ebde4f193b 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -119,7 +119,7 @@ bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& r return 0; // TODO: according to spec, value may contain "auto" - if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "auto" ) ) ) + if ( rValue == "auto" ) { OSL_FAIL( "ConversionHelper::decodeMeasureToEmu - special value 'auto' must be handled by caller" ); return nRefValue; diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx index 7ebe2df0f358..1002637ae538 100644 --- a/package/source/xstor/ocompinstream.cxx +++ b/package/source/xstor/ocompinstream.cxx @@ -389,7 +389,7 @@ sal_Bool SAL_CALL OInputCompStream::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) ) + if ( aSeq[nInd].First == "Target" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -414,7 +414,7 @@ sal_Bool SAL_CALL OInputCompStream::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd].First == "Type" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -441,7 +441,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OInputCompStream::getRelationshipByI uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Id" ) { if ( aSeq[nInd1][nInd2].Second.equals( sID ) ) return aSeq[nInd1]; @@ -474,7 +474,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::g uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Type" ) { if ( aSeq[nInd1][nInd2].Second.equals( sType ) ) { @@ -505,7 +505,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OInputCompStream::g // TODO/LATER: in future the information could be taken directly from m_pImpl when possible uno::Sequence< uno::Sequence< beans::StringPair > > aResult; for ( sal_Int32 aInd = 0; aInd < m_aProperties.getLength(); aInd++ ) - if ( m_aProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) + if ( m_aProperties[aInd].Name == "RelationsInfo" ) { if ( m_aProperties[aInd].Value >>= aResult ) return aResult; @@ -655,12 +655,12 @@ uno::Any SAL_CALL OInputCompStream::getPropertyValue( const ::rtl::OUString& aPr } ::rtl::OUString aPropertyName; - if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) ) + if ( aProp == "IsEncrypted" ) aPropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) ); else aPropertyName = aProp; - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) + if ( aPropertyName == "RelationsInfo" ) throw beans::UnknownPropertyException(); // TODO // all the provided properties are accessible diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index dd0229341aca..697b988a0144 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -431,7 +431,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted() sal_Bool bToBeEncr = sal_False; for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) + if ( m_aProps[nInd].Name == "Encrypted" ) { if ( !( m_aProps[nInd].Value >>= bToBeEncr ) ) { @@ -482,7 +482,7 @@ void OWriteStream_Impl::SetDecrypted() for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) + if ( m_aProps[nInd].Name == "Encrypted" ) m_aProps[nInd].Value <<= sal_False; } } @@ -506,7 +506,7 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn // introduce encryption info for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) + if ( m_aProps[nInd].Name == "Encrypted" ) m_aProps[nInd].Value <<= sal_True; } @@ -950,7 +950,7 @@ void OWriteStream_Impl::Commit() for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ ) { - if ( m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + if ( m_aProps[nInd].Name == "Size" ) { if ( m_pAntiImpl && !m_bHasInsertedStreamOptimization && m_pAntiImpl->m_xSeekable.is() ) { @@ -1063,7 +1063,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( if ( m_nStorageType == embed::StorageFormats::PACKAGE ) { for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ ) - if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) + if ( aResult[nInd].Name == "UseCommonStoragePasswordEncryption" ) { aResult[nInd].Value <<= bUseCommonEncryption; return aResult; @@ -1087,7 +1087,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps( uno::Reference< uno::XInterface >() ); for ( sal_Int32 nInd = 0; nInd < nLen; nInd++ ) - if ( aResult[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) + if ( aResult[nInd].Name == "RelationsInfo" ) { aResult[nInd].Value = aValue; return aResult; @@ -2453,7 +2453,7 @@ void OWriteStream::CloseOutput_Impl() for ( sal_Int32 nInd = 0; nInd < m_pImpl->m_aProps.getLength(); nInd++ ) { - if ( m_pImpl->m_aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + if ( m_pImpl->m_aProps[nInd].Name == "Size" ) m_pImpl->m_aProps[nInd].Value <<= ((sal_Int32)m_xSeekable->getLength()); } } @@ -2813,7 +2813,7 @@ sal_Bool SAL_CALL OWriteStream::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) ) + if ( aSeq[nInd].First == "Target" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -2838,7 +2838,7 @@ sal_Bool SAL_CALL OWriteStream::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd].First == "Type" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -2865,7 +2865,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OWriteStream::getRelationshipByID( uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Id" ) { if ( aSeq[nInd1][nInd2].Second.equals( sID ) ) return aSeq[nInd1]; @@ -2898,7 +2898,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OWriteStream::getRe uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Type" ) { if ( aSeq[nInd1][nInd2].Second.equals( sType ) ) { @@ -3014,7 +3014,7 @@ void SAL_CALL OWriteStream::removeRelationshipByID( const ::rtl::OUString& sID uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Id" ) { if ( aSeq[nInd1][nInd2].Second.equals( sID ) ) { @@ -3264,7 +3264,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const ::rtl::OUString& aPropertyNa else throw lang::IllegalArgumentException(); // TODO } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( aPropertyName == "Size" ) throw beans::PropertyVetoException(); // TODO else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) || aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) ) @@ -3291,13 +3291,13 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) throw lang::DisposedException(); } - if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelId" ) ) ) + if ( aProp == "RelId" ) { return uno::makeAny( m_pImpl->GetNewRelId() ); } ::rtl::OUString aPropertyName; - if ( aProp.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsEncrypted" ) ) ) + if ( aProp == "IsEncrypted" ) aPropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) ); else aPropertyName = aProp; @@ -3318,7 +3318,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp ) else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) ) ) return uno::makeAny( m_pImpl->m_bUseCommonEncryption ); - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( aPropertyName == "Size" ) { CheckInitOnDemand(); diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index 7037e61fb3f0..3a0011c3fb4c 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -210,7 +210,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr aPropsToSet[nNumArgs-1].Name = aDescr[nInd].Name; aPropsToSet[nNumArgs-1].Value = aDescr[nInd].Value; } - else if ( aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StorageFormat" ) ) ) + else if ( aDescr[nInd].Name == "StorageFormat" ) { ::rtl::OUString aFormatName; sal_Int32 nFormatID = 0; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 3845d9c61820..7792a46374d4 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -495,7 +495,7 @@ void OStorage_Impl::OpenOwnPackage() aArguments.realloc( ++nArgNum ); aArguments[nArgNum-1] <<= aNamedValue; } - else if ( m_xProperties[aInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) + else if ( m_xProperties[aInd].Name == "Password" ) { // TODO: implement password setting for documents // the password entry must be removed after setting @@ -5007,7 +5007,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( aPropertyName == "MediaType" ) { aValue >>= m_pImpl->m_aMediaType; m_pImpl->m_bControlMediaType = sal_True; @@ -5015,7 +5015,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, m_pImpl->m_bBroadcastModified = sal_True; m_pImpl->m_bIsModified = sal_True; } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Version" ) ) ) + else if ( aPropertyName == "Version" ) { aValue >>= m_pImpl->m_aVersion; m_pImpl->m_bControlVersion = sal_True; @@ -5040,7 +5040,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfoStream" ) ) ) + if ( aPropertyName == "RelationsInfoStream" ) { uno::Reference< io::XInputStream > xInRelStream; if ( ( aValue >>= xInRelStream ) && xInRelStream.is() ) @@ -5063,7 +5063,7 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, else throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RelationsInfo" ) ) ) + else if ( aPropertyName == "RelationsInfo" ) { if ( aValue >>= m_pImpl->m_aRelInfo ) { @@ -5132,18 +5132,18 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa aCaught ); } - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( aPropertyName == "MediaType" ) return uno::makeAny( m_pImpl->m_aMediaType ); - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Version" ) ) ) + else if ( aPropertyName == "Version" ) return uno::makeAny( m_pImpl->m_aVersion ); else return uno::makeAny( m_pImpl->m_bMTFallbackUsed ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsRoot" ) ) ) + else if ( aPropertyName == "IsRoot" ) { return uno::makeAny( m_pData->m_bIsRoot ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenMode" ) ) ) + else if ( aPropertyName == "OpenMode" ) { return uno::makeAny( m_pImpl->m_nStorageMode ); } @@ -5158,7 +5158,7 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa return m_pImpl->m_xProperties[aInd].Value; } - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + if ( aPropertyName == "URL" ) return uno::makeAny( ::rtl::OUString() ); return uno::makeAny( sal_False ); // RepairPackage @@ -5334,7 +5334,7 @@ sal_Bool SAL_CALL OStorage::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Target" ) ) ) + if ( aSeq[nInd].First == "Target" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -5359,7 +5359,7 @@ sal_Bool SAL_CALL OStorage::hasByID( const ::rtl::OUString& sID ) uno::Sequence< beans::StringPair > aSeq = getRelationshipByID( sID ); for ( sal_Int32 nInd = 0; nInd < aSeq.getLength(); nInd++ ) - if ( aSeq[nInd].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd].First == "Type" ) return aSeq[nInd].Second; return ::rtl::OUString(); @@ -5386,7 +5386,7 @@ uno::Sequence< beans::StringPair > SAL_CALL OStorage::getRelationshipByID( cons uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Id" ) { if ( aSeq[nInd1][nInd2].Second.equals( sID ) ) return aSeq[nInd1]; @@ -5419,7 +5419,7 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OStorage::getRelati uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Type" ) { // the type is usually an URL, so the check should be case insensitive if ( aSeq[nInd1][nInd2].Second.equalsIgnoreAsciiCase( sType ) ) @@ -5536,7 +5536,7 @@ void SAL_CALL OStorage::removeRelationshipByID( const ::rtl::OUString& sID ) uno::Sequence< uno::Sequence< beans::StringPair > > aSeq = getAllRelationships(); for ( sal_Int32 nInd1 = 0; nInd1 < aSeq.getLength(); nInd1++ ) for ( sal_Int32 nInd2 = 0; nInd2 < aSeq[nInd1].getLength(); nInd2++ ) - if ( aSeq[nInd1][nInd2].First.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Id" ) ) ) + if ( aSeq[nInd1][nInd2].First == "Id" ) { if ( aSeq[nInd1][nInd2].Second.equals( sID ) ) { diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 776ccbccdfb9..c6bbff940b29 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -691,9 +691,9 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) } else if ( ( aArguments[ind] >>= aNamedValue ) ) { - if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "RepairPackage" ) ) ) + if ( aNamedValue.Name == "RepairPackage" ) aNamedValue.Value >>= m_bForceRecovery; - else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PackageFormat" ) ) ) + else if ( aNamedValue.Name == "PackageFormat" ) { // setting this argument to true means Package format // setting it to false means plain Zip format @@ -705,7 +705,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) m_pRootFolder->setPackageFormat_Impl( m_nFormat ); } - else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StorageFormat" ) ) ) + else if ( aNamedValue.Name == "StorageFormat" ) { ::rtl::OUString aFormatName; sal_Int32 nFormatID = 0; @@ -734,7 +734,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) m_pRootFolder->setPackageFormat_Impl( m_nFormat ); } - else if ( aNamedValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowRemoveOnInsert" ) ) ) + else if ( aNamedValue.Name == "AllowRemoveOnInsert" ) { aNamedValue.Value >>= m_bAllowRemoveOnInsert; m_pRootFolder->setRemoveOnInsertMode_Impl( m_bAllowRemoveOnInsert ); @@ -1730,14 +1730,14 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const ||aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( IS_INCONSISTENT_PROPERTY ) ) ||aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MEDIATYPE_FALLBACK_USED_PROPERTY ) ) ) throw PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ENCRYPTION_KEY_PROPERTY ) ) ) + else if ( aPropertyName == ENCRYPTION_KEY_PROPERTY ) { if ( !( aValue >>= m_aEncryptionKey ) ) throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 2 ); m_aStorageEncryptionKeys.realloc( 0 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STORAGE_ENCRYPTION_KEYS_PROPERTY ) ) ) + else if ( aPropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { // this property is only necessary to support raw passwords in storage API; // because of this support the storage has to operate with more than one key dependent on storage generation algorithm; @@ -1766,7 +1766,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const m_aStorageEncryptionKeys = aKeys; m_aEncryptionKey.realloc( 0 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ENCRYPTION_ALGORITHMS_PROPERTY ) ) ) + else if ( aPropertyName == ENCRYPTION_ALGORITHMS_PROPERTY ) { uno::Sequence< beans::NamedValue > aAlgorithms; if ( m_pZipFile || !( aValue >>= aAlgorithms ) || aAlgorithms.getLength() == 0 ) @@ -1777,7 +1777,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const for ( sal_Int32 nInd = 0; nInd < aAlgorithms.getLength(); nInd++ ) { - if ( aAlgorithms[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StartKeyGenerationAlgorithm" ) ) ) + if ( aAlgorithms[nInd].Name == "StartKeyGenerationAlgorithm" ) { sal_Int32 nID = 0; if ( !( aAlgorithms[nInd].Value >>= nID ) @@ -1786,7 +1786,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const m_nStartKeyGenerationID = nID; } - else if ( aAlgorithms[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EncryptionAlgorithm" ) ) ) + else if ( aAlgorithms[nInd].Name == "EncryptionAlgorithm" ) { sal_Int32 nID = 0; if ( !( aAlgorithms[nInd].Value >>= nID ) @@ -1795,7 +1795,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const m_nCommonEncryptionID = nID; } - else if ( aAlgorithms[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ChecksumAlgorithm" ) ) ) + else if ( aAlgorithms[nInd].Name == "ChecksumAlgorithm" ) { sal_Int32 nID = 0; if ( !( aAlgorithms[nInd].Value >>= nID ) @@ -1824,12 +1824,12 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) // throw UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); Any aAny; - if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( ENCRYPTION_KEY_PROPERTY ) ) ) + if ( PropertyName == ENCRYPTION_KEY_PROPERTY ) { aAny <<= m_aEncryptionKey; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ENCRYPTION_ALGORITHMS_PROPERTY ) ) ) + else if ( PropertyName == ENCRYPTION_ALGORITHMS_PROPERTY ) { ::comphelper::SequenceAsHashMap aAlgorithms; aAlgorithms[ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StartKeyGenerationAlgorithm" ) ) ] <<= m_nStartKeyGenerationID; @@ -1838,27 +1838,27 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) aAny <<= aAlgorithms.getAsConstNamedValueList(); return aAny; } - if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( STORAGE_ENCRYPTION_KEYS_PROPERTY ) ) ) + if ( PropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { aAny <<= m_aStorageEncryptionKeys; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( HAS_ENCRYPTED_ENTRIES_PROPERTY ) ) ) + else if ( PropertyName == HAS_ENCRYPTED_ENTRIES_PROPERTY ) { aAny <<= m_bHasEncryptedEntries; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( HAS_NONENCRYPTED_ENTRIES_PROPERTY ) ) ) + else if ( PropertyName == HAS_NONENCRYPTED_ENTRIES_PROPERTY ) { aAny <<= m_bHasNonEncryptedEntries; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( IS_INCONSISTENT_PROPERTY ) ) ) + else if ( PropertyName == IS_INCONSISTENT_PROPERTY ) { aAny <<= m_bInconsistent; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( MEDIATYPE_FALLBACK_USED_PROPERTY ) ) ) + else if ( PropertyName == MEDIATYPE_FALLBACK_USED_PROPERTY ) { aAny <<= m_bMediaTypeFallbackUsed; return aAny; diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 48c51b42d364..5fabbab1e973 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -798,7 +798,7 @@ void SAL_CALL ZipPackageFolder::setPropertyValue( const ::rtl::OUString& aProper uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const ::rtl::OUString& PropertyName ) throw(UnknownPropertyException, WrappedTargetException, uno::RuntimeException) { - if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( PropertyName == "MediaType" ) { // TODO/LATER: activate when zip ucp is ready // if ( m_nFormat != embed::StorageFormats::PACKAGE ) @@ -806,9 +806,9 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const ::rtl::OUString& Pro return uno::makeAny ( sMediaType ); } - else if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Version" ) ) ) + else if ( PropertyName == "Version" ) return uno::makeAny( m_sVersion ); - else if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Size" ) ) ) + else if ( PropertyName == "Size" ) return uno::makeAny ( aEntry.nSize ); else throw UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 483759e7e16d..d49c0b3a0029 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -710,7 +710,7 @@ sal_Int64 SAL_CALL ZipPackageStream::getSomething( const Sequence< sal_Int8 >& a void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw( beans::UnknownPropertyException, beans::PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException ) { - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" )) ) + if ( aPropertyName == "MediaType" ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE && rZipPackage.getFormat() != embed::StorageFormats::OFOPXML ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -732,14 +732,14 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, 2 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( aPropertyName == "Size" ) { if ( !( aValue >>= aEntry.nSize ) ) throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for Size property!\n" ) ), uno::Reference< XInterface >(), 2 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encrypted" ) ) ) + else if ( aPropertyName == "Encrypted" ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -763,7 +763,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, 2 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ENCRYPTION_KEY_PROPERTY ) ) ) + else if ( aPropertyName == ENCRYPTION_KEY_PROPERTY ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -808,7 +808,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, m_aStorageEncryptionKeys.realloc( 0 ); } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STORAGE_ENCRYPTION_KEYS_PROPERTY ) ) ) + else if ( aPropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -870,37 +870,37 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName ) throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException ) { Any aAny; - if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + if ( PropertyName == "MediaType" ) { aAny <<= sMediaType; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Size" ) ) ) + else if ( PropertyName == "Size" ) { aAny <<= aEntry.nSize; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Encrypted" ) ) ) + else if ( PropertyName == "Encrypted" ) { aAny <<= ((m_nStreamMode == PACKAGE_STREAM_RAW) ? sal_True : bToBeEncrypted); return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "WasEncrypted" ) ) ) + else if ( PropertyName == "WasEncrypted" ) { aAny <<= bIsEncrypted; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Compressed" ) ) ) + else if ( PropertyName == "Compressed" ) { aAny <<= bToBeCompressed; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ENCRYPTION_KEY_PROPERTY ) ) ) + else if ( PropertyName == ENCRYPTION_KEY_PROPERTY ) { aAny <<= m_aEncryptionKey; return aAny; } - else if ( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STORAGE_ENCRYPTION_KEYS_PROPERTY ) ) ) + else if ( PropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { aAny <<= m_aStorageEncryptionKeys; return aAny; diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 459e8875ded2..8194de9aa328 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -188,11 +188,11 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile ) OUString str; if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGLEVEL" ), str ) ) { - if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NONE" ) ) ) + if ( str == "NONE" ) *pLevel = LogLevel::NONE; - else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CALL" ) ) ) + else if ( str == "CALL" ) *pLevel = LogLevel::CALL; - else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ARGS" ) ) ) + else if ( str == "ARGS" ) *pLevel = LogLevel::ARGS; else { @@ -205,9 +205,9 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile ) *ppFile = stdout; if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGTARGET" ), str ) ) { - if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stdout" ) ) ) + if ( str == "stdout" ) *ppFile = stdout; - else if( str.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stderr" ) ) ) + else if ( str == "stderr" ) *ppFile = stderr; else { diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 61e4c1610228..d81654971b38 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2245,7 +2245,7 @@ uno::Reference< uno::XInterface > SAL_CALL OReportDefinition::createInstanceWith { beans::NamedValue aValue; *pIter >>= aValue; - if( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Storage" ) ) ) + if ( aValue.Name == "Storage" ) aValue.Value >>= xStorage; } m_pImpl->m_pObjectContainer->SwitchPersistence(xStorage); diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 1431b3bbd1d9..b3b920e63dcd 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -479,11 +479,11 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) const PropertyValue* pEnd = pIter + rDescriptor.getLength(); for(;pIter != pEnd;++pIter) { - if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileName" ) ) ) + if ( pIter->Name == "FileName" ) pIter->Value >>= sFileName; - else if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Storage" ) ) ) + else if ( pIter->Name == "Storage" ) pIter->Value >>= xStorage; - else if( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ComponentData" ) ) ) + else if ( pIter->Name == "ComponentData" ) { Sequence< PropertyValue > aComponent; pIter->Value >>= aComponent; @@ -491,7 +491,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) const PropertyValue* pComponentEnd = pComponentIter + aComponent.getLength(); for(;pComponentIter != pComponentEnd;++pComponentIter) { - if( pComponentIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) ) + if ( pComponentIter->Name == "ActiveConnection" ) { uno::Reference xCon(pComponentIter->Value,uno::UNO_QUERY); xNumberFormatsSupplier = ::dbtools::getNumberFormats(xCon); diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index 487de5d6df34..1e3d04d87215 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -1041,7 +1041,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL expwrap_component_getFactory( OUString aImplementationName = OUString::createFromAscii( pImplName ); - if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( IMPLEMENTATION_NAME ) ) ) + if ( aImplementationName == IMPLEMENTATION_NAME ) { xRet = createSingleFactory( xSMgr, aImplementationName, SaxExpatParser_CreateInstance, diff --git a/sax/source/fastparser/facreg.cxx b/sax/source/fastparser/facreg.cxx index 35db3e14ae18..308268455443 100644 --- a/sax/source/fastparser/facreg.cxx +++ b/sax/source/fastparser/facreg.cxx @@ -52,13 +52,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fastsax_component_getFactory( OUString aImplementationName( OUString::createFromAscii( pImplName ) ); - if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( PARSER_IMPLEMENTATION_NAME ) ) ) + if ( aImplementationName == PARSER_IMPLEMENTATION_NAME ) { xRet = createSingleFactory( xSMgr, aImplementationName, FastSaxParser_CreateInstance, FastSaxParser::getSupportedServiceNames_Static() ); } - else if (aImplementationName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SERIALIZER_IMPLEMENTATION_NAME ) ) ) + else if ( aImplementationName == SERIALIZER_IMPLEMENTATION_NAME ) { xRet = createSingleFactory( xSMgr, aImplementationName, FastSaxSerializer_CreateInstance, diff --git a/sc/source/core/tool/addinhelpid.cxx b/sc/source/core/tool/addinhelpid.cxx index 10832d41ce6a..67bae51bcef2 100644 --- a/sc/source/core/tool/addinhelpid.cxx +++ b/sc/source/core/tool/addinhelpid.cxx @@ -169,12 +169,12 @@ void ScUnoAddInHelpIdGenerator::SetServiceName( const ::rtl::OUString& rServiceN pCurrHelpIds = NULL; sal_uInt32 nSize = 0; - if( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.addin.Analysis" ) ) ) + if ( rServiceName == "com.sun.star.sheet.addin.Analysis" ) { pCurrHelpIds = pAnalysisHelpIds; nSize = sizeof( pAnalysisHelpIds ); } - else if( rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.addin.DateFunctions" ) ) ) + else if ( rServiceName == "com.sun.star.sheet.addin.DateFunctions" ) { pCurrHelpIds = pDateFuncHelpIds; nSize = sizeof( pDateFuncHelpIds ); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index d81881d202ed..5ef81a38a34a 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -807,7 +807,7 @@ bool ScOptSolverDlg::FindTimeout( sal_Int32& rTimeout ) for (sal_Int32 nProp=0; nProp>= rTimeout ); } return bFound; diff --git a/sc/source/ui/unoobj/celllistsource.cxx b/sc/source/ui/unoobj/celllistsource.cxx index 54dbfce66149..bbc620a98381 100644 --- a/sc/source/ui/unoobj/celllistsource.cxx +++ b/sc/source/ui/unoobj/celllistsource.cxx @@ -372,7 +372,7 @@ namespace calc NamedValue aValue; if ( *pLoop >>= aValue ) { - if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CellRange" ) ) ) + if ( aValue.Name == "CellRange" ) { if ( aValue.Value >>= aRangeAddress ) bFoundAddress = sal_True; diff --git a/sc/source/ui/unoobj/cellvaluebinding.cxx b/sc/source/ui/unoobj/cellvaluebinding.cxx index 4df865820c55..6ed9bec9d0c5 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.cxx +++ b/sc/source/ui/unoobj/cellvaluebinding.cxx @@ -589,7 +589,7 @@ namespace calc NamedValue aValue; if ( *pLoop >>= aValue ) { - if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BoundCell" ) ) ) + if ( aValue.Name == "BoundCell" ) { if ( aValue.Value >>= aAddress ) bFoundAddress = sal_True; diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 45a88e7a32ac..30a26fee657b 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -3442,11 +3442,11 @@ void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyNam if (pMember) { bool bGetNewIndex = false; - if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SHOWDETAIL ) ) ) + if ( aPropertyName == SC_UNONAME_SHOWDETAIL ) pMember->SetShowDetails(cppu::any2bool(aValue)); - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN ) ) ) + else if ( aPropertyName == SC_UNONAME_ISHIDDEN ) pMember->SetIsVisible(!cppu::any2bool(aValue)); - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_POS ) ) ) + else if ( aPropertyName == SC_UNONAME_POS ) { sal_Int32 nNewPos = 0; if ( ( aValue >>= nNewPos ) && nNewPos >= 0 && nNewPos < nCount ) @@ -3492,7 +3492,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName Reference< XNamed > xMember( xMembersIndex->getByIndex( mnIndex ), UNO_QUERY ); String sName( xMember->getName() ); ScDPSaveMember* pMember = pDim->GetExistingMemberByName( sName ); - if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SHOWDETAIL ) ) ) + if ( aPropertyName == SC_UNONAME_SHOWDETAIL ) { if (pMember && pMember->HasShowDetails()) { @@ -3507,7 +3507,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName aRet <<= true; } } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN ) ) ) + else if ( aPropertyName == SC_UNONAME_ISHIDDEN ) { if (pMember && pMember->HasIsVisible()) { @@ -3522,7 +3522,7 @@ Any SAL_CALL ScDataPilotItemObj::getPropertyValue( const OUString& aPropertyName aRet <<= false; } } - else if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_POS ) ) ) + else if ( aPropertyName == SC_UNONAME_POS ) { aRet <<= mnIndex; } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 3ca264e036dd..030395c587e4 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -367,12 +367,12 @@ void ScPrintUIOptions::SetDefaults() for (sal_Int32 nPropPos=0; nPropPos>= aPropertyValue ) { - if ( aPropertyValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintContent" ) ) ) + if ( aPropertyValue.Name == "PrintContent" ) { aPropertyValue.Value <<= nContent; aUIProp[nPropPos].Value <<= aPropertyValue; @@ -824,28 +824,28 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, for( sal_Int32 i = 0, nLen = rOptions.getLength(); i < nLen; i++ ) { - if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsOnlySelectedSheets" ) ) ) + if ( rOptions[i].Name == "IsOnlySelectedSheets" ) { rOptions[i].Value >>= bSelectedSheetsOnly; } - else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsIncludeEmptyPages" ) ) ) + else if ( rOptions[i].Name == "IsIncludeEmptyPages" ) { rOptions[i].Value >>= bIncludeEmptyPages; } - else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageRange" ) ) ) + else if ( rOptions[i].Name == "PageRange" ) { rOptions[i].Value >>= aPageRange; } - else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ) + else if ( rOptions[i].Name == "PrintRange" ) { rOptions[i].Value >>= nPrintRange; } - else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintContent" ) ) ) + else if ( rOptions[i].Name == "PrintContent" ) { bHasPrintContent = true; rOptions[i].Value >>= nPrintContent; } - else if( rOptions[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) ) ) + else if ( rOptions[i].Name == "View" ) { rOptions[i].Value >>= xView; } diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index d4b2461e1d25..a2b135bff15d 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -300,12 +300,12 @@ void SAL_CALL ScTableConditionalFormat::addNew( { const beans::PropertyValue& rProp = pPropArray[i]; - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_OPERATOR ) ) ) + if ( rProp.Name == SC_UNONAME_OPERATOR ) { sal_Int32 eOper = ScUnoHelpFunctions::GetEnumFromAny( rProp.Value ); aEntry.meMode = lcl_ConditionOperatorToModeNew( eOper ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULA1 ) ) ) + else if ( rProp.Name == SC_UNONAME_FORMULA1 ) { rtl::OUString aStrVal; uno::Sequence aTokens; @@ -317,7 +317,7 @@ void SAL_CALL ScTableConditionalFormat::addNew( aEntry.maTokens1 = aTokens; } } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULA2 ) ) ) + else if ( rProp.Name == SC_UNONAME_FORMULA2 ) { rtl::OUString aStrVal; uno::Sequence aTokens; @@ -329,44 +329,44 @@ void SAL_CALL ScTableConditionalFormat::addNew( aEntry.maTokens2 = aTokens; } } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SOURCEPOS ) ) ) + else if ( rProp.Name == SC_UNONAME_SOURCEPOS ) { table::CellAddress aAddress; if ( rProp.Value >>= aAddress ) aEntry.maPos = ScAddress( (SCCOL)aAddress.Column, (SCROW)aAddress.Row, aAddress.Sheet ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_SOURCESTR ) ) ) + else if ( rProp.Name == SC_UNONAME_SOURCESTR ) { rtl::OUString aStrVal; if ( rProp.Value >>= aStrVal ) aEntry.maPosStr = String( aStrVal ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_STYLENAME ) ) ) + else if ( rProp.Name == SC_UNONAME_STYLENAME ) { rtl::OUString aStrVal; if ( rProp.Value >>= aStrVal ) aEntry.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStrVal, SFX_STYLE_FAMILY_PARA ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULANMSP1 ) ) ) + else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 ) { rtl::OUString aStrVal; if ( rProp.Value >>= aStrVal ) aEntry.maExprNmsp1 = aStrVal; } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_FORMULANMSP2 ) ) ) + else if ( rProp.Name == SC_UNONAME_FORMULANMSP2 ) { rtl::OUString aStrVal; if ( rProp.Value >>= aStrVal ) aEntry.maExprNmsp2 = aStrVal; } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_GRAMMAR1 ) ) ) + else if ( rProp.Name == SC_UNONAME_GRAMMAR1 ) { sal_Int32 nVal = 0; if ( rProp.Value >>= nVal ) aEntry.meGrammar1 = static_cast< FormulaGrammar::Grammar >( nVal ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_GRAMMAR2 ) ) ) + else if ( rProp.Name == SC_UNONAME_GRAMMAR2 ) { sal_Int32 nVal = 0; if ( rProp.Value >>= nVal ) diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index f162a756551c..13c63979008b 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -313,7 +313,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue( { SolarMutexGuard aGuard; - if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) ) + if ( aPropertyName == "IsArrayFunction" ) { if( !(aValue >>= mbArray) ) throw lang::IllegalArgumentException(); @@ -337,7 +337,7 @@ uno::Any SAL_CALL ScFunctionAccess::getPropertyValue( const rtl::OUString& aProp { SolarMutexGuard aGuard; - if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsArrayFunction" ) ) ) + if ( aPropertyName == "IsArrayFunction" ) return uno::Any( mbArray ); if ( !pOptions ) diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 5158394febd3..9119c1ee1af0 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -396,7 +396,7 @@ void SAL_CALL ScNamedRangeObj::setPropertyValue( uno::RuntimeException) { SolarMutexGuard aGuard; - if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISSHAREDFMLA ) ) ) + if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA ) { bool bIsShared = false; if( aValue >>= bIsShared ) @@ -413,21 +413,21 @@ uno::Any SAL_CALL ScNamedRangeObj::getPropertyValue( const rtl::OUString& rPrope { SolarMutexGuard aGuard; uno::Any aRet; - if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNO_LINKDISPBIT ) ) ) + if ( rPropertyName == SC_UNO_LINKDISPBIT ) { // no target bitmaps for individual entries (would be all equal) // ScLinkTargetTypeObj::SetLinkTargetBitmap( aRet, SC_LINKTARGETTYPE_RANGENAME ); } - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNO_LINKDISPNAME ) ) ) + else if ( rPropertyName == SC_UNO_LINKDISPNAME ) aRet <<= rtl::OUString( aName ); - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_TOKENINDEX ) ) ) + else if ( rPropertyName == SC_UNONAME_TOKENINDEX ) { // get index for use in formula tokens (read-only) ScRangeData* pData = GetRangeData_Impl(); if (pData) aRet <<= static_cast(pData->GetIndex()); } - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISSHAREDFMLA ) ) ) + else if ( rPropertyName == SC_UNONAME_ISSHAREDFMLA ) { if( ScRangeData* pData = GetRangeData_Impl() ) aRet <<= static_cast< bool >( pData->HasType( RT_SHARED ) ); diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 09b665519106..63d8a140fbaa 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1463,7 +1463,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty case ATTR_PAGE_SCALETO: { const ScPageScaleToItem aItem((const ScPageScaleToItem&)pItemSet->Get(nWhich)); - if (aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SC_UNO_PAGE_SCALETOX ))) + if ( aPropertyName == SC_UNO_PAGE_SCALETOX ) aAny = uno::makeAny(static_cast(aItem.GetWidth())); else aAny = uno::makeAny(static_cast(aItem.GetHeight())); @@ -1843,7 +1843,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons rtl::OUString aName; if ( *pValue >>= aName ) { - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) ) + if ( aName == SC_PAPERBIN_DEFAULTNAME ) bFound = sal_True; else { diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx index ea1ac05269ef..f4274daf085d 100644 --- a/scripting/source/stringresource/stringresource.cxx +++ b/scripting/source/stringresource/stringresource.cxx @@ -1768,7 +1768,7 @@ void StringResourcePersistenceImpl::implScanLocaleNames( const Sequence< ::rtl:: aExtension = aCompleteName.copy( iDot + 1 ); } - if( aExtension.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "properties" ) ) ) + if ( aExtension == "properties" ) { //rtl::OUString aName = aInetObj.getBase(); Locale aLocale; diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 9f99d1e7ab7b..bb1862c0be3e 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -176,27 +176,27 @@ void CustomAnimationEffect::setNode( const ::com::sun::star::uno::Reference< ::c while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { p->Value >>= mnNodeType; } - else if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-id" ) ) ) + else if ( p->Name == "preset-id" ) { p->Value >>= maPresetId; } - else if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-sub-type" ) ) ) + else if ( p->Name == "preset-sub-type" ) { p->Value >>= maPresetSubType; } - else if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-class" ) ) ) + else if ( p->Name == "preset-class" ) { p->Value >>= mnPresetClass; } - else if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-property" ) ) ) + else if ( p->Name == "preset-property" ) { p->Value >>= maProperty; } - else if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "group-id" ) ) ) + else if ( p->Name == "group-id" ) { p->Value >>= mnGroupId; } @@ -416,7 +416,7 @@ sal_Int32 CustomAnimationEffect::get_node_type( const Reference< XAnimationNode const NamedValue* p = aUserData.getConstArray(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { p->Value >>= nNodeType; break; @@ -448,7 +448,7 @@ void CustomAnimationEffect::setPresetClass( sal_Int16 nPresetClass ) NamedValue* p = aUserData.getArray(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-class" ) ) ) + if ( p->Name == "preset-class" ) { p->Value <<= mnPresetClass; bFound = true; @@ -489,7 +489,7 @@ void CustomAnimationEffect::setNodeType( sal_Int16 nNodeType ) NamedValue* p = aUserData.getArray(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { p->Value <<= mnNodeType; bFound = true; @@ -530,7 +530,7 @@ void CustomAnimationEffect::setGroupId( sal_Int32 nGroupId ) NamedValue* p = aUserData.getArray(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "group-id" ) ) ) + if ( p->Name == "group-id" ) { p->Value <<= mnGroupId; bFound = true; @@ -3132,7 +3132,7 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode > while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "master-element" ) ) ) + if ( p->Name == "master-element" ) { p->Value >>= xMaster; break; diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 78b7f878bd0c..122405890799 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -156,7 +156,7 @@ CustomAnimationPreset::CustomAnimationPreset( CustomAnimationEffectPtr pEffect ) while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "text-only" ) ) ) + if ( p->Name == "text-only" ) { mbIsTextOnly = true; break; diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 89b101bbe497..5d4820070a24 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -80,7 +80,7 @@ TransitionPreset::TransitionPreset( const ::com::sun::star::uno::Reference< ::co const NamedValue* p = aUserData.getConstArray(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-id" ) ) ) + if ( p->Name == "preset-id" ) { p->Value >>= maPresetId; break; diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx index 1e65805ed606..f9b6694ed709 100644 --- a/sd/source/filter/eppt/pptexanimations.cxx +++ b/sd/source/filter/eppt/pptexanimations.cxx @@ -170,12 +170,12 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl { case 5 : { - if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "downward" ) ) ) + if ( rPresetSubType == "downward" ) { nPresetSubType = 5; bTranslated = sal_True; } - else if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "across" ) ) ) + else if ( rPresetSubType == "across" ) { nPresetSubType = 10; bTranslated = sal_True; @@ -184,7 +184,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl break; case 17 : { - if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "across" ) ) ) + if ( rPresetSubType == "across" ) { nPresetSubType = 10; bTranslated = sal_True; @@ -193,22 +193,22 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl break; case 18 : { - if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "right-to-top" ) ) ) + if ( rPresetSubType == "right-to-top" ) { nPresetSubType = 3; bTranslated = sal_True; } - else if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "right-to-bottom" ) ) ) + else if ( rPresetSubType == "right-to-bottom" ) { nPresetSubType = 6; bTranslated = sal_True; } - else if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "left-to-top" ) ) ) + else if ( rPresetSubType == "left-to-top" ) { nPresetSubType = 9; bTranslated = sal_True; } - else if ( rPresetSubType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "left-to-bottom" ) ) ) + else if ( rPresetSubType == "left-to-bottom" ) { nPresetSubType = 12; bTranslated = sal_True; @@ -394,7 +394,7 @@ void AnimationExporter::processAfterEffectNodes( const Reference< XAnimationNode while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "master-element" ) ) ) + if ( p->Name == "master-element" ) { p->Value >>= xMaster; break; @@ -783,7 +783,7 @@ sal_Bool AnimationExporter::GetNodeType( const Reference< XAnimationNode >& xNod sal_Int32 nLength = aUserData.getLength(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { if ( p->Value >>= nType ) return sal_True; @@ -896,23 +896,23 @@ void AnimationExporter::GetUserData( const Sequence< NamedValue >& rUserData, co sal_Int32 nLength = rUserData.getLength(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { pAny[ DFF_ANIM_NODE_TYPE ] = &(p->Value); } - else if ( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-class" ) ) ) + else if ( p->Name == "preset-class" ) { pAny[ DFF_ANIM_PRESET_CLASS ] = &(p->Value); } - else if ( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-id" ) ) ) + else if ( p->Name == "preset-id" ) { pAny[ DFF_ANIM_PRESET_ID ] = &(p->Value); } - else if ( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preset-sub-type" ) ) ) + else if ( p->Name == "preset-sub-type" ) { pAny[ DFF_ANIM_PRESET_SUB_TYPE ] = &(p->Value); } - else if ( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "master-element" ) ) ) + else if ( p->Name == "master-element" ) { pAny[ DFF_ANIM_AFTEREFFECT ] = &(p->Value);; } @@ -1467,7 +1467,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) ); } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillStyle" ) ) ) + else if ( rAttributeName == "FillStyle" ) { ::com::sun::star::drawing::FillStyle eFillStyle; if ( rSourceValue >>= eFillStyle ) @@ -1478,7 +1478,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "solid" ) ); } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LineStyle" ) ) ) + else if ( rAttributeName == "LineStyle" ) { ::com::sun::star::drawing::LineStyle eLineStyle; if ( rSourceValue >>= eLineStyle ) @@ -1489,7 +1489,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ); } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharWeight" ) ) ) + else if ( rAttributeName == "CharWeight" ) { float fFontWeight = 0.0; if ( rSourceValue >>= fFontWeight ) @@ -1500,7 +1500,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "normal" ) ); } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharUnderline" ) ) ) + else if ( rAttributeName == "CharUnderline" ) { sal_Int16 nFontUnderline = 0; if ( rSourceValue >>= nFontUnderline ) @@ -1511,7 +1511,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ); } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharPosture" ) ) ) + else if ( rAttributeName == "CharPosture" ) { ::com::sun::star::awt::FontSlant eFontSlant; if ( rSourceValue >>= eFontSlant ) @@ -1522,7 +1522,7 @@ Any AnimationExporter::convertAnimateValue( const Any& rSourceValue, const rtl:: aDest += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "normal" ) ); // ? } } - else if ( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Visibility" ) ) ) + else if ( rAttributeName == "Visibility" ) { sal_Bool bVisible = sal_True; if ( rSourceValue >>= bVisible ) diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 11679669c7fe..8118a70ff662 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -247,43 +247,43 @@ ShapeExport& PowerPointShapeExport::WriteTextShape( Reference< XShape > xShape ) DBG(printf( "shape(text): %s\n", USS(sShapeType) )); - if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TextShape" ) ) ) + if ( sShapeType == "com.sun.star.drawing.TextShape" ) { ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.DateTimeShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.DateTimeShape" ) { if( !WritePlaceholder( xShape, DateAndTime, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.FooterShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.FooterShape" ) { if( !WritePlaceholder( xShape, Footer, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.HeaderShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.HeaderShape" ) { if( !WritePlaceholder( xShape, Header, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.NotesShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.NotesShape" ) { if( mePageType == NOTICE && mrExport.GetPresObj() ) WritePlaceholderShape( xShape, Notes ); else ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.OutlinerShape" ) { if( !WritePlaceholder( xShape, Outliner, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.SlideNumberShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.SlideNumberShape" ) { if( !WritePlaceholder( xShape, SlideNumber, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.TitleTextShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.TitleTextShape" ) { if( !WritePlaceholder( xShape, Title, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); @@ -298,18 +298,18 @@ ShapeExport& PowerPointShapeExport::WriteUnknownShape( Reference< XShape > xShap DBG(printf( "shape(unknown): %s\n", USS(sShapeType) )); - if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.GroupShape" ) ) ) + if ( sShapeType == "com.sun.star.drawing.GroupShape" ) { Reference< XIndexAccess > rXIndexAccess( xShape, UNO_QUERY ); mrExport.EnterGroup( rXIndexAccess ); DBG(printf( "enter group\n" )); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.PageShape" ) ) ) + else if ( sShapeType == "com.sun.star.drawing.PageShape" ) { WritePageShape( xShape, mePageType, mrExport.GetPresObj() ); } - else if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.SubtitleShape" ) ) ) + else if ( sShapeType == "com.sun.star.presentation.SubtitleShape" ) { if( !WritePlaceholder( xShape, Subtitle, mbMaster ) ) ShapeExport::WriteTextShape( xShape ); diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index e53b0c2230a9..ad0d11a8b881 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -825,17 +825,17 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 if ( pValue ) { ::rtl::OUString aPropName( pPropValue[ i ].Name ); - if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NumberingType" ) ) ) + if ( aPropName == "NumberingType" ) nNumberingType = *( (sal_Int16*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Adjust" ) ) ) + else if ( aPropName == "Adjust" ) nHorzAdjust = *( (sal_Int16*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletChar" ) ) ) + else if ( aPropName == "BulletChar" ) { String aString( *( (String*)pValue ) ); if ( aString.Len() ) cBulletId = aString.GetChar( 0 ); } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletFont" ) ) ) + else if ( aPropName == "BulletFont" ) { aFontDesc = *( (::com::sun::star::awt::FontDescriptor*)pValue ); @@ -843,13 +843,13 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 // instead of a Unicode encoding the encoding RTL_TEXTENCODING_SYMBOL was used. // Because there might exist a lot of damaged documemts I added this two lines // which fixes the bullet problem for the export. - if ( aFontDesc.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ) ) + if ( aFontDesc.Name == "StarSymbol" ) aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252; } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicURL" ) ) ) + else if ( aPropName == "GraphicURL" ) aGraphicURL = ( *(::rtl::OUString*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicSize" ) ) ) + else if ( aPropName == "GraphicSize" ) { if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (::com::sun::star::awt::Size*)0) ) { @@ -860,28 +860,28 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 aBuGraSize.nB = aSize.Height; } } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StartWith" ) ) ) + else if ( aPropName == "StartWith" ) nStartWith = *( (sal_Int16*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LeftMargin" ) ) ) + else if ( aPropName == "LeftMargin" ) nTextOfs = nTextOfs + static_cast< sal_Int16 >( *( (sal_Int32*)pValue ) / ( 2540.0 / 576 ) ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FirstLineOffset" ) ) ) + else if ( aPropName == "FirstLineOffset" ) nBulletOfs += (sal_Int16)( *( (sal_Int32*)pValue ) / ( 2540.0 / 576 ) ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletColor" ) ) ) + else if ( aPropName == "BulletColor" ) { sal_uInt32 nSOColor = *( (sal_uInt32*)pValue ); nBulletColor = nSOColor & 0xff00ff00; // green and hibyte nBulletColor |= (sal_uInt8)( nSOColor ) << 16; // red nBulletColor |= (sal_uInt8)( nSOColor >> 16 ) | 0xfe000000; // blue } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletRelSize" ) ) ) + else if ( aPropName == "BulletRelSize" ) { nBulletRealSize = *( (sal_Int16*)pValue ); nParaFlags |= 0x40; nBulletFlags |= 8; } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Prefix" ) ) ) + else if ( aPropName == "Prefix" ) sPrefix = ( *(::rtl::OUString*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Suffix" ) ) ) + else if ( aPropName == "Suffix" ) sSuffix = ( *(::rtl::OUString*)pValue ); #ifdef DBG_UTIL else if ( ! ( diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx index 2d55e3e061a1..52f6c126b86c 100644 --- a/sd/source/filter/html/HtmlOptionsDialog.cxx +++ b/sd/source/filter/html/HtmlOptionsDialog.cxx @@ -196,7 +196,7 @@ Sequence< PropertyValue > SdHtmlOptionsDialog::getPropertyValues() sal_Int32 i, nCount; for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) break; } if ( i == nCount ) @@ -218,7 +218,7 @@ void SdHtmlOptionsDialog::setPropertyValues( const Sequence< PropertyValue > & a sal_Int32 i, nCount; for ( i = 0, nCount = maMediaDescriptor.getLength(); i < nCount; i++ ) { - if ( maMediaDescriptor[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + if ( maMediaDescriptor[ i ].Name == "FilterData" ) { maMediaDescriptor[ i ].Value >>= maFilterDataSequence; break; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index f2d46ba9f9d3..4d6d3720e29f 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -462,24 +462,24 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams OUString aStr; while( nArgs-- ) { - if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PublishMode" ) ) ) + if ( pParams->Name == "PublishMode" ) { sal_Int32 temp = 0; pParams->Value >>= temp; meMode = (HtmlPublishMode)temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IndexURL" ) ) ) + else if ( pParams->Name == "IndexURL" ) { pParams->Value >>= aStr; maIndexUrl = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Format" ) ) ) + else if ( pParams->Name == "Format" ) { sal_Int32 temp = 0; pParams->Value >>= temp; meFormat = (PublishingFormat)temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Compression" ) ) ) + else if ( pParams->Name == "Compression" ) { pParams->Value >>= aStr; String aTmp( aStr ); @@ -491,19 +491,19 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams mnCompression = (sal_Int16)aTmp.ToInt32(); } } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) ) + else if ( pParams->Name == "Width" ) { sal_Int32 temp = 0; pParams->Value >>= temp; mnWidthPixel = (sal_uInt16)temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseButtonSet" ) ) ) + else if ( pParams->Name == "UseButtonSet" ) { sal_Int32 temp = 0; pParams->Value >>= temp; mnButtonThema = (sal_Int16)temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsExportNotes" ) ) ) + else if ( pParams->Name == "IsExportNotes" ) { if( mbImpress ) { @@ -512,118 +512,118 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams mbNotes = temp; } } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsExportContentsPage" ) ) ) + else if ( pParams->Name == "IsExportContentsPage" ) { sal_Bool temp = sal_False; pParams->Value >>= temp; mbContentsPage = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Author" ) ) ) + else if ( pParams->Name == "Author" ) { pParams->Value >>= aStr; maAuthor = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EMail" ) ) ) + else if ( pParams->Name == "EMail" ) { pParams->Value >>= aStr; maEMail = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HomepageURL" ) ) ) + else if ( pParams->Name == "HomepageURL" ) { pParams->Value >>= aStr; maHomePage = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserText" ) ) ) + else if ( pParams->Name == "UserText" ) { pParams->Value >>= aStr; maInfo = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EnableDownload" ) ) ) + else if ( pParams->Name == "EnableDownload" ) { sal_Bool temp = sal_False; pParams->Value >>= temp; mbDownload = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SlideSound" ) ) ) + else if ( pParams->Name == "SlideSound" ) { sal_Bool temp = sal_True; pParams->Value >>= temp; mbSlideSound = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HiddenSlides" ) ) ) + else if ( pParams->Name == "HiddenSlides" ) { sal_Bool temp = sal_True; pParams->Value >>= temp; mbHiddenSlides = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BackColor" ) ) ) + else if ( pParams->Name == "BackColor" ) { sal_Int32 temp = 0; pParams->Value >>= temp; maBackColor = temp; mbUserAttr = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextColor" ) ) ) + else if ( pParams->Name == "TextColor" ) { sal_Int32 temp = 0; pParams->Value >>= temp; maTextColor = temp; mbUserAttr = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LinkColor" ) ) ) + else if ( pParams->Name == "LinkColor" ) { sal_Int32 temp = 0; pParams->Value >>= temp; maLinkColor = temp; mbUserAttr = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VLinkColor" ) ) ) + else if ( pParams->Name == "VLinkColor" ) { sal_Int32 temp = 0; pParams->Value >>= temp; maVLinkColor = temp; mbUserAttr = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ALinkColor" ) ) ) + else if ( pParams->Name == "ALinkColor" ) { sal_Int32 temp = 0; pParams->Value >>= temp; maALinkColor = temp; mbUserAttr = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsUseDocumentColors" ) ) ) + else if ( pParams->Name == "IsUseDocumentColors" ) { sal_Bool temp = sal_False; pParams->Value >>= temp; mbDocColors = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "KioskSlideDuration" ) ) ) + else if ( pParams->Name == "KioskSlideDuration" ) { sal_Int32 temp = sal_False; pParams->Value >>= temp; mnSlideDuration = temp; mbAutoSlide = true; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "KioskEndless" ) ) ) + else if ( pParams->Name == "KioskEndless" ) { sal_Bool temp = sal_False; pParams->Value >>= temp; mbEndless = temp; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WebCastCGIURL" ) ) ) + else if ( pParams->Name == "WebCastCGIURL" ) { pParams->Value >>= aStr; maCGIPath = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WebCastTargetURL" ) ) ) + else if ( pParams->Name == "WebCastTargetURL" ) { pParams->Value >>= aStr; maURLPath = aStr; } - else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WebCastScriptLanguage" ) ) ) + else if ( pParams->Name == "WebCastScriptLanguage" ) { pParams->Value >>= aStr; - if( aStr.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "asp" ) ) ) + if ( aStr == "asp" ) { meScript = SCRIPT_ASP; } diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 3af544eb88ff..e5e1f1d57ead 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -616,7 +616,7 @@ void AnimationImporter::fixMainSequenceTiming( const ::com::sun::star::uno::Refe sal_Int32 nLength = aUserData.getLength(); while( nLength-- ) { - if( p->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "node-type" ) ) ) + if ( p->Name == "node-type" ) { sal_Int16 nNodeType = 0; p->Value >>= nNodeType; @@ -2222,7 +2222,7 @@ void AnimationImporter::importCommandContainer( const Atom* pAtom, const Referen { case 0: // event case 1: // call - if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "onstopaudio" ) ) ) + if ( aParam == "onstopaudio" ) { nCommand = EffectCommands::STOPAUDIO; } diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 5b691d334522..c1a061d054f1 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1438,7 +1438,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer( sal_Bool bExportNotesPages = sal_False; for( sal_Int32 nProperty = 0, nPropertyCount = rxOptions.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( rxOptions[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportNotesPages" ) ) ) + if ( rxOptions[ nProperty ].Name == "ExportNotesPages" ) rxOptions[ nProperty].Value >>= bExportNotesPages; } uno::Sequence< beans::PropertyValue > aRenderer; diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 82380b6cc652..c4f2566c8c84 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -447,7 +447,7 @@ uno::Any SAL_CALL SdXShape::getPropertyDefault( const OUString& aPropertyName ) { uno::Any aRet( mpShape->_getPropertyDefault(aPropertyName) ); - if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) + if ( aPropertyName == sUNO_shape_layername ) { OUString aName; if( aRet >>= aName ) @@ -688,7 +688,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, { uno::Any aAny( aValue ); - if( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) + if ( aPropertyName == sUNO_shape_layername ) { OUString aName; if( aAny >>= aName ) @@ -848,7 +848,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, { aRet = mpShape->_getPropertyValue(PropertyName); - if( PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_shape_layername ) ) ) + if ( PropertyName == sUNO_shape_layername ) { OUString aName; if( aRet >>= aName ) @@ -1451,7 +1451,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno sBuffer.append( aLibName ); sBuffer.append( sal_Unicode('.') ); - if( aStrLibrary.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarOffice" ) ) ) + if ( aStrLibrary == "StarOffice" ) { sBuffer.append( OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) ); } diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 4a8107a2ee46..5ad0394408cd 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1158,7 +1158,7 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference& rViewTabB { for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) )) + if ( aPropSeq[i].Name == "Name" ) { aPropSeq[i].Value >>= aLabel; break; diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 0af7f39b9054..673cfe83d453 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -565,7 +565,7 @@ void DrawViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence const com::sun::star::beans::PropertyValue *pValue = rSequence.getConstArray(); for (sal_Int16 i = 0 ; i < nLength; i++, pValue++ ) { - if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ZoomOnPage ) ) ) + if ( pValue->Name == sUNO_View_ZoomOnPage ) { sal_Bool bZoomPage = sal_False; if( pValue->Value >>= bZoomPage ) diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 9cf26a6c0187..8724d525bbcc 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -638,10 +638,10 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : const com::sun::star::beans::PropertyValue *pValue = rSequence.getConstArray(); for (sal_Int16 i = 0 ; i < nLength; i++, pValue++ ) { - if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ViewId ) ) ) + if ( pValue->Name == sUNO_View_ViewId ) { } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesDrawing ) ) ) + else if ( pValue->Name == sUNO_View_SnapLinesDrawing ) { if( pValue->Value >>= aString ) { @@ -650,7 +650,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetStandardHelpLines( aHelpLines ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesNotes ) ) ) + else if ( pValue->Name == sUNO_View_SnapLinesNotes ) { if( pValue->Value >>= aString ) { @@ -659,7 +659,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetNotesHelpLines( aHelpLines ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesHandout ) ) ) + else if ( pValue->Name == sUNO_View_SnapLinesHandout ) { if( pValue->Value >>= aString ) { @@ -668,14 +668,14 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetHandoutHelpLines( aHelpLines ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_RulerIsVisible ) ) ) + else if ( pValue->Name == sUNO_View_RulerIsVisible ) { if( pValue->Value >>= bBool ) { SetRuler( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PageKind ) ) ) + else if ( pValue->Name == sUNO_View_PageKind ) { if( pValue->Value >>= nInt16 ) { @@ -686,7 +686,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetPageKindOnLoad( (PageKind)nInt16 ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SelectedPage ) ) ) + else if ( pValue->Name == sUNO_View_SelectedPage ) { if( pValue->Value >>= nInt16 ) { @@ -697,35 +697,35 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetSelectedPageOnLoad( (sal_uInt16)nInt16 ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLayerMode ) ) ) + else if ( pValue->Name == sUNO_View_IsLayerMode ) { if( pValue->Value >>= bBool ) { SetLayerMode( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDoubleClickTextEdit ) ) ) + else if ( pValue->Name == sUNO_View_IsDoubleClickTextEdit ) { if( pValue->Value >>= bBool ) { SetDoubleClickTextEdit( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsClickChangeRotation ) ) ) + else if ( pValue->Name == sUNO_View_IsClickChangeRotation ) { if( pValue->Value >>= bBool ) { SetClickChangeRotation( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SlidesPerRow ) ) ) + else if ( pValue->Name == sUNO_View_SlidesPerRow ) { if( pValue->Value >>= nInt16 ) { SetSlidesPerRow( (sal_uInt16)nInt16 ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeStandard ) ) ) + else if ( pValue->Name == sUNO_View_EditModeStandard ) { if( pValue->Value >>= nInt32 ) { @@ -734,7 +734,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetViewShEditMode( (EditMode)nInt32, PK_STANDARD ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeNotes ) ) ) + else if ( pValue->Name == sUNO_View_EditModeNotes ) { if( pValue->Value >>= nInt32 ) { @@ -743,7 +743,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetViewShEditMode( (EditMode)nInt32, PK_NOTES ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeHandout ) ) ) + else if ( pValue->Name == sUNO_View_EditModeHandout ) { if( pValue->Value >>= nInt32 ) { @@ -752,7 +752,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetViewShEditMode( (EditMode)nInt32, PK_HANDOUT ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaTop ) ) ) + else if ( pValue->Name == sUNO_View_VisibleAreaTop ) { sal_Int32 nTop = 0; if( pValue->Value >>= nTop ) @@ -763,7 +763,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetVisArea( aVisArea ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaLeft ) ) ) + else if ( pValue->Name == sUNO_View_VisibleAreaLeft ) { sal_Int32 nLeft = 0; if( pValue->Value >>= nLeft ) @@ -774,7 +774,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetVisArea( aVisArea ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaWidth ) ) ) + else if ( pValue->Name == sUNO_View_VisibleAreaWidth ) { sal_Int32 nWidth = 0; if( pValue->Value >>= nWidth ) @@ -784,7 +784,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetVisArea( aVisArea ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaHeight ) ) ) + else if ( pValue->Name == sUNO_View_VisibleAreaHeight ) { sal_Int32 nHeight = 0; if( pValue->Value >>= nHeight ) @@ -795,7 +795,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsVisible ) ) ) + else if ( pValue->Name == sUNO_View_GridIsVisible ) { if( pValue->Value >>= bBool ) { @@ -803,98 +803,98 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToGrid ) ) ) + else if ( pValue->Name == sUNO_View_IsSnapToGrid ) { if( pValue->Value >>= bBool ) { SetGridSnap( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsFront ) ) ) + else if ( pValue->Name == sUNO_View_GridIsFront ) { if( pValue->Value >>= bBool ) { SetGridFront( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToPageMargins ) ) ) + else if ( pValue->Name == sUNO_View_IsSnapToPageMargins ) { if( pValue->Value >>= bBool ) { SetBordSnap( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToSnapLines ) ) ) + else if ( pValue->Name == sUNO_View_IsSnapToSnapLines ) { if( pValue->Value >>= bBool ) { SetHlplSnap( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectFrame ) ) ) + else if ( pValue->Name == sUNO_View_IsSnapToObjectFrame ) { if( pValue->Value >>= bBool ) { SetOFrmSnap( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectPoints ) ) ) + else if ( pValue->Name == sUNO_View_IsSnapToObjectPoints ) { if( pValue->Value >>= bBool ) { SetOPntSnap( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsPlusHandlesAlwaysVisible ) ) ) + else if ( pValue->Name == sUNO_View_IsPlusHandlesAlwaysVisible ) { if( pValue->Value >>= bBool ) { SetPlusHandlesAlwaysVisible( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsFrameDragSingles ) ) ) + else if ( pValue->Name == sUNO_View_IsFrameDragSingles ) { if( pValue->Value >>= bBool ) { SetFrameDragSingles( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EliminatePolyPointLimitAngle ) ) ) + else if ( pValue->Name == sUNO_View_EliminatePolyPointLimitAngle ) { if( pValue->Value >>= nInt32 ) { SetEliminatePolyPointLimitAngle( nInt32 ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsEliminatePolyPoints ) ) ) + else if ( pValue->Name == sUNO_View_IsEliminatePolyPoints ) { if( pValue->Value >>= bBool ) { SetEliminatePolyPoints( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ActiveLayer ) ) ) + else if ( pValue->Name == sUNO_View_ActiveLayer ) { if( pValue->Value >>= aString ) { SetActiveLayer( aString ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoAttribs ) ) ) + else if ( pValue->Name == sUNO_View_NoAttribs ) { if( pValue->Value >>= bBool ) { SetNoAttribs( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoColors ) ) ) + else if ( pValue->Name == sUNO_View_NoColors ) { if( pValue->Value >>= bBool ) { SetNoColors( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseWidth ) ) ) + else if ( pValue->Name == sUNO_View_GridCoarseWidth ) { if( pValue->Value >>= nInt32 ) { @@ -902,7 +902,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetGridCoarse( aCoarse ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseHeight ) ) ) + else if ( pValue->Name == sUNO_View_GridCoarseHeight ) { if( pValue->Value >>= nInt32 ) { @@ -910,7 +910,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetGridCoarse( aCoarse ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineWidth ) ) ) + else if ( pValue->Name == sUNO_View_GridFineWidth ) { if( pValue->Value >>= nInt32 ) { @@ -918,7 +918,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetGridFine( aCoarse ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineHeight ) ) ) + else if ( pValue->Name == sUNO_View_GridFineHeight ) { if( pValue->Value >>= nInt32 ) { @@ -926,33 +926,33 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : SetGridFine( aCoarse ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsAngleSnapEnabled ) ) ) + else if ( pValue->Name == sUNO_View_IsAngleSnapEnabled ) { if( pValue->Value >>= bBool ) { SetAngleSnapEnabled( bBool ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapAngle ) ) ) + else if ( pValue->Name == sUNO_View_SnapAngle ) { if( pValue->Value >>= nInt32 ) { SetSnapAngle( nInt32 ); } } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXNumerator ) ) ) + else if ( pValue->Name == sUNO_View_GridSnapWidthXNumerator ) { pValue->Value >>= aSnapGridWidthXNum; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXDenominator ) ) ) + else if ( pValue->Name == sUNO_View_GridSnapWidthXDenominator ) { pValue->Value >>= aSnapGridWidthXDom; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYNumerator ) ) ) + else if ( pValue->Name == sUNO_View_GridSnapWidthYNumerator ) { pValue->Value >>= aSnapGridWidthYNum; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYDenominator ) ) ) + else if ( pValue->Name == sUNO_View_GridSnapWidthYDenominator ) { pValue->Value >>= aSnapGridWidthYDom; } diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 062cf34dc94c..1640b73bb471 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -1938,7 +1938,7 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfos ) if( pStyleSheet ) { const OUString aName( pStyleSheet->GetApiName() ); - if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("title" ) ) ) + if ( aName == "title" ) bPage = true; } } diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index deb97dd006d0..8bfee3b51fde 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -353,13 +353,13 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue rtl::OUStringToOString( pAttribs[i].Name, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aVal, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + if ( pAttribs[i].Name == "InputStream" ) pAttribs[i].Value >>= xInput; - else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + else if ( pAttribs[i].Name == "URL" ) pAttribs[i].Value >>= aURL; - else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + else if ( pAttribs[i].Name == "FilterName" ) nFilterNamePos = i; - else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) + else if ( pAttribs[i].Name == "Password" ) { nPwdPos = i; pAttribs[i].Value >>= aPwd; @@ -444,12 +444,12 @@ rtl::OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text" ) ) || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text-master" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer_pdf_addstream_import" ) ); - else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.presentation" ) ) ) + else if ( aEmbedMimetype == "application/vnd.oasis.opendocument.presentation" ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress_pdf_addstream_import" ) ); else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.graphics" ) ) || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.drawing" ) ) ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "draw_pdf_addstream_import" ) ); - else if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.spreadsheet" ) ) ) + else if ( aEmbedMimetype == "application/vnd.oasis.opendocument.spreadsheet" ) aOutFilterName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc_pdf_addstream_import" ) ); } } @@ -701,7 +701,7 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString& uno::Reference< task::XInteractionHandler > xIntHdl; for( sal_Int32 i = 0; i < nAttribs; i++ ) { - if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) + if ( pAttribs[i].Name == "InteractionHandler" ) pAttribs[i].Value >>= xIntHdl; } if( ! bMayUseUI || ! xIntHdl.is() ) diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 1fc25d85932b..e69907fc4a87 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -83,9 +83,9 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert rtl::OUStringToOString( pAttribs[i].Name, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString( aVal, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EmbeddedSubstream" ) ) ) + if ( pAttribs[i].Name == "EmbeddedSubstream" ) pAttribs[i].Value >>= xSubStream; - else if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) + else if ( pAttribs[i].Name == "Password" ) { nPwPos = i; pAttribs[i].Value >>= aPwd; @@ -97,7 +97,7 @@ sal_Bool SAL_CALL PDFIHybridAdaptor::filter( const uno::Sequence< beans::Propert uno::Reference< io::XInputStream > xInput; for( sal_Int32 i = 0; i < nAttribs; i++ ) { - if( pAttribs[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + if ( pAttribs[i].Name == "InputStream" ) { pAttribs[i].Value >>= xInput; break; @@ -292,15 +292,15 @@ sal_Bool SAL_CALL PDFIRawAdaptor::importer( const uno::Sequence< beans::Property for( sal_Int32 i = 0; i < nAttribs; i++, pAttribs++ ) { OSL_TRACE("importer Attrib: %s", OUStringToOString( pAttribs->Name, RTL_TEXTENCODING_UTF8 ).getStr() ); - if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + if ( pAttribs->Name == "InputStream" ) pAttribs->Value >>= xInput; - else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + else if ( pAttribs->Name == "URL" ) pAttribs->Value >>= aURL; - else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + else if ( pAttribs->Name == "StatusIndicator" ) pAttribs->Value >>= xStatus; - else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) + else if ( pAttribs->Name == "InteractionHandler" ) pAttribs->Value >>= xInteractionHandler; - else if( pAttribs->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Password" ) ) ) + else if ( pAttribs->Name == "Password" ) pAttribs->Value >>= aPwd; } if( !xInput.is() ) diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx index a9c6e781d311..ddcf16124c6f 100644 --- a/sdext/source/presenter/PresenterScreen.cxx +++ b/sdext/source/presenter/PresenterScreen.cxx @@ -230,12 +230,12 @@ void SAL_CALL PresenterScreenListener::notifyEvent( const css::document::EventOb { ThrowIfDisposed(); - if( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnStartPresentation" ) ) ) + if ( Event.EventName == "OnStartPresentation" ) { mpPresenterScreen = new PresenterScreen(mxComponentContext, mxModel); mpPresenterScreen->InitializePresenterScreen(); } - else if( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnEndPresentation" ) ) ) + else if ( Event.EventName == "OnEndPresentation" ) { if (mpPresenterScreen.is()) { diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index c83bd0b328d8..d39bc406fb14 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -889,7 +889,7 @@ namespace { Reference < XFrame > xFrame( xContainer->getByIndex(i), UNO_QUERY_THROW ); ::rtl::OUString sModule = xCheck->identify( xFrame ); - if ( sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.frame.StartModule" ) ) ) + if ( sModule == "com.sun.star.frame.StartModule" ) return xFrame; } catch( const UnknownModuleException& ) diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index cfaa5ffd58bf..00da60db9a61 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -116,7 +116,7 @@ static bool lcl_getWindowState( const uno::Reference< container::XNameAccess >& { for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ ) { - if ( aWindowState[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UIName" ) )) + if ( aWindowState[n].Name == "UIName" ) { aWindowState[n].Value >>= rWindowState.sTitle; } diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 285d2b975634..010002b1840b 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -126,7 +126,7 @@ static rtl::OUString GetLabelFromCommandURL( const rtl::OUString& rCommandURL, c { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) + if ( aPropSeq[i].Name == "Label" ) { aPropSeq[i].Value >>= aLabel; break; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 7f3fa7ebea6c..edee5ab35204 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2541,7 +2541,7 @@ IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox ) { for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) + if ( aPropSeq[i].Name == "Label" ) { aPropSeq[i].Value >>= sRet; break; diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index b180461c73f6..80a0f4cc8526 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -252,7 +252,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri uno::Sequence< beans::PropertyValue > aActuralFilterData; xFilterFactory->getByName( aActualFilter ) >>= aActuralFilterData; for ( sal_Int32 nInd = 0; nInd < aActuralFilterData.getLength(); nInd++ ) - if ( aActuralFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aActuralFilterData[nInd].Name == "Type" ) aActuralFilterData[nInd].Value >>= aActualFilterTypeName; ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) ); uno::Sequence< ::rtl::OUString > aAllExt = diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index c5807fd93952..ac66b5d96fd8 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1902,7 +1902,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, uno::Sequence< beans::PropertyValue > aFilterData; xFilterFactory->getByName( aFilterName ) >>= aFilterData; for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Type" ) ) ) + if ( aFilterData[nInd].Name == "Type" ) aFilterData[nInd].Value >>= aTypeName; if ( aTypeName.isEmpty() ) diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx index 3b1376898c39..8e79f753da79 100644 --- a/sfx2/source/doc/graphhelp.cxx +++ b/sfx2/source/doc/graphhelp.cxx @@ -502,19 +502,19 @@ sal_uInt16 GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const ::r { sal_uInt16 nResult = 0; - if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "scalc" ) ) ) + if ( aFactoryShortName == "scalc" ) { nResult = BMP_128X128_CALC_DOC; } - else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sdraw" ) ) ) + else if ( aFactoryShortName == "sdraw" ) { nResult = BMP_128X128_DRAW_DOC; } - else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "simpress" ) ) ) + else if ( aFactoryShortName == "simpress" ) { nResult = BMP_128X128_IMPRESS_DOC; } - else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "smath" ) ) ) + else if ( aFactoryShortName == "smath" ) { nResult = BMP_128X128_MATH_DOC; } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 2a34c89545c6..8a9fac81949d 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -137,15 +137,15 @@ static sal_uInt16 getSlotIDFromMode( sal_Int8 nStoreMode ) static sal_uInt8 getStoreModeFromSlotName( const ::rtl::OUString& aSlotName ) { sal_uInt8 nResult = 0; - if ( aSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportTo" ) ) ) + if ( aSlotName == "ExportTo" ) nResult = EXPORT_REQUESTED; - else if ( aSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportToPDF" ) ) ) + else if ( aSlotName == "ExportToPDF" ) nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED; - else if ( aSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportDirectToPDF" ) ) ) + else if ( aSlotName == "ExportDirectToPDF" ) nResult = EXPORT_REQUESTED | PDFEXPORT_REQUESTED | PDFDIRECTEXPORT_REQUESTED; - else if ( aSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Save" ) ) ) + else if ( aSlotName == "Save" ) nResult = SAVE_REQUESTED; - else if ( aSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveAs" ) ) ) + else if ( aSlotName == "SaveAs" ) nResult = SAVEAS_REQUESTED; else throw task::ErrorCodeIOException( ::rtl::OUString(), @@ -877,11 +877,11 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList ); } - if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) + if ( aDocServiceName == "com.sun.star.drawing.DrawingDocument" ) eCtxt = sfx2::FileDialogHelper::SD_EXPORT; - else if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) + else if ( aDocServiceName == "com.sun.star.presentation.PresentationDocument" ) eCtxt = sfx2::FileDialogHelper::SI_EXPORT; - else if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) ) + else if ( aDocServiceName == "com.sun.star.text.TextDocument" ) eCtxt = sfx2::FileDialogHelper::SW_EXPORT; if ( eCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index b65c75f27bf3..3276a0800430 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2816,9 +2816,9 @@ sal_Bool SfxObjectShell::IsInformationLost() ::rtl::OUString aPreusedFilterName; for ( sal_Int32 nInd = 0; nInd < aProps.getLength(); nInd++ ) { - if ( aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + if ( aProps[nInd].Name == "FilterName" ) aProps[nInd].Value >>= aFilterName; - else if ( aProps[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreusedFilterName" ) ) ) + else if ( aProps[nInd].Name == "PreusedFilterName" ) aProps[nInd].Value >>= aPreusedFilterName; } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 0fab12577fd6..1bdeddd138ef 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1507,7 +1507,7 @@ SfxPopupWindow* SfxAppToolBoxControl_Impl::CreatePopupWindow() if ( !pMenu ) { ::framework::MenuConfiguration aConf( m_xServiceManager ); - if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:AddDirect" ) )) + if ( m_aCommandURL == ".uno:AddDirect" ) pMenu = aConf.CreateBookmarkMenu( m_xFrame, BOOKMARK_NEWMENU ); else pMenu = aConf.CreateBookmarkMenu( m_xFrame, BOOKMARK_WIZARDMENU ); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 97a5f06b81df..d6497d3dac79 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -152,7 +152,7 @@ SfxPrinterController::SfxPrinterController( const boost::shared_ptr& i_ int nProps = aRenderParms.getLength(); for( int i = 0; i < nProps; i++ ) { - if( aRenderParms[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExtraPrintUIOptions" ) ) ) + if ( aRenderParms[i].Name == "ExtraPrintUIOptions" ) { Sequence< beans::PropertyValue > aUIProps; aRenderParms[i].Value >>= aUIProps; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index dc7cdf636cca..b9615924160d 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -273,7 +273,7 @@ static ::rtl::OUString RetrieveLabelFromCommand( { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) )) + if ( aPropSeq[i].Name == "Label" ) { aPropSeq[i].Value >>= aStr; break; @@ -383,32 +383,32 @@ enum ETypeFamily { case E_MS_DOC: { - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) )) + if ( sModule == "com.sun.star.text.TextDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer_MS_Word_97" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) + if ( sModule == "com.sun.star.sheet.SpreadsheetDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc_MS_Excel_97" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) )) + if ( sModule == "com.sun.star.drawing.DrawingDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress_MS_PowerPoint_97" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) + if ( sModule == "com.sun.star.presentation.PresentationDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress_MS_PowerPoint_97" )); } break; case E_OOO_DOC: { - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) )) + if ( sModule == "com.sun.star.text.TextDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer8" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) + if ( sModule == "com.sun.star.sheet.SpreadsheetDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc8" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) )) + if ( sModule == "com.sun.star.drawing.DrawingDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "draw8" )); else - if (sModule.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) + if ( sModule == "com.sun.star.presentation.PresentationDocument" ) sType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress8" )); } break; diff --git a/sfx2/workben/custompanel/ctp_factory.cxx b/sfx2/workben/custompanel/ctp_factory.cxx index 192f89bb1b64..35f08ca5693c 100644 --- a/sfx2/workben/custompanel/ctp_factory.cxx +++ b/sfx2/workben/custompanel/ctp_factory.cxx @@ -94,7 +94,7 @@ namespace sd { namespace colortoolpanel const PropertyValue* pArgEnd = i_rArgs.getConstArray() + i_rArgs.getLength(); for ( ; pArg != pArgEnd; ++pArg ) { - if ( pArg->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ParentWindow" ) ) ) + if ( pArg->Name == "ParentWindow" ) { xParentWindow.set( pArg->Value, UNO_QUERY ); break; diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 57f1f1d21ce8..71411859bf92 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -472,12 +472,12 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM sal_Int16 nConvertedCount( 0 ); for ( sal_Int32 i = 0; i < aSeq.getLength(); ++i ) { - if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_OPTIONS ) ) ) + if ( aSeq[i].Name == SRCH_PARA_OPTIONS ) { if ( ( aSeq[i].Value >>= aSearchOpt ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_FAMILY ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_FAMILY ) { sal_uInt16 nTemp( 0 ); if ( ( aSeq[i].Value >>= nTemp ) == sal_True ) @@ -486,52 +486,52 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM ++nConvertedCount; } } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_COMMAND ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_COMMAND ) { if ( ( aSeq[i].Value >>= nCommand ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_CELLTYPE ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_CELLTYPE ) { if ( ( aSeq[i].Value >>= nCellType ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_APPFLAG ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_APPFLAG ) { if ( ( aSeq[i].Value >>= nAppFlag ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_ROWDIR ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_ROWDIR ) { if ( ( aSeq[i].Value >>= bRowDirection ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_ALLTABLES ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_ALLTABLES ) { if ( ( aSeq[i].Value >>= bAllTables ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_SEARCHFILTERED ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_SEARCHFILTERED ) { if ( ( aSeq[i].Value >>= bSearchFiltered ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_BACKWARD ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_BACKWARD ) { if ( ( aSeq[i].Value >>= bBackward ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_PATTERN ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_PATTERN ) { if ( ( aSeq[i].Value >>= bPattern ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_CONTENT ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_CONTENT ) { if ( ( aSeq[i].Value >>= bContent ) == sal_True ) ++nConvertedCount; } - else if ( aSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SRCH_PARA_ASIANOPT ) ) ) + else if ( aSeq[i].Name == SRCH_PARA_ASIANOPT ) { if ( ( aSeq[i].Value >>= bAsianOptions ) == sal_True ) ++nConvertedCount; diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx index 3143264f1ce9..59f7d4ec69cb 100644 --- a/svtools/source/filter/jpeg/jpeg.cxx +++ b/svtools/source/filter/jpeg/jpeg.cxx @@ -604,7 +604,7 @@ JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValu const beans::PropertyValue* pValues = pFilterData->getConstArray(); while( nArgs-- ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + if ( pValues->Name == "StatusIndicator" ) { pValues->Value >>= xStatusIndicator; } diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index a9f5fc07b224..b46f5eb0509e 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -233,7 +233,7 @@ throw ( Exception, RuntimeException ) m_xServiceManager.set(aPropValue.Value,UNO_QUERY); else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ParentWindow") )) m_pImpl->m_xParentWindow.set(aPropValue.Value,UNO_QUERY); - else if ( aPropValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ModuleName" ) ) ) + else if ( aPropValue.Name == "ModuleName" ) aPropValue.Value >>= m_pImpl->m_sModuleName; } } diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 32f323b91d59..3be2cd4a87f7 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -112,9 +112,9 @@ void SAL_CALL EnhancedCustomShapeEngine::initialize( const SEQ( NMSP_UNO::Any )& for ( i = 0; i < aParameter.getLength(); i++ ) { const NMSP_BEANS::PropertyValue& rProp = aParameter[ i ]; - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShape" ) ) ) + if ( rProp.Name == "CustomShape" ) rProp.Value >>= mxShape; - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ForceGroupWithText" ) ) ) + else if ( rProp.Name == "ForceGroupWithText" ) rProp.Value >>= mbForceGroupWithText; } } diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 1a94658027b3..f8792313be04 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -249,9 +249,9 @@ namespace svxform OSL_VERIFY( aVisualEffect >>= sVisualEffect ); sal_Int16 nVisualEffect = VisualEffect::NONE; - if ( sVisualEffect.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flat" ) ) ) + if ( sVisualEffect == "flat" ) nVisualEffect = VisualEffect::FLAT; - else if ( sVisualEffect.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "3D" ) ) ) + else if ( sVisualEffect == "3D" ) nVisualEffect = VisualEffect::LOOK3D; if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) ) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 62d09e7777b9..ec74af27c7a2 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -544,7 +544,7 @@ namespace svxform const PropertyValue* pInfoEnd = pInfo + aInfo.getLength(); for ( ; pInfo != pInfoEnd; ++pInfo ) { - if ( pInfo->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferDosLikeLineEnds" ) ) ) + if ( pInfo->Name == "PreferDosLikeLineEnds" ) { pInfo->Value >>= bDosLineEnds; break; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 956663c906fc..5c1522eadba4 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3524,7 +3524,7 @@ void FormController::setMode(const ::rtl::OUString& Mode) throw( NoSupportExcept m_aMode = Mode; - if ( Mode.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterMode" ) ) ) + if ( Mode == "FilterMode" ) startFiltering(); else stopFiltering(); @@ -4184,7 +4184,7 @@ void SAL_CALL FormController::dispatch( const URL& _rURL, const Sequence< Proper return; } - if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:/InteractionHandler" ) ) ) + if ( _rURL.Complete == "private:/InteractionHandler" ) { Reference< XInteractionRequest > xRequest; OSL_VERIFY( _rArgs[0].Value >>= xRequest ); diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index bad7a7aca44e..0104b70d753d 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -286,16 +286,16 @@ int GalApp::Main() aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) bHelp = true; - else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--name" ) ) ) + else if ( aParam == "--name" ) aName = GetCommandLineParam( ++i ); - else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--path" ) ) ) + else if ( aParam == "--path" ) aPath = Smartify( GetCommandLineParam( ++i ) ); - else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--destdir" ) ) ) + else if ( aParam == "--destdir" ) aDestDir = GetCommandLineParam( ++i ); - else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--number-from" ) ) ) + else if ( aParam == "--number-from" ) nNumFrom = GetCommandLineParam( ++i ).ToInt32(); else diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 9dd53da31af4..1bfd3d577c91 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -146,7 +146,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const rtl::OUString& aSize.Width() += 20, aSize.Height() += 6; SetSizePixel( aSize ); - if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) )) + if ( maCommand == ".uno:GrafGamma" ) { SetDecimalDigits( 2 ); @@ -230,9 +230,9 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) { long nValue; - if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) )) + if ( maCommand == ".uno:GrafTransparence" ) nValue = ( (SfxUInt16Item*) pItem )->GetValue(); - else if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) )) + else if ( maCommand == ".uno:GrafGamma" ) nValue = ( (SfxUInt32Item*) pItem )->GetValue(); else nValue = ( (SfxInt16Item*) pItem )->GetValue(); diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index b1d3b07ea216..0a3706dc85fc 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -302,7 +302,7 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() { DBG_ASSERT(( SID_UNDO == GetSlotId() || SID_REDO == GetSlotId() ), "mismatching ids" ); - if ( m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:Undo" ) )) + if ( m_aCommandURL == ".uno:Undo" ) updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetUndoStrings" ))); else updateStatus( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:GetRedoStrings" ))); diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 2546935a6303..ce259c38ca86 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -335,7 +335,7 @@ throw ( uno::RuntimeException ) if ( m_pBox ) { SolarMutexGuard aSolarMutexGuard; - if ( rEvent.FeatureURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontHeight" ) )) + if ( rEvent.FeatureURL.Path == "FontHeight" ) { if ( rEvent.IsEnabled ) { @@ -349,7 +349,7 @@ throw ( uno::RuntimeException ) else m_pBox->Disable(); } - else if ( rEvent.FeatureURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharFontName" ) )) + else if ( rEvent.FeatureURL.Path == "CharFontName" ) { if ( rEvent.State >>= m_aCurrentFont ) m_pBox->UpdateFont( m_aCurrentFont ); diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 68d1f556c4b5..6ee3ed08d1f0 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -443,34 +443,34 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto const PropertyValue* pValues = aDescriptor.getConstArray(); while( nArgs-- ) { - if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + if ( pValues->Name == "FilterName" ) { pValues->Value >>= rSettings.maFilterName; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) + else if ( pValues->Name == "MediaType" ) { pValues->Value >>= rSettings.maMediaType; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "URL" ) ) ) + else if ( pValues->Name == "URL" ) { if( !( pValues->Value >>= rSettings.maURL ) ) { pValues->Value >>= rSettings.maURL.Complete; } } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OutputStream" ) ) ) + else if ( pValues->Name == "OutputStream" ) { pValues->Value >>= rSettings.mxOutputStream; } - else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicRenderer" ) ) ) + else if ( pValues->Name == "GraphicRenderer" ) { pValues->Value >>= rSettings.mxGraphicRenderer; } - else if ( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StatusIndicator" ) ) ) + else if ( pValues->Name == "StatusIndicator" ) { pValues->Value >>= rSettings.mxStatusIndicator; } - else if ( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) + else if ( pValues->Name == "InteractionHandler" ) { pValues->Value >>= rSettings.mxInteractionHandler; } @@ -486,7 +486,7 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto { pValues->Value >>= rSettings.mbExportOnlyBackground; } - else if ( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterData" ) ) ) + else if ( pValues->Name == "FilterData" ) { pValues->Value >>= rSettings.maFilterData; @@ -494,7 +494,7 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto PropertyValue* pDataValues = rSettings.maFilterData.getArray(); while( nFilterArgs-- ) { - if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Translucent" ) ) ) + if ( pDataValues->Name == "Translucent" ) { if ( !( pDataValues->Value >>= rSettings.mbTranslucent ) ) // SJ: TODO: The GIF Transparency is stored as int32 in { // configuration files, this has to be changed to boolean @@ -503,11 +503,11 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto rSettings.mbTranslucent = nTranslucent != 0; } } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PixelWidth" ) ) ) + else if ( pDataValues->Name == "PixelWidth" ) { pDataValues->Value >>= rSettings.mnWidth; } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PixelHeight" ) ) ) + else if ( pDataValues->Name == "PixelHeight" ) { pDataValues->Value >>= rSettings.mnHeight; } @@ -521,24 +521,24 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto pDataValues->Value >>= rSettings.mnHeight; pDataValues->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PixelHeight" ) ); } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportOnlyBackground" ) ) ) + else if ( pDataValues->Name == "ExportOnlyBackground" ) { pDataValues->Value >>= rSettings.mbExportOnlyBackground; } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HighContrast" ) ) ) + else if ( pDataValues->Name == "HighContrast" ) { pDataValues->Value >>= rSettings.mbUseHighContrast; } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageNumber" ) ) ) + else if ( pDataValues->Name == "PageNumber" ) { pDataValues->Value >>= mnPageNumber; } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScrollText" ) ) ) + else if ( pDataValues->Name == "ScrollText" ) { // #110496# Read flag solitary scroll text metafile pDataValues->Value >>= rSettings.mbScrollText; } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CurrentPage" ) ) ) + else if ( pDataValues->Name == "CurrentPage" ) { Reference< XDrawPage > xPage; pDataValues->Value >>= xPage; @@ -549,25 +549,25 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto mpCurrentPage = pUnoPage->GetSdrPage(); } } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleXNumerator" ) ) ) + else if ( pDataValues->Name == "ScaleXNumerator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) rSettings.maScaleX = Fraction( nVal, rSettings.maScaleX.GetDenominator() ); } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleXDenominator" ) ) ) + else if ( pDataValues->Name == "ScaleXDenominator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) rSettings.maScaleX = Fraction( rSettings.maScaleX.GetNumerator(), nVal ); } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleYNumerator" ) ) ) + else if ( pDataValues->Name == "ScaleYNumerator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) rSettings.maScaleY = Fraction( nVal, rSettings.maScaleY.GetDenominator() ); } - else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ScaleYDenominator" ) ) ) + else if ( pDataValues->Name == "ScaleYDenominator" ) { sal_Int32 nVal = 1; if( pDataValues->Value >>= nVal ) diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index 229dd64bf004..eaafdff4e0cb 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -582,7 +582,7 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor, rInventor = SdrInventor; rType = OBJ_TABLE; } - else if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.MediaShape" )) ) + else if ( aName == "com.sun.star.presentation.MediaShape" ) { rInventor = SdrInventor; rType = OBJ_MEDIA; diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 53341d9ae6e4..f3c5548fce23 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -835,18 +835,18 @@ void SAL_CALL SvxShapeControl::setPropertyValue( const OUString& aPropertyName, if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) ) { uno::Any aConvertedValue( aValue ); - if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) + if ( aFormsName == "FontSlant" ) { awt::FontSlant nSlant; if( !(aValue >>= nSlant ) ) throw lang::IllegalArgumentException(); aConvertedValue <<= (sal_Int16)nSlant; } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) + else if ( aFormsName == "Align" ) { lcl_convertParaAdjustmentToTextAlignment( aConvertedValue ); } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) + else if ( aFormsName == "VerticalAlign" ) { convertVerticalAdjustToVerticalAlign( aConvertedValue ); } @@ -876,7 +876,7 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyNa if( xInfo.is() && xInfo->hasPropertyByName( aFormsName ) ) { aValue = xControl->getPropertyValue( aFormsName ); - if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) + if ( aFormsName == "FontSlant" ) { awt::FontSlant eSlant = awt::FontSlant_NONE; sal_Int16 nSlant = sal_Int16(); @@ -890,11 +890,11 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyValue( const OUString& aPropertyNa } aValue <<= eSlant; } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) + else if ( aFormsName == "Align" ) { lcl_convertTextAlignmentToParaAdjustment( aValue ); } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) + else if ( aFormsName == "VerticalAlign" ) { convertVerticalAlignToVerticalAdjust( aValue ); } @@ -970,17 +970,17 @@ uno::Any SAL_CALL SvxShapeControl::getPropertyDefault( const ::rtl::OUString& aP if( xControl.is() ) { Any aDefault( xControl->getPropertyDefault( aFormsName ) ); - if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontSlant" ) ) ) + if ( aFormsName == "FontSlant" ) { sal_Int16 nSlant( 0 ); aDefault >>= nSlant; aDefault <<= (awt::FontSlant)nSlant; } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Align" ) ) ) + else if ( aFormsName == "Align" ) { lcl_convertTextAlignmentToParaAdjustment( aDefault ); } - else if ( aFormsName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalAlign" ) ) ) + else if ( aFormsName == "VerticalAlign" ) { convertVerticalAlignToVerticalAdjust( aDefault ); } diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index ee30a32e23d6..67e6399264cd 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -182,7 +182,7 @@ void SAL_CALL GalleryThemeProvider::initialize( const uno::Sequence< uno::Any >& { const beans::PropertyValue& rProp = aParams[ i ]; - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ProvideHiddenThemes" ) ) ) + if ( rProp.Name == "ProvideHiddenThemes" ) rProp.Value >>= mbHiddenThemes; } } diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index 98b5d6002215..8efc492a8b38 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -484,32 +484,32 @@ SvXMLImportContext *SvxXMLXTableImport::CreateContext( sal_uInt16 nPrefix, const sal_Bool bOOoFormat = (XML_NAMESPACE_OFFICE == nPrefix); Type aType = mrTable->getElementType(); - if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "color-table" ) ) ) + if ( rLocalName == "color-table" ) { if( aType == ::getCppuType((const sal_Int32*)0) ) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_color, mrTable, bOOoFormat ); } - else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "marker-table" ) ) ) + else if ( rLocalName == "marker-table" ) { if( aType == ::getCppuType((const drawing::PolyPolygonBezierCoords*)0) ) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_marker, mrTable, bOOoFormat ); } - else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dash-table" ) ) ) + else if ( rLocalName == "dash-table" ) { if( aType == ::getCppuType((const drawing::LineDash*)0) ) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_dash, mrTable, bOOoFormat ); } - else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hatch-table" ) ) ) + else if ( rLocalName == "hatch-table" ) { if( aType == ::getCppuType((const drawing::Hatch*)0) ) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_hatch, mrTable, bOOoFormat ); } - else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gradient-table" ) ) ) + else if ( rLocalName == "gradient-table" ) { if( aType == ::getCppuType((const awt::Gradient*)0)) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_gradient, mrTable, bOOoFormat ); } - else if( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bitmap-table" ) ) ) + else if ( rLocalName == "bitmap-table" ) { if( aType == ::getCppuType((const OUString*)0)) return new SvxXMLTableImportContext( *this, nPrefix, rLocalName, xAttrList, stice_bitmap, mrTable, bOOoFormat ); diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index cf8070e09fc0..18745ef829f3 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -3461,9 +3461,9 @@ bool XFillGradientItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uI { for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ ) { - if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ))) + if ( aPropSeq[n].Name == "Name" ) aPropSeq[n].Value >>= aName; - else if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillGradient" ))) + else if ( aPropSeq[n].Name == "FillGradient" ) { if ( aPropSeq[n].Value >>= aGradient2 ) bGradient = true; @@ -4057,9 +4057,9 @@ bool XFillHatchItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 { for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ ) { - if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ))) + if ( aPropSeq[n].Name == "Name" ) aPropSeq[n].Value >>= aName; - else if ( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillHatch" ))) + else if ( aPropSeq[n].Name == "FillHatch" ) { if ( aPropSeq[n].Value >>= aUnoHatch ) bHatch = true; diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 85187e8a0fbe..388d4a25c5df 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -712,11 +712,11 @@ bool XFillBitmapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt { for ( sal_Int32 n = 0; n < aPropSeq.getLength(); n++ ) { - if( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ))) + if ( aPropSeq[n].Name == "Name" ) bSetName = (aPropSeq[n].Value >>= aName); - else if( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FillBitmapURL" ))) + else if ( aPropSeq[n].Name == "FillBitmapURL" ) bSetURL = (aPropSeq[n].Value >>= aURL); - else if( aPropSeq[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Bitmap" ))) + else if ( aPropSeq[n].Name == "Bitmap" ) bSetBitmap = (aPropSeq[n].Value >>= xBmp); } } diff --git a/svx/workben/msview/xmlconfig.cxx b/svx/workben/msview/xmlconfig.cxx index b7611d11eefb..12e64160fad5 100644 --- a/svx/workben/msview/xmlconfig.cxx +++ b/svx/workben/msview/xmlconfig.cxx @@ -169,32 +169,32 @@ void SAL_CALL ConfigHandler::startElement(const OUString& aName, const Reference { ElementConfigPtr pElement; - if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config" ) ) ) + if ( aName == "config" ) { return; } - if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "container" ) ) ) + if ( aName == "container" ) { pElement = importAtomConfig( xAttribs, true ); } - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "atom" ) ) ) + else if ( aName == "atom" ) { pElement = importAtomConfig( xAttribs, false ); } - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "element" ) ) ) + else if ( aName == "element" ) { pElement = importElementConfig( xAttribs ); } - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "value" ) ) ) + else if ( aName == "value" ) { pElement = importValueElementConfig( xAttribs ); } - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "switch" ) ) ) + else if ( aName == "switch" ) { pElement = importSwitchConfig( xAttribs ); } - else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "case" ) ) ) + else if ( aName == "case" ) { pElement = importCaseConfig( xAttribs ); } @@ -285,7 +285,7 @@ ElementConfigPtr ConfigHandler::importCaseConfig( const Reference< XAttributeLis void SAL_CALL ConfigHandler::endElement(const OUString& aName) throw( SAXException, RuntimeException ) { - if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config" ) ) ) + if ( aName == "config" ) { return; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index d5b8a6422a48..ea77e4f3103e 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -987,11 +987,11 @@ void makeRedline( SwPaM& rPaM, IDocumentRedlineAccess* pRedlineAccess = rPaM.GetDoc(); RedlineType_t eType = nsRedlineType_t::REDLINE_INSERT; - if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Delete" ) )) + if ( rRedlineType == "Delete" ) eType = nsRedlineType_t::REDLINE_DELETE; - else if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Format" ) )) + else if ( rRedlineType == "Format" ) eType = nsRedlineType_t::REDLINE_FORMAT; - else if( rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "TextTable" ) )) + else if ( rRedlineType == "TextTable" ) eType = nsRedlineType_t::REDLINE_TABLE; else if( !rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Insert" ) )) throw lang::IllegalArgumentException(); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index f19a20a8bcea..6fa217848770 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1061,37 +1061,37 @@ void SwXMLImport::SetViewSettings(const Sequence < PropertyValue > & aViewProps) for (sal_Int32 i = 0; i < nCount ; i++) { - if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaTop" ) ) ) + if ( pValue->Name == "ViewAreaTop" ) { pValue->Value >>= nTmp; aRect.setY( static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp) ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaLeft" ) ) ) + else if ( pValue->Name == "ViewAreaLeft" ) { pValue->Value >>= nTmp; aRect.setX( static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp) ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaWidth" ) ) ) + else if ( pValue->Name == "ViewAreaWidth" ) { pValue->Value >>= nTmp; Size aSize( aRect.GetSize() ); aSize.Width() = static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp); aRect.SetSize( aSize ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaHeight" ) ) ) + else if ( pValue->Name == "ViewAreaHeight" ) { pValue->Value >>= nTmp; Size aSize( aRect.GetSize() ); aSize.Height() = static_cast< long >(bTwip ? MM100_TO_TWIP ( nTmp ) : nTmp); aRect.SetSize( aSize ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ShowRedlineChanges" ) ) ) + else if ( pValue->Name == "ShowRedlineChanges" ) { bShowRedlineChanges = *(sal_Bool *)(pValue->Value.getValue()); bChangeShowRedline = sal_True; } // Headers and footers are not displayed in BrowseView anymore - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "InBrowseMode" ) ) ) + else if ( pValue->Name == "InBrowseMode" ) { bBrowseMode = *(sal_Bool *)(pValue->Value.getValue()); bChangeBrowseMode = sal_True; diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index f5ddbb58fa82..5e54f1055d61 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -356,7 +356,7 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL ) { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Name" ) ) ) + if ( aPropSeq[i].Name == "Name" ) { aPropSeq[i].Value >>= aStr; break; diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 284409b1a7f8..c8be512048b0 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1294,61 +1294,61 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > for (sal_Int16 i = 0 ; i < nLength; i++) { - if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLeft" ) ) ) + if ( pValue->Name == "ViewLeft" ) { pValue->Value >>= nX; nX = MM100_TO_TWIP( nX ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewTop" ) ) ) + else if ( pValue->Name == "ViewTop" ) { pValue->Value >>= nY; nY = MM100_TO_TWIP( nY ); } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleLeft" ) ) ) + else if ( pValue->Name == "VisibleLeft" ) { pValue->Value >>= nLeft; nLeft = MM100_TO_TWIP( nLeft ); bGotVisibleLeft = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleTop" ) ) ) + else if ( pValue->Name == "VisibleTop" ) { pValue->Value >>= nTop; nTop = MM100_TO_TWIP( nTop ); bGotVisibleTop = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleRight" ) ) ) + else if ( pValue->Name == "VisibleRight" ) { pValue->Value >>= nRight; nRight = MM100_TO_TWIP( nRight ); bGotVisibleRight = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VisibleBottom" ) ) ) + else if ( pValue->Name == "VisibleBottom" ) { pValue->Value >>= nBottom; nBottom = MM100_TO_TWIP( nBottom ); bGotVisibleBottom = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ZoomType" ) ) ) + else if ( pValue->Name == "ZoomType" ) { pValue->Value >>= nZoomType; bGotZoomType = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ZoomFactor" ) ) ) + else if ( pValue->Name == "ZoomFactor" ) { pValue->Value >>= nZoomFactor; bGotZoomFactor = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLayoutColumns" ) ) ) + else if ( pValue->Name == "ViewLayoutColumns" ) { pValue->Value >>= nViewLayoutColumns; bGotViewLayoutColumns = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ViewLayoutBookMode" ) ) ) + else if ( pValue->Name == "ViewLayoutBookMode" ) { bViewLayoutBookMode = * (sal_Bool *) pValue->Value.getValue(); bGotViewLayoutBookMode = sal_True; } - else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsSelectedFrame" ) ) ) + else if ( pValue->Name == "IsSelectedFrame" ) { pValue->Value >>= bSelectedFrame; bGotIsSelectedFrame = sal_True; diff --git a/sw/source/ui/uno/SwXFilterOptions.cxx b/sw/source/ui/uno/SwXFilterOptions.cxx index a82e155e0f79..76e3204286cb 100644 --- a/sw/source/ui/uno/SwXFilterOptions.cxx +++ b/sw/source/ui/uno/SwXFilterOptions.cxx @@ -96,7 +96,7 @@ void SwXFilterOptions::setPropertyValues( const uno::Sequence>= sFilterName; else if ( aPropName == ::rtl::OUString(FILTER_OPTIONS_NAME) ) rProp.Value >>= sFilterOptions; - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + else if ( aPropName == "InputStream" ) rProp.Value >>= xInputStream; } } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3ca2deeef3c0..2f9a6900ec57 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2365,7 +2365,7 @@ SfxViewShell * SwXTextDocument::GetRenderView( const beans::PropertyValue *pProps = rOptions.getConstArray(); for (sal_Int32 i = 0; i < nLen; ++i) { - if (pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "View" ) )) + if ( pProps[i].Name == "View" ) { aTmp = pProps[i].Value; break; diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx index 0668001abe28..184ece7327b2 100644 --- a/sw/source/ui/vba/vbapagesetup.cxx +++ b/sw/source/ui/vba/vbapagesetup.cxx @@ -145,7 +145,7 @@ void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) { rtl::OUString pageStyle = getStyleOfFirstPage(); - if( pageStyle.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) ) + if ( pageStyle == "First Page" ) return sal_True; return sal_False; diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 7d0266369f18..13bc019ef7ef 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -747,7 +747,7 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run rtl::OUString aPageStyleName; xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyleName"))) >>= aPageStyleName; sal_Bool bFirstPage = sal_False; - if( aPageStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "First Page" ) ) ) + if ( aPageStyleName == "First Page" ) bFirstPage = sal_True; if( nView == word::WdSeekView::wdSeekFirstPageHeader ) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index fe21cc616283..9a5c32a242e2 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -969,9 +969,9 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) + if ( pProps[i].Name == "WINDOW" ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) + else if ( pProps[i].Name == "XEMBED" ) pProps[i].Value >>= bXEmbed; } } @@ -1201,9 +1201,9 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) + if ( pProps[i].Name == "WINDOW" ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) + else if ( pProps[i].Name == "XEMBED" ) pProps[i].Value >>= bXEmbed; } } diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 02092b6f4cea..3abaeeaecbdd 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -75,9 +75,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) const com::sun::star::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) + if ( pProps[i].Name == "WINDOW" ) pProps[i].Value >>= nHandle; - else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) + else if ( pProps[i].Name == "XEMBED" ) pProps[i].Value >>= bXEmbed; } } diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index f765f1947069..8c12f93157b8 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -130,41 +130,41 @@ namespace cmis fprintf( stderr, "Property: %s\n", rtl::OUStringToOString( rProp.Name, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif - if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + if ( rProp.Name == "IsDocument" ) { if ( m_pObject->getBaseType( ) == "cmis:document" ) xRow->appendBoolean( rProp, true ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + else if ( rProp.Name == "IsFolder" ) { if( m_pObject->getBaseType( ) == "cmis:folder" ) xRow->appendBoolean( rProp, true ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TitleOnServer" ) ) ) + else if ( rProp.Name == "TitleOnServer" ) { // TODO Set the path instead of the name xRow->appendString( rProp, rtl::OUString::createFromAscii( m_pObject->getName().c_str() ) ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) + else if ( rProp.Name == "IsReadOnly" ) { // TODO Fix this value xRow->appendBoolean( rProp, sal_True ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) ) + else if ( rProp.Name == "DateCreated" ) { // TODO Fix this value xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) ) + else if ( rProp.Name == "DateModified" ) { // TODO Fix this value xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( rProp.Name == "Size" ) { libcmis::Document* document = dynamic_cast< libcmis::Document* >( m_pObject.get( ) ); if ( NULL != document ) @@ -480,32 +480,32 @@ namespace cmis { uno::Any aRet; - if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) )) + if ( aCommand.Name == "getPropertyValues" ) { uno::Sequence< beans::Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet <<= getPropertyValues( Properties, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) )) + else if ( aCommand.Name == "getPropertySetInfo" ) aRet <<= getPropertySetInfo( xEnv, sal_False ); - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) )) + else if ( aCommand.Name == "getCommandInfo" ) aRet <<= getCommandInfo( xEnv, sal_False ); - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) )) + else if ( aCommand.Name == "open" ) { ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet = open( aOpenCommand, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "transfer" ) )) + else if ( aCommand.Name == "transfer" ) { ucb::TransferInfo transferArgs; if ( !( aCommand.Argument >>= transferArgs ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); transfer( transferArgs, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) )) + else if ( aCommand.Name == "setPropertyValues" ) { uno::Sequence< beans::PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) || !aProperties.getLength() ) @@ -520,14 +520,14 @@ namespace cmis ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet <<= createNewContent( arg ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) )) + else if ( aCommand.Name == "insert" ) { ucb::InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); insert( arg.Data, arg.ReplaceExisting, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) )) + else if ( aCommand.Name == "delete" ) { sal_Bool bDeletePhysical = sal_False; aCommand.Argument >>= bDeletePhysical; @@ -575,9 +575,9 @@ namespace cmis bool create_document; const char *name; - if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( CMIS_FILE_TYPE ) ) ) + if ( Info.Type == CMIS_FILE_TYPE ) create_document = true; - else if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( CMIS_FOLDER_TYPE ) ) ) + else if ( Info.Type == CMIS_FOLDER_TYPE ) create_document = false; else { diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx index ed959bc74d4f..5138eabf5dc6 100644 --- a/ucb/source/ucp/ext/ucpext_content.cxx +++ b/ucb/source/ucp/ext/ucpext_content.cxx @@ -217,7 +217,7 @@ namespace ucb { namespace ucp { namespace ext { Any aRet; - if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) ) ) + if ( aCommand.Name == "getPropertyValues" ) { Sequence< Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) @@ -230,7 +230,7 @@ namespace ucb { namespace ucp { namespace ext aRet <<= getPropertyValues( Properties, i_rEvironment ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) ) ) + else if ( aCommand.Name == "setPropertyValues" ) { Sequence< PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) ) @@ -251,17 +251,17 @@ namespace ucb { namespace ucp { namespace ext aRet <<= setPropertyValues( aProperties, i_rEvironment ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) ) ) + else if ( aCommand.Name == "getPropertySetInfo" ) { // implemented by base class. aRet <<= getPropertySetInfo( i_rEvironment ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) ) ) + else if ( aCommand.Name == "getCommandInfo" ) { // implemented by base class. aRet <<= getCommandInfo( i_rEvironment ); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) ) ) + else if ( aCommand.Name == "open" ) { OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) @@ -423,19 +423,19 @@ namespace ucb { namespace ucp { namespace ext const Property& rProp = pProps[ n ]; // Process Core properties. - if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + if ( rProp.Name == "ContentType" ) { xRow->appendString ( rProp, ContentProvider::getArtificialNodeContentType() ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rProp.Name == "Title" ) { xRow->appendString ( rProp, i_rTitle ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + else if ( rProp.Name == "IsDocument" ) { xRow->appendBoolean( rProp, sal_False ); } - else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + else if ( rProp.Name == "IsFolder" ) { xRow->appendBoolean( rProp, sal_True ); } diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 4303c59a9baf..8b0ff7d918b2 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -414,7 +414,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValuesFromGFileInfo(GFileInfo * { const beans::Property& rProp = pProps[ n ]; - if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) + if ( rProp.Name == "IsDocument" ) { if (g_file_info_has_attribute(pInfo, G_FILE_ATTRIBUTE_STANDARD_TYPE)) xRow->appendBoolean( rProp, ( g_file_info_get_file_type( pInfo ) == G_FILE_TYPE_REGULAR || @@ -422,14 +422,14 @@ uno::Reference< sdbc::XRow > Content::getPropertyValuesFromGFileInfo(GFileInfo * else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) + else if ( rProp.Name == "IsFolder" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_STANDARD_TYPE) ) xRow->appendBoolean( rProp, ( g_file_info_get_file_type( pInfo ) == G_FILE_TYPE_DIRECTORY )); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rProp.Name == "Title" ) { if (g_file_info_has_attribute(pInfo, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME)) { @@ -439,65 +439,65 @@ uno::Reference< sdbc::XRow > Content::getPropertyValuesFromGFileInfo(GFileInfo * else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) + else if ( rProp.Name == "IsReadOnly" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE ) ) xRow->appendBoolean( rProp, !g_file_info_get_attribute_boolean( pInfo, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) ) + else if ( rProp.Name == "DateCreated" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_TIME_CREATED ) ) xRow->appendTimestamp( rProp, getDateFromUnix(g_file_info_get_attribute_uint64(pInfo, G_FILE_ATTRIBUTE_TIME_CREATED)) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) ) + else if ( rProp.Name == "DateModified" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_TIME_CHANGED ) ) xRow->appendTimestamp( rProp, getDateFromUnix(g_file_info_get_attribute_uint64(pInfo, G_FILE_ATTRIBUTE_TIME_CHANGED)) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + else if ( rProp.Name == "Size" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_STANDARD_SIZE) ) xRow->appendLong( rProp, ( g_file_info_get_size( pInfo ) )); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsVolume" ) ) ) + else if ( rProp.Name == "IsVolume" ) { //What do we use this for ? xRow->appendBoolean( rProp, sal_False ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsCompactDisc" ) ) ) + else if ( rProp.Name == "IsCompactDisc" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT ) ) xRow->appendBoolean( rProp, g_file_info_get_attribute_boolean(pInfo, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsRemoveable" ) ) ) + else if ( rProp.Name == "IsRemoveable" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT ) ) xRow->appendBoolean( rProp, g_file_info_get_attribute_boolean(pInfo, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFloppy" ) ) ) + else if ( rProp.Name == "IsFloppy" ) { xRow->appendBoolean( rProp, sal_False ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsHidden" ) ) ) + else if ( rProp.Name == "IsHidden" ) { if( g_file_info_has_attribute( pInfo, G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN) ) xRow->appendBoolean( rProp, ( g_file_info_get_is_hidden ( pInfo ) ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + else if ( rProp.Name == "CreatableContentsInfo" ) { xRow->appendObject( rProp, uno::makeAny( queryCreatableContentsInfo( xEnv ) ) ); } @@ -670,7 +670,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { aRet[ n ] <<= getReadOnlyException( static_cast< cppu::OWeakObject * >(this) ); } - else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rValue.Name == "Title" ) { rtl::OUString aNewTitle; if (!( rValue.Value >>= aNewTitle )) @@ -915,32 +915,32 @@ uno::Any SAL_CALL Content::execute( #endif uno::Any aRet; - if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertyValues" ) )) + if ( aCommand.Name == "getPropertyValues" ) { uno::Sequence< beans::Property > Properties; if ( !( aCommand.Argument >>= Properties ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet <<= getPropertyValues( Properties, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getPropertySetInfo" ) )) + else if ( aCommand.Name == "getPropertySetInfo" ) aRet <<= getPropertySetInfo( xEnv, sal_False ); - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "getCommandInfo" ) )) + else if ( aCommand.Name == "getCommandInfo" ) aRet <<= getCommandInfo( xEnv, sal_False ); - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "open" ) )) + else if ( aCommand.Name == "open" ) { ucb::OpenCommandArgument2 aOpenCommand; if ( !( aCommand.Argument >>= aOpenCommand ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet = open( aOpenCommand, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "transfer" ) )) + else if ( aCommand.Name == "transfer" ) { ucb::TransferInfo transferArgs; if ( !( aCommand.Argument >>= transferArgs ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); transfer( transferArgs, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "setPropertyValues" ) )) + else if ( aCommand.Name == "setPropertyValues" ) { uno::Sequence< beans::PropertyValue > aProperties; if ( !( aCommand.Argument >>= aProperties ) || !aProperties.getLength() ) @@ -955,14 +955,14 @@ uno::Any SAL_CALL Content::execute( ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); aRet <<= createNewContent( arg ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) )) + else if ( aCommand.Name == "insert" ) { ucb::InsertCommandArgument arg; if ( !( aCommand.Argument >>= arg ) ) ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); insert( arg.Data, arg.ReplaceExisting, xEnv ); } - else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) )) + else if ( aCommand.Name == "delete" ) { sal_Bool bDeletePhysical = sal_False; aCommand.Argument >>= bDeletePhysical; @@ -1142,9 +1142,9 @@ uno::Reference< ucb::XContent > bool create_document; const char *name; - if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( GIO_FILE_TYPE ) ) ) + if ( Info.Type == GIO_FILE_TYPE ) create_document = true; - else if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( GIO_FOLDER_TYPE ) ) ) + else if ( Info.Type == GIO_FOLDER_TYPE ) create_document = false; else { diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index af5a698ac460..13f764088edb 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -496,9 +496,9 @@ Content::createNewContent( const ucb::ContentInfo& Info ) bool create_document; const char *name; - if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( GVFS_FILE_TYPE ) ) ) + if ( Info.Type == GVFS_FILE_TYPE ) create_document = true; - else if ( Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( GVFS_FOLDER_TYPE ) ) ) + else if ( Info.Type == GVFS_FOLDER_TYPE ) create_document = false; else { #ifdef DEBUG @@ -616,7 +616,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendString( rProp, GnomeToOUString( m_info.name ) ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + else if ( rProp.Name == "ContentType" ) xRow->appendString( rProp, getContentType () ); else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) { @@ -658,7 +658,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsHidden" ) ) ) + else if ( rProp.Name == "IsHidden" ) xRow->appendBoolean( rProp, ( m_info.name && m_info.name[0] == '.' ) ); else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsVolume" ) ) || @@ -685,7 +685,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( g_warning ("FIXME: Requested mime-type - an expensive op. indeed!"); #endif xRow->appendVoid( rProp ); - } else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) + } else if ( rProp.Name == "CreatableContentsInfo" ) xRow->appendObject( rProp, uno::makeAny( queryCreatableContentsInfo( xEnv ) ) ); else { diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 85819a482bda..687aacf41baa 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -419,11 +419,11 @@ uno::Any SAL_CALL Content::execute( } } } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "close" ) ) ) + else if ( aCommand.Name == "close" ) { getContentProvider()->closeDocument(m_aProps->m_sDocumentId); } - else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) ) + else if ( aCommand.Name == "delete" ) { ////////////////////////////////////////////////////////////////// // delete @@ -828,7 +828,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { const beans::PropertyValue& rValue = pValues[ n ]; - if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + if ( rValue.Name == "Title" ) { changePropertyValue(rValue,n,m_aProps->m_sTitle,nChanged,aRet,aChanges); } diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx index cebd00a27b96..0147bb745e65 100644 --- a/ucb/source/ucp/webdav/ContentProperties.cxx +++ b/ucb/source/ucp/webdav/ContentProperties.cxx @@ -479,7 +479,7 @@ void ContentProperties::addProperty( const rtl::OUString & rName, (*m_xProps)[ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ] = PropertyValue( rValue, true ); } - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Type" ) ) ) + else if ( rName == "Content-Type" ) { // Do NOT map Content-Type entity header to DAV:getcontenttype! // Only DAV resources have this property. diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index fab721ef35a8..f5636225fa73 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1552,7 +1552,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( // Mandatory props. ////////////////////////////////////////////////////////////////// - if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ) + if ( rName == "ContentType" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( @@ -1578,7 +1578,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( "Property is read-only!" )), static_cast< cppu::OWeakObject * >( this ) ); } - else if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + else if ( rName == "Title" ) { rtl::OUString aNewValue; if ( rValue.Value >>= aNewValue ) @@ -1653,7 +1653,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( continue; } - if ( rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) + if ( rName == "Size" ) { // Read-only property! aRet[ n ] <<= lang::IllegalAccessException( @@ -2581,7 +2581,7 @@ void Content::transfer( if ( aTitle.isEmpty() ) aTitle = sourceURI.GetPathBaseNameUnescaped(); - if ( aTitle.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "/" ) ) ) + if ( aTitle == "/" ) { // kso: ??? aTitle = rtl::OUString(); diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index cab7eb3dfb12..f65a25d82e98 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -335,11 +335,11 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) { return aFallBackArabic; } - else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "th" ) ) ) + else if ( aLocale.Language == "th" ) { return aFallBackThai; } - else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ko" ) ) ) + else if ( aLocale.Language == "ko" ) { return aFallBackKorean; } @@ -355,14 +355,14 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) { return aFallbackLatin2; } - else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "zh" ) ) ) + else if ( aLocale.Language == "zh" ) { if( ! aLocale.Country.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cn" ) ) ) return aFallBackChineseTRD; else return aFallBackChineseSIM; } - else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ja" ) ) ) + else if ( aLocale.Language == "ja" ) { return aFallBackJapanese; } diff --git a/unotools/source/config/xmlaccelcfg.cxx b/unotools/source/config/xmlaccelcfg.cxx index 10397c0637db..74a1ed14b984 100644 --- a/unotools/source/config/xmlaccelcfg.cxx +++ b/unotools/source/config/xmlaccelcfg.cxx @@ -259,7 +259,7 @@ throw( SAXException, RuntimeException ) { m_nElementDepth++; - if ( aElementName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_ACCELERATORLIST ))) + if ( aElementName == ELEMENT_ACCELERATORLIST ) { // acceleratorlist if ( m_bAcceleratorMode ) @@ -271,7 +271,7 @@ throw( SAXException, RuntimeException ) else m_bAcceleratorMode = sal_True; } - else if ( aElementName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_ACCELERATORITEM ))) + else if ( aElementName == ELEMENT_ACCELERATORITEM ) { // accelerator item if ( !m_bAcceleratorMode ) @@ -293,11 +293,11 @@ throw( SAXException, RuntimeException ) OUString aName = xAttrList->getNameByIndex( i ); OUString aValue = xAttrList->getValueByIndex( i ); - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_URL ))) + if ( aName == ATTRIBUTE_URL ) aItem.aCommand = aValue; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_MODIFIER ))) + else if ( aName == ATTRIBUTE_MODIFIER ) aItem.nModifier = (sal_uInt16)aValue.toInt32(); - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_KEYCODE ))) + else if ( aName == ATTRIBUTE_KEYCODE ) aItem.nCode = (sal_uInt16)aValue.toInt32(); } @@ -324,7 +324,7 @@ void SAL_CALL OReadAccelatorDocumentHandler::endElement( const OUString& aName ) { m_nElementDepth--; - if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_ACCELERATORLIST ))) + if ( aName == ELEMENT_ACCELERATORLIST ) { // acceleratorlist if ( !m_bAcceleratorMode ) @@ -334,7 +334,7 @@ void SAL_CALL OReadAccelatorDocumentHandler::endElement( const OUString& aName ) throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_ACCELERATORITEM ))) + else if ( aName == ELEMENT_ACCELERATORITEM ) { if ( !m_bItemCloseExpected ) { diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 1a2743375433..384cf3a45a67 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -373,7 +373,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag uno::Sequence< PropertyValue > aPageParms( i_rController.getPageParameters( i_nPage ) ); for( sal_Int32 nProperty = 0, nPropertyCount = aPageParms.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( aPageParms[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) + if ( aPageParms[ nProperty ].Name == "PageSize" ) { awt::Size aSize; aPageParms[ nProperty].Value >>= aSize; diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index bb24eb6e7371..d44b19e41418 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -2936,53 +2936,53 @@ bool PrintFontManager::readOverrideMetrics() const NamedValue* pProps = aMetrics.getConstArray(); for( sal_Int32 n = 0; n < nProps; n++ ) { - if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FamilyName" ) ) ) + if ( pProps[n].Name == "FamilyName" ) pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, getString(pProps[n].Value), sal_True ); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PSName" ) ) ) + else if ( pProps[n].Name == "PSName" ) pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, getString(pProps[n].Value), sal_True ); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StyleName" ) ) ) + else if ( pProps[n].Name == "StyleName" ) pFont->m_aStyleName = getString(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Italic" ) ) ) + else if ( pProps[n].Name == "Italic" ) pFont->m_eItalic = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) ) + else if ( pProps[n].Name == "Width" ) pFont->m_eWidth = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Weight" ) ) ) + else if ( pProps[n].Name == "Weight" ) pFont->m_eWeight = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Pitch" ) ) ) + else if ( pProps[n].Name == "Pitch" ) pFont->m_ePitch = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encoding" ) ) ) + else if ( pProps[n].Name == "Encoding" ) pFont->m_aEncoding = static_cast(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontEncodingOnly" ) ) ) + else if ( pProps[n].Name == "FontEncodingOnly" ) pFont->m_bFontEncodingOnly = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricXWidth" ) ) ) + else if ( pProps[n].Name == "GlobalMetricXWidth" ) pFont->m_aGlobalMetricX.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricXHeight" ) ) ) + else if ( pProps[n].Name == "GlobalMetricXHeight" ) pFont->m_aGlobalMetricX.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricYWidth" ) ) ) + else if ( pProps[n].Name == "GlobalMetricYWidth" ) pFont->m_aGlobalMetricY.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricYHeight" ) ) ) + else if ( pProps[n].Name == "GlobalMetricYHeight" ) pFont->m_aGlobalMetricY.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Ascend" ) ) ) + else if ( pProps[n].Name == "Ascend" ) pFont->m_nAscend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Descend" ) ) ) + else if ( pProps[n].Name == "Descend" ) pFont->m_nDescend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Leading" ) ) ) + else if ( pProps[n].Name == "Leading" ) pFont->m_nLeading = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XMin" ) ) ) + else if ( pProps[n].Name == "XMin" ) pFont->m_nXMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "YMin" ) ) ) + else if ( pProps[n].Name == "YMin" ) pFont->m_nYMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XMax" ) ) ) + else if ( pProps[n].Name == "XMax" ) pFont->m_nXMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "YMax" ) ) ) + else if ( pProps[n].Name == "YMax" ) pFont->m_nYMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalSubstitutes" ) ) ) + else if ( pProps[n].Name == "VerticalSubstitutes" ) pFont->m_bHaveVerticalSubstitutedGlyphs = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EncodingVector" ) ) ) + else if ( pProps[n].Name == "EncodingVector" ) { Sequence< NamedValue > aEncoding; pProps[n].Value >>= aEncoding; @@ -2995,7 +2995,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_aEncodingVector[ cCode ] = nGlyph; } } - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NonEncoded" ) ) ) + else if ( pProps[n].Name == "NonEncoded" ) { Sequence< NamedValue > aEncoding; pProps[n].Value >>= aEncoding; @@ -3008,7 +3008,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_aNonEncoded[ cCode ] = OUStringToOString(aGlyphName,RTL_TEXTENCODING_ASCII_US); } } - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharacterMetrics" ) ) ) + else if ( pProps[n].Name == "CharacterMetrics" ) { // fill pFont->m_pMetrics->m_aMetrics // expect triples of int: int -> CharacterMetric.{ width, height } @@ -3022,7 +3022,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_pMetrics->m_aMetrics[ pInts[m] ].height = static_cast(pInts[m+2]); } } - else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XKernPairs" ) ) ) + else if ( pProps[n].Name == "XKernPairs" ) { // fill pFont->m_pMetrics->m_aXKernPairs // expection name: value: ((height << 16)| width) diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 3c2222d316ed..e2809d995d80 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -315,7 +315,7 @@ com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const rtl:: throw (com::sun::star::uno::RuntimeException) { com::sun::star::uno::Any ret; - if( Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "java-vm.interaction-handler" ) ) ) + if ( Name == "java-vm.interaction-handler" ) { // Currently, for accessbility no interaction handler shall be offered. // There may be introduced later on a handler using native toolkits diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 017681a323b6..8194f527f509 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -791,21 +791,21 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons sal_Int32 nPaperBin = mnDefaultPaperBin; for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredPageSize" ) ) ) + if ( i_rProps[ nProperty ].Name == "PreferredPageSize" ) { i_rProps[ nProperty ].Value >>= aSetSize; } - else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) + else if ( i_rProps[ nProperty ].Name == "PageSize" ) { i_rProps[ nProperty ].Value >>= aIsSize; } - else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageIncludesNonprintableArea" ) ) ) + else if ( i_rProps[ nProperty ].Name == "PageIncludesNonprintableArea" ) { sal_Bool bVal = sal_False; i_rProps[ nProperty ].Value >>= bVal; aPageSize.bFullPaper = static_cast(bVal); } - else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrinterPaperTray" ) ) ) + else if ( i_rProps[ nProperty ].Name == "PrinterPaperTray" ) { sal_Int32 nBin = -1; i_rProps[ nProperty ].Value >>= nBin; @@ -1372,7 +1372,7 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ for( int n = 0; n < aOptProp.getLength(); n++ ) { const beans::PropertyValue& rEntry( aOptProp[ n ] ); - if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Property" ) ) ) + if ( rEntry.Name == "Property" ) { PropertyValue aVal; rEntry.Value >>= aVal; @@ -1382,17 +1382,17 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ aPropName = aVal.Name; bHaveProperty = true; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enabled" ) ) ) + else if ( rEntry.Name == "Enabled" ) { sal_Bool bValue = sal_True; rEntry.Value >>= bValue; bIsEnabled = bValue; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnName" ) ) ) + else if ( rEntry.Name == "DependsOnName" ) { rEntry.Value >>= aDep.maDependsOnName; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnEntry" ) ) ) + else if ( rEntry.Name == "DependsOnEntry" ) { rEntry.Value >>= aDep.mnDependsOnEntry; } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index ee646e81a341..89bc71ca5163 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1095,58 +1095,58 @@ void PrintDialog::setupOptionalUI() for( int n = 0; n < aOptProp.getLength(); n++ ) { const beans::PropertyValue& rEntry( aOptProp[ n ] ); - if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Text" ) ) ) + if ( rEntry.Name == "Text" ) { rEntry.Value >>= aText; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ControlType" ) ) ) + else if ( rEntry.Name == "ControlType" ) { rEntry.Value >>= aCtrlType; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Choices" ) ) ) + else if ( rEntry.Name == "Choices" ) { rEntry.Value >>= aChoices; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ChoicesDisabled" ) ) ) + else if ( rEntry.Name == "ChoicesDisabled" ) { rEntry.Value >>= aChoicesDisabled; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Property" ) ) ) + else if ( rEntry.Name == "Property" ) { PropertyValue aVal; rEntry.Value >>= aVal; aPropertyName = aVal.Name; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enabled" ) ) ) + else if ( rEntry.Name == "Enabled" ) { sal_Bool bValue = sal_True; rEntry.Value >>= bValue; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GroupingHint" ) ) ) + else if ( rEntry.Name == "GroupingHint" ) { rEntry.Value >>= aGroupingHint; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnName" ) ) ) + else if ( rEntry.Name == "DependsOnName" ) { rEntry.Value >>= aDependsOnName; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnEntry" ) ) ) + else if ( rEntry.Name == "DependsOnEntry" ) { rEntry.Value >>= nDependsOnValue; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AttachToDependency" ) ) ) + else if ( rEntry.Name == "AttachToDependency" ) { rEntry.Value >>= bUseDependencyRow; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MinValue" ) ) ) + else if ( rEntry.Name == "MinValue" ) { rEntry.Value >>= nMinValue; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MaxValue" ) ) ) + else if ( rEntry.Name == "MaxValue" ) { rEntry.Value >>= nMaxValue; } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HelpText" ) ) ) + else if ( rEntry.Name == "HelpText" ) { if( ! (rEntry.Value >>= aHelpTexts) ) { @@ -1158,7 +1158,7 @@ void PrintDialog::setupOptionalUI() } } } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HelpId" ) ) ) + else if ( rEntry.Name == "HelpId" ) { if( ! (rEntry.Value >>= aHelpIds ) ) { @@ -1170,7 +1170,7 @@ void PrintDialog::setupOptionalUI() } } } - else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HintNoLayoutPage" ) ) ) + else if ( rEntry.Name == "HintNoLayoutPage" ) { sal_Bool bNoLayoutPage = sal_False; rEntry.Value >>= bNoLayoutPage; @@ -1198,25 +1198,25 @@ void PrintDialog::setupOptionalUI() bOnStaticPage = false; bSubgroupOnStaticPage = false; - if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ) + if ( aGroupingHint == "PrintRange" ) { pCurColumn = maJobPage.mxPrintRange; pCurParent = &maJobPage; // set job page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OptionsPage" ) ) ) + else if ( aGroupingHint == "OptionsPage" ) { pCurColumn = boost::dynamic_pointer_cast(maOptionsPage.getLayout()); pCurParent = &maOptionsPage; // set options page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OptionsPageOptGroup" ) ) ) + else if ( aGroupingHint == "OptionsPageOptGroup" ) { pCurColumn = maOptionsPage.mxOptGroup; pCurParent = &maOptionsPage; // set options page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LayoutPage" ) ) ) + else if ( aGroupingHint == "LayoutPage" ) { pCurColumn = boost::dynamic_pointer_cast(maNUpPage.getLayout()); pCurParent = &maNUpPage; // set layout page as current parent @@ -1261,7 +1261,7 @@ void PrintDialog::setupOptionalUI() ) { Window* pNewSub = NULL; - if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ) + if ( aGroupingHint == "PrintRange" ) pNewSub = new FixedText( pCurParent, WB_VCENTER ); else pNewSub = new FixedLine( pCurParent ); @@ -1447,7 +1447,7 @@ void PrintDialog::setupOptionalUI() pLabel->setLabel( pHeading ); } - if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "List" ) ) ) + if ( aCtrlType == "List" ) { ListBox* pList = new ListBox( pCurParent, WB_DROPDOWN | WB_BORDER ); maControls.push_front( pList ); @@ -1480,7 +1480,7 @@ void PrintDialog::setupOptionalUI() else pFieldColumn->addWindow( pList ); } - else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Range" ) ) ) + else if ( aCtrlType == "Range" ) { NumericField* pField = new NumericField( pCurParent, WB_BORDER | WB_SPIN ); maControls.push_front( pField ); @@ -1513,7 +1513,7 @@ void PrintDialog::setupOptionalUI() else pFieldColumn->addWindow( pField ); } - else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Edit" ) ) ) + else if ( aCtrlType == "Edit" ) { Edit* pField = new Edit( pCurParent, WB_BORDER ); maControls.push_front( pField ); @@ -2219,7 +2219,7 @@ void PrintDialog::updateWindowFromProperty( const rtl::OUString& i_rProperty ) { pBox->Check( bVal ); } - else if( i_rProperty.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintProspect" ) ) ) + else if ( i_rProperty == "PrintProspect" ) { // EVIL special case if( bVal ) diff --git a/vcl/unx/kde/UnxCommandThread.cxx b/vcl/unx/kde/UnxCommandThread.cxx index 8f7ee3d0c21c..ace8c44b405c 100644 --- a/vcl/unx/kde/UnxCommandThread.cxx +++ b/vcl/unx/kde/UnxCommandThread.cxx @@ -188,27 +188,27 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString & ::rtl::OUString aCommandName = aList.front(); aList.pop_front(); - if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "accept" ) ) ) + if ( aCommandName == "accept" ) { m_aResult = sal_True; m_aExecCondition.set(); } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "reject" ) ) ) + else if ( aCommandName == "reject" ) { m_aResult = sal_False; m_aExecCondition.set(); } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "fileSelectionChanged" ) ) ) + else if ( aCommandName == "fileSelectionChanged" ) { if ( m_pNotifyThread ) m_pNotifyThread->fileSelectionChanged(); } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "files" ) ) ) + else if ( aCommandName == "files" ) { m_aGetFiles = aList; m_aGetFilesCondition.set(); } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "value" ) ) ) + else if ( aCommandName == "value" ) { ::rtl::OUString aType; if ( !aList.empty() ) @@ -217,14 +217,14 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString & aList.pop_front(); } - if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bool" ) ) ) + if ( aType == "bool" ) { sal_Bool bValue = !aList.empty() && aList.front().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")); m_aGetValue <<= bValue; m_aGetValueCondition.set(); } - else if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "int" ) ) ) + else if ( aType == "int" ) { sal_Int32 nValue = 0; if ( !aList.empty() ) @@ -233,7 +233,7 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString & m_aGetValue <<= nValue; m_aGetValueCondition.set(); } - else if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "string" ) ) ) + else if ( aType == "string" ) { ::rtl::OUString aValue; if ( !aList.empty() ) @@ -242,7 +242,7 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString & m_aGetValue <<= aValue; m_aGetValueCondition.set(); } - else if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stringList" ) ) ) + else if ( aType == "stringList" ) { uno::Sequence< ::rtl::OUString > aSequence( aList.size() ); sal_Int32 nIdx = 0; @@ -258,12 +258,12 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const ::rtl::OUString & m_aGetValueCondition.set(); } } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "currentFilter" ) ) ) + else if ( aCommandName == "currentFilter" ) { m_aGetCurrentFilter = aList.empty()? ::rtl::OUString(): aList.front(); m_aGetCurrentFilterCondition.set(); } - else if ( aCommandName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "currentDirectory" ) ) ) + else if ( aCommandName == "currentDirectory" ) { m_aGetDirectory = aList.empty()? ::rtl::OUString(): aList.front(); m_aGetDirectoryCondition.set(); diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx index 1a30913d1797..3c29047a1cec 100644 --- a/vcl/unx/kde/UnxFilePicker.cxx +++ b/vcl/unx/kde/UnxFilePicker.cxx @@ -341,7 +341,7 @@ void SAL_CALL UnxFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlA aBuffer.appendAscii( " ", 1 ); aBuffer.append( aAction ); - if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "checkbox" ) ) ) + if ( aType == "checkbox" ) { sal_Bool bControlValue; if ( ( rValue >>= bControlValue ) && bControlValue ) @@ -349,7 +349,7 @@ void SAL_CALL UnxFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlA else aBuffer.appendAscii( " false" ); } - else if ( aType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "listbox" ) ) ) + else if ( aType == "listbox" ) { switch ( nControlAction ) { diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a400b4b1f745..54fe0a0efc36 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3032,9 +3032,9 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { sal_Int16 nEscapement = 0; sal_Int8 nProp = 58; - if( sStringValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "superscript" ) )) + if ( sStringValue == "superscript" ) nEscapement = 101; - else if( sStringValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "subscript" ) )) + else if ( sStringValue == "subscript" ) nEscapement = -101; else nProp = 100; diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index fcb7aa577cbc..1da16246254f 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -69,7 +69,7 @@ void MeasureHandler::lcl_attribute(Id rName, Value & rVal) case NS_ooxml::LN_CT_Height_hRule: // 90666; { ::rtl::OUString sHeightType = rVal.getString(); - if( sHeightType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "exact" ) ) ) + if ( sHeightType == "exact" ) m_nRowHeightSizeType = text::SizeType::FIX; } break; diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index b79ce6b18c13..07d6591d2a55 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -818,7 +818,7 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) uno::Reference< beans::XPropertyState >xState1( xStyle, uno::UNO_QUERY_THROW ); xState1->setPropertyToDefault(rPropNameSupplier.GetName( PROP_PARA_LEFT_MARGIN )); } - else if( sConvertedStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Text body" ) ) ) + else if ( sConvertedStyleName == "Text body" ) xState->setPropertyToDefault(rPropNameSupplier.GetName( PROP_PARA_BOTTOM_MARGIN )); else if( sConvertedStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Heading 1" ) ) || sConvertedStyleName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Heading 2" ) ) || diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index f9d9ca482001..6f30944453f3 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -73,11 +73,11 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r { if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TypeName")) ) rDescriptor[nProperty].Value >>= sTypeName; - else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "URL" )) ) + else if ( pValues[nProperty].Name == "URL" ) pValues[nProperty].Value >>= sURL; - else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "Stream" )) ) + else if ( pValues[nProperty].Name == "Stream" ) pValues[nProperty].Value >>= xStream; - else if( pValues[nProperty].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "InputStream" )) ) + else if ( pValues[nProperty].Name == "InputStream" ) pValues[nProperty].Value >>= xInputStream; } bool bBinary = sTypeName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "writer_MS_Word_97" )) || @@ -113,7 +113,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r else { uno::Reference< embed::XStorage > xDocStorage; - if( sURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:stream" ) ) ) + if ( sURL == "private:stream" ) xDocStorage = comphelper::OStorageHelper::GetStorageFromInputStream( xInputStream ); else xDocStorage = comphelper::OStorageHelper::GetStorageFromURL( @@ -124,7 +124,7 @@ OUString WriterFilterDetection::detect( uno::Sequence< beans::PropertyValue >& r const ::rtl::OUString* pNames = aNames.getConstArray(); for(sal_Int32 nName = 0; nName < aNames.getLength(); ++nName) { - if(pNames[nName].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM ( "word" ))) + if ( pNames[nName] == "word" ) { bWord = true; if( sTypeName.isEmpty() ) diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx index 7114168486b8..26226ff2d1fa 100644 --- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx +++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx @@ -389,7 +389,7 @@ throw(beans::UnknownPropertyException, beans::PropertyVetoException, if ( aPropName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")) ) rProp.Value >>= msPassword; - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ) ) ) + else if ( aPropName == "InputStream" ) rProp.Value >>= mxInputStream; } } diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 5df79c9ddd94..167e9e8bca0b 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -487,7 +487,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( // for NetCharts there were no xAxis exported to older files // so we need to add the x axis here for those old NetChart files - if( maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.NetChartType" )) ) + if ( maChartTypeServiceName == "com.sun.star.chart2.NetChartType" ) bAddMissingXAxisForNetCharts = true; //Issue 59288 @@ -499,7 +499,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan2_4( GetImport().GetModel() ) ) { //issue74660 - if( maChartTypeServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.ColumnChartType" )) ) + if ( maChartTypeServiceName == "com.sun.star.chart2.ColumnChartType" ) bAdaptXAxisOrientationForOld2DBarCharts = true; } diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 9c962ce4296b..691baaf9d11c 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -804,7 +804,7 @@ void XMLConfigItemMapIndexedContext::EndElement() { if (mpBaseContext) { - if( maConfigItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ForbiddenCharacters" ) ) ) + if ( maConfigItemName == "ForbiddenCharacters" ) { uno::Reference< i18n::XForbiddenCharacters > xForbChars; @@ -891,7 +891,7 @@ void XMLConfigItemMapIndexedContext::EndElement() mrAny <<= maProps.GetIndexContainer(); } } - else if( maConfigItemName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Symbols" ) ) ) + else if ( maConfigItemName == "Symbols" ) { uno::Reference< container::XIndexAccess > xIndex( maProps.GetIndexContainer(), uno::UNO_QUERY ); diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6b750ad929b1..d30585f7a4bf 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -837,12 +837,12 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue const OUString& rPropName = pProps->Name; const Any& rValue = pProps->Value; - if( rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FileName" ) ) ) + if ( rPropName == "FileName" ) { if( !(rValue >>= msOrigFileName ) ) return sal_False; } - else if (rPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) + else if ( rPropName == "FilterName" ) { if( !(rValue >>= msFilterName ) ) return sal_False; diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 9eaf9a31bb47..5baefba6bbac 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -693,11 +693,11 @@ AnimationNodeContext::AnimationNodeContext( if( (nPrefix == XML_NAMESPACE_PRESENTATION) && IsXMLToken( aLocalName, XML_PRESET_ID ) ) { const OUString& rValue = xAttrList->getValueByIndex( nAttribute ); - if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ooo-entrance-random" ) ) ) + if ( rValue == "ooo-entrance-random" ) { nPresetClass = EffectPresetClass::ENTRANCE; } - else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ooo-exit-random" ) ) ) + else if ( rValue == "ooo-exit-random" ) { nPresetClass = EffectPresetClass::EXIT; } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 9100f599759c..58859149aafe 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1587,7 +1587,7 @@ namespace xmloff { ::rtl::OUString sDefaultControl; OSL_VERIFY( aDefaultControlPropertyPos->Value >>= sDefaultControl ); - if ( sDefaultControl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "stardiv.one.form.control.Edit" ) ) ) + if ( sDefaultControl == "stardiv.one.form.control.Edit" ) { // complete remove this property value from the array. Today's "default value" of the "DefaultControl" // property is sufficient diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index beae4d64fbda..efcd5140c5d4 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -630,7 +630,7 @@ sal_uInt16 SvXMLStylesContext::GetFamily( { nFamily = XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID; } - else if( rValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( XML_STYLE_FAMILY_SCH_CHART_NAME ))) + else if ( rValue == XML_STYLE_FAMILY_SCH_CHART_NAME ) { nFamily = XML_STYLE_FAMILY_SCH_CHART_ID; } diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx index 062bdf32d4eb..59de3c9cd212 100644 --- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx +++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx @@ -84,12 +84,12 @@ namespace xmlscript ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) ); if ( !aValue.isEmpty() ) { - if ( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "true" ) ) ) + if ( aValue == "true" ) { *pRet = sal_True; return true; } - else if ( aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "false" ) ) ) + else if ( aValue == "false" ) { *pRet = sal_False; return true; @@ -214,7 +214,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ), Reference< XInterface >(), Any() ); } - else if ( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "library-linked" ) ) ) + else if ( rLocalName == "library-linked" ) { if ( xAttributes.is() ) { @@ -253,7 +253,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/ } } } - else if ( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "library-embedded" ) ) ) + else if ( rLocalName == "library-embedded" ) { // TODO: create password protected libraries @@ -355,7 +355,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ), Reference< XInterface >(), Any() ); } - else if ( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "module" ) ) ) + else if ( rLocalName == "module" ) { if ( xAttributes.is() ) { @@ -420,7 +420,7 @@ void BasicElementBase::processingInstruction( const ::rtl::OUString& /*rTarget*/ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ), Reference< XInterface >(), Any() ); } - else if ( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "source-code" ) ) ) + else if ( rLocalName == "source-code" ) { // TODO: password protected libraries @@ -574,7 +574,7 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal namespace!" ) ), Reference< XInterface >(), Any() ); } - else if ( rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "libraries" ) ) ) + else if ( rLocalName == "libraries" ) { Reference< script::XLibraryContainer2 > xLibContainer; -- cgit