summaryrefslogtreecommitdiff
path: root/cui/source/customize/macropg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/customize/macropg.cxx')
-rw-r--r--cui/source/customize/macropg.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index e0ca7ef4c89d..ab01f069a0a0 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -631,7 +631,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
}
bool bDoubleClick = (pBtn == NULL);
- bool bUNOAssigned = (sEventURL.indexOf( aVndSunStarUNO ) == 0);
+ bool bUNOAssigned = sEventURL.startsWith( aVndSunStarUNO );
if( pBtn == pImpl->pDeletePB )
{
// delete pressed
@@ -895,14 +895,10 @@ AssignComponentDialog::AssignComponentDialog( Window * pParent, const OUString&
maOKButton.SetClickHdl(LINK(this, AssignComponentDialog, ButtonHandler));
OUString aMethodName;
- if( !maURL.isEmpty() )
+ if( maURL.startsWith( aVndSunStarUNO ) )
{
- sal_Int32 nIndex = maURL.indexOf( aVndSunStarUNO );
- if( nIndex == 0 )
- {
- sal_Int32 nBegin = aVndSunStarUNO.getLength();
- aMethodName = maURL.copy( nBegin );
- }
+ sal_Int32 nBegin = aVndSunStarUNO.getLength();
+ aMethodName = maURL.copy( nBegin );
}
maMethodEdit.SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
}