diff options
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unomod.cxx | 5 | ||||
-rw-r--r-- | svx/source/unodraw/unomtabl.cxx | 22 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 3 |
4 files changed, 14 insertions, 22 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index e6b74d32cdda..735c6a5de16e 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -1216,16 +1216,14 @@ Sequence< OUString > SAL_CALL GraphicExporter::getSupportedServiceNames( ) } // XMimeTypeInfo -sal_Bool SAL_CALL GraphicExporter::supportsMimeType( const OUString& MimeTypeName ) throw (RuntimeException, std::exception) +sal_Bool SAL_CALL GraphicExporter::supportsMimeType( const OUString& rMimeTypeName ) throw (RuntimeException, std::exception) { - const OUString aMimeTypeName( MimeTypeName ); - GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter(); sal_uInt16 nCount = rFilter.GetExportFormatCount(); sal_uInt16 nFilter; for( nFilter = 0; nFilter < nCount; nFilter++ ) { - if( aMimeTypeName == rFilter.GetExportFormatMediaType( nFilter ) ) + if( rMimeTypeName == rFilter.GetExportFormatMediaType( nFilter ) ) { return sal_True; } diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 456ae108c559..7aa925377f91 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -418,14 +418,13 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c uno::Reference< uno::XInterface > xRet; - const OUString aType( aServiceSpecifier ); const OUString aPackagePrefix( "com.sun.star.presentation." ); - if( aType.startsWith( aPackagePrefix ) ) + if( aServiceSpecifier.startsWith( aPackagePrefix ) ) { SvxShape* pShape = nullptr; sal_uInt16 nType = OBJ_TEXT; - OUString aTypeName = aType.copy( aPackagePrefix.getLength() ); + OUString aTypeName = aServiceSpecifier.copy( aPackagePrefix.getLength() ); // create a shape wrapper if( aTypeName.startsWith("TitleTextShape") ) { diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index aea0bd644884..70997655e0f6 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -191,17 +191,15 @@ void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) return; } - OUString Name = SvxUnogetInternalNameForItem(XATTR_LINEEND, aApiName); + OUString aName = SvxUnogetInternalNameForItem(XATTR_LINEEND, aApiName); ItemPoolVector::iterator aIter = maItemSetVector.begin(); const ItemPoolVector::iterator aEnd = maItemSetVector.end(); - const OUString aSearchName( Name ); - while( aIter != aEnd ) { const NameOrIndex *pItem = static_cast<const NameOrIndex *>(&((*aIter)->Get( XATTR_LINEEND ) )); - if( pItem->GetName() == aSearchName ) + if( pItem->GetName() == aName ) { delete (*aIter); maItemSetVector.erase( aIter ); @@ -210,7 +208,7 @@ void SAL_CALL SvxUnoMarkerTable::removeByName( const OUString& aApiName ) ++aIter; } - if( !hasByName( Name ) ) + if( !hasByName( aName ) ) throw container::NoSuchElementException(); } @@ -220,27 +218,25 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const { SolarMutexGuard aGuard; - OUString aName = SvxUnogetInternalNameForItem(XATTR_LINEEND, aApiName); + const OUString aName = SvxUnogetInternalNameForItem(XATTR_LINEEND, aApiName); ItemPoolVector::iterator aIter = maItemSetVector.begin(); const ItemPoolVector::iterator aEnd = maItemSetVector.end(); - const OUString aSearchName( aName ); - while( aIter != aEnd ) { const NameOrIndex *pItem = static_cast<const NameOrIndex *>(&((*aIter)->Get( XATTR_LINEEND ) )); - if( pItem->GetName() == aSearchName ) + if( pItem->GetName() == aName ) { XLineEndItem aEndMarker; - aEndMarker.SetName( aSearchName ); + aEndMarker.SetName( aName ); if( !aEndMarker.PutValue( aElement, 0 ) ) throw lang::IllegalArgumentException(); (*aIter)->Put( aEndMarker, XATTR_LINEEND ); XLineStartItem aStartMarker; - aStartMarker.SetName( aSearchName ); + aStartMarker.SetName( aName ); aStartMarker.PutValue( aElement, 0 ); (*aIter)->Put( aStartMarker, XATTR_LINESTART ); @@ -257,7 +253,7 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const for( nSurrogate = 0; nSurrogate < nStartCount; nSurrogate++ ) { NameOrIndex *pItem = const_cast<NameOrIndex*>(static_cast<const NameOrIndex*>(mpModelPool->GetItem2( XATTR_LINESTART, nSurrogate))); - if( pItem && pItem->GetName() == aSearchName ) + if( pItem && pItem->GetName() == aName ) { pItem->PutValue( aElement, 0 ); bFound = true; @@ -269,7 +265,7 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const for( nSurrogate = 0; nSurrogate < nEndCount; nSurrogate++ ) { NameOrIndex *pItem = const_cast<NameOrIndex*>(static_cast<const NameOrIndex*>(mpModelPool->GetItem2( XATTR_LINEEND, nSurrogate))); - if( pItem && pItem->GetName() == aSearchName ) + if( pItem && pItem->GetName() == aName ) { pItem->PutValue( aElement, 0 ); bFound = true; diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 5df66bbd6469..51cfdcae1f7c 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1577,13 +1577,12 @@ bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName, const SfxItemPool* pPool = rSet.GetPool(); - const OUString aSearchName( aName ); const sal_uInt32 nCount = pPool->GetItemCount2((sal_uInt16)nWID); for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ ) { const NameOrIndex* pItem = static_cast<const NameOrIndex*>(pPool->GetItem2((sal_uInt16)nWID, nSurrogate)); - if( pItem && ( pItem->GetName() == aSearchName ) ) + if( pItem && ( pItem->GetName() == aName ) ) { rSet.Put( *pItem ); return true; |