From 6d8cd969391c79dfbcff4a85c4c9869ba8a2bfab Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Fri, 1 Jun 2012 15:29:51 -0500 Subject: targeted string re-work Change-Id: I91a8a1410fc9a3a48b77f980c01b51bdacf6b02b --- svx/source/form/dbtoolsclient.cxx | 5 +- svx/source/gengal/gengal.cxx | 10 ++-- .../chinese_translationdialog.cxx | 12 ++-- svx/source/unodraw/unoshap4.cxx | 27 +++++---- svx/source/xml/xmlgrhlp.cxx | 66 +++++++++++----------- svx/workben/msview/msview.cxx | 22 ++++---- 6 files changed, 70 insertions(+), 72 deletions(-) (limited to 'svx') diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx index 78c04445c70f..da1ef3735d70 100644 --- a/svx/source/form/dbtoolsclient.cxx +++ b/svx/source/form/dbtoolsclient.cxx @@ -115,8 +115,7 @@ namespace svxform OSL_ENSURE(NULL == s_hDbtoolsModule, "ODbtoolsClient::registerClient: inconsistence: already have a module!"); OSL_ENSURE(NULL == s_pFactoryCreationFunc, "ODbtoolsClient::registerClient: inconsistence: already have a factory function!"); - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM( - SVLIBRARY( "dbtools" )) + const ::rtl::OUString sModuleName( SVLIBRARY( "dbtools" ) ); // load the dbtools library @@ -126,7 +125,7 @@ namespace svxform if (NULL != s_hDbtoolsModule) { // get the symbol for the method creating the factory - const ::rtl::OUString sFactoryCreationFunc( RTL_CONSTASCII_USTRINGPARAM("createDataAccessToolsFactory") ); + const ::rtl::OUString sFactoryCreationFunc( "createDataAccessToolsFactory" ); // reinterpret_cast s_pFactoryCreationFunc = (createDataAccessToolsFactoryFunction)( osl_getFunctionSymbol(s_hDbtoolsModule, sFactoryCreationFunc.pData)); diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx index f91b42e64187..acbe3d986a14 100644 --- a/svx/source/gengal/gengal.cxx +++ b/svx/source/gengal/gengal.cxx @@ -203,9 +203,9 @@ void GalApp::Init() lastSlash = fileName.lastIndexOf( '\\' ); #endif rtl::OUString baseBinDir = fileName.copy( 0, lastSlash ); - rtl::OUString installPrefix = baseBinDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/../..")); + rtl::OUString installPrefix = baseBinDir + rtl::OUString("/../.."); - rtl::OUString envVar(RTL_CONSTASCII_USTRINGPARAM("OOO_INSTALL_PREFIX")); + rtl::OUString envVar("OOO_INSTALL_PREFIX"); osl_setEnvironment(envVar.pData, installPrefix.pData); } OSL_TRACE( "OOO_INSTALL_PREFIX=%s", getenv( "OOO_INSTALL_PREFIX" ) ); @@ -225,9 +225,9 @@ void GalApp::InitUCB() { Sequence< Any > aArgs(2); aArgs[0] - <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_LOCAL)); + <<= rtl::OUString(UCB_CONFIGURATION_KEY1_LOCAL); aArgs[1] - <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE)); + <<= rtl::OUString(UCB_CONFIGURATION_KEY2_OFFICE); if (! ::ucbhelper::ContentBroker::initialize( xMSF, aArgs ) ) fprintf( stderr, "Failed to init content broker\n" ); @@ -237,7 +237,7 @@ int GalApp::Main() { bool bHelp = false; rtl::OUString aPath, aDestDir; - rtl::OUString aName(RTL_CONSTASCII_USTRINGPARAM("Default name")); + rtl::OUString aName("Default name"); sal_uInt32 nNumFrom = 0; FileNameList aFiles; diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx index c6949185410a..da7fa610fa3d 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx @@ -75,14 +75,14 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent ) SvtLinguConfig aLngCfg; sal_Bool bValue = sal_Bool(); - Any aAny( aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )) ) ); + Any aAny( aLngCfg.GetProperty( rtl::OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ) ) ); aAny >>= bValue; if( bValue ) m_aRB_To_Simplified.Check(); else m_aRB_To_Traditional.Check(); - aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )) ); + aAny = aLngCfg.GetProperty( rtl::OUString( UPN_IS_USE_CHARACTER_VARIANTS ) ); if( aAny >>= bValue ) m_aCB_Use_Variants.Check( bValue ); @@ -94,7 +94,7 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent ) m_aCB_Use_Variants.Enable( sal_False ); m_aCB_Use_Variants.Show( sal_False ); - aAny = aLngCfg.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )) ); + aAny = aLngCfg.GetProperty( rtl::OUString( UPN_IS_TRANSLATE_COMMON_TERMS ) ); if( aAny >>= bValue ) m_aCB_Translate_Commonterms.Check( bValue ); @@ -152,11 +152,11 @@ IMPL_LINK_NOARG(ChineseTranslationDialog, OkHdl) SvtLinguConfig aLngCfg; Any aAny; aAny <<= sal_Bool( !!m_aRB_To_Simplified.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_DIRECTION_TO_SIMPLIFIED )), aAny ); + aLngCfg.SetProperty( rtl::OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ), aAny ); aAny <<= sal_Bool( !!m_aCB_Use_Variants.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_USE_CHARACTER_VARIANTS )), aAny ); + aLngCfg.SetProperty( rtl::OUString( UPN_IS_USE_CHARACTER_VARIANTS ), aAny ); aAny <<= sal_Bool( !!m_aCB_Translate_Commonterms.IsChecked() ); - aLngCfg.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UPN_IS_TRANSLATE_COMMON_TERMS )), aAny ); + aLngCfg.SetProperty( rtl::OUString( UPN_IS_TRANSLATE_COMMON_TERMS ), aAny ); EndDialog( RET_OK ); return 0; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 03b723acee6c..3fe75fc23e55 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -358,8 +358,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx if( pGraphic ) { GraphicObject aObj( *pGraphic ); - aURL = OUString(RTL_CONSTASCII_USTRINGPARAM( - UNO_NAME_GRAPHOBJ_URLPREFIX)); + aURL = OUString( UNO_NAME_GRAPHOBJ_URLPREFIX); aURL += rtl::OStringToOUString(aObj.GetUniqueID(), RTL_TEXTENCODING_ASCII_US); } @@ -420,7 +419,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) ::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist(); ::rtl::OUString aPersistName; OUString aTmpStr; - if( getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )) ) >>= aTmpStr ) + if( getPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ) ) >>= aTmpStr ) aPersistName = aTmpStr; //TODO/LATER: how to cope with creation failure?! @@ -451,7 +450,7 @@ sal_Bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) } // connect the object after the visual area is set - setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), Any( aTmpStr = aPersistName ) ); + setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), Any( aTmpStr = aPersistName ) ); // the object is inserted during setting of PersistName property usually if( pOle2Obj->IsEmpty() ) @@ -474,14 +473,14 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL ) ::comphelper::IEmbeddedHelper* pPersist = mpModel->GetPersist(); uno::Sequence< beans::PropertyValue > aMediaDescr( 1 ); - aMediaDescr[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")); + aMediaDescr[0].Name = ::rtl::OUString("URL"); aMediaDescr[0].Value <<= aLinkURL; uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler(); if ( xInteraction.is() ) { aMediaDescr.realloc( 2 ); - aMediaDescr[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) ); + aMediaDescr[1].Name = ::rtl::OUString( "InteractionHandler" ); aMediaDescr[1].Value <<= xInteraction; } @@ -514,7 +513,7 @@ sal_Bool SvxOle2Shape::createLink( const ::rtl::OUString& aLinkURL ) } // connect the object after the visual area is set - setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_OLE2_PERSISTNAME )), uno::makeAny( aPersistName ) ); + setPropertyValue( OUString( UNO_NAME_OLE2_PERSISTNAME ), uno::makeAny( aPersistName ) ); // the object is inserted during setting of PersistName property usually if ( pOle2Obj->IsEmpty() ) @@ -584,7 +583,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(rtl::OUString& rHexCLSID) SvxAppletShape::SvxAppletShape( SdrObject* pObject ) throw() : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) ) { - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.AppletShape" ) ); } SvxAppletShape::~SvxAppletShape() throw() @@ -596,7 +595,7 @@ void SvxAppletShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aAppletClassId( SO3_APPLET_CLASSID ); createObject(aAppletClassId); - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.AppletShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.AppletShape" ) ); } void SAL_CALL SvxAppletShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -657,7 +656,7 @@ bool SvxAppletShape::getPropertyValueImpl( const ::rtl::OUString& rName, const S SvxPluginShape::SvxPluginShape( SdrObject* pObject ) throw() : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()) ) { - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.PluginShape" ) ); } SvxPluginShape::~SvxPluginShape() throw() @@ -669,7 +668,7 @@ void SvxPluginShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aPluginClassId( SO3_PLUGIN_CLASSID ); createObject(aPluginClassId); - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.PluginShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.PluginShape" ) ); } void SAL_CALL SvxPluginShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -730,7 +729,7 @@ bool SvxPluginShape::getPropertyValueImpl( const ::rtl::OUString& rName, const S SvxFrameShape::SvxFrameShape( SdrObject* pObject ) throw() : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool()) ) { - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.FrameShape" ) ); } SvxFrameShape::~SvxFrameShape() throw() @@ -742,7 +741,7 @@ void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage ) throw () SvxShape::Create( pNewObj, pNewPage ); const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID ); createObject(aIFrameClassId); - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.FrameShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.FrameShape" ) ); } void SAL_CALL SvxFrameShape::setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -805,7 +804,7 @@ bool SvxFrameShape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sf SvxMediaShape::SvxMediaShape( SdrObject* pObj ) throw() : SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) ) { - SetShapeType( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.MediaShape" ) ) ); + SetShapeType( rtl::OUString( "com.sun.star.drawing.MediaShape" ) ); } //---------------------------------------------------------------------- diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 68d9edefdf96..bd4954a6d348 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -143,9 +143,9 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi String aFormat; if( aGraphic.IsAnimated() ) - aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) ); + aFormat = String( "gif" ); else - aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) ); + aFormat = String( "png" ); bRet = ( rFilter.ExportGraphic( aGraphic, String(), *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 ); } @@ -439,7 +439,7 @@ sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr, if( 1 == nTokenCount ) { - rPictureStorageName = String( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICSTORAGE_NAME ) ); + rPictureStorageName = String( XML_GRAPHICSTORAGE_NAME ); rPictureStreamName = aURLStr; } else @@ -508,7 +508,7 @@ SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const ::rt aRet.xStream = aRet.xStorage->openStreamElement( rPictureStreamName, nMode ); if( aRet.xStream.is() && ( GRAPHICHELPER_MODE_WRITE == meCreateMode ) ) { - ::rtl::OUString aPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") ); + ::rtl::OUString aPropName( "UseCommonStoragePasswordEncryption" ); uno::Reference < beans::XPropertySet > xProps( aRet.xStream, uno::UNO_QUERY ); xProps->setPropertyValue( aPropName, uno::makeAny( sal_True) ); } @@ -593,12 +593,12 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt if( !aMimeType.isEmpty() ) { aAny <<= aMimeType; - xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), aAny ); + xProps->setPropertyValue( String( "MediaType" ), aAny ); } const sal_Bool bCompressed = aMimeType.isEmpty() || aMimeType == "image/tiff"; aAny <<= bCompressed; - xProps->setPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), aAny ); + xProps->setPropertyValue( String( "Compressed" ), aAny ); SvStream* pStream = utl::UcbStreamHelper::CreateStream( aStream.xStream ); if( bUseGfxLink && aGfxLink.GetDataSize() && aGfxLink.GetData() ) @@ -611,9 +611,9 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt String aFormat; if( aGraphic.IsAnimated() ) - aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "gif" ) ); + aFormat = String( "gif" ); else - aFormat = String( RTL_CONSTASCII_USTRINGPARAM( "png" ) ); + aFormat = String( "png" ); bRet = ( rFilter.ExportGraphic( aGraphic, String(), *pStream, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 ); @@ -687,7 +687,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s if( aObj.GetType() != GRAPHIC_NONE ) { maGrfObjs.push_back( aObj ); - ::rtl::OUString aBaseURL( RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE ) ); + ::rtl::OUString aBaseURL( XML_GRAPHICOBJECT_URL_BASE ); rURLPair.second = aBaseURL; rURLPair.second += rtl::OStringToOUString(aObj.GetUniqueID(), @@ -713,14 +713,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s { switch( aGfxLink.GetType() ) { - case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break; - case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break; - case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break; - case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break; - case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break; - case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break; - case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break; - case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break; + case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( ".eps" ); break; + case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( ".gif" ); break; + case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( ".jpg" ); break; + case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( ".png" ); break; + case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( ".tif" ); break; + case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( ".wmf" ); break; + case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( ".met" ); break; + case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( ".pct" ); break; case( GFX_LINK_TYPE_NATIVE_SVG ): // backward-compat kludge: since no released OOo // version to date can handle svg properly, wrap it up @@ -730,14 +730,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s if( SvtSaveOptions().GetODFDefaultVersion() <= SvtSaveOptions::ODFVER_012 ) { bUseGfxLink = false; - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) ); + aExtension = String( ".svm" ); } else - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svg" ) ); + aExtension = String( ".svg" ); break; default: - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) ); + aExtension = String( ".grf" ); break; } } @@ -746,23 +746,23 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s if( aGrfObject.GetType() == GRAPHIC_BITMAP ) { if( aGrfObject.IsAnimated() ) - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); + aExtension = String( ".gif" ); else - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); + aExtension = String( ".png" ); } else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE ) { // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() ); if ( ImplCheckForEPS( rMtf ) ) - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); + aExtension = String( ".eps" ); else - aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) ); + aExtension = String( ".svm" ); } } rtl::OUString aURLEntry; - const String sPictures( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) ); + const String sPictures( "Pictures/" ); if ( !rRequestedFileName.isEmpty() ) { @@ -885,7 +885,7 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ) rtl::OUString aParam( aToken.copy( 0, n ) ); rtl::OUString aValue( aToken.copy( n + 1, aToken.getLength() - ( n + 1 ) ) ); - const rtl::OUString sRequestedName( RTL_CONSTASCII_USTRINGPARAM("requestedName") ); + const rtl::OUString sRequestedName( "requestedName" ); if ( aParam.match( sRequestedName ) ) aRequestedFileName = aValue; } @@ -964,7 +964,7 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream() if( !aId.isEmpty() ) { - aRet = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( XML_GRAPHICOBJECT_URL_BASE )); + aRet = ::rtl::OUString( XML_GRAPHICOBJECT_URL_BASE ); aRet += aId; } } @@ -1135,15 +1135,15 @@ Reference< XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const R ::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.GraphicImportHelper" )); + return ::rtl::OUString( "com.sun.star.comp.Svx.GraphicImportHelper" ); } Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw() { // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service Sequence< ::rtl::OUString > aSupportedServiceNames( 2 ); - aSupportedServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.GraphicObjectResolver" ) ); - aSupportedServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStreamResolver" ) ); + aSupportedServiceNames[0] = ::rtl::OUString( "com.sun.star.document.GraphicObjectResolver" ); + aSupportedServiceNames[1] = ::rtl::OUString( "com.sun.star.document.BinaryStreamResolver" ); return aSupportedServiceNames; } @@ -1156,15 +1156,15 @@ Reference< XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const R ::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw() { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Svx.GraphicExportHelper" )); + return ::rtl::OUString( "com.sun.star.comp.Svx.GraphicExportHelper" ); } Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw() { // XGraphicObjectResolver and XBinaryStreamResolver are not part of any service Sequence< ::rtl::OUString > aSupportedServiceNames( 2 ); - aSupportedServiceNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.GraphicObjectResolver" ) ); - aSupportedServiceNames[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.BinaryStreamResolver" ) ); + aSupportedServiceNames[0] = ::rtl::OUString( "com.sun.star.document.GraphicObjectResolver" ); + aSupportedServiceNames[1] = ::rtl::OUString( "com.sun.star.document.BinaryStreamResolver" ); return aSupportedServiceNames; } diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx index 34841761bdb0..122dcc1fa5e1 100644 --- a/svx/workben/msview/msview.cxx +++ b/svx/workben/msview/msview.cxx @@ -755,7 +755,7 @@ void PPTDocument::Load( const rtl::OUString& rFilePath ) maStorage = new SotStorage( rFilePath, STREAM_STD_READ ); if( !maStorage->GetError() ) { - mpDocStream = maStorage->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("PowerPoint Document") ), STREAM_STD_READ ); + mpDocStream = maStorage->OpenSotStream( String( "PowerPoint Document" ), STREAM_STD_READ ); if( mpDocStream ) { DffRecordHeader aRecordHeader; @@ -867,7 +867,7 @@ PPTDocumentPtr MSViewerWorkWindow::Load() { ::sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.ppt" ) ); + String aStrFilterType( "*.ppt" ); aDlg.AddFilter( aStrFilterType, aStrFilterType ); // INetURLObject aFile( SvtPathOptions().GetPalettePath() ); // aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) ); @@ -888,19 +888,19 @@ MSViewerWorkWindow::MSViewerWorkWindow() : { Size aOutputSize( 400, 600 ); SetOutputSizePixel( aOutputSize ); - SetText( String( RTL_CONSTASCII_USTRINGPARAM( "MSViewer" ) ) ); + SetText( String( "MSViewer" ) ); Size aOutSize( GetOutputSizePixel() ); - Font aFont( String( RTL_CONSTASCII_USTRINGPARAM( "Courier" ) ), GetFont().GetSize() ); + Font aFont( String( "Courier" ), GetFont().GetSize() ); mpMenuBar = new MenuBar(); - mpMenuBar->InsertItem( 1, String( RTL_CONSTASCII_USTRINGPARAM("~File" ) ) ); + mpMenuBar->InsertItem( 1, String( "~File" ) ); mpFileMenu = new PopupMenu(); - mpFileMenu->InsertItem( 2, String( RTL_CONSTASCII_USTRINGPARAM("~View" ) ) ); - mpFileMenu->InsertItem( 3, String( RTL_CONSTASCII_USTRINGPARAM("~Compare" ) ) ); + mpFileMenu->InsertItem( 2, String( "~View" ) ); + mpFileMenu->InsertItem( 3, String( "~Compare" ) ); mpFileMenu->InsertSeparator(); - mpFileMenu->InsertItem( 4, String( RTL_CONSTASCII_USTRINGPARAM("~Quit" ) ) ); + mpFileMenu->InsertItem( 4, String( "~Quit" ) ); mpFileMenu->SetSelectHdl( LINK( this, MSViewerWorkWindow, implMenuHdl ) ); mpMenuBar->SetPopupMenu( 1, mpFileMenu ); @@ -1116,8 +1116,8 @@ void MSViewerWorkWindow::Resize() // Init UCB uno::Sequence< uno::Any > aArgs( 2 ); - aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )); - aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )); + aArgs[ 0 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY1_LOCAL ); + aArgs[ 1 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY2_OFFICE ); sal_Bool bSuccess = ::ucb::ContentBroker::initialize( xMSF, aArgs ); if ( !bSuccess ) { @@ -1142,7 +1142,7 @@ void MSViewerWorkWindow::Resize() aURL.removeSegment(); aURL.removeFinalSlash(); - aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "msview.xml" ) ) ); + aURL.Append( String( "msview.xml" ) ); load_config( aURL.GetMainURL( INetURLObject::NO_DECODE ) ); } -- cgit