remove unnecessary use of OUString constructor in FRAMEWORK module

Change-Id: Icbed4f318043a166ed78fe0c49a53f87ebf7201d
This commit is contained in:
Noel Grandin 2013-11-04 11:42:58 +02:00
parent 62f27a5e7b
commit c4a593b6b1
13 changed files with 43 additions and 46 deletions

View File

@ -120,7 +120,7 @@ void SAL_CALL InterceptionHelper::registerDispatchProviderInterceptor(const css:
else
{
aInfo.lURLPattern.realloc(1);
aInfo.lURLPattern[0] = OUString("*");
aInfo.lURLPattern[0] = "*";
}
// SAFE {

View File

@ -192,7 +192,7 @@ OUString SAL_CALL Oxt_Handler::detect( css::uno::Sequence< css::beans::PropertyV
// I think we can the following ones:
// a) look for given extension of url to map our type decision HARD CODED!!!
// b) return preferred type every time... it's easy :-)
sTypeName = OUString("oxt_OpenOffice_Extension");
sTypeName = "oxt_OpenOffice_Extension";
aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName;
aDescriptor >> lDescriptor;
}

View File

@ -129,11 +129,11 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam)
switch (nCommand)
{
case SHOWDIALOG_ID_PREFERENCES :
sCommand = OUString(".uno:OptionsTreeDialog");
sCommand = ".uno:OptionsTreeDialog";
break;
case SHOWDIALOG_ID_ABOUT :
sCommand = OUString(".uno:About");
sCommand = ".uno:About";
break;
default :

View File

@ -159,31 +159,31 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
aModuleId == "com.sun.star.text.GlobalDocument" ||
aModuleId == "com.sun.star.text.WebDocument" ||
aModuleId == "com.sun.star.xforms.XMLFormDocument" )
sDesktopName = OUString("Writer");
sDesktopName = "Writer";
else if ( aModuleId == "com.sun.star.sheet.SpreadsheetDocument" )
sDesktopName = OUString("Calc");
sDesktopName = "Calc";
else if ( aModuleId == "com.sun.star.presentation.PresentationDocument" )
sDesktopName = OUString("Impress");
sDesktopName = "Impress";
else if ( aModuleId == "com.sun.star.drawing.DrawingDocument" )
sDesktopName = OUString("Draw");
sDesktopName = "Draw";
else if ( aModuleId == "com.sun.star.formula.FormulaProperties" )
sDesktopName = OUString("Math");
sDesktopName = "Math";
else if ( aModuleId == "com.sun.star.sdb.DatabaseDocument" ||
aModuleId == "com.sun.star.sdb.OfficeDatabaseDocument" ||
aModuleId == "com.sun.star.sdb.RelationDesign" ||
aModuleId == "com.sun.star.sdb.QueryDesign" ||
aModuleId == "com.sun.star.sdb.TableDesign" ||
aModuleId == "com.sun.star.sdb.DataSourceBrowser" )
sDesktopName = OUString("Base");
sDesktopName = "Base";
else
sDesktopName = OUString("Startcenter");
sDesktopName = "Startcenter";
#if defined(WNT)
// We use a hardcoded product name matching the registry keys so applications can be associated with file types
sApplicationID = "TheDocumentFoundation.LibreOffice.";
sApplicationID += sDesktopName;
#else
sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase();
sApplicationID += OUString(sal_Unicode('-'));
sApplicationID += "-";
sApplicationID += sDesktopName.toAsciiLowerCase();
#endif
#endif

View File

