diff options
Diffstat (limited to 'sc/source/ui/unoobj/targuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/targuno.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 17da342e3ab8..ead87f8fecd5 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -95,9 +95,8 @@ uno::Any SAL_CALL ScLinkTargetTypesObj::getByName(const OUString& aName) { if (pDocShell) { - OUString aNameStr(aName); for (sal_uInt16 i=0; i<SC_LINKTARGETTYPE_COUNT; i++) - if ( aNames[i] == aNameStr ) + if ( aNames[i] == aName ) return uno::makeAny(uno::Reference< beans::XPropertySet >(new ScLinkTargetTypeObj( pDocShell, i ))); } @@ -115,9 +114,8 @@ uno::Sequence<OUString> SAL_CALL ScLinkTargetTypesObj::getElementNames() throw( sal_Bool SAL_CALL ScLinkTargetTypesObj::hasByName(const OUString& aName) throw( uno::RuntimeException, std::exception ) { - OUString aNameStr = aName; for (sal_uInt16 i=0; i<SC_LINKTARGETTYPE_COUNT; i++) - if ( aNames[i] == aNameStr ) + if ( aNames[i] == aName ) return sal_True; return false; } @@ -236,10 +234,9 @@ uno::Any SAL_CALL ScLinkTargetTypeObj::getPropertyValue(const OUString& Property throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception ) { uno::Any aRet; - OUString aNameStr(PropertyName); - if ( aNameStr == SC_UNO_LINKDISPBIT ) + if ( PropertyName == SC_UNO_LINKDISPBIT ) SetLinkTargetBitmap( aRet, nType ); - else if ( aNameStr == SC_UNO_LINKDISPNAME ) + else if ( PropertyName == SC_UNO_LINKDISPNAME ) aRet <<= OUString( aName ); return aRet; |