convert equalsAsciiL calls to startsWith calls

Convert code like:
    aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) )
to
    aStr.startsWith( "ActiveConnection" )
which compiles down to the same machine code.

Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
This commit is contained in:
Noel Grandin 2013-11-19 15:58:58 +02:00
parent d665e05824
commit 3af99e4d59
58 changed files with 233 additions and 239 deletions

View File

@ -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;

View File

@ -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 );

View File

@ -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");

View File

@ -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 ) )

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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();

View File

@ -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 );
}
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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())

View File

@ -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;

View File

@ -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" );
}
}
}

View File

@ -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 );

View File

@ -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 );
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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 )

View File

@ -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));

View File

@ -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;
}

View File

@ -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);

View File

@ -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)
{

View File

@ -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(')');

View File

@ -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);

View File

@ -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;
}

View File

@ -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()

View File

@ -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()

View File

@ -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" ) {

View File

@ -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";

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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;
}

View File

@ -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;

View File

@ -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

View File

@ -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()
)
)

View File

@ -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 )

View File

@ -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;

View File

@ -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;

View File

@ -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() )

View File

@ -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";

View File

@ -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;

View File

@ -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;

View File

@ -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?

View File

@ -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

View File

@ -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 )
{

View File

@ -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(

View File

@ -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);