@ -401,15 +401,15 @@ OUString JobData::getEnvironmentDescriptor() const
switch(m_eEnvironment)
{
case E_EXECUTION :
sDescriptor = OUString("EXECUTOR");
sDescriptor = "EXECUTOR";
break;
case E_DISPATCH :
sDescriptor = OUString("DISPATCH");
sDescriptor = "DISPATCH";
break;
case E_DOCUMENTEVENT :
sDescriptor = OUString("DOCUMENTEVENT");
sDescriptor = "DOCUMENTEVENT";
break;
default:
break;
@ -712,10 +712,10 @@ void JobData::impl_reset()
WriteGuard aWriteLock(m_aLock);
m_eMode = E_UNKNOWN_MODE;
m_eEnvironment = E_UNKNOWN_ENVIRONMENT;
m_sAlias = OUString();
m_sService = OUString();
m_sContext = OUString();
m_sEvent = OUString();
m_sAlias = "";
m_sService = "";
m_sContext = "";
m_sEvent = "";
m_lArguments = css::uno::Sequence< css::beans::NamedValue >();
aWriteLock.unlock();
/* } SAFE */

View File

@ -316,8 +316,7 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const OUString& aURL,
OUStringBuffer aArgumentBuffer(1000);
OUString sArrayName;
// this value is used to name the arrays of aArgumentBuffer
sArrayName = OUString("args");
sArrayName += OUString::number(m_nRecordingID);
sArrayName = "args" + OUString::number(m_nRecordingID);
aScriptBuffer.appendAscii("rem ----------------------------------------------------------------------\n");

View File

@ -370,7 +370,7 @@ DispatchParams& DispatchParams::operator=(const DispatchParams& rCopy)
//-----------------------------------------------
void DispatchParams::forget()
{
m_sSavePath = OUString();
m_sSavePath = "";
m_nWorkingEntryID = -1;
m_xProgress.clear();
m_xHoldRefForAsyncOpAlive.clear();
@ -1047,7 +1047,7 @@ void AutoRecovery::implts_readConfig()
continue;
AutoRecovery::TDocumentInfo aInfo;
aInfo.NewTempURL = OUString();
aInfo.NewTempURL = "";
aInfo.Document = css::uno::Reference< css::frame::XModel >();
xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_ORIGINALURL)) >>= aInfo.OrgURL ;
xItem->getPropertyValue(OUString(CFG_ENTRY_PROP_TEMPURL)) >>= aInfo.OldTempURL ;
@ -1140,16 +1140,15 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
css::uno::Sequence< OUString > lExtensions = lTypeProps.getUnpackedValueOrDefault(OUString(TYPE_PROP_EXTENSIONS), css::uno::Sequence< OUString >());
if (lExtensions.getLength())
{
rInfo.Extension = OUString(".");
rInfo.Extension += lExtensions[0];
rInfo.Extension = lExtensions[0];
}
else
rInfo.Extension = OUString(".unknown");
rInfo.Extension = ".unknown";
}
catch(const css::uno::Exception&)
{
rInfo.DefaultFilter = OUString();
rInfo.Extension = OUString();
rInfo.DefaultFilter = "";
rInfo.Extension = "";
}
}
@ -1900,8 +1899,8 @@ void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::fr
OUString sRemoveURL1 = rInfo.OldTempURL;
OUString sRemoveURL2 = rInfo.NewTempURL;
rInfo.OldTempURL = OUString();
rInfo.NewTempURL = OUString();
rInfo.OldTempURL = "";
rInfo.NewTempURL = "";
::comphelper::MediaDescriptor lDescriptor(rInfo.Document->getArgs());
rInfo.RealFilter = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME(), OUString());
@ -2394,7 +2393,7 @@ void AutoRecovery::implts_saveOneDoc(const OUString&
else
{
// safe the state about error ...
rInfo.NewTempURL = OUString();
rInfo.NewTempURL = "";
rInfo.DocumentState &= ~AutoRecovery::E_TRY_SAVE;
rInfo.DocumentState |= AutoRecovery::E_HANDLED;
rInfo.DocumentState |= AutoRecovery::E_INCOMPLETE;
@ -2407,8 +2406,8 @@ void AutoRecovery::implts_saveOneDoc(const OUString&
// Ignore any error here. We have a new temp file, which is up to date.
// The only thing is: we fill the disk with temp files, if we cant remove old ones :-)
OUString sRemoveFile = rInfo.OldTempURL;
rInfo.OldTempURL = rInfo.NewTempURL;
rInfo.NewTempURL = OUString();
rInfo.OldTempURL = rInfo.NewTempURL;
rInfo.NewTempURL = "";
implts_flushConfigItem(rInfo);

View File

@ -120,7 +120,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
css::uno::Sequence< css::beans::PropertyValue > aArguments( lArguments );
sal_Int32 nLength = lArguments.getLength();
aArguments.realloc( nLength + 1 );
aArguments[ nLength ].Name = OUString("SynchronMode");
aArguments[ nLength ].Name = "SynchronMode";
aArguments[ nLength ].Value <<= (sal_Bool) sal_True;
css::uno::Any aResult;

View File

@ -236,7 +236,7 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na
Reference< XMultiServiceFactory > theConfigProvider = theDefaultProvider::get( m_xContext );
Sequence< Any > theArgs(1);
NamedValue v;
v.Name = OUString("NodePath");
v.Name = "NodePath";
v.Value <<= OUString("org.openoffice.Setup/Office");
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(

View File

@ -116,7 +116,7 @@ void SessionListener::StoreSession( sal_Bool bAsync )
css::uno::Reference< XDispatch > xDispatch = css::frame::AutoRecovery::create( m_xContext );
css::uno::Reference< XURLTransformer > xURLTransformer = URLTransformer::create( m_xContext );
URL aURL;
aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionSave");
aURL.Complete = "vnd.sun.star.autorecovery:/doSessionSave";
xURLTransformer->parseStrict(aURL);
// in case of asynchronous call the notification will trigger saveDone()
@ -148,7 +148,7 @@ void SessionListener::QuitSessionQuietly()
css::uno::Reference< XDispatch > xDispatch = css::frame::AutoRecovery::create( m_xContext );
css::uno::Reference< XURLTransformer > xURLTransformer = URLTransformer::create( m_xContext );
URL aURL;
aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionQuietQuit");
aURL.Complete = "vnd.sun.star.autorecovery:/doSessionQuietQuit";
xURLTransformer->parseStrict(aURL);
Sequence< PropertyValue > args(1);
@ -229,7 +229,7 @@ sal_Bool SAL_CALL SessionListener::doRestore()
css::uno::Reference< XDispatch > xDispatch = css::frame::AutoRecovery::create( m_xContext );
URL aURL;
aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionRestore");
aURL.Complete = "vnd.sun.star.autorecovery:/doSessionRestore";
css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(m_xContext));
xURLTransformer->parseStrict(aURL);
Sequence< PropertyValue > args;

View File

@ -240,7 +240,7 @@ SubstitutePathVariables_Impl::SubstitutePathVariables_Impl( const Link& aNotifyL
// Enable notification mechanism
// We need it to get information about changes outside these class on our configuration branch
Sequence< OUString > aNotifySeq( 1 );
aNotifySeq[0] = OUString( "SharePoints" );
aNotifySeq[0] = "SharePoints";
EnableNotification( aNotifySeq, sal_True );
}
@ -347,7 +347,7 @@ const OUString& SubstitutePathVariables_Impl::GetDNSDomainName()
if ( nIndex >= 0 && aTemp.getLength() > nIndex+1 )
m_aDNSDomain = aTemp.copy( nIndex+1 ).toAsciiLowerCase();
else
m_aDNSDomain = OUString();
m_aDNSDomain = "";
m_bDNSDomainRetrieved = sal_True;
}
@ -524,7 +524,7 @@ void SubstitutePathVariables_Impl::ReadSharePointRuleSetFromConfiguration(
aEnvUsePropNameTemplate += m_aLevelSep;
for ( sal_Int32 nProperty = 0; nProperty < aEnvironmentVariable.getLength(); nProperty++ )
aEnvUsedPropertySeq[nProperty] = OUString( aEnvUsePropNameTemplate + aEnvironmentVariable[nProperty] );
aEnvUsedPropertySeq[nProperty] = aEnvUsePropNameTemplate + aEnvironmentVariable[nProperty];
Sequence< Any > aEnvUsedValueSeq;
aEnvUsedValueSeq = GetProperties( aEnvUsedPropertySeq );
@ -1113,7 +1113,7 @@ throw ( NoSuchElementException, RuntimeException )
void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariables& aPreDefPathVariables )
{
aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL] = OUString("$BRAND_BASE_DIR");
aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL] = "$BRAND_BASE_DIR";
rtl::Bootstrap::expandMacros(
aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL]);

View File

@ -311,7 +311,7 @@ OUString SAL_CALL URLTransformer::getPresentation( const URL& aURL
if ( !bWithPassword && !aTestURL.Password.isEmpty() )
{
// Exchange password text with other placeholder string
aTestURL.Password = OUString("<******>");
aTestURL.Password = "<******>";
assemble( aTestURL );
}

View File

@ -207,7 +207,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
}
// We have to map commands which uses special characters like '/',':','?','\','<'.'>','|'
OUString aExt = OUString(".png");
OUString aExt = ".png";
m_aImageCommandNameVector.resize(aCmdImageSeq.getLength() );
m_aImageNameVector.resize( aCmdImageSeq.getLength() );
@ -571,8 +571,7 @@ sal_Bool ImageManagerImpl::implts_storeUserImages(
pList->pImageItemList->push_back( pItem );
}
pList->aURL = OUString("Bitmaps/");
pList->aURL += OUString::createFromAscii(BITMAP_FILE_NAMES[nImageType]);
pList->aURL = "Bitmaps/" + OUString::createFromAscii(BITMAP_FILE_NAMES[nImageType]);
uno::Reference< XTransactedObject > xTransaction;
uno::Reference< XOutputStream > xOutputStream;