diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-04 11:59:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 11:21:23 +0200 |
commit | 484819a235f578df6e6146e536ab542fc2f04391 (patch) | |
tree | 13de07309ab421ef59996705da48acc568f69978 | |
parent | 22435a0777d6048757855f7f30b04fb8e5523fb2 (diff) |
remove unnecessary use of OUString constructor in EMBEDDEDOBJ module
Change-Id: I60bbdd2a2592a1e5333abe50711aa227786ce935
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 16 | ||||
-rw-r--r-- | embeddedobj/source/general/intercept.cxx | 20 | ||||
-rw-r--r-- | embeddedobj/source/general/xcreator.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/msole/olecomponent.cxx | 14 | ||||
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 10 | ||||
-rw-r--r-- | embeddedobj/source/msole/xolefactory.cxx | 4 |
7 files changed, 40 insertions, 40 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 5a964bcaedb8..b592306972f1 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -39,8 +39,8 @@ using namespace ::com::sun::star; uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.OOoEmbeddedObjectFactory"); - aRet[1] = OUString("com.sun.star.comp.embed.OOoEmbeddedObjectFactory"); + aRet[0] = "com.sun.star.embed.OOoEmbeddedObjectFactory"; + aRet[1] = "com.sun.star.comp.embed.OOoEmbeddedObjectFactory"; return aRet; } @@ -471,8 +471,8 @@ uno::Sequence< OUString > SAL_CALL OOoEmbeddedObjectFactory::getSupportedService uno::Sequence< OUString > SAL_CALL OOoSpecialEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"); - aRet[1] = OUString("com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"); + aRet[0] = "com.sun.star.embed.OOoSpecialEmbeddedObjectFactory"; + aRet[1] = "com.sun.star.comp.embed.OOoSpecialEmbeddedObjectFactory"; return aRet; } diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index c34cb8276eff..8bd51d6679be 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -164,11 +164,11 @@ DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& m_aOutplaceFrameProps.realloc( 3 ); beans::NamedValue aArg; - aArg.Name = OUString("TopWindow"); + aArg.Name = "TopWindow"; aArg.Value <<= sal_True; m_aOutplaceFrameProps[0] <<= aArg; - aArg.Name = OUString("MakeVisible"); + aArg.Name = "MakeVisible"; aArg.Value <<= sal_False; m_aOutplaceFrameProps[1] <<= aArg; @@ -183,7 +183,7 @@ DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& } m_refCount--; - aArg.Name = OUString("ParentFrame"); + aArg.Name = "ParentFrame"; aArg.Value <<= xDesktop; //TODO/LATER: should use parent document frame m_aOutplaceFrameProps[2] <<= aArg; } @@ -453,14 +453,14 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& uno::Sequence< uno::Any > aArgs( 2 ); beans::NamedValue aArg; - aArg.Name = OUString("ContainerWindow"); + aArg.Name = "ContainerWindow"; aArg.Value <<= xOwnWindow; aArgs[0] <<= aArg; uno::Reference< frame::XFrame > xContFrame( xContDisp, uno::UNO_QUERY ); if ( xContFrame.is() ) { - aArg.Name = OUString("ParentFrame"); + aArg.Name = "ParentFrame"; aArg.Value <<= xContFrame; aArgs[1] <<= aArg; } @@ -974,13 +974,13 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) if ( xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.report.ReportDefinition") ) { - sUrl = OUString(".component:DB/ReportDesign"); + sUrl = ".component:DB/ReportDesign"; } else if( xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.chart2.ChartDocument")) - sUrl = OUString("private:factory/schart"); + sUrl = "private:factory/schart"; else - sUrl = OUString("private:object"); + sUrl = "private:object"; xComponentLoader->loadComponentFromURL( sUrl, OUString( "_self" ), diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 1f160564fd7c..0f328cb27652 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -103,12 +103,12 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder ) m_pDisposeEventListeners(0), m_pStatCL(0) { - m_aInterceptedURL[0] = OUString(".uno:Save"); - m_aInterceptedURL[1] = OUString(".uno:SaveAll"); - m_aInterceptedURL[2] = OUString(".uno:CloseDoc"); - m_aInterceptedURL[3] = OUString(".uno:CloseWin"); - m_aInterceptedURL[4] = OUString(".uno:CloseFrame"); - m_aInterceptedURL[5] = OUString(".uno:SaveAs"); + m_aInterceptedURL[0] = ".uno:Save"; + m_aInterceptedURL[1] = ".uno:SaveAll"; + m_aInterceptedURL[2] = ".uno:CloseDoc"; + m_aInterceptedURL[3] = ".uno:CloseWin"; + m_aInterceptedURL[4] = ".uno:CloseFrame"; + m_aInterceptedURL[5] = ".uno:SaveAs"; } @@ -166,7 +166,7 @@ Interceptor::dispatch( if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); - aNewArgs[nInd].Name = OUString( "SaveTo" ); + aNewArgs[nInd].Name = "SaveTo"; aNewArgs[nInd].Value <<= sal_True; } @@ -194,7 +194,7 @@ Interceptor::addStatusListener( { // Save frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[0]; - aStateEvent.FeatureDescriptor = OUString("Update"); + aStateEvent.FeatureDescriptor = "Update"; aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (OUString( "($1) ") + m_pDocHolder->GetTitle() ); @@ -218,7 +218,7 @@ Interceptor::addStatusListener( { // Close and return frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i]; - aStateEvent.FeatureDescriptor = OUString("Close and Return"); + aStateEvent.FeatureDescriptor = "Close and Return"; aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (OUString( "($2) ") + m_pDocHolder->GetTitle() ); @@ -240,7 +240,7 @@ Interceptor::addStatusListener( { // SaveAs frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[5]; - aStateEvent.FeatureDescriptor = OUString("SaveCopyTo"); + aStateEvent.FeatureDescriptor = "SaveCopyTo"; aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (OUString( "($3)")); diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 64d2e03ee395..f909ba5ff2bf 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -43,8 +43,8 @@ using namespace ::com::sun::star; uno::Sequence< OUString > SAL_CALL UNOEmbeddedObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.EmbeddedObjectCreator"); - aRet[1] = OUString("com.sun.star.comp.embed.EmbeddedObjectCreator"); + aRet[0] = "com.sun.star.embed.EmbeddedObjectCreator"; + aRet[1] = "com.sun.star.comp.embed.EmbeddedObjectCreator"; return aRet; } @@ -92,7 +92,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta { // use system fallback // TODO: in future users factories can be tested - aEmbedFactory = OUString( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); + aEmbedFactory = "com.sun.star.embed.OLEEmbeddedObjectFactory"; } uno::Reference < uno::XInterface > xFact( m_xContext->getServiceManager()->createInstanceWithContext(aEmbedFactory, m_xContext) ); @@ -186,7 +186,7 @@ uno::Reference< uno::XInterface > SAL_CALL UNOEmbeddedObjectCreator::createInsta uno::Any aAny = xPropSet->getPropertyValue("MediaType"); aAny >>= aMediaType; if ( aMediaType == "application/vnd.sun.star.oleobject" ) - aEmbedFactory = OUString( "com.sun.star.embed.OLEEmbeddedObjectFactory" ); + aEmbedFactory = "com.sun.star.embed.OLEEmbeddedObjectFactory"; } catch ( const uno::Exception& ) { diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index 74b801beb415..e4a11c9d8847 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -246,11 +246,11 @@ OUString GetFlavorSuffixFromAspect( DWORD nAsp ) OUString aResult; if ( nAsp == DVASPECT_THUMBNAIL ) - aResult = OUString( ";Aspect=THUMBNAIL" ); + aResult = ";Aspect=THUMBNAIL"; else if ( nAsp == DVASPECT_ICON ) - aResult = OUString( ";Aspect=ICON" ); + aResult = ";Aspect=ICON"; else if ( nAsp == DVASPECT_DOCPRINT ) - aResult = OUString( ";Aspect=DOCPRINT" ); + aResult = ";Aspect=DOCPRINT"; // no suffix for DVASPECT_CONTENT @@ -292,7 +292,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium if ( aMedium.tymed == TYMED_MFPICT ) // Win Metafile { - aFormat = OUString("image/x-wmf"); + aFormat = "image/x-wmf"; METAFILEPICT* pMF = ( METAFILEPICT* )GlobalLock( aMedium.hMetaFilePict ); if ( pMF ) { @@ -323,7 +323,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_ENHMF ) // Enh Metafile { - aFormat = OUString("image/x-emf"); + aFormat = "image/x-emf"; nBufSize = GetEnhMetaFileBits( aMedium.hEnhMetaFile, 0, NULL ); pBuf = new unsigned char[nBufSize]; if ( nBufSize && nBufSize == GetEnhMetaFileBits( aMedium.hEnhMetaFile, nBufSize, pBuf ) ) @@ -337,7 +337,7 @@ sal_Bool OleComponentNative_Impl::ConvertDataForFlavor( const STGMEDIUM& aMedium } else if ( aMedium.tymed == TYMED_GDI ) // Bitmap { - aFormat = OUString("image/x-MS-bmp"); + aFormat = "image/x-MS-bmp"; nBufSize = GetBitmapBits( aMedium.hBitmap, 0, NULL ); pBuf = new unsigned char[nBufSize]; if ( nBufSize && nBufSize == sal::static_int_cast< ULONG >( GetBitmapBits( aMedium.hBitmap, nBufSize, pBuf ) ) ) @@ -408,7 +408,7 @@ OUString WinAccToVcl_Impl( const sal_Unicode* pStr ) { if ( *pStr == '&' ) { - aResult += OUString( "~" ); + aResult += "~"; while( *( ++pStr ) == '&' ); } else diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index dce9eba9971d..d2c9cfb7e8fe 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -109,8 +109,8 @@ uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_In uno::Sequence< OUString > SAL_CALL MSOLEDialogObjectCreator::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.MSOLEObjectSystemCreator"); - aRet[1] = OUString("com.sun.star.comp.embed.MSOLEObjectSystemCreator"); + aRet[0] = "com.sun.star.embed.MSOLEObjectSystemCreator"; + aRet[1] = "com.sun.star.comp.embed.MSOLEObjectSystemCreator"; return aRet; } @@ -215,7 +215,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia throw uno::RuntimeException(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = OUString( "URL" ); + aMediaDescr[0].Name = "URL"; aMediaDescr[0].Value <<= aFileURL; // TODO: use config helper for type detection @@ -258,9 +258,9 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia getCppuType( ( const uno::Sequence< sal_Int8 >* ) 0 ) ); aObjectInfo.Options.realloc( 2 ); - aObjectInfo.Options[0].Name = OUString( "Icon" ); + aObjectInfo.Options[0].Name = "Icon"; aObjectInfo.Options[0].Value <<= aMetafile; - aObjectInfo.Options[1].Name = OUString( "IconFormat" ); + aObjectInfo.Options[1].Name = "IconFormat"; aObjectInfo.Options[1].Value <<= aFlavor; } diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index 65bf507c9078..6545bdb6b895 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -37,8 +37,8 @@ using namespace ::com::sun::star; uno::Sequence< OUString > SAL_CALL OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.OLEEmbeddedObjectFactory"); - aRet[1] = OUString("com.sun.star.comp.embed.OLEEmbeddedObjectFactory"); + aRet[0] = "com.sun.star.embed.OLEEmbeddedObjectFactory"; + aRet[1] = "com.sun.star.comp.embed.OLEEmbeddedObjectFactory"; return aRet; } |