diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:34:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-06 09:34:39 +0100 |
commit | a80bab705888ca020533dee97b2e2850529dbf09 (patch) | |
tree | a6a739dc6809630ad3fadc09deff84a9df64d401 /basic | |
parent | 71a91f8025360074df47a375633cc7d4da2d544f (diff) |
loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I9979100550a86ac3f42d74a5403fb3ffd9d5006b
Diffstat (limited to 'basic')
-rw-r--r-- | basic/qa/cppunit/basictest.hxx | 4 | ||||
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 4 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 38 | ||||
-rw-r--r-- | basic/source/classes/eventatt.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/image.cxx | 4 | ||||
-rw-r--r-- | basic/source/classes/sb.cxx | 18 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 8 | ||||
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 16 | ||||
-rw-r--r-- | basic/source/comp/dim.cxx | 8 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/stdobj.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/stdobj1.cxx | 32 | ||||
-rw-r--r-- | basic/source/uno/namecont.cxx | 12 | ||||
-rw-r--r-- | basic/source/uno/scriptcont.cxx | 6 |
15 files changed, 82 insertions, 82 deletions
diff --git a/basic/qa/cppunit/basictest.hxx b/basic/qa/cppunit/basictest.hxx index ad6ac4d94ed1..9115b60bb544 100644 --- a/basic/qa/cppunit/basictest.hxx +++ b/basic/qa/cppunit/basictest.hxx @@ -37,7 +37,7 @@ class MacroSnippet } void MakeModule( const OUString& sSource ) { - mpMod = mpBasic->MakeModule( OUString( "TestModule" ), sSource ); + mpMod = mpBasic->MakeModule( "TestModule", sSource ); } public: struct ErrorDetail @@ -93,7 +93,7 @@ class MacroSnippet SbxVariableRef pReturn = NULL; if ( !Compile() ) return pReturn; - SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( OUString("doUnitTest"), SbxCLASS_METHOD )) : NULL; + SbMethod* pMeth = mpMod ? static_cast<SbMethod*>(mpMod->Find( "doUnitTest", SbxCLASS_METHOD )) : NULL; if ( pMeth ) { if ( rArgs.getLength() ) diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 5a2a2fa2eeff..3ec9ed4f8bf0 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -266,12 +266,12 @@ namespace basic OUString aAppBasicDir( aPathCFG.GetBasicPath() ); if ( aAppBasicDir.isEmpty() ) { - aPathCFG.SetBasicPath(OUString("$(prog)")); + aPathCFG.SetBasicPath("$(prog)"); } // Create basic and load it // AppBasicDir is now a PATH - INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable(OUString("$(progurl)")) ); + INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable("$(progurl)") ); aAppBasic.insertName( Application::GetAppName() ); BasicManager* pBasicManager = new BasicManager( new StarBASIC, &aAppBasicDir ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 46e43eb417ce..18e8f6ff50c3 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -496,7 +496,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star // If there is no Manager Stream, no further actions are necessary - if ( rStorage.IsStream( OUString(szManagerStream) ) ) + if ( rStorage.IsStream( szManagerStream ) ) { LoadBasicManager( rStorage, rBaseURL ); // StdLib contains Parent: @@ -514,8 +514,8 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star rStdLibInfo.SetLib( pStdLib ); StarBASICRef xStdLib = rStdLibInfo.GetLib(); - xStdLib->SetName( OUString(szStdLibName) ); - rStdLibInfo.SetLibName( OUString(szStdLibName) ); + xStdLib->SetName( szStdLibName ); + rStdLibInfo.SetLibName( szStdLibName ); xStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch ); xStdLib->SetModified( false ); } @@ -539,11 +539,11 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star // #91626 Save all stream data to save it unmodified if basic isn't modified // in an 6.0+ office. So also the old basic dialogs can be saved. - tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode ); + tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szManagerStream, eStreamReadMode ); mpImpl->mpManagerStream = new SvMemoryStream(); static_cast<SvStream*>(&xManagerStream)->ReadStream( *mpImpl->mpManagerStream ); - tools::SvRef<SotStorage> xBasicStorage = rStorage.OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false ); + tools::SvRef<SotStorage> xBasicStorage = rStorage.OpenSotStorage( szBasicStorage, eStorageReadMode, false ); if( xBasicStorage.Is() && !xBasicStorage->GetError() ) { sal_uInt16 nLibs = GetLibCount(); @@ -560,7 +560,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star else { ImpCreateStdLib( pParentFromStdLib ); - if ( rStorage.IsStream( OUString(szOldManagerStream) ) ) + if ( rStorage.IsStream( szOldManagerStream ) ) LoadOldBasicManager( rStorage ); } } @@ -688,8 +688,8 @@ BasicManager::BasicManager( StarBASIC* pSLib, OUString* pLibPath, bool bDocMgr ) BasicLibInfo* pStdLibInfo = CreateLibInfo(); pStdLibInfo->SetLib( pSLib ); StarBASICRef xStdLib = pStdLibInfo->GetLib(); - xStdLib->SetName(OUString(szStdLibName)); - pStdLibInfo->SetLibName(OUString(szStdLibName) ); + xStdLib->SetName(szStdLibName); + pStdLibInfo->SetLibName(szStdLibName ); pSLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch ); // Save is only necessary if basic has changed @@ -707,8 +707,8 @@ void BasicManager::ImpMgrNotLoaded( const OUString& rStorageName ) BasicLibInfo* pStdLibInfo = CreateLibInfo(); pStdLibInfo->SetLib( new StarBASIC( NULL, mbDocMgr ) ); StarBASICRef xStdLib = pStdLibInfo->GetLib(); - xStdLib->SetName( OUString(szStdLibName) ); - pStdLibInfo->SetLibName( OUString(szStdLibName) ); + xStdLib->SetName( szStdLibName ); + pStdLibInfo->SetLibName( szStdLibName ); xStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch ); xStdLib->SetModified( false ); } @@ -719,14 +719,14 @@ void BasicManager::ImpCreateStdLib( StarBASIC* pParentFromStdLib ) BasicLibInfo* pStdLibInfo = CreateLibInfo(); StarBASIC* pStdLib = new StarBASIC( pParentFromStdLib, mbDocMgr ); pStdLibInfo->SetLib( pStdLib ); - pStdLib->SetName( OUString(szStdLibName) ); - pStdLibInfo->SetLibName( OUString(szStdLibName) ); + pStdLib->SetName( szStdLibName ); + pStdLibInfo->SetLibName( szStdLibName ); pStdLib->SetFlag( SbxFlagBits::DontStore | SbxFlagBits::ExtSearch ); } void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBaseURL, bool bLoadLibs ) { - tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szManagerStream), eStreamReadMode ); + tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szManagerStream, eStreamReadMode ); OUString aStorName( rStorage.GetName() ); // #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" ); @@ -818,7 +818,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) { - tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( OUString(szOldManagerStream), eStreamReadMode ); + tools::SvRef<SotStorageStream> xManagerStream = rStorage.OpenSotStream( szOldManagerStream, eStreamReadMode ); OUString aStorName( rStorage.GetName() ); DBG_ASSERT( aStorName.getLength(), "No Storage Name!" ); @@ -976,7 +976,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora { xStorage = new SotStorage( false, aStorageName, eStorageReadMode ); } - tools::SvRef<SotStorage> xBasicStorage = xStorage->OpenSotStorage( OUString(szBasicStorage), eStorageReadMode, false ); + tools::SvRef<SotStorage> xBasicStorage = xStorage->OpenSotStorage( szBasicStorage, eStorageReadMode, false ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1172,7 +1172,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName, else { pLibInfo->GetLib()->SetModified( true ); // Must be saved after Add! - pLibInfo->SetStorageName( OUString(szImbedded) ); // Save in BasicManager-Storage + pLibInfo->SetStorageName( szImbedded ); // Save in BasicManager-Storage } } else @@ -1238,10 +1238,10 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) SAL_WARN("basic", "BasicManager::RemoveLib: Caught exception: " << e.Message); } - if (xStorage.Is() && xStorage->IsStorage(OUString(szBasicStorage))) + if (xStorage.Is() && xStorage->IsStorage(szBasicStorage)) { tools::SvRef<SotStorage> xBasicStorage = xStorage->OpenSotStorage - ( OUString(szBasicStorage), STREAM_STD_READWRITE, false ); + ( szBasicStorage, STREAM_STD_READWRITE, false ); if ( !xBasicStorage.Is() || xBasicStorage->GetError() ) { @@ -1260,7 +1260,7 @@ bool BasicManager::RemoveLib( sal_uInt16 nLib, bool bDelBasicFromStorage ) if ( aInfoList.empty() ) { xBasicStorage.Clear(); - xStorage->Remove( OUString(szBasicStorage) ); + xStorage->Remove( szBasicStorage ); xStorage->Commit(); // If no further Streams or SubStorages available, // delete the Storage, too. diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 0afda2fdfc64..a47404dca919 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -332,7 +332,7 @@ css::uno::Reference< css::container::XNameContainer > implFindDialogLibForDialog { css::uno::Reference< css::container::XNameContainer > aRetDlgLib; - SbxVariable* pDlgLibContVar = pBasic->Find(OUString("DialogLibraries"), SbxCLASS_OBJECT); + SbxVariable* pDlgLibContVar = pBasic->Find("DialogLibraries", SbxCLASS_OBJECT); if( pDlgLibContVar && 0 != dynamic_cast<const SbUnoObject*>( pDlgLibContVar) ) { SbUnoObject* pDlgLibContUnoObj = static_cast<SbUnoObject*>(static_cast<SbxBase*>(pDlgLibContVar)); diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index 12eff1835c5b..268fcd00eda5 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -333,8 +333,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) } - pType->Remove( OUString("Name"), SbxCLASS_DONTCARE ); - pType->Remove( OUString("Parent"), SbxCLASS_DONTCARE ); + pType->Remove( "Name", SbxCLASS_DONTCARE ); + pType->Remove( "Parent", SbxCLASS_DONTCARE ); AddType(pType); } diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 67c633dfc8dd..2b30d114c770 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -820,7 +820,7 @@ void SbClassModuleObject::triggerInitializeEvent() mbInitializeEventDone = true; // Search method - SbxVariable* pMeth = SbxObject::Find(OUString("Class_Initialize"), SbxCLASS_METHOD); + SbxVariable* pMeth = SbxObject::Find("Class_Initialize", SbxCLASS_METHOD); if( pMeth ) { SbxValues aVals; @@ -835,7 +835,7 @@ void SbClassModuleObject::triggerTerminateEvent() return; } // Search method - SbxVariable* pMeth = SbxObject::Find(OUString("Class_Terminate"), SbxCLASS_METHOD ); + SbxVariable* pMeth = SbxObject::Find("Class_Terminate", SbxCLASS_METHOD ); if( pMeth ) { SbxValues aVals; @@ -1936,12 +1936,12 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer ) } } // HACK for SFX-Bullshit! - SbxVariable* p = Find( OUString("FALSE"), SbxCLASS_PROPERTY ); + SbxVariable* p = Find( "FALSE", SbxCLASS_PROPERTY ); if( p ) { Remove( p ); } - p = Find( OUString("TRUE"), SbxCLASS_PROPERTY ); + p = Find( "TRUE", SbxCLASS_PROPERTY ); if( p ) { Remove( p ); @@ -2100,15 +2100,15 @@ void BasicCollection::Initialize() if ( !xAddInfo.Is() ) { xAddInfo = new SbxInfo; - xAddInfo->AddParam( OUString( "Item" ), SbxVARIANT ); - xAddInfo->AddParam( OUString( "Key" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); - xAddInfo->AddParam( OUString( "Before" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); - xAddInfo->AddParam( OUString( "After" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); + xAddInfo->AddParam( "Item", SbxVARIANT ); + xAddInfo->AddParam( "Key", SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); + xAddInfo->AddParam( "Before", SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); + xAddInfo->AddParam( "After", SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional ); } if ( !xItemInfo.Is() ) { xItemInfo = new SbxInfo; - xItemInfo->AddParam( OUString( "Index" ), SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional); + xItemInfo->AddParam( "Index", SbxVARIANT, SbxFlagBits::Read | SbxFlagBits::Optional); } } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index c6bb54841288..74a97996fc4a 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2329,8 +2329,8 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) static Reference< XIntrospection > xIntrospection; // beat out again the default properties of Sbx - Remove( OUString("Name"), SbxCLASS_DONTCARE ); - Remove( OUString("Parent"), SbxCLASS_DONTCARE ); + Remove( "Name", SbxCLASS_DONTCARE ); + Remove( "Parent", SbxCLASS_DONTCARE ); // check the type of the objects TypeClass eType = aUnoObj_.getValueType().getTypeClass(); @@ -3300,7 +3300,7 @@ void VBAConstantHelper::init() { Sequence< TypeClass > types(1); types[ 0 ] = TypeClass_CONSTANTS; - Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( OUString(defaultNameSpace), types, TypeDescriptionSearchDepth_INFINITE ); + Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( defaultNameSpace, types, TypeDescriptionSearchDepth_INFINITE ); if ( !xEnum.is()) { @@ -4742,7 +4742,7 @@ bool handleToStringForCOMObjects( SbxObject* pObj, SbxValue* pVal ) // Only for native COM objects if( pUnoObj->isNativeCOMObject() ) { - SbxVariableRef pMeth = pObj->Find( OUString( "toString" ), SbxCLASS_METHOD ); + SbxVariableRef pMeth = pObj->Find( "toString", SbxCLASS_METHOD ); if ( pMeth.Is() ) { SbxValues aRes; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 10d7f147159c..ed7102bc0cde 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -990,25 +990,25 @@ static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p ) void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic ) { // delete the return value of CreateUnoService - SbxVariable* pVar = pBasic->GetRtl()->Find( OUString("CreateUnoService"), SbxCLASS_METHOD ); + SbxVariable* pVar = pBasic->GetRtl()->Find( "CreateUnoService", SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete the return value of CreateUnoDialog - pVar = pBasic->GetRtl()->Find( OUString("CreateUnoDialog"), SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( "CreateUnoDialog", SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete the return value of CDec - pVar = pBasic->GetRtl()->Find( OUString("CDec"), SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( "CDec", SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); } // delete return value of CreateObject - pVar = pBasic->GetRtl()->Find( OUString("CreateObject"), SbxCLASS_METHOD ); + pVar = pBasic->GetRtl()->Find( "CreateObject", SbxCLASS_METHOD ); if( pVar ) { pVar->SbxValue::Clear(); @@ -2551,25 +2551,25 @@ void SbUserFormModule::triggerInitializeEvent() if ( mbInit ) return; SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent"); - triggerMethod(OUString("Userform_Initialize")); + triggerMethod("Userform_Initialize"); mbInit = true; } void SbUserFormModule::triggerTerminateEvent() { SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent"); - triggerMethod(OUString( "Userform_Terminate" )); + triggerMethod("Userform_Terminate"); mbInit=false; } void SbUserFormModule::triggerLayoutEvent() { - triggerMethod(OUString( "Userform_Layout" )); + triggerMethod("Userform_Layout"); } void SbUserFormModule::triggerResizeEvent() { - triggerMethod(OUString("Userform_Resize")); + triggerMethod("Userform_Resize"); } SbUserFormModuleInstance* SbUserFormModule::CreateInstance() diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index cff81af3b642..c4673712708c 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -680,8 +680,8 @@ void SbiParser::DefType( bool bPrivate ) } } - pType->Remove( OUString("Name"), SbxCLASS_DONTCARE ); - pType->Remove( OUString("Parent"), SbxCLASS_DONTCARE ); + pType->Remove( "Name", SbxCLASS_DONTCARE ); + pType->Remove( "Parent", SbxCLASS_DONTCARE ); rTypeArray->Insert (pType,rTypeArray->Count()); } @@ -815,8 +815,8 @@ void SbiParser::DefEnum( bool bPrivate ) } } - pEnum->Remove( OUString("Name"), SbxCLASS_DONTCARE ); - pEnum->Remove( OUString("Parent"), SbxCLASS_DONTCARE ); + pEnum->Remove( "Name", SbxCLASS_DONTCARE ); + pEnum->Remove( "Parent", SbxCLASS_DONTCARE ); rEnumArray->Insert( pEnum, rEnumArray->Count() ); } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0a44213f0625..76ef40e392de 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4455,7 +4455,7 @@ RTLFUNC(Load) } else if (SbxObject* pSbxObj = dynamic_cast<SbxObject*>(pObj)) { - SbxVariable* pVar = pSbxObj->Find(OUString("Load"), SbxCLASS_METHOD); + SbxVariable* pVar = pSbxObj->Find("Load", SbxCLASS_METHOD); if( pVar ) { pVar->GetInteger(); @@ -4486,7 +4486,7 @@ RTLFUNC(Unload) } else if (SbxObject *pSbxObj = dynamic_cast<SbxObject*>(pObj)) { - SbxVariable* pVar = pSbxObj->Find(OUString("Unload"), SbxCLASS_METHOD); + SbxVariable* pVar = pSbxObj->Find("Unload", SbxCLASS_METHOD); if( pVar ) { pVar->GetInteger(); diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 99031a118c81..a4054790c5bf 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2812,7 +2812,7 @@ void SbiRuntime::StepLOADNC( sal_uInt32 nOp1 ) sal_Int32 iComma = aStr.indexOf((sal_Unicode)','); if( iComma >= 0 ) { - aStr = aStr.replaceAt(iComma, 1, OUString(".")); + aStr = aStr.replaceAt(iComma, 1, "."); } double n = ::rtl::math::stringToDouble( aStr, '.', ',' ); @@ -3631,7 +3631,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName ) { // Parameter is missing pElem = new SbxVariable( SbxSTRING ); - pElem->PutString( OUString("<missing parameter>")); + pElem->PutString( "<missing parameter>"); } else { diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index 23d1766ccc91..52c8653a3e6b 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -722,8 +722,8 @@ SbiStdObject::SbiStdObject( const OUString& r, StarBASIC* pb ) : SbxObject( r ) } // #i92642: Remove default properties - Remove( OUString("Name"), SbxCLASS_DONTCARE ); - Remove( OUString("Parent"), SbxCLASS_DONTCARE ); + Remove( "Name", SbxCLASS_DONTCARE ); + Remove( "Parent", SbxCLASS_DONTCARE ); SetParent( pb ); diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 49779705178f..a621331c85e5 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -116,13 +116,13 @@ SbStdPicture::SbStdPicture() : SbxObject( OUString("Picture")) { // Properties - SbxVariable* p = Make( OUString("Type"), SbxCLASS_PROPERTY, SbxVARIANT ); + SbxVariable* p = Make( "Type", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_TYPE ); - p = Make( OUString("Width"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "Width", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_WIDTH ); - p = Make( OUString("Height"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "Height", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::Read | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_HEIGHT ); } @@ -235,24 +235,24 @@ SbStdFont::SbStdFont() , nSize(0) { // Properties - SbxVariable* p = Make( OUString("Bold"), SbxCLASS_PROPERTY, SbxVARIANT ); + SbxVariable* p = Make( "Bold", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_BOLD ); - p = Make( OUString("Italic"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "Italic", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_ITALIC ); - p = Make( OUString("StrikeThrough"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "StrikeThrough", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_STRIKETHROUGH ); - p = Make( OUString("Underline"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "Underline", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_UNDERLINE ); - p = Make( OUString("Size"), SbxCLASS_PROPERTY, SbxVARIANT ); + p = Make( "Size", SbxCLASS_PROPERTY, SbxVARIANT ); p->SetFlags( SbxFlagBits::ReadWrite | SbxFlagBits::DontStore ); p->SetUserData( ATTR_IMP_SIZE ); // handle name property yourself - p = Find( OUString("Name"), SbxCLASS_PROPERTY ); + p = Find( "Name", SbxCLASS_PROPERTY ); assert(p && "No Name Property"); p->SetUserData( ATTR_IMP_NAME ); } @@ -397,27 +397,27 @@ TYPEINIT1( SbStdClipboard, SbxObject ); SbStdClipboard::SbStdClipboard() : SbxObject( OUString("Clipboard") ) { - SbxVariable* p = Find( OUString("Name"), SbxCLASS_PROPERTY ); + SbxVariable* p = Find( "Name", SbxCLASS_PROPERTY ); assert(p && "No Name Property"); p->SetUserData( ATTR_IMP_NAME ); // register methods - p = Make( OUString("Clear"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "Clear", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_CLEAR ); - p = Make( OUString("GetData"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "GetData", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_GETDATA ); - p = Make( OUString("GetFormat"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "GetFormat", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_GETFORMAT ); - p = Make( OUString("GetText"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "GetText", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_GETTEXT ); - p = Make( OUString("SetData"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "SetData", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_SETDATA ); - p = Make( OUString("SetText"), SbxCLASS_METHOD, SbxEMPTY ); + p = Make( "SetText", SbxCLASS_METHOD, SbxEMPTY ); p->SetFlag( SbxFlagBits::DontStore ); p->SetUserData( METH_SETTEXT ); } diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 30f551b5dd66..5b56c411998b 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -797,7 +797,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, pLibInfoInetObj.reset(new INetURLObject( maLibraryPath.getToken(1, (sal_Unicode)';') )); } pLibInfoInetObj->insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - pLibInfoInetObj->setExtension( OUString("xlc") ); + pLibInfoInetObj->setExtension( "xlc" ); aFileName = pLibInfoInetObj->GetMainURL( INetURLObject::NO_DECODE ); } @@ -816,7 +816,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, { INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); aLibInfoInetObj.insertName( maOldInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aLibInfoInetObj.setExtension( OUString( "xli") ); + aLibInfoInetObj.setExtension( "xli" ); aFileName = aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); try @@ -1128,7 +1128,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, INetURLObject aPrevUserBasicLibInfoInetObj( aUserBasicInetObj ); aPrevUserBasicLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aPrevUserBasicLibInfoInetObj.setExtension( OUString("xlc")); + aPrevUserBasicLibInfoInetObj.setExtension( "xlc"); OUString aLibInfoFileName = aPrevUserBasicLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ); Sequence<Any> aInitSeq( 1 ); aInitSeq.getArray()[0] <<= aLibInfoFileName; @@ -1334,7 +1334,7 @@ void SfxLibraryContainer::checkStorageURL( const OUString& aSourceURL, // URL to library folder aStorageURL = aExpandedSourceURL; aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aInetObj.setExtension( OUString("xlb") ); + aInetObj.setExtension( "xlb" ); aLibInfoFileURL = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } } @@ -1637,7 +1637,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, xSFI->createFolder( aLibDirPath ); } aInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aInetObj.setExtension( OUString( "xlb" ) ); + aInetObj.setExtension( "xlb" ); aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } else @@ -2131,7 +2131,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto // Create Output stream INetURLObject aLibInfoInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); aLibInfoInetObj.insertName( maInfoFileName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aLibInfoInetObj.setExtension( OUString("xlc") ); + aLibInfoInetObj.setExtension( "xlc" ); OUString aLibInfoPath( aLibInfoInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); try diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 998c3f4959e0..13b8f774dd1a 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -521,7 +521,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& } else { - aElementInetObj.setExtension( OUString( "pba" ) ); + aElementInetObj.setExtension( "pba" ); } OUString aElementPath( aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -732,7 +732,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aElementInetObj.setExtension( OUString( "pba" ) ); + aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( !isLibraryElementValid( pLib->getByName( aElementName ) ) ) @@ -1029,7 +1029,7 @@ bool SfxScriptLibraryContainer::implLoadPasswordLibrary INetURLObject aElementInetObj( aLibDirPath ); aElementInetObj.insertName( aElementName, false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); - aElementInetObj.setExtension( OUString( "pba" ) ); + aElementInetObj.setExtension( "pba" ); OUString aElementPath = aElementInetObj.GetMainURL( INetURLObject::NO_DECODE ); uno::Reference< embed::XStorage > xElementRootStorage; |