From bccf34c19ae022b67565e212fa4ec0d5213947de Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 2 Jul 2012 16:02:38 +0100 Subject: ditch String::CreateFromAscii Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691 --- starmath/source/cfgitem.cxx | 4 ++-- starmath/source/eqnolefilehdr.cxx | 2 +- starmath/source/format.cxx | 2 +- starmath/source/mathtype.cxx | 2 +- starmath/source/smdetect.cxx | 10 +++++----- starmath/source/smdll.cxx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'starmath') diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index e5b9991c67f4..7bffea6c2e1a 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -41,7 +41,7 @@ using namespace com::sun::star::beans; using ::rtl::OUString; -static const char* aRootName = "Office.Math"; +static const char aRootName[] = "Office.Math"; #define SYMBOL_LIST "SymbolList" #define FONT_FORMAT_LIST "FontFormatList" @@ -409,7 +409,7 @@ const rtl::OUString SmFontFormatList::GetNewFontFormatId() const ///////////////////////////////////////////////////////////////// SmMathConfig::SmMathConfig() : - ConfigItem( String::CreateFromAscii( aRootName )) + ConfigItem(rtl::OUString(aRootName)) { pFormat = 0; pOther = 0; diff --git a/starmath/source/eqnolefilehdr.cxx b/starmath/source/eqnolefilehdr.cxx index fc59c8f4514e..eb14f0cbf82b 100644 --- a/starmath/source/eqnolefilehdr.cxx +++ b/starmath/source/eqnolefilehdr.cxx @@ -42,7 +42,7 @@ sal_Bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion ) // code snippet copied from MathType::Parse // SvStorageStreamRef xSrc = pStor->OpenSotStream( - String::CreateFromAscii("Equation Native"), + rtl::OUString("Equation Native"), STREAM_STD_READ | STREAM_NOCREATE); if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError())) return bSuccess; diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index 1a058a047f95..411c2b8e8407 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -82,7 +82,7 @@ String GetDefaultFontName( LanguageType nLang, sal_uInt16 nIdent ) "index out opd range" ); if (FNT_MATH == nIdent) - return String::CreateFromAscii( FNTNAME_MATH ); + return rtl::OUString(FNTNAME_MATH); else { const sal_uInt16 *pTable; diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 1bff46f03b9c..2f003fd64d37 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -566,7 +566,7 @@ void MathType::TypeFaceToString(String &rTxt,sal_uInt8 nFace) int MathType::Parse(SotStorage *pStor) { SvStorageStreamRef xSrc = pStor->OpenSotStream( - String::CreateFromAscii("Equation Native"), + rtl::OUString("Equation Native"), STREAM_STD_READ | STREAM_NOCREATE); if ( (!xSrc.Is()) || (SVSTREAM_OK != xSrc->GetError())) return 0; diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx index 6d51ae5503bd..6a24413fd2be 100644 --- a/starmath/source/smdetect.cxx +++ b/starmath/source/smdetect.cxx @@ -169,12 +169,12 @@ SmFilterDetect::~SmFilterDetect() bWasReadOnly = pItem && pItem->GetValue(); String aFilterName; - String aPrefix = String::CreateFromAscii( "private:factory/" ); + String aPrefix = rtl::OUString( "private:factory/" ); if( aURL.Match( aPrefix ) == aPrefix.Len() ) { const SfxFilter* pFilter = 0; String aPattern( aPrefix ); - aPattern += String::CreateFromAscii("smath"); + aPattern += rtl::OUString("smath"); if ( aURL.Match( aPattern ) >= aPattern.Len() ) { pFilter = SfxFilter::GetDefaultFilterFromFactory( aURL ); @@ -233,7 +233,7 @@ SmFilterDetect::~SmFilterDetect() { const SfxFilter* pFilter = aPreselectedFilterName.Len() ? SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : aTypeName.Len() ? - SfxFilterMatcher(String::CreateFromAscii("smath")).GetFilter4EA( aTypeName ) : 0; + SfxFilterMatcher(rtl::OUString("smath")).GetFilter4EA( aTypeName ) : 0; String aTmpFilterName; if ( pFilter ) aTmpFilterName = pFilter->GetName(); @@ -286,7 +286,7 @@ SmFilterDetect::~SmFilterDetect() if ( aTypeName.Len() ) { const SfxFilter* pFilter = - SfxFilterMatcher( String::CreateFromAscii("smath") ).GetFilter4EA( aTypeName ); + SfxFilterMatcher( rtl::OUString("smath") ).GetFilter4EA( aTypeName ); if ( pFilter ) aFilterName = pFilter->GetName(); } @@ -332,7 +332,7 @@ SmFilterDetect::~SmFilterDetect() if ( aTypeName.Len() ) { - const SfxFilter* pFilt = SfxFilterMatcher( String::CreateFromAscii("smath") ).GetFilter4EA( aTypeName ); + const SfxFilter* pFilt = SfxFilterMatcher( rtl::OUString("smath") ).GetFilter4EA( aTypeName ); if ( pFilt ) aFilterName = pFilt->GetName(); } diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx index cc585af6323e..c2e4d5e75aee 100644 --- a/starmath/source/smdll.cxx +++ b/starmath/source/smdll.cxx @@ -65,7 +65,7 @@ namespace SmModule *pModule = new SmModule( &rFactory ); *ppShlPtr = pModule; - rFactory.SetDocumentServiceName( String::CreateFromAscii("com.sun.star.formula.FormulaProperties") ); + rFactory.SetDocumentServiceName( rtl::OUString("com.sun.star.formula.FormulaProperties") ); SmModule::RegisterInterface(pModule); SmDocShell::RegisterInterface(pModule); -- cgit