summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/commontools/dbtools2.cxx6
-rw-r--r--cppu/source/uno/lbmap.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/options/treeopt.cxx6
-rw-r--r--dtrans/source/cnttype/mcnttype.cxx6
-rw-r--r--editeng/source/editeng/edtspell.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx4
-rw-r--r--editeng/source/items/paraitem.cxx2
-rw-r--r--embeddedobj/source/general/docholder.cxx10
-rw-r--r--embeddedobj/source/msole/ownview.cxx4
-rw-r--r--extensions/source/update/check/updatecheckjob.cxx2
-rw-r--r--filter/source/msfilter/eschesdo.cxx2
-rw-r--r--filter/source/placeware/filter.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx2
-rw-r--r--framework/source/fwe/xml/menudocumenthandler.cxx22
-rw-r--r--framework/source/jobs/jobexecutor.cxx8
-rw-r--r--framework/source/services/autorecovery.cxx22
-rw-r--r--framework/source/uielement/newmenucontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx2
-rw-r--r--framework/source/uielement/statusbarmerger.cxx40
-rw-r--r--i18npool/source/collator/collator_unicode.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx14
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx22
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx2
-rw-r--r--sal/rtl/bootstrap.cxx2
-rw-r--r--sc/qa/unit/ucalc.cxx10
-rw-r--r--sc/source/core/tool/appoptio.cxx3
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx2
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx4
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx7
-rw-r--r--sc/source/ui/vba/vbaworkbook.cxx6
-rw-r--r--sdext/source/pdfimport/filterdet.cxx8
-rw-r--r--sfx2/source/appl/sfxhelp.cxx28
-rw-r--r--sfx2/source/appl/shutdowniconunx.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/notify/eventsupplier.cxx8
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx2
-rw-r--r--stoc/source/security/access_controller.cxx2
-rw-r--r--stoc/source/security/permissions.cxx2
-rw-r--r--stoc/test/testiadapter.cxx61
-rw-r--r--svtools/source/uno/unogridcolumnfacade.cxx12
-rw-r--r--svx/source/form/fmdpage.cxx4
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/items/galleryitem.cxx10
-rw-r--r--svx/source/sidebar/nbdtmg.cxx12
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx16
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx10
-rw-r--r--svx/source/unodraw/unopage.cxx4
-rw-r--r--svx/source/unodraw/unoshap2.cxx2
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx21
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx18
58 files changed, 233 insertions, 239 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index 689fc5c64547..ca012d109b0b 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -875,9 +875,9 @@ bool isEmbeddedInDatabase( const Reference< XInterface >& _rxComponent, Referenc
const PropertyValue* pContextEnd = pContextIter + aDocumentContext.getLength();
for(;pContextIter != pContextEnd;++pContextIter)
{
- if ( pContextIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
- && ( pContextIter->Value >>= _rxActualConnection )
- )
+ if ( pContextIter->Name.startsWith( "ActiveConnection" )
+ && ( pContextIter->Value >>= _rxActualConnection )
+ )
{
bIsEmbedded = true;
break;
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 9b4204c9da16..9c6061565061 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -386,7 +386,7 @@ static Mapping loadExternalMapping(
OUString aName;
uno_ext_getMappingFunc fpGetMapFunc = 0;
- if (EnvDcp::getTypeName(rFrom.getTypeName()).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_LB_UNO) ))
+ if (EnvDcp::getTypeName(rFrom.getTypeName()).startsWith( UNO_LB_UNO ))
{
aName = getBridgeName( rTo, rFrom, rAddPurpose );
fpGetMapFunc = selectMapFunc( aName );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 5cb3bb6f10f8..54f745c29760 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -411,8 +411,8 @@ SvxConfigPage::CanConfig( const OUString& aModuleId )
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" ) ) )
+ if ( aModuleId.startsWith( "com.sun.star.text.TextDocument" ) ||
+ aModuleId.startsWith( "com.sun.star.text.GlobalDocument" ) )
return OUString("Writer");
else if ( aModuleId == "com.sun.star.text.WebDocument" )
return OUString("Writer/Web");
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 062d9c9f7c82..3cfb7ff9e196 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1615,9 +1615,9 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
// text document
ResStringArray& rTextArray = aDlgResource.GetTextArray();
- if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) )
- || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) )
- || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) )
+ if ( aFactory.startsWith( "com.sun.star.text.TextDocument" )
+ || aFactory.startsWith( "com.sun.star.text.WebDocument" )
+ || aFactory.startsWith( "com.sun.star.text.GlobalDocument" ) )
{
SfxModule* pSwMod = (*(SfxModule**) GetAppData(SHL_WRITER));
if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) )
diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx
index 89eea11beda4..015a77f89178 100644
--- a/dtrans/source/cnttype/mcnttype.cxx
+++ b/dtrans/source/cnttype/mcnttype.cxx
@@ -170,7 +170,7 @@ void SAL_CALL CMimeContentType::acceptSym( const OUString& pSymTlb )
void SAL_CALL CMimeContentType::skipSpaces( void )
{
- while (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SPACE)))
+ while (m_nxtSym.startsWith(SPACE))
getSym( );
}
@@ -353,8 +353,8 @@ OUString SAL_CALL CMimeContentType::quotedPValue( )
while ( !m_nxtSym.isEmpty( ) )
{
if ( bAfterQuoteSign && (
- (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SPACE))) ||
- (m_nxtSym.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SEMICOLON))))
+ (m_nxtSym.startsWith(SPACE)) ||
+ (m_nxtSym.startsWith(SEMICOLON)))
)
{
break;
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index f9eb3560ac56..3ec1a921cf3e 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -651,7 +651,7 @@ sal_Bool EdtAutoCorrDoc::SetAttr( sal_uInt16 nStt, sal_uInt16 nEnd,
{
SfxItemPool* pPool = &mpEditEngine->GetEditDoc().GetItemPool();
while ( pPool->GetSecondaryPool() &&
- !pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")) )
+ !pPool->GetName().startsWith("EditEngineItemPool") )
{
pPool = pPool->GetSecondaryPool();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 3ec19db12ef4..74ca596acfb9 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -158,13 +158,13 @@ EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
// The SvRTF parser expects the Which-mapping passed on in the pool, not
// dependant on a secondary.
SfxItemPool* pPool = &aEditDoc.GetItemPool();
- while (pPool->GetSecondaryPool() && !pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")))
+ while (pPool->GetSecondaryPool() && !pPool->GetName().startsWith("EditEngineItemPool"))
{
pPool = pPool->GetSecondaryPool();
}
- DBG_ASSERT(pPool && pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EditEngineItemPool")),
+ DBG_ASSERT(pPool && pPool->GetName().startsWith("EditEngineItemPool"),
"ReadRTF: no EditEnginePool!");
EditRTFParserRef xPrsr = new EditRTFParser(rInput, aSel, *pPool, pEditEngine);
diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index c130771a862e..5f11920eb39b 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -1164,7 +1164,7 @@ SvStream& SvxTabStopItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ )
const SfxItemPool *pPool = SfxItemPool::GetStoringPool();
const bool bStoreDefTabs = pPool
- && pPool->GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SWG"))
+ && pPool->GetName().startsWith("SWG")
&& ::IsDefaultItem( this );
const short nTabs = Count();
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index 8bd51d6679be..bbd2a5696b35 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -1183,11 +1183,11 @@ void SAL_CALL DocumentHolder::notifyEvent( const document::EventObject& Event )
if( m_pEmbedObj && Event.Source == m_xComponent )
{
// for now the ignored events are not forwarded, but sent by the object itself
- if ( !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSave" ) )
- && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveDone" ) )
- && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAs" ) )
- && !Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) )
- && !( Event.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnVisAreaChanged" ) ) && m_nNoResizeReact ) )
+ if ( !Event.EventName.startsWith( "OnSave" )
+ && !Event.EventName.startsWith( "OnSaveDone" )
+ && !Event.EventName.startsWith( "OnSaveAs" )
+ && !Event.EventName.startsWith( "OnSaveAsDone" )
+ && !( Event.EventName.startsWith( "OnVisAreaChanged" ) && m_nNoResizeReact ) )
m_pEmbedObj->PostEvent_Impl( Event.EventName );
}
}
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index 90814fb3dd46..d28f30b8ed36 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -242,7 +242,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream(
{
for ( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ )
{
- if ( aTypes[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aTypes[nInd].Value >>= aFilterName ) )
+ if ( aTypes[nInd].Name.startsWith( "PreferredFilter" ) && ( aTypes[nInd].Value >>= aFilterName ) )
{
aTypes[nInd].Value >>= aFilterName;
break;
@@ -589,7 +589,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent )
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( aEvent.Source == m_xModel && aEvent.EventName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OnSaveAsDone" ) ) )
+ if ( aEvent.Source == m_xModel && aEvent.EventName.startsWith( "OnSaveAsDone" ) )
{
// SaveAs operation took place, so just forget the model and deregister listeners
xModel = m_xModel;
diff --git a/extensions/source/update/check/updatecheckjob.cxx b/extensions/source/update/check/updatecheckjob.cxx
index 273450531c13..ae7a49e1725c 100644
--- a/extensions/source/update/check/updatecheckjob.cxx
+++ b/extensions/source/update/check/updatecheckjob.cxx
@@ -226,7 +226,7 @@ UpdateCheckJob::execute(const uno::Sequence<beans::NamedValue>& namedValues)
m_pInitThread.reset(
new InitUpdateCheckJobThread(
m_xContext, aConfig,
- !aEventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("onFirstVisibleTask"))));
+ !aEventName.startsWith("onFirstVisibleTask")));
return uno::Any();
}
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index c97f474fc8f6..a164591b9629 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -1051,7 +1051,7 @@ basegfx::B2DRange getUnrotatedGroupBoundRange(const Reference< XShape >& rxShape
{
if(rxShape.is())
{
- if(rxShape->getShapeType().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GroupShape")))
+ if(rxShape->getShapeType().startsWith("com.sun.star.drawing.GroupShape"))
{
// it's a group shape, iterate over children
const Reference< XIndexAccess > xXIndexAccess(rxShape, UNO_QUERY);
diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx
index 20f7f86a6926..b2f7c98e905a 100644
--- a/filter/source/placeware/filter.cxx
+++ b/filter/source/placeware/filter.cxx
@@ -88,15 +88,15 @@ sal_Bool SAL_CALL PlaceWareExportFilter::filter( const ::com::sun::star::uno::Se
Reference < XStatusIndicator > xStatusIndicator;
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
- if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "OutputStream" ) ) )
+ if ( pValue[i].Name.startsWith( "OutputStream" ) )
{
pValue[i].Value >>= xOutputStream;
}
- else if( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "URL" ) ) )
+ else if( pValue[i].Name.startsWith( "URL" ) )
{
pValue[i].Value >>= sURL;
}
- else if( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "InteractionHandler" ) ) )
+ else if( pValue[i].Name.startsWith( "InteractionHandler" ) )
{
pValue[i].Value >>= xInteractionHandler;
}
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index bfd172dd7906..deea834a4732 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -1115,7 +1115,7 @@ void XMLFilterSettingsDialog::initFilterList()
}
// if this is not a XmlFilterAdaptor entry, skip it
- if( !aFilterService.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.comp.Writer.XmlFilterAdaptor" ) ) )
+ if( !aFilterService.startsWith( "com.sun.star.comp.Writer.XmlFilterAdaptor" ) )
continue;
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index 212025822712..b8d7a8bc6ed4 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -294,7 +294,7 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName )
m_xReader->endDocument();
m_xReader.clear();
m_bMenuBarMode = sal_False;
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR )))
+ if ( !aName.startsWith( ELEMENT_MENUBAR ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menubar expected!";
@@ -442,7 +442,7 @@ void OReadMenuBarHandler::endElement( const OUString& aName )
m_xReader->endDocument();
m_xReader.clear();
m_bMenuMode = sal_False;
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU )))
+ if ( !aName.startsWith( ELEMENT_MENU ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menu expected!";
@@ -528,7 +528,7 @@ void SAL_CALL OReadMenuHandler::endElement( const OUString& aName )
m_xReader->endDocument();
m_xReader.clear();
m_bMenuPopupMode = sal_False;
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP )))
+ if ( !aName.startsWith( ELEMENT_MENUPOPUP ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menupopup expected!";
@@ -732,7 +732,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName )
m_xReader->endDocument();
m_xReader.clear();
m_bMenuMode = sal_False;
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU )))
+ if ( !aName.startsWith( ELEMENT_MENU ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menu expected!";
@@ -746,7 +746,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName )
{
if ( m_nNextElementExpected == ELEM_CLOSE_MENUITEM )
{
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM )))
+ if ( !aName.startsWith( ELEMENT_MENUITEM ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menuitem expected!";
@@ -755,7 +755,7 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName )
}
else if ( m_nNextElementExpected == ELEM_CLOSE_MENUSEPARATOR )
{
- if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR )))
+ if ( !aName.startsWith( ELEMENT_MENUSEPARATOR ))
{
OUString aErrorMessage = getErrorLineString();
aErrorMessage += "closing element menuseparator expected!";
@@ -847,8 +847,8 @@ throw ( SAXException, RuntimeException )
ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType, nItemBits );
if ( xSubMenu.is() )
{
- if ( aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ADDDIRECT_CMD)) ||
- aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(AUTOPILOTMENU_CMD)) )
+ if ( aCommandURL.startsWith(ADDDIRECT_CMD) ||
+ aCommandURL.startsWith(AUTOPILOTMENU_CMD) )
{
WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits );
bSeparator = sal_False;
@@ -862,7 +862,7 @@ throw ( SAXException, RuntimeException )
m_aAttributeType,
aCommandURL );
- if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL))) )
+ if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL)) )
pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ),
m_aAttributeType,
aLabel );
@@ -921,13 +921,13 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, cons
aHelpURL );
}
- if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )
+ if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL) )
{
pList->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ),
m_aAttributeType,
aLabel );
}
- if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) ))
+ if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).startsWith(CMD_PROTOCOL) ))
{
OUString aValue;
MenuStyleItem* pStyle = MenuItemStyles;
diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx
index d0b955cec3c5..dd98699fa94b 100644
--- a/framework/source/jobs/jobexecutor.cxx
+++ b/framework/source/jobs/jobexecutor.cxx
@@ -200,8 +200,8 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
// Special feature: If the events "OnNew" or "OnLoad" occurs - we generate our own event "onDocumentOpened".
if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_NEW))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_LOAD)))
+ (aEvent.EventName.startsWith(EVENT_ON_NEW)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_LOAD))
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_OPENED) != m_lEvents.end())
@@ -210,8 +210,8 @@ void SAL_CALL JobExecutor::notifyEvent( const css::document::EventObject& aEvent
// Special feature: If the events "OnCreate" or "OnLoadFinished" occurs - we generate our own event "onDocumentAdded".
if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_CREATE))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_LOAD_FINISHED)))
+ (aEvent.EventName.startsWith(EVENT_ON_CREATE)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_LOAD_FINISHED))
)
{
if (m_lEvents.find(EVENT_ON_DOCUMENT_ADDED) != m_lEvents.end())
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 6c3944f1cf32..1106f84615b8 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -738,8 +738,8 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent
// new document => put it into the internal list
if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_NEW))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_LOAD)))
+ (aEvent.EventName.startsWith(EVENT_ON_NEW)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_LOAD))
)
{
implts_registerDocument(xDocument);
@@ -755,17 +755,17 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent
for the moment, till this other save requests will be finished.
*/
else if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVE))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVEAS))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVETO)))
+ (aEvent.EventName.startsWith(EVENT_ON_SAVE)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_SAVEAS)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_SAVETO))
)
{
implts_updateDocumentUsedForSavingState(xDocument, SAVE_IN_PROGRESS);
}
// document saved => remove tmp. files - but hold config entries alive!
else if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVEDONE))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVEASDONE)))
+ (aEvent.EventName.startsWith(EVENT_ON_SAVEDONE)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_SAVEASDONE))
)
{
implts_markDocumentAsSaved(xDocument);
@@ -785,9 +785,9 @@ void SAL_CALL AutoRecovery::notifyEvent(const css::document::EventObject& aEvent
// But we can reset the state "used for other save requests". Otherwhise
// these documents will never be saved!
else if (
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVEFAILED))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVEASFAILED))) ||
- (aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(EVENT_ON_SAVETOFAILED)))
+ (aEvent.EventName.startsWith(EVENT_ON_SAVEFAILED)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_SAVEASFAILED)) ||
+ (aEvent.EventName.startsWith(EVENT_ON_SAVETOFAILED))
)
{
implts_updateDocumentUsedForSavingState(xDocument, SAVE_FINISHED);
@@ -2885,7 +2885,7 @@ css::frame::FeatureStateEvent AutoRecovery::implst_createFeatureStateEvent(
aEvent.FeatureURL.Complete = AutoRecovery::implst_getJobDescription(eJob);
aEvent.FeatureDescriptor = sEventType;
- if (pInfo && sEventType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(OPERATION_UPDATE)))
+ if (pInfo && sEventType.startsWith(OPERATION_UPDATE))
{
// pack rInfo for transport via UNO
::comphelper::NamedValueCollection aInfo;
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 63c4976c4b0d..0472218e9359 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -521,7 +521,7 @@ void SAL_CALL NewMenuController::initialize( const Sequence< Any >& aArguments )
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_bShowImages = rSettings.GetUseImagesInMenus();
- m_bNewMenu = m_aCommandURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:AddDirect" ) );
+ m_bNewMenu = m_aCommandURL.startsWith( ".uno:AddDirect" );
}
}
}
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 37c3c052d9c1..52b3ed69ebce 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -280,7 +280,7 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent
OSL_TRACE( "RecentFilesMenuController::itemSelected() - Command : %s",
OUStringToOString( aCommand, RTL_TEXTENCODING_UTF8 ).getStr() );
- if ( aCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( CMD_CLEAR_LIST ) ) )
+ if ( aCommand.startsWith( CMD_CLEAR_LIST ) )
SvtHistoryOptions().Clear( ePICKLIST );
else
executeEntry( rEvent.MenuId-1 );
diff --git a/framework/source/uielement/statusbarmerger.cxx b/framework/source/uielement/statusbarmerger.cxx
index b71f612e741a..667929f7cfc6 100644
--- a/framework/source/uielement/statusbarmerger.cxx
+++ b/framework/source/uielement/statusbarmerger.cxx
@@ -61,19 +61,19 @@ static void lcl_ConvertSequenceToValues(
for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
{
aPropVal = rSequence[i];
- if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_URL ) ) )
+ if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_URL ) )
aPropVal.Value >>= rItem.aCommandURL;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_TITLE ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_TITLE ) )
aPropVal.Value >>= rItem.aLabel;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_CONTEXT ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_CONTEXT ) )
aPropVal.Value >>= rItem.aContext;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_ALIGN ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_ALIGN ) )
aPropVal.Value >>= sAlignment;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_AUTOSIZE ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_AUTOSIZE ) )
aPropVal.Value >>= bAutoSize;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_OWNERDRAW ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_OWNERDRAW ) )
aPropVal.Value >>= bOwnerDraw;
- else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_WIDTH ) ) )
+ else if ( aPropVal.Name.startsWith( MERGE_STATUSBAR_WIDTH ) )
{
sal_Int32 aWidth = 0;
aPropVal.Value >>= aWidth;
@@ -86,9 +86,9 @@ static void lcl_ConvertSequenceToValues(
nItemBits |= SIB_AUTOSIZE;
if ( bOwnerDraw )
nItemBits |= SIB_USERDRAW;
- if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_CENTER )))
+ if ( sAlignment.startsWith( STATUSBAR_ALIGN_CENTER ))
nItemBits |= SIB_CENTER;
- else if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_RIGHT )))
+ else if ( sAlignment.startsWith( STATUSBAR_ALIGN_RIGHT ))
nItemBits |= SIB_RIGHT;
else
// if unset, defaults to left alignment
@@ -214,13 +214,13 @@ bool StatusbarMerger::ProcessMergeOperation(
const ::rtl::OUString& rMergeCommandParameter,
const AddonStatusbarItemContainer& rItems )
{
- if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ) ) )
+ if ( rMergeCommand.startsWith( MERGECOMMAND_ADDAFTER ) )
return lcl_MergeItems( pStatusbar, nPos, 1, rItemId, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ) ) )
+ else if ( rMergeCommand.startsWith( MERGECOMMAND_ADDBEFORE ) )
return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ) ) )
+ else if ( rMergeCommand.startsWith( MERGECOMMAND_REPLACE ) )
return lcl_ReplaceItem( pStatusbar, nPos, rItemId, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ) ) )
+ else if ( rMergeCommand.startsWith( MERGECOMMAND_REMOVE ) )
return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter );
return false;
@@ -236,18 +236,18 @@ bool StatusbarMerger::ProcessMergeFallback(
const AddonStatusbarItemContainer& rItems )
{
// fallback IGNORE or REPLACE/REMOVE item not found
- if (( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_IGNORE ))) ||
- ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ))) ||
- ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ))) )
+ if (( rMergeFallback.startsWith( MERGEFALLBACK_IGNORE )) ||
+ ( rMergeCommand.startsWith( MERGECOMMAND_REPLACE )) ||
+ ( rMergeCommand.startsWith( MERGECOMMAND_REMOVE )) )
{
return true;
}
- else if (( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ))) ||
- ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ))) )
+ else if (( rMergeCommand.startsWith( MERGECOMMAND_ADDBEFORE )) ||
+ ( rMergeCommand.startsWith( MERGECOMMAND_ADDAFTER )) )
{
- if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDFIRST )))
+ if ( rMergeFallback.startsWith( MERGEFALLBACK_ADDFIRST ))
return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rModuleIdentifier, rItems );
- else if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDLAST )))
+ else if ( rMergeFallback.startsWith( MERGEFALLBACK_ADDLAST ))
return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, rModuleIdentifier, rItems );
}
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index cca247764ed9..52620ac68b20 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -140,9 +140,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
} else {
if ( rLocale.Language == "ja" ) {
// replace algorithm name to implementation name.
- if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric first)")) )
+ if (rAlgorithm.startsWith("phonetic (alphanumeric first)") )
aBuf.appendAscii("phonetic_alphanumeric_first");
- else if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric last)")))
+ else if (rAlgorithm.startsWith("phonetic (alphanumeric last)"))
aBuf.appendAscii("phonetic_alphanumeric_last");
else
aBuf.append(rAlgorithm);
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 6e91557511f1..1136de1e4ea9 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -195,7 +195,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
{
m_bCountColumnHeader = true;
}
- else if ( m_bCountColumnHeader && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell")) )
+ else if ( m_bCountColumnHeader && _sName.startsWith("table:table-cell") )
{
++m_nColumnCount;
}
@@ -207,7 +207,7 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
m_bTableRowsStarted = true;
m_bFirstRowExported = true;
}
- else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
+ else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.startsWith("table:table-row") || _sName.startsWith("table:table-cell")) )
bExport = false;
else if ( _sName == "chart:plot-area" )
{
@@ -224,13 +224,13 @@ void SAL_CALL ExportDocumentHandler::startElement(const OUString & _sName, const
static OUString s_sCellAddress(lcl_createAttribute(XML_NP_CHART,XML_VALUES_CELL_RANGE_ADDRESS));
lcl_correctCellAddress(s_sCellAddress,xAttribs);
}
- else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell")) )
+ else if ( m_bTableRowsStarted && !m_bFirstRowExported && _sName.startsWith("table:table-cell") )
{
SvXMLAttributeList* pList = SvXMLAttributeList::getImplementation(xAttribs);
static OUString s_sValue(lcl_createAttribute(XML_NP_OFFICE,XML_VALUE));
pList->RemoveAttribute(s_sValue);
}
- else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text:p")) )
+ else if ( m_bTableRowsStarted && _sName.startsWith("text:p") )
{
bExport = false;
}
@@ -258,11 +258,11 @@ void SAL_CALL ExportDocumentHandler::endElement(const OUString & _sName) throw (
}
else if ( _sName == "table:table-rows" )
m_bTableRowsStarted = false;
- else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-cell"))) )
+ else if ( m_bTableRowsStarted && m_bFirstRowExported && (_sName.startsWith("table:table-row") || _sName.startsWith("table:table-cell")) )
bExport = false;
- else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("table:table-row")) )
+ else if ( m_bTableRowsStarted && _sName.startsWith("table:table-row") )
m_bFirstRowExported = true;
- else if ( m_bTableRowsStarted && _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text:p")) )
+ else if ( m_bTableRowsStarted && _sName.startsWith("text:p") )
{
bExport = !m_bFirstRowExported;
}
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index ddad2e36e02f..88fe4339e7a3 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -249,11 +249,11 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
}
bExport = false;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:detail"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:formatted-text"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-fields"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-component"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-element")))
+ else if ( _sName.startsWith("rpt:detail")
+ || _sName.startsWith("rpt:formatted-text")
+ || _sName.startsWith("rpt:master-detail-fields")
+ || _sName.startsWith("rpt:report-component")
+ || _sName.startsWith("rpt:report-element"))
bExport = false;
else if ( _sName == "chart:plot-area" )
{
@@ -274,7 +274,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const
if ( sLocalName == "data-source-has-labels" )
{
const OUString sValue = _xAttrList->getValueByIndex( i );
- bHasCategories = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("both"));
+ bHasCategories = sValue.startsWith("both");
break;
}
}
@@ -316,11 +316,11 @@ void SAL_CALL ImportDocumentHandler::endElement(const OUString & _sName) throw (
m_xDatabaseDataProvider->setDetailFields(uno::Sequence< OUString>(&*m_aDetailFields.begin(),m_aDetailFields.size()));
bExport = false;
}
- else if ( _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:detail"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:formatted-text"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:master-detail-field"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-component"))
- || _sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("rpt:report-element")))
+ else if ( _sName.startsWith("rpt:detail")
+ || _sName.startsWith("rpt:formatted-text")
+ || _sName.startsWith("rpt:master-detail-field")
+ || _sName.startsWith("rpt:report-component")
+ || _sName.startsWith("rpt:report-element"))
bExport = false;
if ( bExport )
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index e0dd8c8ed262..a81f390d8a6e 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -180,7 +180,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
m_aStates.insert(TCommandState::value_type(OUString(".uno:CharFontName"),sal_True));
m_pToolbarController = TToolbarHelper::createFromQuery(new SvxFontNameToolBoxControl/*SvxStyleToolBoxControl*/(m_nSlotId = SID_ATTR_CHAR_FONT,m_nToolBoxId,*pToolBox));
}
- else if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:FontColor")) || m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Color")) )
+ else if ( m_aCommandURL.startsWith(".uno:FontColor") || m_aCommandURL.startsWith(".uno:Color") )
{
m_aStates.insert(TCommandState::value_type(OUString(".uno:FontColor"),sal_True));
m_aStates.insert(TCommandState::value_type(OUString(".uno:Color"),sal_True));
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index aa48f846e4c4..0d47a7b6ef72 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -484,7 +484,7 @@ bool Bootstrap_Impl::getValue(
const
{
if (mode == LOOKUP_MODE_NORMAL &&
- key.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URE_BOOTSTRAP")))
+ key.startsWith("URE_BOOTSTRAP"))
{
mode = LOOKUP_MODE_URE_BOOTSTRAP;
}
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 9eef1eec9d05..715681b75b2d 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3139,7 +3139,7 @@ void Test::testCopyPaste()
fValue = m_pDoc->GetValue(ScAddress(1,1,1));
ASSERT_DOUBLES_EQUAL_MESSAGE("formula should return 2 after redo", fValue, 2);
aString = m_pDoc->GetString(2, 1, 1);
- CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.C2 should contain: test", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test")));
+ CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.C2 should contain: test", aString.startsWith("test"));
m_pDoc->GetFormula(1,1,1, aString);
CPPUNIT_ASSERT_MESSAGE("Formula should be correct again", aString == aFormulaString);
@@ -3201,13 +3201,13 @@ void Test::testCopyPasteTranspose()
//check cell content after transposed copy/paste
OUString aString = m_pDoc->GetString(3, 3, 1);
- CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.D4 should contain: test", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test")));
+ CPPUNIT_ASSERT_MESSAGE("Cell Sheet2.D4 should contain: test", aString.startsWith("test"));
double fValue = m_pDoc->GetValue(ScAddress(3,1,1));
ASSERT_DOUBLES_EQUAL_MESSAGE("transposed copied cell should return 1", fValue, 1);
fValue = m_pDoc->GetValue(ScAddress(3,2,1));
ASSERT_DOUBLES_EQUAL_MESSAGE("transposed copied formula should return 2", fValue, 2);
m_pDoc->GetFormula(3, 2, 1, aString);
- CPPUNIT_ASSERT_MESSAGE("transposed formula should point on Sheet2.D2", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=D2+1")));
+ CPPUNIT_ASSERT_MESSAGE("transposed formula should point on Sheet2.D2", aString.startsWith("=D2+1"));
// check notes after transposed copy/paste
CPPUNIT_ASSERT_MESSAGE("There should be a note on Sheet2.D2", m_pDoc->HasNote(ScAddress(3, 1, 1)));
@@ -3266,9 +3266,9 @@ void Test::testMoveBlock()
//check cell content
OUString aString = m_pDoc->GetString(3, 0, 0);
- CPPUNIT_ASSERT_MESSAGE("Cell D1 should contain: test", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test")));
+ CPPUNIT_ASSERT_MESSAGE("Cell D1 should contain: test", aString.startsWith("test"));
m_pDoc->GetFormula(2, 0, 0, aString);
- CPPUNIT_ASSERT_MESSAGE("Cell C1 should contain an updated formula", aString.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("=B1+1")));
+ CPPUNIT_ASSERT_MESSAGE("Cell C1 should contain an updated formula", aString.startsWith("=B1+1"));
double fValue = m_pDoc->GetValue(aAddrB1);
ASSERT_DOUBLES_EQUAL_MESSAGE("Cell B1 should contain 1", fValue, 1);
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 92612eed480c..7479c45705d3 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -176,8 +176,7 @@ static void lcl_SetSortList( const Any& rValue )
// if setting is "default", keep default values from ScUserList ctor
//! mark "default" in a safe way
- sal_Bool bDefault = ( nCount == 1 &&
- pArray[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NULL" ) ) );
+ sal_Bool bDefault = ( nCount == 1 && pArray[0].startsWith( "NULL" ) );
if (!bDefault)
{
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index 5f1e81b8da93..82a9e02117a3 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -159,7 +159,7 @@ void ScFilterOptionsMgr::Init()
}
}
- if ( !theDbName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)) )
+ if ( !theDbName.startsWith(STR_DB_LOCAL_NONAME) )
{
theDbArea.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
theDbArea.append(theDbName).append(')');
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 4dcdc59dc9bc..13588ff0c523 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -199,7 +199,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData )
bool bUndo = pDoc->IsUndoEnabled();
ScDBData* pData = NULL;
- if (rNewData.GetName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STR_DB_LOCAL_NONAME)))
+ if (rNewData.GetName().startsWith(STR_DB_LOCAL_NONAME))
{
ScRange aRange;
rNewData.GetArea(aRange);
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 88ac86500c06..1057fb562b3b 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1796,7 +1796,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL ScChart2DataProvider::detectArgum
Reference< beans::XPropertySet > xSeqProp( xLS->getValues(), uno::UNO_QUERY );
OUString aRole;
if( xSeqProp.is() && (xSeqProp->getPropertyValue("Role") >>= aRole) &&
- aRole.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("categories")) )
+ aRole.startsWith("categories") )
bThisIsCategories = bHasCategories = true;
}
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index 38936d70ba3c..ef920d230295 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -430,8 +430,8 @@ OUString SAL_CALL ScNamedRangeObj::getImplementationName() throw(uno::RuntimeExc
sal_Bool SAL_CALL ScNamedRangeObj::supportsService( const OUString& rServiceName )
throw(uno::RuntimeException)
{
- return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SCNAMEDRANGEOBJ_SERVICE ) ) ||
- rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SCLINKTARGET_SERVICE ) );
+ return rServiceName.startsWith( SCNAMEDRANGEOBJ_SERVICE ) ||
+ rServiceName.startsWith( SCLINKTARGET_SERVICE );
}
uno::Sequence<OUString> SAL_CALL ScNamedRangeObj::getSupportedServiceNames()
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index 24a74901c3a4..82cd940027c6 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -1842,7 +1842,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName )
SolarMutexGuard aGuard;
uno::Any aAny;
- if ( aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_DISPNAME ) ) ) // read-only
+ if ( aPropertyName.startsWith( SC_UNONAME_DISPNAME ) ) // read-only
{
// core always has the display name
SfxStyleSheetBase* pStyle = GetStyle_Impl();
@@ -1987,9 +1987,8 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
throw(uno::RuntimeException)
{
bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
- return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )||
- rServiceName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE ));
+ return rServiceName.startsWith( SCSTYLE_SERVICE ) ||
+ ( bPage ? rServiceName.startsWith( SCPAGESTYLE_SERVICE ) : rServiceName.startsWith( SCCELLSTYLE_SERVICE ) );
}
uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index e486087d4139..0dbaef67a9cf 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -151,7 +151,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException)
aArgs[1].Value >>= aFilterName;
}
- if (aFilterName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Text - txt - csv (StarCalc)"))) {
+ if (aFilterName.startsWith("Text - txt - csv (StarCalc)")) {
aFileFormat = excel::XlFileFormat::xlCSV; //xlFileFormat.
}
@@ -179,7 +179,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException)
aFileFormat = excel::XlFileFormat::xlExcel9795;
}
- if (aFilterName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HTML (StarCalc)"))) {
+ if (aFilterName.startsWith("HTML (StarCalc)")) {
aFileFormat = excel::XlFileFormat::xlHtml;
}
@@ -187,7 +187,7 @@ ScVbaWorkbook::getFileFormat( ) throw (::uno::RuntimeException)
aFileFormat = excel::XlFileFormat::xlTemplate;
}
- if (aFilterName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("StarOffice XML (Calc)"))) {
+ if (aFilterName.startsWith("StarOffice XML (Calc)")) {
aFileFormat = excel::XlFileFormat::xlWorkbookNormal;
}
if ( aFilterName == "calc8" ) {
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 69ba797eba8b..ab49cdbbba06 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -301,13 +301,13 @@ OUString SAL_CALL PDFDetector::detect( uno::Sequence< beans::PropertyValue >& rF
osl_removeFile( aURL.pData );
if( !aEmbedMimetype.isEmpty() )
{
- if( aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text" ) )
- || aEmbedMimetype.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.oasis.opendocument.text-master" ) ) )
+ if( aEmbedMimetype.startsWith( "application/vnd.oasis.opendocument.text" )
+ || aEmbedMimetype.startsWith( "application/vnd.oasis.opendocument.text-master" ) )
aOutFilterName = "writer_pdf_addstream_import";
else if ( aEmbedMimetype == "application/vnd.oasis.opendocument.presentation" )
aOutFilterName = "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" ) ) )
+ else if( aEmbedMimetype.startsWith( "application/vnd.oasis.opendocument.graphics" )
+ || aEmbedMimetype.startsWith( "application/vnd.oasis.opendocument.drawing" ) )
aOutFilterName = "draw_pdf_addstream_import";
else if ( aEmbedMimetype == "application/vnd.oasis.opendocument.spreadsheet" )
aOutFilterName = "calc_pdf_addstream_import";
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index a64d124d9831..33224c51ee90 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -328,22 +328,22 @@ OUString SfxHelp::GetHelpModuleName_Impl()
aFactoryShortName = "schart" ;
else if ( aFactoryShortName == "BasicIDE" )
aFactoryShortName = "sbasic";
- else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sweb"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sglobal"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swxform")) )
+ else if ( aFactoryShortName.startsWith("sweb")
+ || aFactoryShortName.startsWith("sglobal")
+ || aFactoryShortName.startsWith("swxform") )
aFactoryShortName = "swriter" ;
- else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbquery"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbrelation"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbtable"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbapp"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbreport"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swreport"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swform")) )
+ else if ( aFactoryShortName.startsWith("dbquery")
+ || aFactoryShortName.startsWith("dbbrowser")
+ || aFactoryShortName.startsWith("dbrelation")
+ || aFactoryShortName.startsWith("dbtable")
+ || aFactoryShortName.startsWith("dbapp")
+ || aFactoryShortName.startsWith("dbreport")
+ || aFactoryShortName.startsWith("swreport")
+ || aFactoryShortName.startsWith("dbbrowser")
+ || aFactoryShortName.startsWith("swform") )
aFactoryShortName = "sdatabase";
- else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sbibliography"))
- || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("StartModule")) )
+ else if ( aFactoryShortName.startsWith("sbibliography")
+ || aFactoryShortName.startsWith("StartModule") )
aFactoryShortName = sDefaultModule;
}
else
diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx
index 2d3ecf7c0e8a..937cabe8de6d 100644
--- a/sfx2/source/appl/shutdowniconunx.cxx
+++ b/sfx2/source/appl/shutdowniconunx.cxx
@@ -212,7 +212,7 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL,
aEntry[m].Value >>= aDescription;
}
- if ( aURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(BASE_URL)) && !aDescription.isEmpty() )
+ if ( aURL.startsWith(BASE_URL) && !aDescription.isEmpty() )
{
add_item (pMenuShell, pAsciiURL, &aDescription, nResId, pFnCallback);
break;
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index 300af84bc80a..7598e4f2dade 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -490,7 +490,7 @@ sal_uInt16 GraphicHelper::getThumbnailReplacementIDByFactoryName_Impl( const OUS
{
nResult = BMP_128X128_MATH_DOC;
}
- else if ( aFactoryShortName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "swriter" ) ) || aFactoryShortName.startsWith("swriter/") )
+ else if ( aFactoryShortName.startsWith( "swriter" ) )
{
nResult = BMP_128X128_WRITER_DOC;
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 09bc35a2350a..44f9f92f991d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2311,7 +2311,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const datatransfer::DataF
&& aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) )
return sal_True;
}
- else if ( aFlavor.MimeType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"")) )
+ else if ( aFlavor.MimeType.startsWith("application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"") )
{
if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) )
return sal_True;
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index a871df6d3ed8..d3095b021d51 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -211,13 +211,13 @@ static void Execute( uno::Any& aEventData, const document::DocumentEvent& aTrigg
nIndex += 1;
}
- if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC)) && !aScript.isEmpty())
+ if (aType.startsWith(STAR_BASIC) && !aScript.isEmpty())
{
uno::Any aAny;
SfxMacroLoader::loadMacro( aScript, aAny, pDoc );
}
- else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Service")) ||
- aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")))
+ else if (aType.startsWith("Service") ||
+ aType.startsWith("Script"))
{
if ( !aScript.isEmpty() )
{
@@ -385,7 +385,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShe
ScriptType eType( STARBASIC );
if ( aType == STAR_BASIC )
eType = STARBASIC;
- else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) && !aScriptURL.isEmpty())
+ else if (aType.startsWith("Script") && !aScriptURL.isEmpty())
eType = EXTENDED_STYPE;
else if ( aType == SVX_MACRO_LANGUAGE_JAVASCRIPT )
eType = JAVASCRIPT;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index ab323f7f62b2..72643d9b5338 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -850,7 +850,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const
}
}
}
- else if( sTargetFrameName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_self")) || sTargetFrameName.isEmpty() )
+ else if( sTargetFrameName.startsWith("_self") || sTargetFrameName.isEmpty() )
{
// check for already loaded URL ... but with additional jumpmark!
Reference< frame::XModel > xModel = getModel();
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index ce78ed875b90..5f59ed156526 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -295,7 +295,7 @@ void acc_CurrentContext::release()
Any acc_CurrentContext::getValueByName( OUString const & name )
throw (RuntimeException)
{
- if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(s_acRestriction)))
+ if (name.startsWith(s_acRestriction))
{
return m_restriction;
}
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 4cf385e9361a..34bb834ef339 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -319,7 +319,7 @@ FilePermission::FilePermission(
: Permission( FILE, next )
, m_actions( makeMask( perm.Actions, s_actions ) )
, m_url( perm.URL )
- , m_allFiles( sal_False != perm.URL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("<<ALL FILES>>")) )
+ , m_allFiles( sal_False != perm.URL.startsWith("<<ALL FILES>>") )
{
if (! m_allFiles)
{
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index b9875d850cfe..e13b486f7e12 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -633,36 +633,36 @@ Any XLB_Invocation::getValue( const OUString & rName )
sal_Bool XLB_Invocation::hasMethod( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException)
{
- return (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("raiseException") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("getValues") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setValues2") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("setValues") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("acquire") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("release") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("queryInterface") ));
+ return (rName.startsWith( "raiseException" ) ||
+ rName.startsWith( "getValues" ) ||
+ rName.startsWith( "setValues2" ) ||
+ rName.startsWith( "setValues" ) ||
+ rName.startsWith( "acquire" ) ||
+ rName.startsWith( "release" ) ||
+ rName.startsWith( "queryInterface" ));
}
//__________________________________________________________________________________________________
sal_Bool XLB_Invocation::hasProperty( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException)
{
- return (rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Bool") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Byte") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Char") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Short") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UShort") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Long") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ULong") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Hyper") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UHyper") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Float") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Double") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Enum") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("String") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Interface") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Any") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Sequence") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Struct") ) ||
- rName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RuntimeException") ) );
+ return (rName.startsWith( "Bool" ) ||
+ rName.startsWith( "Byte" ) ||
+ rName.startsWith( "Char" ) ||
+ rName.startsWith( "Short" ) ||
+ rName.startsWith( "UShort" ) ||
+ rName.startsWith( "Long" ) ||
+ rName.startsWith( "ULong" ) ||
+ rName.startsWith( "Hyper" ) ||
+ rName.startsWith( "UHyper" ) ||
+ rName.startsWith( "Float" ) ||
+ rName.startsWith( "Double" ) ||
+ rName.startsWith( "Enum" ) ||
+ rName.startsWith( "String" ) ||
+ rName.startsWith( "Interface" ) ||
+ rName.startsWith( "Any" ) ||
+ rName.startsWith( "Sequence" ) ||
+ rName.startsWith( "Struct" ) ||
+ rName.startsWith( "RuntimeException" ) );
}
//##################################################################################################
@@ -895,7 +895,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
catch (const IllegalArgumentException &aExc)
{
OSL_ENSURE( aExc.ArgumentPosition == 5 &&
- aExc.Message.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...")),
+ aExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
"### unexpected exception content!" );
Reference<XLanguageBindingTest > xLBT2(
@@ -910,8 +910,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
}
catch (const RuntimeException & rExc)
{
- OSL_ENSURE(
- rExc.Message.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...")),
+ OSL_ENSURE( rExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
"### unexpected exception content!" );
Reference<XLanguageBindingTest > xLBT2(
@@ -926,11 +925,9 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
}
catch (const Exception & aExc)
{
- OSL_ENSURE(
- aExc.Message.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...")),
+ OSL_ENSURE( aExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
"### unexpected exception content!" );
- return (
- aExc.Message.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dum dum dum ich tanz im kreis herum...")));
+ return aExc.Message.startsWith("dum dum dum ich tanz im kreis herum...");
}
return sal_False;
}
diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx
index 1b7e754845e2..8c936425f980 100644
--- a/svtools/source/uno/unogridcolumnfacade.cxx
+++ b/svtools/source/uno/unogridcolumnfacade.cxx
@@ -146,12 +146,12 @@ namespace svt { namespace table
if ( i_event.AttributeName == "HorizontalAlign" )
nChangedAttributes |= COL_ATTRS_APPEARANCE;
- if ( i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ColumnWidth"))
- || i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MaxWidth"))
- || i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MinWidth"))
- || i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PreferredWidth"))
- || i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Resizeable"))
- || i_event.AttributeName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Flexibility"))
+ if ( i_event.AttributeName.startsWith("ColumnWidth")
+ || i_event.AttributeName.startsWith("MaxWidth")
+ || i_event.AttributeName.startsWith("MinWidth")
+ || i_event.AttributeName.startsWith("PreferredWidth")
+ || i_event.AttributeName.startsWith("Resizeable")
+ || i_event.AttributeName.startsWith("Flexibility")
)
nChangedAttributes |= COL_ATTRS_WIDTH;
diff --git a/svx/source/form/fmdpage.cxx b/svx/source/form/fmdpage.cxx
index 76d1c97f930f..db03d581c88f 100644
--- a/svx/source/form/fmdpage.cxx
+++ b/svx/source/form/fmdpage.cxx
@@ -85,8 +85,8 @@ SdrObject *SvxFmDrawPage::_CreateSdrObject( const ::com::sun::star::uno::Referen
{
OUString aShapeType( xDescr->getShapeType() );
- if ( aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ShapeControl" ) ) // compatibility
- || aShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ControlShape" ) )
+ if ( aShapeType.startsWith( "com.sun.star.drawing.ShapeControl" ) // compatibility
+ || aShapeType.startsWith( "com.sun.star.drawing.ControlShape" )
)
return new FmFormObj();
else
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index ed1516077759..972822aef10c 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -4115,7 +4115,7 @@ FormController::interceptedQueryDispatch( const URL& aURL,
Reference< XDispatch > xReturn;
// dispatches handled by ourself
if ( ( aURL.Complete == FMURL_CONFIRM_DELETION )
- || ( ( aURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:/InteractionHandler" ) ) )
+ || ( ( aURL.Complete.startsWith( "private:/InteractionHandler" ) )
&& ensureInteractionHandler()
)
)
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index a8dafac8533d..2767816cfd42 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -178,14 +178,14 @@ void SAL_CALL GalleryThemePopup::statusChanged(
throw ( css::uno::RuntimeException )
{
const OUString &rURL = rEvent.FeatureURL.Complete;
- if ( rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( CMD_SID_GALLERY_ENABLE_ADDCOPY ) ) )
+ if ( rURL.startsWith( CMD_SID_GALLERY_ENABLE_ADDCOPY ) )
{
if ( !rEvent.IsEnabled )
{
maPopupMenu.EnableItem( MN_ADD, sal_False );
}
}
- else if ( rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( CMD_SID_GALLERY_BG_BRUSH ) ) )
+ else if ( rURL.startsWith( CMD_SID_GALLERY_BG_BRUSH ) )
{
maBackgroundPopup.Clear();
if ( rEvent.IsEnabled )
diff --git a/svx/source/items/galleryitem.cxx b/svx/source/items/galleryitem.cxx
index 1a88cf5de476..c07ed06c17dc 100644
--- a/svx/source/items/galleryitem.cxx
+++ b/svx/source/items/galleryitem.cxx
@@ -87,27 +87,27 @@ bool SvxGalleryItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /* nMemberId
const css::beans::PropertyValue *pEnd = pProp + aSeq.getLength();
for ( ; pProp != pEnd; pProp++ )
{
- if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_TYPE ) ) )
+ if ( pProp->Name.startsWith( SVXGALLERYITEM_TYPE ) )
{
bAllConverted &= bIsSetType = ( pProp->Value >>= nType );
++nConverted;
}
- else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_URL ) ) )
+ else if ( pProp->Name.startsWith( SVXGALLERYITEM_URL ) )
{
bAllConverted &= ( pProp->Value >>= aURL );
++nConverted;
}
- else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_FILTER ) ) )
+ else if ( pProp->Name.startsWith( SVXGALLERYITEM_FILTER ) )
{
bAllConverted &= ( pProp->Value >>= aFilterName );
++nConverted;
}
- else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_DRAWING ) ) )
+ else if ( pProp->Name.startsWith( SVXGALLERYITEM_DRAWING ) )
{
bAllConverted &= ( pProp->Value >>= xDrawing );
++nConverted;
}
- else if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SVXGALLERYITEM_GRAPHIC ) ) )
+ else if ( pProp->Name.startsWith( SVXGALLERYITEM_GRAPHIC ) )
{
bAllConverted &= ( pProp->Value >>= xGraphic );
++nConverted;
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index dbda6ecaf055..4a14f4663fdc 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -114,17 +114,17 @@ NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>
NumSettings_ImplPtr pNew = new NumSettings_Impl;
for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
{
- if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sNumberingType)))
+ if(pValues[j].Name.startsWith(sNumberingType))
pValues[j].Value >>= pNew->nNumberType;
- else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sPrefix)))
+ else if(pValues[j].Name.startsWith(sPrefix))
pValues[j].Value >>= pNew->sPrefix;
- else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sSuffix)))
+ else if(pValues[j].Name.startsWith(sSuffix))
pValues[j].Value >>= pNew->sSuffix;
- else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sParentNumbering)))
+ else if(pValues[j].Name.startsWith(sParentNumbering))
pValues[j].Value >>= pNew->nParentNumbering;
- else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBulletChar)))
+ else if(pValues[j].Name.startsWith(sBulletChar))
pValues[j].Value >>= pNew->sBulletChar;
- else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBulletFontName)))
+ else if(pValues[j].Name.startsWith(sBulletFontName))
pValues[j].Value >>= pNew->sBulletFont;
}
const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix[0] : 0;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 4eea7bddce37..59b7a31eb6f7 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -128,7 +128,7 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const OUString& rCmd,
}
else
{
- const long nMinVal = ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) )) ? 0 : -100;
+ const long nMinVal = maCommand.startsWith( ".uno:GrafTransparence" ) ? 0 : -100;
SetUnit( FUNIT_CUSTOM );
SetCustomUnitText( OUString(" %") );
@@ -160,14 +160,14 @@ IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl)
// Convert value to an any to be usable with dispatch API
Any a;
- if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafRed" ) ) ||
- maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGreen" ) ) ||
- maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafBlue" ) ) ||
- maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafLuminance" ) ) ||
- maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafContrast" ) ))
+ if ( maCommand.startsWith( ".uno:GrafRed" ) ||
+ maCommand.startsWith( ".uno:GrafGreen" ) ||
+ maCommand.startsWith( ".uno:GrafBlue" ) ||
+ maCommand.startsWith( ".uno:GrafLuminance" ) ||
+ maCommand.startsWith( ".uno:GrafContrast" ))
a = makeAny( sal_Int16( nVal ));
- else if ( maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafGamma" ) ) ||
- maCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GrafTransparence" ) ))
+ else if ( maCommand.startsWith( ".uno:GrafGamma" ) ||
+ maCommand.startsWith( ".uno:GrafTransparence" ))
a = makeAny( sal_Int32( nVal ));
if ( a.hasValue() )
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 71d013cfb035..0c83a677b248 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -521,15 +521,15 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto
{
pValues->Value >>= rSettings.mxInteractionHandler;
}
- else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name.startsWith( "Width" ) ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mnWidth;
}
- else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Height" ) ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name.startsWith( "Height" ) ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mnHeight;
}
- else if( pValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExportOnlyBackground" ) ) ) // for compatibility reasons, deprecated
+ else if( pValues->Name.startsWith( "ExportOnlyBackground" ) ) // for compatibility reasons, deprecated
{
pValues->Value >>= rSettings.mbExportOnlyBackground;
}
@@ -558,12 +558,12 @@ void GraphicExporter::ParseSettings( const Sequence< PropertyValue >& aDescripto
{
pDataValues->Value >>= rSettings.mnHeight;
}
- else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) ) // for compatibility reasons, deprecated
+ else if( pDataValues->Name.startsWith( "Width" ) ) // for compatibility reasons, deprecated
{
pDataValues->Value >>= rSettings.mnWidth;
pDataValues->Name = "PixelWidth";
}
- else if( pDataValues->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Height" ) ) ) // for compatibility reasons, deprecated
+ else if( pDataValues->Name.startsWith( "Height" ) ) // for compatibility reasons, deprecated
{
pDataValues->Value >>= rSettings.mnHeight;
pDataValues->Name = "PixelHeight";
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index acf0ce864dd7..4af2f5253b1f 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -532,8 +532,8 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
if( nTempType == UHASHMAP_NOTFOUND )
{
- if( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) ||
- aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TableShape")) )
+ if( aName.startsWith("com.sun.star.drawing.TableShape") ||
+ aName.startsWith("com.sun.star.presentation.TableShape") )
{
rInventor = SdrInventor;
rType = OBJ_TABLE;
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index cc6ee03089b7..3d8370fabb0e 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1901,7 +1901,7 @@ void SAL_CALL SvxCustomShape::setPropertyValue( const OUString& aPropertyName, c
::SolarMutexGuard aGuard;
SdrObject* pObject = mpObj.get();
- bool bCustomShapeGeometry = pObject && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CustomShapeGeometry" ) );
+ bool bCustomShapeGeometry = pObject && aPropertyName.startsWith( "CustomShapeGeometry" );
sal_Bool bMirroredX = sal_False;
sal_Bool bMirroredY = sal_False;
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index e4404bbd0328..0543f6560f5c 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1184,7 +1184,7 @@ void makeRedline( SwPaM& rPaM,
eType = nsRedlineType_t::REDLINE_FORMAT;
else if ( rRedlineType == "TextTable" )
eType = nsRedlineType_t::REDLINE_TABLE;
- else if( !rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Insert" ) ))
+ else if( !rRedlineType.startsWith( "Insert" ))
throw lang::IllegalArgumentException();
//todo: what about REDLINE_FMTCOLL?
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index cea2d9e26b84..32e74d11a550 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1108,7 +1108,7 @@ const char aInvalidStyle[] = "__XXX___invalid";
bool SwXNumberingRules::isInvalidStyle(const OUString &rName)
{
- return rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aInvalidStyle));
+ return rName.startsWith(aInvalidStyle);
}
namespace
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 8ba76e410507..5560dcc61fef 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1692,7 +1692,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_uInt16 nBin = USHRT_MAX;
if ( !( rValue >>= sTmp ) )
throw lang::IllegalArgumentException();
- if ( sTmp.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "[From printer settings]" ) ) )
+ if ( sTmp.startsWith ( "[From printer settings]" ) )
nBin = USHRT_MAX-1;
else if ( pPrinter )
{
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index b81c3c031876..07ecebe0730b 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -97,7 +97,7 @@ static void lcl_sendPartialGETRequest( bool &bError,
for ( std::vector< rtl::OUString >::const_iterator it = aHeaderNames.begin();
it != aHeaderNames.end(); ++it )
{
- if ( it->equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Length" ) ) )
+ if ( it->startsWith( "Content-Length" ) )
{
bIsRequestSize = true;
break;
@@ -129,11 +129,11 @@ static void lcl_sendPartialGETRequest( bool &bError,
for ( std::vector< DAVPropertyValue >::const_iterator it = aResponseProps.begin();
it != aResponseProps.end(); ++it )
{
- if ( it->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Accept-Ranges" ) ) )
+ if ( it->Name.startsWith( "Accept-Ranges" ) )
it->Value >>= aAcceptRanges;
- else if ( it->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Range" ) ) )
+ else if ( it->Name.startsWith( "Content-Range" ) )
it->Value >>= aContentRange;
- else if ( it->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Length" ) ) )
+ else if ( it->Name.startsWith( "Content-Length" ) )
it->Value >>= aContentLength;
}
@@ -148,7 +148,7 @@ static void lcl_sendPartialGETRequest( bool &bError,
// MAY ignore ranges specified using other units.
if ( nSize == 1 &&
aContentRange.getLength() &&
- aAcceptRanges.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bytes" ) ) )
+ aAcceptRanges.startsWith( "bytes" ) )
{
// Parse the Content-Range to get the size
// vid. http://tools.ietf.org/html/rfc2616#section-14.16
@@ -158,12 +158,12 @@ static void lcl_sendPartialGETRequest( bool &bError,
{
rtl::OUString aSize = aContentRange.copy( nSlash + 1 );
// "*" means that the instance-length is unknown at the time when the response was generated
- if ( !aSize.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "*" )))
+ if ( !aSize.startsWith( "*" ))
{
for ( std::vector< DAVPropertyValue >::iterator it = aResponseProps.begin();
it != aResponseProps.end(); ++it )
{
- if ( it->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Content-Length" ) ) )
+ if ( it->Name.startsWith( "Content-Length" ) )
{
it->Value <<= aSize;
break;
@@ -743,7 +743,7 @@ uno::Any SAL_CALL Content::execute(
aRet = uno::makeAny( createNewContent( aArg ) );
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "addProperty" )))
+ else if ( aCommand.Name.startsWith( "addProperty" ))
{
ucb::PropertyCommandArgument aPropArg;
if ( !( aCommand.Argument >>= aPropArg ))
@@ -775,7 +775,7 @@ uno::Any SAL_CALL Content::execute(
ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
}
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "removeProperty" )))
+ else if ( aCommand.Name.startsWith( "removeProperty" ))
{
rtl::OUString sPropName;
if ( !( aCommand.Argument >>= sPropName ) )
@@ -1893,8 +1893,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
"Property is read-only!" ),
static_cast< cppu::OWeakObject * >( this ) );
}
- if ( rName.equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
+ if ( rName.startsWith( "CreatableContentsInfo" ) )
{
// Read-only property!
aRet[ n ] <<= lang::IllegalAccessException(
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 5378194ccada..7d2790cf6c8c 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -557,7 +557,7 @@ GtkPrintDialog::impl_initCustomTab()
if ( aPropertyName == "PrintContent" )
bGtkInternal = true;
- if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Group")) || !pCurParent)
+ if (aCtrlType.startsWith("Group") || !pCurParent)
{
pCurTabPage = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pCurTabPage), 6);
@@ -566,7 +566,7 @@ GtkPrintDialog::impl_initCustomTab()
pCurParent = pCurTabPage;
aCustomTabs.push_back(std::make_pair(pCurTabPage, aText));
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Subgroup")) && (pCurParent /*|| bOnJobPageValue*/))
+ else if (aCtrlType.startsWith("Subgroup") && (pCurParent /*|| bOnJobPageValue*/))
{
bIgnoreSubgroup = bIgnore;
if (bIgnore)
@@ -600,7 +600,7 @@ GtkPrintDialog::impl_initCustomTab()
GtkWidget* pWidget = NULL;
beans::PropertyValue* pVal = NULL;
- if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Bool")) && pCurParent)
+ if (aCtrlType.startsWith("Bool") && pCurParent)
{
pWidget = gtk_check_button_new_with_mnemonic(
OUStringToOString(aText, RTL_TEXTENCODING_UTF8).getStr());
@@ -616,7 +616,7 @@ GtkPrintDialog::impl_initCustomTab()
m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
g_signal_connect(pWidget, "toggled", G_CALLBACK(GtkPrintDialog::UIOption_CheckHdl), this);
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Radio")) && pCurParent)
+ else if (aCtrlType.startsWith("Radio") && pCurParent)
{
GtkWidget* const pVbox = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pVbox), 0);
@@ -653,9 +653,9 @@ GtkPrintDialog::impl_initCustomTab()
else
pWidget = pVbox;
}
- else if ((aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("List")) ||
- aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range")) ||
- aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit"))
+ else if ((aCtrlType.startsWith("List") ||
+ aCtrlType.startsWith("Range") ||
+ aCtrlType.startsWith("Edit")
) && pCurParent)
{
GtkWidget* const pHbox = gtk_hbox_new(FALSE, 12);
@@ -678,7 +678,7 @@ GtkPrintDialog::impl_initCustomTab()
gtk_combo_box_set_active(GTK_COMBO_BOX(pWidget), nSelectVal);
g_signal_connect(pWidget, "changed", G_CALLBACK(GtkPrintDialog::UIOption_SelectHdl), this);
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Edit")) && pCurParent)
+ else if (aCtrlType.startsWith("Edit") && pCurParent)
{
pWidget = gtk_entry_new();
@@ -689,7 +689,7 @@ GtkPrintDialog::impl_initCustomTab()
gtk_entry_set_text(GTK_ENTRY(pWidget),
OUStringToOString(aCurVal, RTL_TEXTENCODING_UTF8).getStr());
}
- else if (aCtrlType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Range")) && pCurParent)
+ else if (aCtrlType.startsWith("Range") && pCurParent)
{
pWidget = gtk_spin_button_new_with_range(nMinValue, nMaxValue, 1.0);